mirror of
https://github.com/arnaucube/go-blindsecp256k1.git
synced 2026-02-06 19:16:40 +01:00
c3e4afc5529278df8ace6dad7aeae79883ce06c8
go-blindsecp256k1

Blind signature over secp256k1, based on "An Efficient Blind Signature Scheme Based on the Elliptic Curve Discrete Logarithm Problem" paper.
WARNING: this repo is experimental, do not use in production.
Usage
// message to be signed
msg := new(big.Int).SetBytes([]byte("test"))
// create new signer
signerPrivateData := blindsecp256k1.NewSigner()
signerPublicData := signerPrivateData.PublicData()
// user blinds the msg
msgBlinded, user := blindsecp256k1.Blind(msg, signerPublicData)
// signer signs the blinded message
sBlind := signerPrivateData.BlindSign(msgBlinded)
// user unblinds the blinded signature
sig := blindsecp256k1.Unblind(sBlind, msg, user)
// signature can be verified with signer PublicKey
verified := blindsecp256k1.Verify(msg, sig, signerPublicData.Q)
assert.True(t, verified)
WASM usage
WASM wrappers for browser usage can be found at the wasm directory with an example in html&js.
Languages
Go
93.3%
JavaScript
5.2%
HTML
1.1%
Shell
0.4%