Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endianess of random identifier is platform-dependent #17

Open
simonratner opened this issue Feb 23, 2023 · 0 comments
Open

Endianess of random identifier is platform-dependent #17

simonratner opened this issue Feb 23, 2023 · 0 comments

Comments

@simonratner
Copy link

simonratner commented Feb 23, 2023

Ref: https://github.com/BlockchainCommons/bc-sskr/blob/master/src/encoding.c#L165..L166

While the identifier is always serialized and deserialized as big-endian, during identifier generation random bytes are assigned in platform byte order.

This doesn't matter much since it is random anyway, except when replicating test vectors; the first byte out of the RNG ends up in second position of the output. Would help with test replication if the order in which random bytes out of the RNG are combined into the identifier was also big-endian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant