Skip to content

Commit 0d7727f

Browse files
committed
Add SECP256K1_FE_STORAGE_CONST_GET to 5x52 field
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.
1 parent 805082d commit 0d7727f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/field_5x52.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,10 @@ typedef struct {
4646
(d6) | (((uint64_t)(d7)) << 32) \
4747
}}
4848

49+
#define SECP256K1_FE_STORAGE_CONST_GET(d) \
50+
(uint32_t)(d.n[3] >> 32), (uint32_t)d.n[3], \
51+
(uint32_t)(d.n[2] >> 32), (uint32_t)d.n[2], \
52+
(uint32_t)(d.n[1] >> 32), (uint32_t)d.n[1], \
53+
(uint32_t)(d.n[0] >> 32), (uint32_t)d.n[0]
54+
4955
#endif /* SECP256K1_FIELD_REPR_H */

0 commit comments

Comments
 (0)