Compare commits

...

10 Commits
perf ... trunk

4 changed files with 24 additions and 16 deletions

View File

@ -1,7 +1,7 @@
[package]
name = "fuzzytags"
description = "a probabilistic cryptographic structure for metadata resistant tagging"
version = "0.5.0"
version = "0.6.0"
repository = "https://git.openprivacy.ca/openprivacy/fuzzytags"
authors = ["Sarah Jamie Lewis <sarah@openprivacy.ca>"]
edition = "2018"
@ -12,13 +12,13 @@ keywords = ["fuzzytags","privacy","metadata-resistance","ristretto","cryptograph
[dependencies]
hex = "0.4.2"
rand_core = "0.6.0"
rand ="0.8.3"
curve25519-dalek = { package = "curve25519-dalek-ng", version="4.0.1", features=["serde"]}
rand_core = "0.5.0"
rand ="0.7"
curve25519-dalek = { package = "curve25519-dalek", version="3.2", features=["serde"]}
sha3 = "0.9.1"
serde = {version="1.0.123", features=["derive"]}
bit-vec = {version="0.6.3"}
brute-force = {git="https://git.openprivacy.ca/sarah/brute-force.git", version="0.2.0", features=["curve25519"], optional=true}
brute-force = {version="0.1.1", features=["curve25519"], optional=true}
rayon = {version="1.5.0", optional=true}
[dev-dependencies]

View File

@ -52,6 +52,11 @@ parameter choices in addition to other factors when deploying fuzzytags to real-
For more guidance (and warnings) on integrating fuzzytags into a privacy preserving application see [documentation](https://docs.rs/fuzzytags/#integrating-fuzzytags)
## Building
This crate requires experimental features currently only provided by Rust nightly:
` rustup default nightly`
## Terminology and a more detailed System Description
@ -89,7 +94,7 @@ A party first needs to generate `RootSecret`
use fuzzytags::RootSecret;
use rand::rngs::OsRng;
let mut rng = OsRng::default();
let mut rng = OsRng;
let secret = RootSecret::<24>::generate(&mut rng);
From the secret detection key a party can derive a `DetectionKey` which can be given to adversarial server to
@ -107,7 +112,7 @@ Once in possession of a tagging key, a party in a metadata resistant app can use
use fuzzytags::RootSecret;
use rand::rngs::OsRng;
let mut rng = OsRng::default();
let mut rng = OsRng;
let secret = RootSecret::<24>::generate(&mut rng);
let tagging_key = secret.tagging_key();
@ -125,7 +130,7 @@ This extracted key can then be given to an adversarial server. The server can th
use fuzzytags::RootSecret;
use rand::rngs::OsRng;
let mut rng = OsRng::default();
let mut rng = OsRng;
let secret = RootSecret::<24>::generate(&mut rng);
let tagging_key = secret.tagging_key();
// extract a detection key
@ -151,7 +156,7 @@ opens up applications like **multiple broadcast** and **deniable sending**.
use fuzzytags::{RootSecret, TaggingKey};
use rand::rngs::OsRng;
let mut rng = OsRng::default();
let mut rng = OsRng;
let secret_1 = RootSecret::<24>::generate(&mut rng);
let secret_2 = RootSecret::<24>::generate(&mut rng);
let tagging_key_1 = secret_1.tagging_key(); // give this to a sender
@ -171,7 +176,7 @@ of different approaches e.g.:
use fuzzytags::Tag;
use rand::rngs::OsRng;
let mut rng = OsRng::default();
let mut rng = OsRng;
let secret = RootSecret::<24>::generate(&mut rng);
let tagging_key = secret.tagging_key();
@ -189,10 +194,14 @@ of different approaches e.g.:
## Benchmarks
We use [criterion](https://crates.io/crates/criterion) for benchmarking, and benchmarks can run using `cargo bench`
We use [criterion](https://crates.io/crates/criterion) for benchmarking, and benchmarks can run using `cargo bench --bench fuzzy_tags_benches`
Results will be in `target/criterion/report/index.html`.
To benchmark entangled tags run:
`cargo bench --features "entangled" --bench entangled`
### AVX2
This crate has support for the avx2 under the feature `simd`, to take advantage of this feature it is

View File

@ -1,5 +1,5 @@
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use fuzzytags::{RootSecret, TaggingKey};
use fuzzytags::{RootSecret};
use rand::rngs::OsRng;
use std::time::Duration;

View File

@ -1,7 +1,6 @@
#![deny(missing_docs)]
#![feature(external_doc)]
#![doc(include = "../README.md")]
#![doc(include = "../ANONYMITY.md")]
#![doc = include_str!("../README.md")]
#![doc = include_str!("../ANONYMITY.md")]
#![doc(html_logo_url = "https://git.openprivacy.ca/openprivacy/fuzzytags/media/branch/trunk/FuzzyTags_Logo.png")]
use bit_vec::BitVec;
use curve25519_dalek::constants::RISTRETTO_BASEPOINT_POINT;
@ -534,7 +533,7 @@ impl<const GAMMA: u8> TaggingKey<{ GAMMA }> {
// Once the ciphertext has been computed, we use a master trapdoor for the chameleon hash (which is part of the schemes DetectionKey) in order to compute a collision (y,m) where m
// is a hash of the remaining components of the ciphertext"
// Translated m is a challenge over the random element u and the ordered ciphertexts
// Translated, m is a challenge over the random element u and the ordered ciphertexts
// It is then used to construct a response y which can be used to recover w the random element
// used to derive the key.