|
rlib
Convenience library for useful things
|
Heap-backed multi-precision integer. More...
#include <rlib/data/rmpint.h>
Data Fields | |
| ruint16 | dig_alloc |
| ruint16 | dig_used |
| ruint32 | sign |
| ruint32 | flags |
Behaviour flags, currently only R_MPINT_FLAG_SECURE_CLEAR. | |
| rmpint_digit * | data |
Heap-backed multi-precision integer.
Stores a sign-magnitude representation: the absolute value lives in data[0 .. dig_used) (little-endian per-digit), with the sign carried separately. dig_alloc is the allocated capacity; the storage grows as values do.
| rmpint_digit* rmpint::data |
Digit array; little-endian.
| ruint16 rmpint::dig_alloc |
Allocated digit capacity.
| ruint16 rmpint::dig_used |
Digits actually carrying value.
| ruint32 rmpint::flags |
Behaviour flags, currently only R_MPINT_FLAG_SECURE_CLEAR.
Set R_MPINT_FLAG_SECURE_CLEAR on any mpint that carries a secret (private scalars, nonces, intermediate plaintexts) so the buffer is wiped via r_memclear_secure on r_mpint_clear, never leaking into freed heap.
| ruint32 rmpint::sign |
Non-zero for negative values.