Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Verify ¶
Verify takes a message and a signature Bundle and attempts to verify the bundle based on bundle's implemented Alg, the sig, and the pubkey. Verify returns a simple true or false.
func VerifyNaclSign ¶
VerifyNaclSign takes a message and a Bundle and bool indicating if the message is verified ny the signature.
func VerifyXMSS10 ¶
VerifyXMSS10 takes a message and a Bundle and bool indicating if the message is verified ny the signature.
Types ¶
type Alg ¶
type Alg int32
Alg type is used for setting the Algorithm in a Signature Set
const ( // AlgNaClSign is meant for Nacl Sign implementations AlgNaClSign Alg // AlgXMSS10 is meant for xmss sha2_10_256 AlgXMSS10 )
type Bundle ¶
Bundle is used to encapsulate an Algorithm implementation, A Public Key, and a Signature. A Bundle is designed to be used to verify the integrity of the Payload.
type NaClSign ¶
type NaClSign struct {
PrivateKey [64]byte
}
NaClSign holds a pointer to a 64 byte array used by NaCl Sign. It implements the Signer interface.
func GenNaclSign ¶
func GenNaclSign() *NaClSign
GenNaclSign returns a randomly generated ed25519 private key in a NaClSign
func NewNaClSign ¶
NewNaClSign takes a ed25519 private key as a byte array and returns a NaClSign
type XMSS10 ¶
type XMSS10 struct { PrivateKey [132]byte // contains filtered or unexported fields }
XMSS10 holds a pointer to a 132 byte array used by XMSS. It implements the Signer interface.
func GenXMSS10 ¶
func GenXMSS10() *XMSS10
GenXMSS10 returns a randomly generated XMSS SHA2_10_256 private key in a NaClSign