mirror of
https://github.com/taigrr/arduinolibs
synced 2025-01-18 04:33:12 -08:00
Implementation of the NIST P-521 curve
This commit is contained in:
@@ -26,9 +26,11 @@
|
||||
#include "ProgMemUtil.h"
|
||||
|
||||
// Number of limbs in a big number value of various sizes.
|
||||
#define NUM_LIMBS_128BIT (16 / sizeof(limb_t))
|
||||
#define NUM_LIMBS_256BIT (32 / sizeof(limb_t))
|
||||
#define NUM_LIMBS_512BIT (64 / sizeof(limb_t))
|
||||
#define NUM_LIMBS_BITS(n) \
|
||||
(((n) + sizeof(limb_t) * 8 - 1) / (8 * sizeof(limb_t)))
|
||||
#define NUM_LIMBS_128BIT NUM_LIMBS_BITS(128)
|
||||
#define NUM_LIMBS_256BIT NUM_LIMBS_BITS(256)
|
||||
#define NUM_LIMBS_512BIT NUM_LIMBS_BITS(512)
|
||||
|
||||
// The number of bits in a limb.
|
||||
#define LIMB_BITS (8 * sizeof(limb_t))
|
||||
|
||||
Reference in New Issue
Block a user