Skip to content

lubux/key-derivation-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Key Derivation Tree

Build Status

Rust implementation of the key derivation tree used in TimeCrypt(Link).

Build

cargo build

Usage

Initialize the Key Derivation Tree with the master secret key and 32 bit inputs.

let key = [0u8; 16];
let prf = ConstrainedPrf::init(32, key);

Derive the i-th key.

let key_out = prf.apply(i).unwrap();

Give access to the keys in the range [1,15).

let node_keys = prf.constrain(1, 15).unwrap();

Initialize the Key Derivation Tree with the constrained nodes.

let prf2 = ConstrainedPrf::new(32, node_keys);
// derive key ok
let key_out = prf.apply(2).unwrap();
// derive key error
let key_out = prf.apply(0).unwrap();

Benchmark

cargo bench

Disclaimer

This is a research prototype.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages