Expand description
Pure Rust implementation of libsodium’s sealed box encryption/decryption.
This crate provides a standalone implementation of the sealed box functionality from libsodium (NaCl) using only pure Rust cryptographic libraries. It is fully compatible with sealed boxes created by libsodium/sodiumoxide.
§Features
seal: Create a sealed box for a recipient’s public keyopen_sealed_box: Open a sealed box using the recipient’s keypair- Pure Rust implementation with no C dependencies
Structs§
- Public
Key - A Diffie-Hellman public key
- Static
Secret - A Diffie-Hellman secret key that can be used to compute multiple
SharedSecrets.
Constants§
- PUBLICKEYBYTES
- The length of a Curve25519 public key in bytes (for compatibility with sealed box format)
Functions§
- generate_
keypair - Generate a new X25519 keypair for use with sealed box operations
- open_
sealed_ box - Opens a sealed box using RustCrypto libraries.
- public_
key_ from_ bytes - Convenience function to convert a public key from bytes to the PublicKey type
- seal
- Creates a sealed box for a message using a recipient’s public key.
- secret_
key_ from_ bytes - Convenience function to convert a secret key from bytes to the StaticSecret type