Skip to content
/ KT2 Public

KeyTree2 (KT2) is a 2nd generation, quantum-resistant cryptographic library used for Atlas' Data Access Layer

License

Notifications You must be signed in to change notification settings

aciedo/KT2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KT2

KeyTree2 (KT2) is a 2nd generation, quantum-resistant cryptographic library used for Atlas' Data Access Layer. It is effectively a wrapper around multiple cryptographic primitives:

  • Symmetric encryption: AES-256-GCM from ring
  • Signatures: modified Dilithium3 from CRYSTALS (we've reduced SHAKE256's rounds down to 12), taken from crystals-dilithium
  • Hashes: BLAKE3 from blake3
  • Key encapsulation: Kyber768 from CRYSTALS from safe_pqc_kyber

Use at Your Own Risk
This library has not yet undergone a formal security audit by a recognized authority. As a result, there may be unknown security vulnerabilities, weaknesses, or potential flaws in the code. Users are advised to exercise caution when implementing or using this code.


Build

cargo build --release

How to use

use d3::Keypair;

let keypair = Keypair::generate(Some(&seed));
let sk = keypair.secret;
// pk is also available as keypair.public
let signature = keypair.sign(&msg);
// public key can now be separately derived from the secret key
let pk = PublicKey::from_sk(&sk);
let is_verified = pk.verify(&msg, &signature);

Test

cargo test

Benchmarks

Benchmarks are run using criterion.rs:

cargo bench

Running on an Apple M1 Max

Benchmark time
keypair generation 93.799 µs
signing 125.73 µs
signature verification 82.825 µs

Docs

cargo doc --open

Contributor Agreement

By contributing to this repository, you agree that your contributions will be licensed under the GPLv3 License.

About

KeyTree2 (KT2) is a 2nd generation, quantum-resistant cryptographic library used for Atlas' Data Access Layer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages