Crates.io | challenge-bypass-ristretto |
lib.rs | challenge-bypass-ristretto |
version | 2.0.0 |
source | src |
created_at | 2018-12-14 03:42:22.503153 |
updated_at | 2024-06-20 18:14:47.733181 |
description | A rust implemention of the privacy pass cryptographic protocol using the Ristretto group (WIP) |
homepage | |
repository | https://github.com/brave-intl/challenge-bypass-ristretto |
max_upload_size | |
id | 101831 |
size | 109,325 |
A rust implemention of the privacy pass cryptographic protocol using the Ristretto group.
This library utilizes the wonderful curve25519-dalek which is a pure-Rust implementation of group operations on Ristretto.
It is only an implementation of the cryptographic protocol, it does not provide a service or FFI for use by other languages.
This crate is still a work in progress and is not yet recommended for external use.
This library exposes some functions intended to assist FFI creation but does not implement a FFI itself.
For FFI see challenge-bypass-ristretto-ffi.
As originally implemented in the challenge bypass server and extension repositories, blinded tokens enable internet users to anonymously bypass internet challenges (CAPTCHAs).
In this use case, upon completing a CAPTCHA a user is issued tokens which can be redeemed in place of completing further CAPTCHAs. The issuer can verify that the tokens are valid but cannot determine which user they were issued to.
This method of token creation is generally useful as it allows for authorization in a way that is unlinkable. This library is intended for use in applications where these combined properties may be useful.
A short description of the protocol follows, a more detailed writeup is also available.
The blinded token protocol has two parties and two stages. A client and issuer first perform the signing stage, after which the client is able to derive tokens which can later be used in the redemption phase.
The client prepares random tokens, blinds those tokens such that the issuer cannot determine the original token value, and sends them to the issuer. The issuer signs the tokens using a secret key and returns them to the client. The client then reverses the original blind to yield a signed token.
The client proves the validity of their signed token to the server. The server marks the token as spent so it cannot be used again.
WARNING this library has not been audited, use at your own risk!
See tests/e2e.rs
.
Run cargo bench
This software attempts to ensure the following:
Given that:
By default this crate uses std
and the u64_backend
of curve25519-dalek. However it is no-std
compatible and the other curve25519-dalek
backends can be selected.
The optional features include base64
and serde
.
base64
exposes methods for base64 encoding / decoding of the various structures.serde
implements the serde Serialize
/ Deserialize
traits.Install rust.
Run cargo build
Run cargo test