Skip to main content

Module keypair

Module keypair 

Source
Expand description

§Public/secret keypair tools

Provides an implementation for handling public/private keypairs based on libsodium’s crypto_box, which uses X25519.

With the protected feature, KeyPair also provides locked-memory constructors such as KeyPair::generate_locked_keypair; the key types come from protected.

Structs§

KeyPair
Public/secret keypair for use with crate::dryocbox::DryocBox and libsodium-compatible public-key encryption.

Functions§

is_valid_public_key
Checks if the given public key is valid according to X25519 rules.

Type Aliases§

PublicKey
Stack-allocated public key type alias.
SecretKey
Stack-allocated secret key type alias.
StackKeyPair
Stack-allocated key pair type alias.