WOTSHash class

WOTS Hash Chain Implementation

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

addrToBytes(ByteBuffer addr) ByteArray
Convert address buffer to bytes in little-endian format. This function reads bytes from the ByteBuffer and manually reorders them to produce a little-endian byte array, assuming the ByteBuffer's get_() method reads bytes in the order they were put (likely big-endian if putInt was used with BIG_ENDIAN order, or just sequential).
prf(ByteArray out, int offset, ByteArray input, ByteArray key) ByteArray
PRF (Pseudo-Random Function) implementation. This function calculates a hash based on padding, a key, and an input.
setChainAddr(ByteBuffer addr, int chain) → void
Set chain address in the address buffer. Modifies the provided ByteBuffer's position and writes the chain value.
setHashAddr(ByteBuffer addr, int hash) → void
Set hash address in the address buffer. Modifies the provided ByteBuffer's position and writes the hash value.
setKeyAndMask(ByteBuffer addr, int keyAndMask) → void
Set key and mask in the address buffer. Modifies the provided ByteBuffer's position and writes the keyAndMask value.
thashF(ByteArray out, int outOffset, ByteArray input, int inOffset, ByteArray pubSeed, ByteBuffer addr) → void
F hash function (used in WOTS+). This function calculates a hash based on padding, a key derived from pubSeed and addr, an input XORed with a bitmask, and then hashes the combined data.

Constants

XMSS_HASH_PADDING_F → const int
XMSS_HASH_PADDING_PRF → const int