X25519Api class abstract interface

X25519 (Curve25519 Diffie-Hellman, RFC 7748) operations.

Implementers

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

diffieHellman({required List<int> privateKey, required List<int> peerPublic}) → BuBytes
Computes the 32-byte shared secret from 32-byte privateKey and 32-byte peerPublic. Throws on invalid lengths or an all-zero (low-order) result.
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.
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.
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.
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 LE u coordinate via the RFC 7748 ladder. Returns the 32-byte shared u-coordinate. Throws on invalid lengths or non-canonical u.

Operators

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