Skip Ratchet Logo

Skip Ratchet

This library implements the Skip Ratchet paper. Skip ratchet is a data structure for deriving keys that maintain backward secrecy. Unlike hash chains, this data structure is capable of efficiently making large leaps in hash count.

Usage

Creating a new ratchet and advancing it.

```rs use skip_ratchet::Ratchet;

let mut ratchet = Ratchet::new(); ratchet.inc_by(10);

println!("{}", ratchet.derive_key()); ```

Getting the previous versions of a ratchet.

```rs use skip_ratchet::Ratchet;

let mut oldratchet = Ratchet::new(); oldratchet.inc_by(5);

let mut recentratchet = old.clone(); recentratchet.inc_by(10);

for revision in recentratchet.previous(&oldratchet, 10) { println!("{:?}", String::from(&revision)); } ```

Building the Project

Other Implementations