CryptoNote1

package
v0.0.0-...-ba3c928 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

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

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

func RandFieldElement

func RandFieldElement(c elliptic.Curve) (k *big.Int)

RandFieldElement returns a random element of the field underlying the given Curve using the procedure given in [NSA] A.2.1.

Types

type LSAGsignature

type LSAGsignature struct {
	Sigma
	elliptic.Curve
}

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

func (*LSAGsignature) Verify

func (s *LSAGsignature) Verify(id uint64, candidate common.Address, pubKeys []*ecdsa.PublicKey) bool

checks weather the given LSAG signature is valid according to verification rules in MRL-0005 returns true if valid, false otherwise

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
}

type Sigma

type Sigma struct {
	Ix, Iy *big.Int //keyimage I=xH(P)
	//position of signer Public Key in the pubKeys Array. Should be assigned randomly.
	Ci []*big.Int //commitment for TRS. In LSAG only len(Ci)=1
	Si []*big.Int //commitment for LSAG and TRS
}

func (Sigma) String

func (s Sigma) String() string

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.

Jump to

Keyboard shortcuts

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