From e5f0e122a766cc966df2821989d81bf252256dae Mon Sep 17 00:00:00 2001 From: arnaucube Date: Sun, 10 Jan 2021 17:25:06 +0100 Subject: [PATCH] Add README.md --- README.md | 28 ++++++++++++++++++++++++++++ blindsecp256k1.go | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..6766e77 --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# go-blindsecp256k1 +Blind signature over [secp256k1](https://en.bitcoin.it/wiki/Secp256k1), based on *"[An Efficient Blind Signature Scheme Based on the Elliptic CurveDiscrete Logarithm Problem](http://www.isecure-journal.com/article_39171_47f9ec605dd3918c2793565ec21fcd7a.pdf)"* paper. + +**WARNING**: this repo is experimental, do not use in production. + +## Usage + +```go +// 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) +``` diff --git a/blindsecp256k1.go b/blindsecp256k1.go index 85d3548..35d0120 100644 --- a/blindsecp256k1.go +++ b/blindsecp256k1.go @@ -1,5 +1,7 @@ // Package blindsecp256k1 implements the Blind signature scheme explained at // http://www.isecure-journal.com/article_39171_47f9ec605dd3918c2793565ec21fcd7a.pdf +// +// LICENSE can be found at https://github.com/arnaucube/go-blindsecp256k1/blob/master/LICENSE package blindsecp256k1 // WARNING: WIP code