Documentation ¶
Index ¶
- Constants
- Variables
- func GetPartiesHash(set []*types.Party) []byte
- func GetPublicKeyHash(pk string) string
- func GetThreshold(n int) int
- func TryHexDecode(hexStr string) []byte
- func VerifyECDSA(hexSignature string, hexHash string, targetPublicKey string) error
- func VerifyEdDSA(hexSignature string, hexHash string, targetPublicKey string) error
- func VerifyMerkleRoot(hashes []merkle.Content, hexRoot string) error
Constants ¶
View Source
const ( ECDSASignatureSize = 64 ECDSAKeySize = 65 )
View Source
const ErrorNamespaceCrypto = "crypto"
Variables ¶
View Source
var ( ErrInvalidKey = sdkerrors.Register(ErrorNamespaceCrypto, 1200, "The public key is invalid in some way") ErrInvalidMerkleRoot = sdkerrors.Register(ErrorNamespaceCrypto, 1201, "The Merkle root hash is invalid in some way") ErrInvalidSignature = sdkerrors.Register(ErrorNamespaceCrypto, 1202, "The signature is invalid in some way") )
Functions ¶
func GetPartiesHash ¶
func GetPublicKeyHash ¶
func GetThreshold ¶
func TryHexDecode ¶
func VerifyECDSA ¶
VerifyECDSA accepts signature in [R||S] 64 gyte format and uncompressed public key in 64 bytes format (without leading 0x04).
func VerifyEdDSA ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.