You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
arnaucube 8ac13100e7 Add test hash odd bytes for js compatibility 2 weeks ago
.github/workflows Add WASM wrappers & compiled 1 month ago
v0 Update `Unblind` inputs removing unnecessary `m` 3 weeks ago
wasm Add checks to inputs at Blind & BlindSign 2 weeks ago
.gitignore Add WASM wrappers & compiled 1 month ago
.golangci.yml Add GHA (tests & lint), add descr, update readme 1 month ago
LICENSE init repo add LICENSE 1 month ago
README.md Add checks to inputs at Blind & BlindSign 2 weeks ago
blindsecp256k1.go Add test hash odd bytes for js compatibility 2 weeks ago
blindsecp256k1_test.go Add test hash odd bytes for js compatibility 2 weeks ago
go.mod Update interface 1 month ago
go.sum Update interface 1 month ago
parsers.go add NewPublicKeyFromECDSA 3 weeks ago
parsers_test.go Signature.S mod N 3 weeks ago

README.md

go-blindsecp256k1 GoDoc Go Report Card Test

Blind signature over secp256k1, based on "New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem" paper by Hamid Mala & Nafiseh Nezhadansari.

WARNING: this repo is experimental, do not use in production.

Usage

// signer: create new signer key pair
sk := NewPrivateKey()
signerPubK := sk.Public()

// signer: when user requests new R parameter to blind a new msg,
// create new signerR (public) with its secret k
k, signerR := NewRequestParameters()

// user: blinds the msg using signer's R
msg := new(big.Int).SetBytes([]byte("test"))
msgBlinded, userSecretData, err := Blind(msg, signerR)
require.Nil(t, err)

// signer: signs the blinded message using its private key & secret k
sBlind, err := sk.BlindSign(msgBlinded, k)
require.Nil(t, err)

// user: unblinds the blinded signature
sig := Unblind(sBlind, userSecretData)

// signature can be verified with signer PublicKey
verified := Verify(msg, sig, signerPubK)
assert.True(t, verified)

WASM usage

WASM wrappers for browser usage can be found at the wasm directory with an example in html&js.