Falcon class

The Falcon signature scheme for a given degree n (a power of two, 2..1024).

final falcon = Falcon(512);
final (sk, vk) = falcon.keygen();
final sig = falcon.sign(sk, message);
assert(falcon.verify(vk, message, sig));
Available extensions

Constructors

Falcon(int n)

Properties

hashCode int
The hash code for this object.
no setterinherited
n int
no setter
param FalconParams
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

hashToPoint(Uint8List message, Uint8List salt) List<int>
Hash message (bound to salt) to a point in Z_qx/(x^n+1).
keygen({List<List<int>>? polys, RandomBytes? randombytes}) → (SecretKey, Uint8List)

Available on Falcon, provided by the FalconKeygen extension

Generate a key pair (secretKey, verificationKey).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sign(SecretKey sk, Uint8List message, {RandomBytes? randombytes}) Uint8List

Available on Falcon, provided by the FalconSign extension

Sign message with sk. If randombytes is provided it is used both as the salt source and to seed the per-attempt ChaCha20 sampler, making the signature reproducible (and byte-identical to the reference). When null, a secure source is used directly.
toString() String
A string representation of this object.
inherited
verify(Uint8List vk, Uint8List message, Uint8List signature) bool

Available on Falcon, provided by the FalconVerify extension

Verify signature over message against the verification key vk.

Operators

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