Crates.io | skip_ratchet |
lib.rs | skip_ratchet |
version | 0.3.0 |
source | src |
created_at | 2022-08-19 11:25:34.252401 |
updated_at | 2023-07-19 14:30:59.294703 |
description | Skip ratchet |
homepage | |
repository | |
max_upload_size | |
id | 648659 |
size | 114,049 |
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.
use skip_ratchet::Ratchet;
let mut ratchet = Ratchet::new();
ratchet.inc_by(10);
println!("{:?}", ratchet.derive_key());
use skip_ratchet::Ratchet;
let mut old_ratchet = Ratchet::new();
old_ratchet.inc_by(5);
let mut recent_ratchet = old_ratchet.clone();
recent_ratchet.inc_by(10);
for revision in recent_ratchet.previous(&old_ratchet, 10).unwrap() {
println!("{:#?}", revision);
}
Clone the repository.
git clone https://github.com/WebNativeFileSystem/rs-skip-ratchet.git
Change directory
cd rs-skip-ratchet
Build the project
cargo build
Run tests
cargo test
This library recommends using pre-commit for running pre-commit hooks. Please run this before every commit and/or push.
pre-commit install
to setup the pre-commit hooks locally. This will reduce failed CI builds.git commit -a -m "Your message here" --no-verify
.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:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
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.
This project is licensed under the Apache License 2.0.