BlockchainCommons / BlockchainCommons/bc-sskr

Endianess of random identifier is platform-dependent

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22
Forks
6
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.