From 0f111bf1ea0e5310852c50448a7226db57e61d5b Mon Sep 17 00:00:00 2001 From: "Pavel V. Shatov (Meister)" Date: Wed, 23 Oct 2019 17:03:17 +0300 Subject: Added demo driver code for STM32. --- stm32/modexpng_util.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 stm32/modexpng_util.h (limited to 'stm32/modexpng_util.h') 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 + + +// +// 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 +// -- cgit v1.2.3