GithubHelp home page GithubHelp logo

p4u / go-blindsecp256k1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arnaucube/go-blindsecp256k1

0.0 1.0 0.0 3.83 MB

Blind signatures over secp256k1

License: GNU General Public License v3.0

Go 89.76% Shell 0.51% HTML 1.72% JavaScript 8.01%

go-blindsecp256k1's Introduction

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 := Blind(msg, signerR)

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

// user: unblinds the blinded signature
sig := Unblind(sBlind, msg, 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.

go-blindsecp256k1's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.