PqEcdsaP256 class
ECDSA over NIST P-256, byte-oriented and self-contained.
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(
) → ({Uint8List publicKey, Uint8List secretKey}) - Generates a fresh P-256 key pair.
-
publicKeyFromPrivate(
Uint8List privateKey) → Uint8List -
Derives the uncompressed SEC1 public key (
0x04 || X || Y) for the 32-byte private scalarprivateKeyasd · G. -
sign(
{required Uint8List privateKey, required Uint8List message}) → Uint8List -
Signs
messagewithprivateKey(a 32-byte scalar), returningr || s. -
verify(
{required Uint8List publicKey, required Uint8List message, required Uint8List signature}) → bool -
Verifies a raw
r || ssignatureovermessageunderpublicKey.
Constants
- privateKeyBytes → const int
- Private scalar length in bytes.
- publicKeyBytes → const int
-
Uncompressed SEC1 public-key length in bytes (
0x04 || X || Y). - signatureBytes → const int
-
Raw
r || ssignature length in bytes.