diff options
Diffstat (limited to 'chip/g/dcrypto/internal.h')
-rw-r--r-- | chip/g/dcrypto/internal.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chip/g/dcrypto/internal.h b/chip/g/dcrypto/internal.h index 61db833a53..36aa35f6bf 100644 --- a/chip/g/dcrypto/internal.h +++ b/chip/g/dcrypto/internal.h @@ -89,10 +89,12 @@ void dcrypto_sha_wait(enum sha_mode mode, uint32_t *digest); #define BN_BYTES 4 struct BIGNUM { - uint32_t dmax; /* Size of d, in 32-bit words. */ - uint32_t *d; /* Word array, little endian format ... */ + uint32_t dmax; /* Size of d, in 32-bit words. */ + struct access_helper *d; /* Word array, little endian format ... */ }; +#define BN_DIGIT(b, i) ((b)->d[(i)].udata) + void bn_init(struct BIGNUM *bn, void *buf, size_t len); #define bn_size(b) ((b)->dmax * BN_BYTES) int bn_check_topbit(const struct BIGNUM *N); |