const ErrorInvalidHashType: u64 = 3;
const ErrorInvalidPubKey: u64 = 2;
const ErrorInvalidSignature: u64 = 1;
const SHA256: u8 = 0;
const ErrorInvalidMessageLength: u64 = 4;
Maximum exponent (e) length (bytes) for RSASSA-PKCS1-V1_5 with SHA-256 (RS256)
const RSASSA_PKCS1_V1_5_MAXIMUM_EXPONENT_LENGTH: u64 = 512;
Minimum exponent (e) length (bytes) for RSASSA-PKCS1-V1_5 with SHA-256 (RS256)
const RSASSA_PKCS1_V1_5_MINIMUM_EXPONENT_LENGTH: u64 = 1;
Minimum modulus (n) length (bits) for RSASSA-PKCS1-V1_5 with SHA-256 (RS256)
const RSASSA_PKCS1_V1_5_MINIMUM_MODULUS_LENGTH: u64 = 2048;
Message length for the Sha2-256 hash function
const SHA256_MESSAGE_LENGTH: u64 = 32;
public fun sha256(): u8
Verifies a RSA signature from public modulus (n) and public exponent (e) over RSASSA-PKCS1-V1_5 with SHA-256 (RS256). The message will be the original message with hashing in-function.
Verifies a RSA signature from public modulus (n) and public exponent (e) over RSASSA-PKCS1-V1_5 with SHA-256 (RS256). The message will be the hashed using SHA256 before the verification.
public fun verify_prehash(signature: &vector<u8>, n: &vector<u8>, e: &vector<u8>, msg: &vector<u8>, hash_type: u8): bool