Skip to content

Commit 88d192e

Browse files
Add Jubjub curve
1 parent f7e534d commit 88d192e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

include/ox_ec.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ enum cx_curve_e {
235235

236236
CX_CURVE_EdBLS12 = 0x73,
237237

238+
CX_CURVE_JUBJUB = 0x74,
239+
238240
/** High limit (not included) of Twisted Edwards curve ID */
239241
CX_CURVE_TWISTED_EDWARDS_END = 0x7F,
240242

lib_cxng/src/cx_ecfp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ cx_err_t cx_ecfp_generate_pair2_no_throw(cx_curve_t curve,
229229
if (CX_CURVE_RANGE(curve, TWISTED_EDWARDS)) {
230230
uint8_t scal[114];
231231

232-
if (curve == CX_CURVE_EdBLS12) {
232+
if ((curve == CX_CURVE_EdBLS12) || (curve == CX_CURVE_JUBJUB)) {
233233
CX_CHECK(cx_ecpoint_alloc(&W, private_key->curve));
234234
CX_CHECK(cx_ecdomain_generator_bn(curve, &W));
235235
CX_CHECK(cx_ecpoint_rnd_scalarmul(&W, private_key->d, private_key->d_len));

0 commit comments

Comments
 (0)