core::crypto::x25519
이 페이지의 내용
- Structs
PrivateKey5PublicKey2
API 참조는 영어로만 있습니다. 표준 라이브러리 소스의 영어 문서 주석에서 만듭니다.
X25519 (RFC 7748): Diffie-Hellman on Curve25519's u coordinate.
Structs
PrivateKeySource
pub struct PrivateKeyA private key: 32 bytes in secret storage (clamped when used, as
RFC 7748 says). It has one owner (let b = a moves it); wipe and
its release clear it.
Sourcepub fn from_bytes<B: AsBytes>(§bytes: B) throws (ValueError) -> PrivateKey The key of 32 bytes; throws
ValueErroron another length.A copy of the 32 bytes.
The public key that pairs with this one.
The shared secret with
peer;nonewhen it is all zero (a small-order peer key, RFC 7748 6.1).Overwrite the key with zeros now (every copy shares it).
PublicKeySource
pub struct PublicKeyA public key: a 32-byte u coordinate.
Sourcepub fn from_bytes<B: AsBytes>(§bytes: B) throws (ValueError) -> PublicKey Any 32 bytes (RFC 7748 5: every u coordinate is accepted).
The key's 32 bytes.