HomePhabricator

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

Description

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

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

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8036

Details

Provenance
Pieter Wuille <pieter@wuille.net>Authored on Aug 14 2020, 18:49
FabienCommitted on Oct 22 2020, 19:48
FabienPushed on Oct 22 2020, 19:49
Reviewer
Restricted Project
Differential Revision
D8036: [SECP256K1] Add fallback LE/BE for architectures with known endianness + SHA256 selftest
Parents
rABC8e73a882cb48: Add more release notes
Branches
Unknown
Tags
Unknown