Skip Ratchet Logo

Skip Ratchet

Crate Information Code Coverage Build Status License Docs Discord

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.

Outline

Usage

Creating a new ratchet and advancing it.

```rust use skip_ratchet::Ratchet;

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

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

Getting the previous versions of a ratchet.

```rust use skip_ratchet::Ratchet;

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

let mut recentratchet = oldratchet.clone(); recentratchet.incby(10);

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

Building the Project

Testing the Project

Contributing

Pre-commit Hook

This library recommends using pre-commit for running pre-commit hooks. Please run this before every commit and/or push.

Conventional Commits

This project lightly follows the Conventional Commits convention to help explain commit history and tie in with our release process. The full specification can be found here. We recommend prefixing your commits with a type of fix, feat, docs, ci, refactor, etc..., structured like so:

``` [optional scope]:

[optional body]

[optional footer(s)] ```

Getting Help

For usage questions, usecases, or issues reach out to us in our Discord webnative-fs channel. We would be happy to try to answer your question or try opening a new issue on Github.

License

This project is licensed under the Apache License 2.0.