CryptGuard Lite
Overview
CryptGuard Lite is a compact and intuitive library that wraps the crypt_guard crate, making its core functionalities easily accessible and manageable. This library provides essential cryptographic operations, including key generation, encryption, decryption, and digital signing, with support for multiple key variants such as Falcon and Dilithium. Its streamlined interface ensures a straightforward integration into your projects, offering robust security mechanisms with minimal complexity.
Features
- Key Generation: Generate public and private key pairs for Falcon and Dilithium key variants.
- Encryption/Decryption: Perform encryption and decryption using AES and XChaCha20 with support for various key sizes.
- Digital Signing: Create and verify digital signatures using Falcon and Dilithium key pairs.
- Support for Multiple Key Sizes: Works with different key sizes for both Falcon and Dilithium.
Installation
Add the following to your Cargo.toml:
[]
= "1.2.10"
= "0.2.1"
Usage
Key Variants
The library supports two key variants:
Signing
Creating a Signature
use KDFSignature;
use crateFalcon;
let key_size = 512;
let = keypair.unwrap;
let mut guard = signature;
let data = b"your message".to_vec;
let signature = guard.signed_data.unwrap;
Verifying a Signature
let mut guard = signature;
let verified = guard.verify.unwrap;
assert!;
Encryption
AES Encryption
let key_size = 1024;
let passphrase = "password".to_string;
let = keypair.unwrap;
let mut guard = cryptography;
let data = b"your data".to_vec;
let = guard.aencrypt.unwrap;
let mut guard = cryptography;
let decrypted_data = guard.adecrypt.unwrap;
assert_eq!;
XChaCha20 Encryption
let key_size = 1024;
let passphrase = "password".to_string;
let = keypair.unwrap;
let mut guard = cryptography;
let data = b"your data".to_vec;
let = guard.xencrypt.unwrap;
let mut guard = cryptography;
let decrypted_data = guard.xdecrypt.unwrap;
assert_eq!;
License
This project is licensed under the MIT License. See the LICENSE file for details.