Skip to content

Commit 5febf6e

Browse files
author
Michael Scott
committed
Update M.Scott 12th December
New mips.mcs file Fix to config.c
1 parent 99838bd commit 5febf6e

File tree

8 files changed

+526
-18
lines changed

8 files changed

+526
-18
lines changed

config.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ int main()
120120

121121

122122
fp=fopen("mirdef.tst","wt");
123-
fprintf(fp,"/*\n * MIRACL compiler/hardware definitions - mirdef.h\n");
123+
fprintf(fp,"/*\n * MIRACL compiler/hardware definitions - mirdef.h\n */\n");
124124
end=1;
125125
ptr=(char *)(&end);
126126

manual.doc

483 Bytes
Binary file not shown.

readme.txt

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ In the subdirectory SOURCE
5858
CS.MCS - Alternate C macros
5959
CLMUL.MCS - MSC Intrinsic macros to use PCLMULQDQ instruction
6060
GCCLMUL.MCS - GCC assembly language to support PCLMULQDQ instruction
61+
MIPS.MCS - Macros for MIPS32 processor
6162
SMARTMIP.MCS - Macros for Smartmips smart-card processor
6263
MS86.MCS - Microsoft/Borland 80*86/Pentium macros for use with above
6364
GCC386.MCS - GCC compiler compatible Pentium macros

source/curve/pairing/ake12bnx.cpp

+9-3
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,9 @@ fpa=fpc=fpx=fpmq=fpsq=fpaq=0;
338338

339339
t1=pow(t1,-x);
340340

341-
x2=t1; x2.powq(X);
341+
x2=t1;
342+
343+
x2.powq(X);
342344
x4/=x2;
343345

344346
x2.powq(X);
@@ -539,6 +541,7 @@ void glv(Big &e,Big &r,Big W[2],Big B[2][2],Big u[2])
539541

540542
// Use GLV endomorphism idea for multiplication in G1
541543

544+
542545
ECn G1_mult(ECn &P,Big &e,ZZn &Beta,Big &r,Big W[2],Big B[2][2])
543546
{
544547
// return e*P;
@@ -702,9 +705,12 @@ int main()
702705
Alice=hash_and_map((char *)"Alice");
703706
Bob= hash_and_map((char *)"Robert");
704707

708+
705709
sS=G2_mult(Server,ss,X,q,WB,BB); // Use Galbraith-Scott Homomorphism to multiply in G2
706-
sA=G1_mult(Alice,ss,Beta,q,W,SB); // Use GLV method to multiply in G1
707-
sB=G1_mult(Bob,ss,Beta,q,W,SB);
710+
sA=G1_mult(Alice,ss,Beta,q,W,SB); // Use GLV method to multiply in G1
711+
sB=G1_mult(Bob,ss,Beta,q,W,SB);
712+
713+
708714

709715
cout << "Alice and Server Key Exchange" << endl;
710716

0 commit comments

Comments
 (0)