Documentation ¶
Overview ¶
Copyright (c) 2018-2019 by mottla Use of this source code is governed by an MIT license that can be found in the LICENSE file.
Index ¶
- func PrepareRingSig_random(in RingSignature, cosigners int) (signerPosition int, signerPrivatekey *ecdsa.PrivateKey, ...)
- func RandFieldElement(c elliptic.Curve) (k *big.Int)
- type LSAGsignature
- func (s *LSAGsignature) AddKeyImage(priv *ecdsa.PrivateKey)
- func (s *LSAGsignature) GetCurve() elliptic.Curve
- func (s *LSAGsignature) Sign(id uint64, candidate common.Address, pubKeys []*ecdsa.PublicKey, ...)
- func (s LSAGsignature) String() string
- func (s *LSAGsignature) Verify(id uint64, candidate common.Address, pubKeys []*ecdsa.PublicKey) bool
- type RingSignature
- type Sigma
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrepareRingSig_random ¶
func PrepareRingSig_random(in RingSignature, cosigners int) (signerPosition int, signerPrivatekey *ecdsa.PrivateKey, pkps []*ecdsa.PublicKey)
creates a signature template with random cosigners and random signer position usefull for testing
Types ¶
type LSAGsignature ¶
func NewLSAG ¶
func NewLSAG(key *ecdsa.PrivateKey) (ls *LSAGsignature)
returns a new Linkable Spontaneous Anonymous Group Signature Struct. if key is set, ls can be used for signing and verification. If not, ls can be used for verification only
func (*LSAGsignature) AddKeyImage ¶
func (s *LSAGsignature) AddKeyImage(priv *ecdsa.PrivateKey)
Initializes the Key Image which is necessary for signing, validating and the prevention of doublespending after all
func (*LSAGsignature) GetCurve ¶
func (s *LSAGsignature) GetCurve() elliptic.Curve
func (*LSAGsignature) Sign ¶
func (s *LSAGsignature) Sign(id uint64, candidate common.Address, pubKeys []*ecdsa.PublicKey, signerKey *ecdsa.PrivateKey, signerPosition int)
create a Linkable Spontaneous Anonymous Groups Signature asserts that the calling Sigma was prepared properly by calling PrepareRingSig_random(..) before produces a ring signature on a given Curve for a given message as input using the scheme in https://bitcointalk.org/index.php?topic=972541.msg10619684#msg10619684 note that len(Sigma.Ci) =1 != len(Sigma.Si)=len(pubKeys), and therefore the signature requires approximately half the storage as a Traceable Ring Signature produced by SignTRS(...)
func (LSAGsignature) String ¶
func (s LSAGsignature) String() string
type RingSignature ¶
type RingSignature interface { Sign(id uint64, candidate common.Address, pubKeys []*ecdsa.PublicKey, signerKey *ecdsa.PrivateKey, signerPosition int) Verify(id uint64, candidate common.Address, pubKeys []*ecdsa.PublicKey) bool AddKeyImage(priv *ecdsa.PrivateKey) // contains filtered or unexported methods }
Directories ¶
Path | Synopsis |
---|---|
Package secp256k1 implements support for the elliptic curves needed for decred.
|
Package secp256k1 implements support for the elliptic curves needed for decred. |
util
|
|
ethereum/abi
Package abi implements the Ethereum ABI (Application Binary Interface).
|
Package abi implements the Ethereum ABI (Application Binary Interface). |
ethereum/abi/bind
Package bind generates Ethereum contract Go bindings.
|
Package bind generates Ethereum contract Go bindings. |
ethereum/common
Package common contains various helper functions.
|
Package common contains various helper functions. |
ethereum/common/bitutil
Package bitutil implements fast bitwise operations.
|
Package bitutil implements fast bitwise operations. |
ethereum/common/compiler
Package compiler wraps the Solidity compiler executable (solc).
|
Package compiler wraps the Solidity compiler executable (solc). |
ethereum/common/hexutil
Package hexutil implements hex encoding with 0x prefix.
|
Package hexutil implements hex encoding with 0x prefix. |
ethereum/common/math
Package math provides integer math utilities.
|
Package math provides integer math utilities. |
ethereum/common/mclock
package mclock is a wrapper for a monotonic clock source
|
package mclock is a wrapper for a monotonic clock source |
ethereum/sha3
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
|
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202. |