Commit f38c87f6 authored by Michael Hamburg's avatar Michael Hamburg

also remove X_SER_BYTES while were at it

parent 752d260a
......@@ -26,12 +26,12 @@ void API_NS(precompute_wnafs) (
const API_NS(point_t) base
);
static void field_print(const gf f) {
unsigned char ser[X_SER_BYTES];
unsigned char ser[SER_BYTES];
gf_serialize(ser,f);
int b=0, i, comma=0;
unsigned long long limb = 0;
printf("{FIELD_LITERAL(");
for (i=0; i<X_SER_BYTES; i++) {
for (i=0; i<SER_BYTES; i++) {
limb |= ((uint64_t)ser[i])<<b;
b += 8;
if (b >= GF_LIT_LIMB_BITS || i == SER_BYTES-1) {
......
......@@ -8,8 +8,7 @@
#define __DECAF_$(gf_shortname)_GF_DEFINED__ 1
#define NLIMBS ($(gf_impl_bits//8)/sizeof(word_t))
#define X_SER_BYTES $(((gf_bits-1)//8 + 1))
#define SER_BYTES $(((gf_bits-2)//8 + 1))
#define SER_BYTES $(((gf_bits-1)//8 + 1))
typedef struct gf_$(gf_shortname)_s {
word_t limb[NLIMBS];
} __attribute__((aligned(32))) gf_$(gf_shortname)_s, gf_$(gf_shortname)_t[1];
......@@ -39,7 +38,7 @@ typedef struct gf_$(gf_shortname)_s {
#define gf_deserialize gf_$(gf_shortname)_deserialize
/* RFC 7748 support */
#define X_PUBLIC_BYTES X_SER_BYTES
#define X_PUBLIC_BYTES SER_BYTES
#define X_PRIVATE_BYTES X_PUBLIC_BYTES
#define X_PRIVATE_BITS $(gf_bits)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment