‌Dear community,

I have a technical question regarding the use of the addresses in section 4.2 of FIPS 205, the NIST standard of SPHINCS+. Taking for example the tree address, we want to copy an integer in big-endian byte type in the words 1,2 and 3 of the address (starting at 0). Hence, the lowest byte of my integer should be copy at the rightmost place of word 3.

Ex: For the tree address 0x782342FAB we get the tree address:

[0x00, 0x00, 0x00, 0x00 || 0x00, 0x00, 0x00, 0x07 || 0x82, 0x34, 0x2F, 0xAB]

Am I right? I do not see other good options, but since the addresses are used as parameter in hash functions, I wanted to be sure.



1 Answer 1


Am I right?

Yes, you are. You encode the value as a 12 byte bigendian value. The fact that the upper bytes will always be zero (because tree addresses never get that large) is not important to the encoding process.

In fact, one way to do this is always set the first 4 bytes to all zero, and then encode the vlaue as an 8 byte bigendian value. This is equivalent, as tree addresses are always less than $2^{64}$ with all defined SLH-DSA parameter sets. This is what the reference code does.

  • $\begingroup$ Hi Poncho, thank you for your confirmation, have a nice week! $\endgroup$
    – Emilien
    Dec 4 at 6:38
  • $\begingroup$ Actually, in the version of SLH-DSA using SHA256, we always have a compressed address as input for the hash functions. Do you see any inconvenient of using in the complete implementation the compressed version, hence 22 byte addresses instead of 32 byte addresses? $\endgroup$
    – Emilien
    Dec 4 at 8:33
  • $\begingroup$ @Emilien: I'm not precisely certain what you're asking, but if you're asking whether it makes sense for a SHA-2 implementation of SLH-DSA to maintain the addresses in compressed format (and never put addresses in the 32 byte format), well, yes, it makes a great deal of sense. In fact, the reference code does exactly that. $\endgroup$
    – poncho
    Dec 4 at 14:57
  • $\begingroup$ All right, yes it was my question. Thks! $\endgroup$
    – Emilien
    Dec 5 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.