Documentation ¶
Overview ¶
variable names to match names in the crypto protocol Package mlsag contains the implementation of MLSAG, a ring signature scheme.
variable names to match names in the crypto protocol
variable names to match names in the crypto protocol
Index ¶
- Constants
- func ParseKeyImages(privateKeys []*operation.Scalar) []*operation.Point
- func ParseKeyImagesCA(privateKeys []*operation.Scalar) []*operation.Point
- func Verify(sig *Sig, K *Ring, message []byte) (bool, error)
- func VerifyConfidentialAsset(sig *Sig, K *Ring, message []byte) (bool, error)
- type Mlsag
- type Ring
- type Sig
- func (sig *Sig) FromBytes(b []byte) (*Sig, error)
- func (sig Sig) GetC() *operation.Scalar
- func (sig Sig) GetKeyImages() []*operation.Point
- func (sig Sig) GetR() [][]*operation.Scalar
- func (sig *Sig) SetC(c *operation.Scalar)
- func (sig *Sig) SetKeyImages(keyImages []*operation.Point)
- func (sig *Sig) SetR(r [][]*operation.Scalar)
- func (sig *Sig) ToBytes() ([]byte, error)
Constants ¶
const ( MlsagPrefix = byte(0x2) MaxSizeByte = (1 << 8) - 1 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mlsag ¶
type Mlsag struct { R *Ring // contains filtered or unexported fields }
Mlsag struct contains the data needed to sign a Ring.
pi : the row index of the "real" coins
func (*Mlsag) Sign ¶
Sign uses the private key in this Mlsag to sign a message (which is the transaction hash). It returns a Sig.
func (*Mlsag) SignConfidentialAsset ¶
SignConfidentialAsset uses the private key in this Mlsag to sign a message (which is the transaction hash). It returns a mlsag.Sig.
The Ring for Confidential Asset transactions has one extra column; it contains the asset tag sums.
type Ring ¶
type Ring struct {
// contains filtered or unexported fields
}
Ring is the struct for a MLSAG ring. It is a matrix of public keys. One of these rows is the actual coin transfer, others consist of "decoy" public keys from the chain data.
func NewRandomRing ¶
NewRandomRing creates a random ring with dimension: (numFake; len(privateKeys)) where we generate fake public keys inside
type Sig ¶
type Sig struct {
// contains filtered or unexported fields
}
Sig is the ring signature that appears on transactions.