Mercurial Signature
This is a simple implementation of the Mercurial signature scheme which is instroduced in the paper Delegatable Anonymous Credentials from Mercurial Signatures, by Elizabeth C. Crites and Anna Lysyanskaya.
A mercurial signature, which allows a signature
sig
on a messagem
under public keypk
to be transformed into a signaturesig'
on an equivalent but unlinkable messagem'
under an equivalent but unlinkable public keypk'
.
The crate implements the signature scheme with use of the elliptic curve Bls12-381
. It uses the dependencies from Arkworks which is a rust ecosystem for cryptography.
Note: this repository has not been thoroughly audited. Please take your own risk if you use it in production environment.
Example
use ;
use UniformRand;
use thread_rng;
type G1 = G1;
type Fr = Fr;
let mut rng = thread_rng;
let pp = new;
let = pp.key_gen;
let mut message = .map.;
let mut sig = sk.sign;
// Convert keys and signatures (i.e. randomization)
let p = rand;
pk.convert;
sk.convert; // not necessary for the following steps.
sig.convert;
// public key, secret key and the signatre are different now.
// Change the message and signature (i.e. randomization)
let u = rand;
change_representation;
// message and the signature are different now.
// Verification can still pass.
assert!;