Crate ntrumls [−] [src]
This crate implements the NTRUMLS library in Rust. It is an interface to the reference NTRUMLS implementation. NTRUMLS is a modular latice signature based in NTRU, which avoids the security issues of NTRUSign. More on NTRUMLS here.
NTRU is a faster encryption / decryption scheme, that uses latice based encryption to provide quantum proof security. More on NTRUEncrypt here.
To use this library, you need to include this in your crate:
extern crate ntrumls;
Examples
To generate the keys that will be used during encryption / decryption, you have to use the
generate_keys()
function. These keys must not be used in NTRUEncrypt nor in other
encryption schemes, since they are specifically generated for this purpose. Example:
use ntrumls::params::{ParamSet, XXX_20151024_743}; let params = XXX_20151024_743; let (private_key, public_key) = ntrumls::generate_keys(¶ms).unwrap(); let mut message = b"Hello from NTRUMLS!"; let signature = ntrumls::sign(&private_key, &public_key, message).unwrap(); assert!(ntrumls::verify(&signature, &public_key, message));
Modules
params |
NTRUMLS parameter module |
Structs
PrivateKey |
NTRUMLS private key |
PublicKey |
NTRUMLS public key |
Functions
generate_keys |
Generates a public and private key pair |
sign |
Signs a message |
verify |
Verifies a signed message |