Sphincs

Members

Aliases

sig_bytes
alias sig_bytes = crypto_bytes
Undocumented in source.

Functions

keypair
void keypair(ubyte[secretkey_bytes] sk, ubyte[publickey_bytes] pk)

Generate a Sphincs keypair.

pubkey
ubyte[publickey_bytes] pubkey(ubyte[secretkey_bytes] sk)

Compute the public key given the secret key.

sign_detached
ubyte[sig_bytes] sign_detached(ubyte[] message, ubyte[secretkey_bytes] sk)

Generate a detached sphincs256 signature for message.

verify
bool verify(ubyte[] message, ubyte[sig_bytes] signature, ubyte[publickey_bytes] pk)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

n_masks
enum n_masks;

has to be the max of (2*(SUBTREE_HEIGHT+WOTS_LOGL)) and (WOTS_W-1) and 2*HORST_LOGT

publickey_bytes
enum publickey_bytes;

root hash & masks

secretkey_bytes
enum secretkey_bytes;

(SK1, SK2, Q)

sk_rand_seed_bytes
enum sk_rand_seed_bytes;

Length of SK2.

Parameters

n

Bitlength of hashes in HORST and WOTS.

m

Bitlength of the message hash.

n_levels

Number of subtree-layers of the hyper-tree.

subtree_height

Number of levels of a subtree.

hash_n_n

A hash function mapping n-bit strings to n-bit strings. hash_n_n: {0,1}^n -> {0,1}^n

hash_2n_n

A hash function mapping 2 n-bit strings to n-bit strings. hash_2n_n: {0,1}^n x {0,1}^n -> {0,1}^n

prg

A pseudo random generator function.

Meta