NativeSr25519SigningApi class
Native (FFI) implementation of sr25519 (Schnorrkel) key derivation/ signing/verification/VRF operations.
- Implemented types
Constructors
- NativeSr25519SigningApi(BuSr25519SigningApi api)
-
const
Properties
- api → BuSr25519SigningApi
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
derivePublic(
{required List< int> publicKey, required List<int> chainCode32, List<int> ? message}) → (BuBytes, BuBytes) -
Public HDKD derive from 32-byte
publicKeyand 32-bytechainCode32with optionalmessage. Returns (publicKey32, chainCode32). Throws on invalid lengths.override -
dleqProve(
{required List< int> seedOrSk, required List<int> inout64, required List<int> nonce64, List<int> ? extra, bool fromSeed = true, bool uniform = false, bool kusamaVrf = true}) → BuBytes -
DLEQ proof (c‖s = 64).
inout64= input‖output.override -
dleqVerify(
{required List< int> publicKey, required List<int> inout64, required List<int> proof64, List<int> ? extra, bool kusamaVrf = true}) → bool -
Verifies 64-byte DLEQ
proof64over 64-byteinout64(input‖output) for 32-bytepublicKeywith optionalextra. Returns true on valid, false on invalid, throws on bad lengths.override -
hardDerive(
{required List< int> seedOrSk, required List<int> chainCode32, List<int> ? message, bool fromSeed = true, bool uniform = false}) → (BuBytes, BuBytes) -
Hard HDKD derive from
seedOrSk(32-byte seed whenfromSeedelse 64-byte secret) and 32-bytechainCode32with optionalmessage. Returns (secret64, chainCode32). Throws on invalid lengths.override -
isValidPublicKey(
List< int> pk32) → bool -
True if 32-byte
pk32is a valid Ristretto-compressed public key, else false, never throws for bad length.override -
isValidSecretKey(
List< int> sk) → bool -
True if
sk(32-byte seed or 64-byte secret) has a canonical key part, else false, never throws for bad length.override -
normalizePublicKey(
List< int> publicKey) → BuBytes? -
Validates 32-byte
publicKeyand returns its canonical base encoding, or null when invalid (bad length, range, curve membership, or identity).override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
publicKeyFromSecret(
List< int> sk64) → BuBytes -
Derives 32-byte public key from 64-byte
sk64. Throws on invalid secret length.override -
publicKeyFromSeed(
List< int> seed32, {bool uniform = false}) → BuBytes -
Derives 32-byte public key from 32-byte
seed32;uniformselects ExpandSecretKeys expansion over ed25519 expansion. Throws on invalid seed length.override -
secretFromSeed(
List< int> seed, {bool uniform = false}) → BuBytes -
Expands 32-byte
seedinto 64-byte secret (key‖nonce);uniformselects ExpandSecretKeys expansion. Throws on invalid seed length.override -
sign(
{required List< int> seedOrSk, required List<int> message, required List<int> nonce64, bool fromSeed = true, bool uniform = false, List<int> ? context}) → BuBytes -
64-byte Schnorrkel signature over
messagewith 64-bytenonce64;seedOrSkis 32-byte seed whenfromSeedelse 64-byte secret,uniformselects expansion, optionalcontext. Throws on invalid lengths.override -
softDerive(
{required List< int> seedOrSk, required List<int> chainCode32, required List<int> newNonce32, List<int> ? message, bool fromSeed = true, bool uniform = false}) → (BuBytes, BuBytes) -
Soft HDKD derive from
seedOrSk(32-byte seed whenfromSeedelse 64-byte secret), 32-bytechainCode32and 32-bytenewNonce32with optionalmessage. Returns (secret64, chainCode32). Throws on invalid lengths.override -
toEd25519Bytes(
List< int> sk64) → BuBytes -
Converts 64-byte sr25519 secret
sk64to 64-byte ed25519-expanded bytes (scalar multiplied by cofactor). Throws on invalid length.override -
toString(
) → String -
A string representation of this object.
inherited
-
verify(
{required List< int> publicKey, required List<int> message, required List<int> signature, List<int> ? context}) → bool -
Verifies 64-byte
signatureovermessagefor 32-bytepublicKeywith optionalcontext. Returns true on valid, false on invalid, throws on bad lengths.override -
vrfHash(
{required List< int> publicKey, required List<int> message, List<int> ? context}) → BuBytes -
VRF input point H from SigningContext + message + pk.
override
-
vrfInOut(
{required List< int> seedOrSk, required List<int> message, bool fromSeed = true, bool uniform = false, List<int> ? context}) → BuBytes -
VRF (input32‖output32).
override
-
vrfSign(
{required List< int> seedOrSk, required List<int> message, required List<int> nonce64, bool fromSeed = true, bool uniform = false, List<int> ? context, List<int> ? extra, bool kusamaVrf = true}) → BuBytes -
96-byte VRF signature (preOut32‖proof64) over
messagewith 64-bytenonce64;seedOrSkis 32-byte seed whenfromSeedelse 64-byte secret, optionalcontext/extra,kusamaVrfselects transcript variant. Throws on invalid lengths.override -
vrfVerify(
{required List< int> publicKey, required List<int> message, required List<int> preOut32, required List<int> proof64, List<int> ? context, List<int> ? extra, bool kusamaVrf = true}) → bool -
Verifies VRF
proof64and 32-bytepreOut32overmessagefor 32-bytepublicKeywith optionalcontext/extra. Returns true on valid, false on invalid, throws on bad lengths.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited