xcrypto

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddKeys

func AddKeys(a, b types.Key) (ret types.Key, err error)

func AddKeys2

func AddKeys2(a, b, B types.Key) (ret types.Key, err error)

func BytesToWords

func BytesToWords(sec types.SecretKey, lang string) (string, error)

BytesToWords convert recover_key to words

func CheckKey

func CheckKey(key types.PublicKey) bool

func CheckRingSignature

func CheckRingSignature(prefix types.Hash, keyImage types.KeyImage, pks []types.PublicKey, sig *types.Signature) bool

CheckRingSignature true means RingSignature ok.

func DerivationToScalar

func DerivationToScalar(derivation types.KeyDerivation, outIndex int) (res types.EcScalar, err error)

DerivationToScalar key-derivation to ec-scalar

func DerivePublicKey

func DerivePublicKey(derivation types.KeyDerivation, outIndex int, pub types.PublicKey) (derPub types.PublicKey, err error)

DerivePublicKey derive sub public-key

func DeriveSecretKey

func DeriveSecretKey(derivation types.KeyDerivation, outIndex int, sec types.SecretKey) (derSec types.SecretKey, err error)

DeriveSecretKey derive sub secret-key

func DeriveSubaddressPublicKey

func DeriveSubaddressPublicKey(pub types.PublicKey, derivation types.KeyDerivation, outIndex int) (derPub types.PublicKey, err error)

DeriveSubaddressPublicKey derive public-key for subaddress.

func EcdhDecode

func EcdhDecode(masked *types.EcdhTuple, sharedSec types.Key, shortAmount bool) bool

EcdhDecode decode ecdhTuple info

func EcdhEncode

func EcdhEncode(unmasked *types.EcdhTuple, sharedSec types.Key, shortAmount bool) bool

EcdhEncode encode ecdhTuple info

func GenC

func GenC(a types.Key, amount types.Lk_amount) (ret types.Key, err error)

void x_genC(rct_key_t c,rct_key_t a,unsigned long long amount);

func GenerateKeyDerivation

func GenerateKeyDerivation(pub types.PublicKey, sec types.SecretKey) (der types.KeyDerivation, err error)

GenerateKeyDerivation generate KeyDerivation

func GenerateKeyImage

func GenerateKeyImage(pub types.PublicKey, sec types.SecretKey) (ki types.KeyImage, err error)

GenerateKeyImage generate key_image

func GenerateKeys

func GenerateKeys(recoverKey types.SecretKey) (sk types.SecretKey, pk types.PublicKey)

GenerateKeys generate secret_key and public_key

func GenerateRingSignature

func GenerateRingSignature(prefix types.Hash, keyImage types.KeyImage, pks []types.PublicKey, sec types.SecretKey, secIndex uint) (*types.Signature, error)

GenerateRingSignature --

func GetSubaddress

func GetSubaddress(keys *types.AccountKey, index uint32) (addr types.AccountAddress)

GetSubaddress get sub public_key pair by index

func GetSubaddressSecretKey

func GetSubaddressSecretKey(main types.SecretKey, index uint32) (sub types.SecretKey)

GetSubaddressSecretKey get sub secret_key by index.

func ScAdd

func ScAdd(a, b types.EcScalar) (ret types.Key)

void x_sc_add(ec_scalar_t s, ec_scalar_t a, ec_scalar_t b);

func ScSub

func ScSub(a, b types.EcScalar) (ret types.Key)

void x_sc_sub(ec_scalar_t s, ec_scalar_t a, ec_scalar_t b);

func Scalarmult8

func Scalarmult8(p types.Key) (ret types.Key, err error)

Computes 8P x_scalarmult8(rct_key_t p ,rct_key_t ret);

func ScalarmultBase

func ScalarmultBase(a types.Key) (ret types.Key)

func ScalarmultH

func ScalarmultH(a types.Key) (ret types.Key)

func ScalarmultKey

func ScalarmultKey(p, a types.Key) (ret types.Key, err error)

func SecretAdd

func SecretAdd(a, b types.SecretKey) (r types.SecretKey)

SecretAdd : r = a+b

func SecretKeyToPublicKey

func SecretKeyToPublicKey(sec types.SecretKey) (pub types.PublicKey, err error)

SecretKeyToPublicKey get public-key from secret-key

func SkGen

func SkGen() (ret types.Key)

void x_skGen(rct_key_t key);

func SkpkGen

func SkpkGen() (sk types.Key, pk types.Key)

func TlvAddKeyV

func TlvAddKeyV(a types.KeyV) (sum types.Key, err error)

func TlvGetPreMlsagHash

func TlvGetPreMlsagHash(rctsign *types.RctSig) (key types.Key, err error)

func TlvGetSubaddress

func TlvGetSubaddress(keys *types.AccountKey, index uint32) (addr types.AccountAddress, err error)

func TlvKeyVTest

func TlvKeyVTest(keysie int) error

func TlvProveRangeBulletproof

func TlvProveRangeBulletproof(amounts types.KeyV, sk types.KeyV) (b *types.Bulletproof, c types.KeyV, masks types.KeyV, err error)

func TlvProveRangeBulletproof128

func TlvProveRangeBulletproof128(amounts types.KeyV, sk types.KeyV) (b *types.Bulletproof, c types.KeyV, masks types.KeyV, err error)

func TlvProveRctMGSimple

func TlvProveRctMGSimple(message types.Key, pubs types.CtkeyV, inSk types.Ctkey, a, Count types.Key, mscout *types.Key, kLRki *types.MultisigKLRki, index uint32) (sig *types.MgSig, err error)

func TlvRctSign

func TlvRctSign(rctsign *types.RctSig) error

func TlvRctsigForTest

func TlvRctsigForTest(rctsign *types.RctSig) (*types.RctSig, error)

func TlvVerBulletproof

func TlvVerBulletproof(bp *types.Bulletproof) (bool, error)

func TlvVerBulletproof128

func TlvVerBulletproof128(bp *types.Bulletproof) (bool, error)

func TlvVerRctNotSemanticsSimple

func TlvVerRctNotSemanticsSimple(rctsign *types.RctSig) bool

func TlvVerRctSimple

func TlvVerRctSimple(rctsign *types.RctSig) (error, bool)

func WordsToBytes

func WordsToBytes(words string) (sec types.SecretKey, err error)

WordsToBytes convert words to recover_key

func ZeroCommit

func ZeroCommit(amount types.Lk_amount) (ret types.Key, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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