zcash / zips

Zcash Improvement Proposals
https://zips.z.cash
MIT License
273 stars 156 forks source link

[protocol spec] Section 5.4.1.9 (Sinsemilla Hash Function) declares use of LEOS2IP when it should declare use of LEBS2IP #840

Closed oxarbitrage closed 3 months ago

oxarbitrage commented 4 months ago

I might be wrong but it seems to be an error with some functions defined and later used in the Sinsemilla hash function section of the zcash protocol.

The Sinsemilla hash function specified defines the next 2 functions to be used as part of the algorithm:

sinsemilla1

However:

sinsemilla1 5

sinsemilla2

So LEOStoIP is not used and LEBStoIP is used instead, which is not defined.

This is a normal oversight as the names are very long and similar but also confusing:

If pad is correct and LEBStoIP is the one that is going to be used then we should replace LEOStoIP in the definition with LEBStoIP. Otherwise we should change pad to use LEOStoIP

daira commented 4 months ago

You're correct, the reference should be to LEBS2IP. I'll fix it.