What is the LEBS2OS function in the ZIP-32 spec?

The Sapling Helper Functions section of the
ZIP 32: Shielded Hierarchical Deterministic Wallets spec references an LEBS2OS_256 function, but I can’t find any definition for it in that spec or the general Zcash protocol spec.

These are hard specs to exhaustively search because this and many other function names are included as graphics or otherwise are unsearchable text. But I can see in ZIP-32 where the other functions are defined, including LEBS2OSP under the Conventions section, but LEBS2OS is never defined as far as I can see.

Any pointers?
Thanks.

1 Like

it’s a typo. LEBS2OSP: Little Endian Bit Stream to Octet Stream (packed?), though they never spell it out so I’m just guessing. Tip: It’s easier to search the rst file.

3 Likes

Yep, that’s a typo. The name stands for “Little Endian Bit String to Octet String Primitive”. It is the same idea as the BS2OSP function you will find in the specifications at many other standards organisations (IETF, IEEE, ISO, NIST, etc), but explicitly interprets each group of 8 bits as little-endian (being precise about the bit-endianness is sadly necessary for zero-knowledge circuits).

4 Likes

How can we propose edits to the ZIP to correct the typo?

Where is the rst file?

I found it at https://github.com/zcash/zips/blob/fixErrors/zip-0032.rst

1 Like