Crates.io | rust-blind-rsa-signatures |
lib.rs | rust-blind-rsa-signatures |
version | 0.1.0 |
source | src |
created_at | 2021-02-25 23:27:25.447738 |
updated_at | 2021-02-25 23:27:25.447738 |
description | RSA blind signatures in pure Rust |
homepage | https://github.com/jedisct1/rust-blind-rsa-signatures |
repository | https://github.com/jedisct1/rust-blind-rsa-signatures |
max_upload_size | |
id | 360739 |
size | 12,688 |
Author-blinded RSASSA-PSS RSAE signatures.
This is an implementation of the RSA Blind Signatures proposal, based on the Zig implementation.
A client asks a server to sign a message. The server receives the message, and returns the signature.
Using that (message, signature)
pair, the client can locally compute a second, valid (message', signature')
pair.
Anyone can verify that (message', signature')
is valid for the server's public key, even though the server didn't see that pair before.
But no one besides the client can link (message', signature')
to (message, signature)
.
Using that scheme, a server can issue a token and verify that a client has a valid token, without being able to link both actions to the same client.
(message, signature)
pair that can be verified using the server's public key.(message, signature)
is valid, without knowing when step 2 occurred.The scheme was designed by David Chaum, and was originally implemented for anonymizing DigiCash transactions.
let kp = KeyPair::generate(2048)?;
let (pk, sk) = (kp.pk, kp.sk);
let msg = b"test";
let blinding_result = pk.blind(msg)?;
let blind_sig = sk.blind_sign(&blinding_result.blind_msg)?;
let sig = pk.finalize(&blind_sig, &blinding_result.secret, &msg)?;
sig.verify(&pk, msg)?;