PqRsa class

PKCS#1 v1.5 and PSS signatures. Byte-oriented.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

generateKeyPair({int modulusBits = 2048}) → ({Uint8List exponent, Uint8List modulus, PqRsaPrivateKey privateKey})
Generates a key with a 2048, 3072, or 4096 bit modulus and e = 65537.
signPkcs1({required PqRsaPrivateKey privateKey, required Uint8List message, required PqRsaHash hash}) → Uint8List
PKCS#1 v1.5 signature. hash selects the DigestInfo. The message is hashed inside the signer. FIPS mode rejects SHA-1 and a modulus under 2048 bits.
signPss({required PqRsaPrivateKey privateKey, required Uint8List message, required PqRsaHash hash, int? saltLength}) → Uint8List
RSASSA-PSS. saltLength defaults to the hash length. Trailer is 0xBC. FIPS mode rejects SHA-1 and a modulus under 2048 bits.
verifyPkcs1({required Uint8List modulus, required Uint8List exponent, required Uint8List message, required Uint8List signature, required PqRsaHash hash}) → bool
Returns false for a bad modulus, exponent, length, or signature. FIPS mode also returns false for SHA-1 and a modulus under 2048 bits.
verifyPss({required Uint8List modulus, required Uint8List exponent, required Uint8List message, required Uint8List signature, required PqRsaHash hash, int? saltLength}) → bool
Returns false for a bad modulus, exponent, length, or signature.