rokdocs
v0.1

rok::core::crypto::x25519

X25519 (RFC 7748): Diffie-Hellman on Curve25519's u coordinate.

Structs

X25519

pub struct X25519

X25519 key agreement. Keys are 32 bytes.

  • pub fn public_key(secret: Bytes) throws (ValueError) -> List<u8>

    The public key of a 32-byte secret (clamped as RFC 7748 says).

  • pub fn shared_secret(secret: Bytes, peer_public: Bytes) throws (ValueError) -> Secret | none

    The shared secret with peer_public; none when it is all zero (a small-order peer key, RFC 7748 6.1).