aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/codegen/bn/bn.h
diff options
context:
space:
mode:
authorJ08nY2020-02-28 15:03:36 +0100
committerJ08nY2020-02-28 15:03:36 +0100
commitb387d00511a03dc20e15ac55fcbf07f3dfa79ce0 (patch)
tree6f7c7cb0168366b2862a6e42e20067652cbc443b /pyecsca/codegen/bn/bn.h
parent4eafe2d49fc7406861609c5af12b850741bbe5a0 (diff)
downloadpyecsca-codegen-b387d00511a03dc20e15ac55fcbf07f3dfa79ce0.tar.gz
pyecsca-codegen-b387d00511a03dc20e15ac55fcbf07f3dfa79ce0.tar.zst
pyecsca-codegen-b387d00511a03dc20e15ac55fcbf07f3dfa79ce0.zip
Update libtommath, use multi init and clear.
Diffstat (limited to 'pyecsca/codegen/bn/bn.h')
-rw-r--r--pyecsca/codegen/bn/bn.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/pyecsca/codegen/bn/bn.h b/pyecsca/codegen/bn/bn.h
index 02b3e93..862b67c 100644
--- a/pyecsca/codegen/bn/bn.h
+++ b/pyecsca/codegen/bn/bn.h
@@ -34,12 +34,14 @@ typedef struct {
} wnaf_t;
bn_err bn_init(bn_t *bn);
+#define bn_init_multi mp_init_multi
bn_err bn_copy(const bn_t *from, bn_t *to);
void bn_clear(bn_t *bn);
+#define bn_clear_multi mp_clear_multi
-int bn_from_bin(const uint8_t *data, size_t size, bn_t *out);
-int bn_from_hex(const char *data, bn_t *out);
-int bn_from_int(unsigned int value, bn_t *out);
+bn_err bn_from_bin(const uint8_t *data, size_t size, bn_t *out);
+bn_err bn_from_hex(const char *data, bn_t *out);
+bn_err bn_from_int(unsigned int value, bn_t *out);
bn_err bn_to_binpad(const bn_t *one, uint8_t *data, size_t size);
bn_err bn_to_bin(const bn_t *one, uint8_t *data);