| Crates.io | laqf2 |
| lib.rs | laqf2 |
| version | 0.1.1 |
| created_at | 2025-01-06 21:46:51.562478+00 |
| updated_at | 2025-01-08 18:59:16.120807+00 |
| description | v2 of the LAQ-Fort Encryption Scheme |
| homepage | |
| repository | https://github.com/zanderlewis/laqf-2 |
| max_upload_size | |
| id | 1506235 |
| size | 25,806 |
Laqf2 is a hybrid encryption scheme that combines Kyber and AES-GCM with Argon2 and HMAC-SHA256. It also employs encoding data to Mandelbrot points for more secure encryption.
It is also the second version of the LAQ-Fort (Lattice Authenticated Quantum Fortress, an originally messy crate) encryption scheme.
new(): Create a new Laqf2 instance.generate_salt() -> Vec<u8>: Generate a random salt.generate_kyber_keypair() -> (PublicKey, SecretKey): Generate a Kyber keypair.encrypt(data: &[u8], password: &str, pk: &PublicKey, salt: &[u8]) -> Vec<u8>: Encrypt data using Kyber and AES-GCM.decrypt(encrypted_data: &[u8], password: &str, sk: &SecretKey, salt: &[u8]) -> Vec<u8>: Decrypt data using Kyber and AES-GCM.use laqf2::Laqf2;
fn main() {
let laqf = Laqf2::new();
let (pk, sk) = laqf.generate_kyber_keypair();
let data = b"Hello, world!";
let password = "password";
let salt = laqf.generate_salt();
let encrypted_data = laqf.encrypt(data, password, &pk, &salt);
let decrypted_data = laqf.decrypt(&encrypted_data, password, &sk, &salt);
assert_eq!(data, decrypted_data.as_slice());
}