Skip to content

Commit 644386f

Browse files
committed
Merge branch 'master' of https://github.com/guanzhi/GmSSL
2 parents e31dbde + 211b34e commit 644386f

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

crypto/ec/asm/ecp_sm2z256-x86_64.pl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,9 @@
12671267
shrx $a_ptr, $acc0, $t4
12681268
mov .Lpoly+8*3(%rip), $t1
12691269
1270+
# set of = 0
1271+
add \$0, $acc2
1272+
12701273
# reduction step 1
12711274
xor $t1, $t1
12721275
adox $acc0, $acc1
@@ -1281,6 +1284,9 @@
12811284
shlx $a_ptr, $acc1, $t0
12821285
shrx $a_ptr, $acc1, $t4
12831286
1287+
# set of = 0
1288+
add \$0, $acc2
1289+
12841290
# reduction step 2
12851291
adox $acc1, $acc2
12861292
adox $t1, $acc3
@@ -1294,6 +1300,9 @@
12941300
shlx $a_ptr, $acc2, $t0
12951301
shrx $a_ptr, $acc2, $t4
12961302
1303+
# set of = 0
1304+
add \$0, $acc2
1305+
12971306
# reduction step 3
12981307
adox $acc2, $acc3
12991308
adox $t1, $acc0
@@ -1307,6 +1316,9 @@
13071316
shlx $a_ptr, $acc3, $t0
13081317
shrx $a_ptr, $acc3, $t4
13091318
1319+
# set of = 0
1320+
add \$0, $acc2
1321+
13101322
# reduction step 4
13111323
adox $acc3, $acc0
13121324
adox $t1, $acc1

test/sm9test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ static int sm9test_exch(const char *idA, const char *idB)
356356
goto end;
357357
}
358358

359-
if (memcmp(SKA, SKA, sizeof(SKA)) != 0 || memcmp(SA, S2, sizeof(SA)) != 0) {
359+
if (memcmp(SKA, SKB, sizeof(SKA)) != 0 || memcmp(SA, S2, sizeof(SA)) != 0) {
360360
goto end;
361361
}
362362

0 commit comments

Comments
 (0)