Skip to content

Commit

Permalink
Add SECP256K1_FE_STORAGE_CONST_GET to 5x52 field
Browse files Browse the repository at this point in the history
So far this has not been needed, as it's only used by the static precomputation
which always builds with 32-bit fields.

This prepares for the ability to have __int128 detected on the C side, breaking
that restriction.
  • Loading branch information
sipa committed Aug 10, 2020
1 parent 805082d commit 0d7727f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/field_5x52.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,10 @@ typedef struct {
(d6) | (((uint64_t)(d7)) << 32) \
}}

#define SECP256K1_FE_STORAGE_CONST_GET(d) \
(uint32_t)(d.n[3] >> 32), (uint32_t)d.n[3], \
(uint32_t)(d.n[2] >> 32), (uint32_t)d.n[2], \
(uint32_t)(d.n[1] >> 32), (uint32_t)d.n[1], \
(uint32_t)(d.n[0] >> 32), (uint32_t)d.n[0]

#endif /* SECP256K1_FIELD_REPR_H */

0 comments on commit 0d7727f

Please sign in to comment.