urs

package module
v0.0.0-...-dfe7ae2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2014 License: MIT Imports: 7 Imported by: 0

README

Unique Ring Signatures (URS)

URS can be used to sign messages 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.

Documentation

Overview

Package urs implements Unique Ring Signatures, as defined in short version: http://csiflabs.cs.ucdavis.edu/~hbzhang/romring.pdf full version: http://eprint.iacr.org/2012/577.pdf

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Verify

func Verify(R *PublicKeyRing, m []byte, rs *RingSign) bool

Verify verifies the signature in rs of m using the public key ring, R. Its return value records whether the signature is valid.

Types

type PrivateKey

type PrivateKey struct {
	PublicKey
	D *big.Int
}

PrivateKey corresponds to a ECDSA private key.

func GenerateKey

func GenerateKey(c elliptic.Curve, rand io.Reader) (priv *PrivateKey, err error)

GenerateKey generates a public and private key pair.

type PublicKey

type PublicKey struct {
	elliptic.Curve
	X, Y *big.Int
}

PublicKey corresponds to a ECDSA public key.

func (PublicKey) String

func (k PublicKey) String() string

type PublicKeyRing

type PublicKeyRing struct {
	Ring []PublicKey
}

PublicKeyRing is a list of public keys.

func NewPublicKeyRing

func NewPublicKeyRing(cap uint) *PublicKeyRing

NewPublicKeyRing creates a new public key ring. All keys added to the ring must use the same curve.

func (*PublicKeyRing) Add

func (r *PublicKeyRing) Add(pub PublicKey)

Add adds a public key, pub to the ring. All keys added to the ring must use the same curve.

func (*PublicKeyRing) Bytes

func (r *PublicKeyRing) Bytes() (b []byte)

Bytes returns the public key ring as a byte slice.

func (*PublicKeyRing) Len

func (r *PublicKeyRing) Len() int

Len returns the length of ring.

type RingSign

type RingSign struct {
	X, Y *big.Int
	C, T []*big.Int
}

func Sign

func Sign(rand io.Reader, priv *PrivateKey, R *PublicKeyRing, m []byte) (rs *RingSign, err error)

Sign signs an arbitrary length message (which should NOT be the hash of a larger message) using the private key, priv and the public key ring, R. It returns the signature as a struct of type RingSign. The security of the private key depends on the entropy of rand. The public keys in the ring must all be using the same curve.

func (*RingSign) String

func (k *RingSign) String() string

this is just for debugging; we probably don't want this for anything else

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL