Page MenuHomePhabricator

[SECP256K1] Add fallback LE/BE for architectures with known endianness + SHA256 selftest
ClosedPublic

Authored by Fabien on Oct 22 2020, 08:10.

Details

Summary
These are all the architecture macros I could find with known
endianness. Use those as a fallback when BYTE_ORDER isn't available.

See #787 (comment)

It also adds a SHA256 selftest, so that improperly overriding the
endianness detection will be detected at runtime.

Backport of secp256k1 PR799.

Test Plan
ninja check-secp256k1

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Oct 22 2020, 08:10
Fabien retitled this revision from Add fallback LE/BE for architectures with known endianness + SHA256 selftest to [SECP256K1] Add fallback LE/BE for architectures with known endianness + SHA256 selftest.Oct 22 2020, 09:30
This revision is now accepted and ready to land.Oct 22 2020, 11:52