Skip to content

Commit 3f8d0d5

Browse files
committed
Tests passing
1 parent 581b761 commit 3f8d0d5

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

contrib/relic/include/relic_label.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
/* Macro definitions */
4343
/*============================================================================*/
4444

45+
#ifdef LABEL
4546

4647
#undef first_ctx
4748
#define first_ctx PREFIX(first_ctx)
@@ -2661,6 +2662,6 @@
26612662
#define md_xmd_sh384 PREFIX(md_xmd_sh384)
26622663
#define md_xmd_sh512 PREFIX(md_xmd_sh512)
26632664

2664-
// #endif /* LABEL */
2665+
#endif /* LABEL */
26652666

26662667
#endif /* !RLC_LABEL_H */

contrib/relic/src/ep/relic_ep_param.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@
652652
RLC_GET(str, CURVE##_S3, sizeof(CURVE##_S3)); \
653653
bn_read_str(s3, str, strlen(str), 16); \
654654
RLC_GET(str, CURVE##_S32, sizeof(CURVE##_S32)); \
655-
bn_read_str(s32, str, strlen(str), 16); \
655+
bn_read_str(s32, str, strlen(str), 16);
656656

657657
/**
658658
* Assigns a set of parameters for an elliptic curve with endomorphisms.

contrib/relic/src/epx/relic_ep2_curve.c

+4
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,10 @@
286286
bn_read_str(r, str, strlen(str), 16); \
287287
RLC_GET(str, CURVE##_H, sizeof(CURVE##_H)); \
288288
bn_read_str(h, str, strlen(str), 16); \
289+
RLC_GET(str, CURVE##_S3, sizeof(CURVE##_S3)); \
290+
bn_read_str(s3, str, strlen(str), 16); \
291+
RLC_GET(str, CURVE##_S32, sizeof(CURVE##_S32)); \
292+
bn_read_str(s32, str, strlen(str), 16); \
289293
RLC_GET(str, CURVE##_MAPU0, sizeof(CURVE##_MAPU0)); \
290294
fp_read_str(u[0], str, strlen(str), 16); \
291295
RLC_GET(str, CURVE##_MAPU1, sizeof(CURVE##_MAPU1)); \

contrib/relic/src/fp/relic_fp_inv.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -562,14 +562,14 @@ void fp_inv_exgcd_bn(bn_t c, const bn_t u1, const bn_t p) {
562562
bn_null(q);
563563
bn_null(r);
564564
bn_null(u);
565-
566565
TRY {
567566
bn_new(v);
568567
bn_new(g1);
569568
bn_new(g2);
570569
bn_new(q);
571570
bn_new(r);
572571
bn_new(u);
572+
bn_copy(u, u1);
573573

574574
/* u = a, v = p, g1 = 1, g2 = 0. */
575575
bn_copy(v, p);

src/privatekey.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,7 @@ InsecureSignature PrivateKey::SignInsecure(const uint8_t *msg, size_t len) const
214214
InsecureSignature PrivateKey::SignInsecurePrehashed(const uint8_t *messageHash) const {
215215
g2_t sig, point;
216216

217-
// std::cout << "Msg: " << Util::HexStr(messageHash, 32) << std::endl;
218217
g2_map(point, messageHash, BLS::MESSAGE_HASH_LEN, 0);
219-
// std::cout << "Mapped" << InsecureSignature::FromG2(&point) << std::endl;
220218
g2_mul(sig, point, *keydata);
221219

222220
return InsecureSignature::FromG2(&sig);

0 commit comments

Comments
 (0)