ddn.crypto.key.x25519
X25519 Keys.
Types 2
classX25519PublicKey : PublicKey
X25519 Public Key. Contains the 32-byte u-coordinate (Little Endian).
Fields
ubyte[32] uMethods
Constructors
this(const(ubyte)[] uBytes)classX25519PrivateKey : PrivateKey
X25519 Private Key. Contains the 32-byte secret scalar (Little Endian).
Fields
ubyte[32] scalarMethods
X25519PrivateKey generate(SecureRandom rng)Generates a random X25519 private key.Constructors
this(const(ubyte)[] scalarBytes)Destructors
Functions 4
fn
ubyte[] encodeX25519Spki(X25519PublicKey key)Encodes an X25519 public key as DER SubjectPublicKeyInfo (RFC 8410).fn
X25519PublicKey decodeX25519Spki(const(ubyte)[] der)Decodes an X25519 public key from DER SubjectPublicKeyInfo (RFC 8410).fn
ubyte[] encodeX25519Pkcs8(X25519PrivateKey key)Encodes an X25519 private key as DER PKCS#8 PrivateKeyInfo (RFC 8410).fn
X25519PrivateKey decodeX25519Pkcs8(const(ubyte)[] der)Decodes an X25519 private key from DER PKCS#8 PrivateKeyInfo (RFC 8410).