|
|
@@ -479,18 +479,18 @@ decaf_serialize_extensible ( |
|
|
|
field_mul ( L3, L2, a->t ); |
|
|
|
field_mul ( L2, L3, a->u ); |
|
|
|
field_mul ( L0, a->x, a->z ); |
|
|
|
field_sub ( L3, L2, L0 ); |
|
|
|
field_sub ( L3, L0, L2 ); |
|
|
|
field_add ( L0, a->y, a->z ); |
|
|
|
field_sub ( L1, a->y, a->z ); |
|
|
|
field_mul ( L2, L1, L0 ); |
|
|
|
field_isr ( L2, L2 ); |
|
|
|
field_sqr ( L1, L2 ); |
|
|
|
field_mul ( L0, L1, L3 ); |
|
|
|
field_mul ( L1, L2, sqrt_d_minus_1 ); |
|
|
|
field_add ( L3, L1, L1 ); |
|
|
|
field_neg ( L3, L3 ); |
|
|
|
field_sub ( L1, a->z, a->y ); |
|
|
|
field_mul ( L2, L1, L0 ); |
|
|
|
field_mulw_scc ( L1, L2, 1-EDWARDS_D ); |
|
|
|
field_isr ( L0, L1 ); |
|
|
|
field_mulw_scc ( L1, L0, 1-EDWARDS_D ); |
|
|
|
field_mul ( L2, L1, L0 ); |
|
|
|
field_mul ( L0, L2, L3 ); |
|
|
|
field_add ( L3, L1, L1 ); |
|
|
|
field_mul ( L2, L3, a->z ); |
|
|
|
field_cond_neg ( L1, field_low_bit(L2) ); |
|
|
|
field_cond_neg ( L1, ~field_low_bit(L2) ); |
|
|
|
field_mul ( L2, L1, a->y ); |
|
|
|
field_add ( b, L0, L2 ); |
|
|
|
decaf_make_even ( b ); |
|
|
@@ -509,15 +509,15 @@ decaf_serialize_tw_extensible ( |
|
|
|
field_sub ( L3, L2, L0 ); |
|
|
|
field_add ( L0, a->z, a->y ); |
|
|
|
field_sub ( L1, a->z, a->y ); |
|
|
|
field_mul ( L2, L1, L0 ); |
|
|
|
field_isr ( L2, L2 ); |
|
|
|
field_sqr ( L1, L2 ); |
|
|
|
field_mul ( L0, L1, L3 ); |
|
|
|
field_mul ( L1, L2, sqrt_minus_d ); |
|
|
|
field_add ( L3, L1, L1 ); |
|
|
|
field_neg ( L3, L3 ); |
|
|
|
field_mul ( L2, L1, L0 ); |
|
|
|
field_mulw_scc ( L1, L2, -EDWARDS_D ); |
|
|
|
field_isr ( L0, L1 ); |
|
|
|
field_mulw_scc ( L1, L0, -EDWARDS_D ); |
|
|
|
field_mul ( L2, L1, L0 ); |
|
|
|
field_mul ( L0, L2, L3 ); |
|
|
|
field_add ( L3, L1, L1 ); |
|
|
|
field_mul ( L2, L3, a->z ); |
|
|
|
field_cond_neg ( L1, field_low_bit(L2) ); |
|
|
|
field_cond_neg ( L1, ~field_low_bit(L2) ); |
|
|
|
field_mul ( L2, L1, a->y ); |
|
|
|
field_add ( b, L0, L2 ); |
|
|
|
decaf_make_even ( b ); |
|
|
|