Coder Social home page Coder Social logo

urs's Introduction

Unique Ring Signatures (URS)

URS can be used to sign plaintext or binaries anonymously (among a group of known users). That is a user can sign a message, hiding among a group of known/registered users, that prevents the verifier from revealing the signer's identity other than knowing that it is in the set of registered users. The size of the set of registered users is flexible. Increasing this number slows down signing and verifying linearly, and also increases the size of the signatures linearly.

Bitcoin public and private keys are used to generate the signatures. You may generate your own keypairs with the set-generate function described below. Bitcoin addresses are also generated.

When in default (unique) mode, signatures are generated with the prefix '1' and contain immutable Hx, Hy values as the first two bigints in the signature. These are immutable per message and private key. That is, any single message signed with the same private key and keyring will always generate the same Hx, Hy values, so for this single message you can identify if multiple members of the keyring have signed (but not which one).

Signature blinding has also been implemented. Blind signatures are prefixed with '2'. While blind signatures lose their Hx, Hy uniqueness, they use an ephemeral key to generate that signature that is afterwards discarded. This will prevents someone in the future from being able to identify which member of the ring signaturesigned the message, even if all private keys for the public keys in the keyring are later revealed.

For more information on signature blinding, refer to this link.

Requirements

Go 1.2 or newer.

Installation

With Go installed, run the following command: $ go get github.com/monero-project/urs/...

Usage

-B=false: Enable signature blinding (non-unique!); B|blind

-S="": Load a Base58 signature to verify; S|sig (filename)

-b="": Verify a binary message; b|verify-bin (filename)

-blind=false: Enable signature blinding (non-unique!); B|blind

-g="": Generates to a new keypair; g|set-generate (filename)

-k="": Load a keyring of pubkeys; k|keyring (filename)

-keypair="": Load a keypair to sign from; p|keypair (filename)

-keyring="": Load a keyring of pubkeys; k|keyring (filename)

-p="": Load a keypair to sign from; p|keypair (filename)

-s="": Sign a text message; s|verify-bin (filename)

-set-generate="": Generates to a new keypair; g|set-generate (filename)

-sig="": Load a Base58 signature to verify; S|sig (filename)

-sign-bin="": Sign a text message; z|verify-bin (filename)

-sign-text="": Sign a binary message; s|verify-bin (filename)

-v="": Verify a text message; v|verify-text (filename)

-verify-bin="": Verify a binary message; b|verify-bin (filename)

-verify-text="": Verify a text message; v|verify-text (filename)

-z="": Sign a binary message; z|verify-bin (filename)

Example usage

Generate signature example

$ urs -sign-bin urs -keypair pair.key -keyring pubkeyring.keys > signature

Verify signature example

$ urs -verify-bin urs -sig signature -keyring pubkeyring.keys

Acknowledgements

  • Andytoshi and Gmaxwell for their signature blinding scheme.

  • Conformal Systems for generating the btcec lib, so that secp256k1 could be used.

  • Hein Meling for the initial library for the ring signatures.

urs's People

Contributors

meling avatar

Watchers

James Cloos 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.