Documentation ¶
Index ¶
- func IndexFromSig(bsig []byte) (uint32, error)
- func PublickeyMTHeader(h, d uint32) (byte, error)
- func Verify(bsig, msg, bpk []byte) bool
- func VerifyMT(bsig, msg, bpk []byte) bool
- type Merkle
- func (m *Merkle) DecodeMsgpack(dec *msgpack.Decoder) error
- func (m *Merkle) EncodeMsgpack(enc *msgpack.Encoder) error
- func (m *Merkle) LeafNo() uint64
- func (m *Merkle) MarshalJSON() ([]byte, error)
- func (m *Merkle) PublicKey() []byte
- func (m *Merkle) SetLeafNo(n uint64) error
- func (m *Merkle) Sign(msg []byte) []byte
- func (m *Merkle) Traverse()
- func (m *Merkle) UnmarshalJSON(b []byte) error
- type NH
- type PrivKey
- type PrivKeyMT
- func (p *PrivKeyMT) DecodeMsgpack(dec *msgpack.Decoder) error
- func (p *PrivKeyMT) EncodeMsgpack(enc *msgpack.Encoder) error
- func (p *PrivKeyMT) LeafNo() uint64
- func (p *PrivKeyMT) MarshalJSON() ([]byte, error)
- func (p *PrivKeyMT) PublicKey() []byte
- func (p *PrivKeyMT) SetLeafNo(n uint64) error
- func (p *PrivKeyMT) Sign(msg []byte) []byte
- func (p *PrivKeyMT) UnmarshalJSON(b []byte) error
- type PublicKey
- type PublicKeyMT
- type Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexFromSig ¶
IndexFromSig returns index of merkle from the signature bsig.
func PublickeyMTHeader ¶
PublickeyMTHeader returns first 1 byte of public key of XMSS^MT
Types ¶
type Merkle ¶
type Merkle struct { //Leaf is the number of unused leaf. Leaf uint32 Height uint32 // contains filtered or unexported fields }
Merkle represents MerkleTree for XMSS.
func (*Merkle) DecodeMsgpack ¶
DecodeMsgpack unmarshals JSON to Merkle.
func (*Merkle) EncodeMsgpack ¶
EncodeMsgpack marshals Merkle into valid JSON.
func (*Merkle) MarshalJSON ¶
MarshalJSON marshals Merkle into valid JSON.
func (*Merkle) Traverse ¶
func (m *Merkle) Traverse()
Traverse refreshes auth and stacks and increment leafe number.
func (*Merkle) UnmarshalJSON ¶
UnmarshalJSON unmarshals JSON to Merkle.
type NH ¶
type NH struct {
// contains filtered or unexported fields
}
NH represents a node in a merkle tree.
func (*NH) DecodeMsgpack ¶
DecodeMsgpack unmarshals NH.
func (*NH) EncodeMsgpack ¶
EncodeMsgpack marshals NH into valid msgpack.
func (*NH) MarshalJSON ¶
MarshalJSON marshals NH into valid JSON.
func (*NH) UnmarshalJSON ¶
UnmarshalJSON unmarshals NH .
type PrivKey ¶
type PrivKey struct {
// contains filtered or unexported fields
}
PrivKey is a private key of XMSS.
func (*PrivKey) DecodeMsgpack ¶
DecodeMsgpack unmarshals msgpack to PrivKey.
func (*PrivKey) EncodeMsgpack ¶
EncodeMsgpack marshals PrivKey into valid msgpack.
func (*PrivKey) MarshalJSON ¶
MarshalJSON marshals PrivKey into valid JSON.
func (*PrivKey) UnmarshalJSON ¶
UnmarshalJSON unmarshals JSON to PrivKey.
type PrivKeyMT ¶
type PrivKeyMT struct {
// contains filtered or unexported fields
}
PrivKeyMT is a private key of XMSS^MT.
func NewPrivKeyMT ¶
NewPrivKeyMT returns XMSS^MT private key.
func (*PrivKeyMT) DecodeMsgpack ¶
DecodeMsgpack unmarshals msgpack to PrivKey.
func (*PrivKeyMT) EncodeMsgpack ¶
EncodeMsgpack marshals PrivKeyMT into valid msgpack.
func (*PrivKeyMT) MarshalJSON ¶
MarshalJSON marshals PrivKeyMT into valid JSON.
func (*PrivKeyMT) UnmarshalJSON ¶
UnmarshalJSON unmarshals JSON to PrivKeyMT.
type PublicKey ¶
PublicKey for xmss
func DeserializePK ¶
DeserializePK deserialized bytes to XMSS PublicKey.
type PublicKeyMT ¶
PublicKeyMT for xmss^MT
func DeserializeMT ¶
func DeserializeMT(key []byte) (*PublicKeyMT, error)
DeserializeMT deserialized bytes to XMSS^MT PublicKey.
func (*PublicKeyMT) Serialize ¶
func (p *PublicKeyMT) Serialize() ([]byte, error)
Serialize returns serialized bytes of XMSS^MT PublicKey.
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
Stack is a stack to use in merkle traversing.
func (*Stack) DecodeMsgpack ¶
DecodeMsgpack unmarshals Stack to msgpack.
func (*Stack) EncodeMsgpack ¶
EncodeMsgpack marshals Stack into valid msgpack.
func (*Stack) MarshalJSON ¶
MarshalJSON marshals Stack into valid JSON.
func (*Stack) UnmarshalJSON ¶
UnmarshalJSON unmarshals Stack to JSON.