diff options
author | Pavel V. Shatov (Meister) <meisterpaul1@yandex.ru> | 2019-10-23 17:03:17 +0300 |
---|---|---|
committer | Pavel V. Shatov (Meister) <meisterpaul1@yandex.ru> | 2019-10-23 17:03:17 +0300 |
commit | 0f111bf1ea0e5310852c50448a7226db57e61d5b (patch) | |
tree | 9f05558be50dd93a523ee343d1ecd73235879cb9 /stm32/modexpng_util.h | |
parent | d50bb6039649a61b2048447a63a9670895e1e2be (diff) |
Added demo driver code for STM32.
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 +// |