diff options
Diffstat (limited to 'stm32/modexpng_util.h')
-rw-r--r-- | stm32/modexpng_util.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/stm32/modexpng_util.h b/stm32/modexpng_util.h new file mode 100644 index 0000000..a209f31 --- /dev/null +++ b/stm32/modexpng_util.h @@ -0,0 +1,30 @@ +// +// helper precomputation routines for the "modexpng" core +// + + +// +// headers +// +#include <stdint.h> + + +// +// defined values +// +#define UINT32_BITS (sizeof(uint32_t) << 3) +#define UINT16_BITS (sizeof(uint16_t) << 3) + +#define BUF_NUM_WORDS (4096/UINT32_BITS) + + +// +// prototypes +// +void _calc_montgomery_factor(uint32_t, const uint32_t *, uint32_t *); +void _calc_modulus_coeff(uint32_t, const uint32_t *, uint32_t *); + + +// +// end-of-file +// |