ValidatedX25519Api class
X25519Api wrapper that validates every argument's length before delegating.
- Implemented types
Constructors
- ValidatedX25519Api(X25519Api inner)
Properties
Methods
-
diffieHellman(
{required List< int> privateKey, required List<int> peerPublic}) → BuBytes -
Computes the 32-byte shared secret from 32-byte
privateKeyand 32-bytepeerPublic. Throws on invalid lengths or an all-zero (low-order) result.override -
fromEd25519PublicKey(
List< int> ed25519Pk) → BuBytes -
Converts a 32-byte ed25519 public key (compressed Edwards y) to its 32-byte Montgomery u-coordinate
(1+y)/(1-y). Throws on invalid points.override -
fromEd25519Seed(
List< int> seed) → BuBytes -
Derives the 32-byte clamped X25519 scalar from a 32-byte ed25519
seed(SHA-512, clamp first half). Throws on invalid length.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
publicKey(
List< int> privateKey) → BuBytes -
Derives the 32-byte public key from 32-byte
privateKey(clamped scalar-mult with base point u = 9). Throws on invalid length.override -
toString(
) → String -
A string representation of this object.
inherited
-
x25519(
{required List< int> scalar, required List<int> u}) → BuBytes -
Multiplies 32-byte
scalar(clamped) by 32-byte LEucoordinate via the RFC 7748 ladder. Returns the 32-byte shared u-coordinate. Throws on invalid lengths or non-canonicalu.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited