Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions arduino/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def curveset(nbt,tf,tc,base,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :
replace(fnameh,"ZZZ",tc)
replace(fnameh,"YYY",tf)
replace(fnameh,"XXX",bd)

fnamec="pair_"+tc+".cpp"
fnameh="pair_"+tc+".h"

Expand Down Expand Up @@ -650,7 +650,7 @@ def curveset(nbt,tf,tc,base,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :

copy_file("pair8.cpp", fnamec)
copy_file("pair8.h", fnameh)

replace(fnamec,"ZZZ",tc)
replace(fnamec,"YYY",tf)
replace(fnamec,"XXX",bd)
Expand Down Expand Up @@ -836,7 +836,6 @@ def interactive_prompt_input():
if (userInput == ''):
return 0
print("Non-integer input, select values between 1 and " + str(miracl_crypto.total_entries))
interactive_prompt_input()

interactive_prompt_print()

Expand Down
1 change: 0 additions & 1 deletion c/config16.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,6 @@ def interactive_prompt_input():
if (userInput == ''):
return 0
print("Non-integer input, select values between 1 and " + str(miracl_crypto.total_entries))
interactive_prompt_input()

interactive_prompt_print()
while keep_querying and not testing:
Expand Down
3 changes: 1 addition & 2 deletions c/config32.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ def curveset(nbt,tf,tc,base,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :

copy_temp_file("pair8.c", fnamec)
copy_keep_file("pair8.h", fnameh)

replace(fnamec,"ZZZ",tc)
replace(fnamec,"YYY",tf)
replace(fnamec,"XXX",bd)
Expand Down Expand Up @@ -871,7 +871,6 @@ def interactive_prompt_input():
if (userInput == ''):
return 0
print("Non-integer input, select values between 1 and " + str(miracl_crypto.total_entries))
interactive_prompt_input()

interactive_prompt_print()
while keep_querying and not testing:
Expand Down
19 changes: 9 additions & 10 deletions c/config64.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def curveset(nbt,tf,tc,base,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :

copy_temp_file("fp12.c", fnamec)
copy_keep_file("fp12.h", fnameh)

replace(fnamec,"YYY",tf)
replace(fnamec,"XXX",bd)
replace(fnamec,"ZZZ",tc)
Expand Down Expand Up @@ -557,7 +557,7 @@ def curveset(nbt,tf,tc,base,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :

copy_temp_file("mpin.c", fnamec)
copy_keep_file("mpin.h", fnameh)

replace(fnamec,"ZZZ",tc)
replace(fnamec,"YYY",tf)
replace(fnamec,"XXX",bd)
Expand Down Expand Up @@ -586,7 +586,7 @@ def curveset(nbt,tf,tc,base,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :

copy_temp_file("fp8.c", fnamec)
copy_keep_file("fp8.h", fnameh)

replace(fnamec,"YYY",tf)
replace(fnamec,"XXX",bd)
replace(fnamec,"ZZZ",tc)
Expand Down Expand Up @@ -657,7 +657,7 @@ def curveset(nbt,tf,tc,base,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :

copy_temp_file("bls192.c", fnamec)
copy_keep_file("bls192.h", fnameh)

replace(fnamec,"ZZZ",tc)
replace(fnamec,"YYY",tf)
replace(fnamec,"XXX",bd)
Expand All @@ -673,7 +673,7 @@ def curveset(nbt,tf,tc,base,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :

copy_temp_file("fp8.c", fnamec)
copy_keep_file("fp8.h", fnameh)

replace(fnamec,"YYY",tf)
replace(fnamec,"XXX",bd)
replace(fnamec,"ZZZ",tc)
Expand Down Expand Up @@ -703,7 +703,7 @@ def curveset(nbt,tf,tc,base,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :

copy_temp_file("fp16.c", fnamec)
copy_keep_file("fp16.h", fnameh)

replace(fnamec,"YYY",tf)
replace(fnamec,"XXX",bd)
replace(fnamec,"ZZZ",tc)
Expand All @@ -718,7 +718,7 @@ def curveset(nbt,tf,tc,base,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :

copy_temp_file("fp48.c", fnamec)
copy_keep_file("fp48.h", fnameh)

replace(fnamec,"YYY",tf)
replace(fnamec,"XXX",bd)
replace(fnamec,"ZZZ",tc)
Expand All @@ -733,7 +733,7 @@ def curveset(nbt,tf,tc,base,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :

copy_temp_file("pair8.c", fnamec)
copy_keep_file("pair8.h", fnameh)

replace(fnamec,"ZZZ",tc)
replace(fnamec,"YYY",tf)
replace(fnamec,"XXX",bd)
Expand Down Expand Up @@ -761,7 +761,7 @@ def curveset(nbt,tf,tc,base,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :

copy_temp_file("bls256.c", fnamec)
copy_keep_file("bls256.h", fnameh)

replace(fnamec,"ZZZ",tc)
replace(fnamec,"YYY",tf)
replace(fnamec,"XXX",bd)
Expand Down Expand Up @@ -908,7 +908,6 @@ def interactive_prompt_input():
if (userInput == ''):
return 0
print("Non-integer input, select values between 1 and " + str(miracl_crypto.total_entries))
interactive_prompt_input()

def usage():
print("Usage: ./config64.py [OPTIONS] [ARGUMENTS]\n")
Expand Down
1 change: 0 additions & 1 deletion cpp/config16.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,6 @@ def interactive_prompt_input():
if (userInput == ''):
return 0
print("Non-integer input, select values between 1 and " + str(miracl_crypto.total_entries))
interactive_prompt_input()

interactive_prompt_print()
while keep_querying and not testing:
Expand Down
3 changes: 1 addition & 2 deletions cpp/config32.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ def curveset(nbt,tf,tc,base,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :

copy_temp_file("pair8.cpp", fnamec)
copy_keep_file("pair8.h", fnameh)

replace(fnamec,"ZZZ",tc)
replace(fnamec,"YYY",tf)
replace(fnamec,"XXX",bd)
Expand Down Expand Up @@ -872,7 +872,6 @@ def interactive_prompt_input():
if (userInput == ''):
return 0
print("Non-integer input, select values between 1 and " + str(miracl_crypto.total_entries))
interactive_prompt_input()

interactive_prompt_print()
while keep_querying and not testing:
Expand Down
1 change: 0 additions & 1 deletion cpp/config64.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,6 @@ def interactive_prompt_input():
if (userInput == ''):
return 0
print("Non-integer input, select values between 1 and " + str(miracl_crypto.total_entries))
interactive_prompt_input()

def usage():
print("Usage: ./config64.py [OPTIONS] [ARGUMENTS]\n")
Expand Down
7 changes: 3 additions & 4 deletions go/config32.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ def curveset(tc,base,nbt,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :
replace(fpath+"CONFIG_CURVE.go","@AB@",ab)
replace(fpath+"CONFIG_CURVE.go","@G2@",g2)

replace(fpath+"CONFIG_CURVE.go","@HC@",hc)
replace(fpath+"CONFIG_CURVE.go","@HC2@",hc2)
replace(fpath+"CONFIG_CURVE.go","@HC@",hc)
replace(fpath+"CONFIG_CURVE.go","@HC2@",hc2)

if cs == "128" :
replace(fpath+"CONFIG_CURVE.go","@HT@","32")
Expand Down Expand Up @@ -327,7 +327,7 @@ class miracl_crypto:
("TWEEDLEDUM","29","255","33","1","NOT_SPECIAL","5","WEIERSTRASS","0","NOT","NOT","NOT","NOT","NOT","128"),
("TWEEDLEDEE","29","255","34","1","NOT_SPECIAL","5","WEIERSTRASS","0","NOT","NOT","NOT","NOT","NOT","128")
)


pf_curves = (
("BN254","28","254","1",["-1","-1","0"],"NOT_SPECIAL","0","WEIERSTRASS","0","BN","D_TYPE","NEGATIVEX","71","66","128"),
Expand Down Expand Up @@ -408,7 +408,6 @@ def interactive_prompt_input():
if (userInput == ''):
return 0
print("Non-integer input, select values between 1 and " + str(miracl_crypto.total_entries))
interactive_prompt_input()


interactive_prompt_print()
Expand Down
5 changes: 2 additions & 3 deletions go/config64.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ def curveset(tc,base,nbt,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :
replace(fpath+"CONFIG_CURVE.go","@AB@",ab)
replace(fpath+"CONFIG_CURVE.go","@G2@",g2)

replace(fpath+"CONFIG_CURVE.go","@HC@",hc)
replace(fpath+"CONFIG_CURVE.go","@HC2@",hc2)
replace(fpath+"CONFIG_CURVE.go","@HC@",hc)
replace(fpath+"CONFIG_CURVE.go","@HC2@",hc2)

if cs == "128" :
replace(fpath+"CONFIG_CURVE.go","@HT@","32")
Expand Down Expand Up @@ -407,7 +407,6 @@ def interactive_prompt_input():
if (userInput == ''):
return 0
print("Non-integer input, select values between 1 and " + str(miracl_crypto.total_entries))
interactive_prompt_input()


interactive_prompt_print()
Expand Down
5 changes: 2 additions & 3 deletions java/config32.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ def curveset(tc,base,nbt,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :
replace(fpath+"CONFIG_CURVE.java","@AB@",ab)
replace(fpath+"CONFIG_CURVE.java","@G2@",g2)

replace(fpath+"CONFIG_CURVE.java","@HC@",hc)
replace(fpath+"CONFIG_CURVE.java","@HC2@",hc2)
replace(fpath+"CONFIG_CURVE.java","@HC@",hc)
replace(fpath+"CONFIG_CURVE.java","@HC2@",hc2)

if cs == "128" :
replace(fpath+"CONFIG_CURVE.java","@HT@","32")
Expand Down Expand Up @@ -449,7 +449,6 @@ def interactive_prompt_input():
if (userInput == ''):
return 0
print("Non-integer input, select values between 1 and " + str(miracl_crypto.total_entries))
interactive_prompt_input()


interactive_prompt_print()
Expand Down
7 changes: 3 additions & 4 deletions java/config64.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ def curveset(tc,base,nbt,m8,rz,mt,qi,ct,ca,pf,stw,sx,g2,ab,cs) :
replace(fpath+"CONFIG_CURVE.java","@AB@",ab)
replace(fpath+"CONFIG_CURVE.java","@G2@",g2)

replace(fpath+"CONFIG_CURVE.java","@HC@",hc)
replace(fpath+"CONFIG_CURVE.java","@HC2@",hc2)
replace(fpath+"CONFIG_CURVE.java","@HC@",hc)
replace(fpath+"CONFIG_CURVE.java","@HC2@",hc2)

if cs == "128" :
replace(fpath+"CONFIG_CURVE.java","@HT@","32")
Expand Down Expand Up @@ -372,7 +372,7 @@ class miracl_crypto:
("BN254","56","254","1",["-1","-1","0"],"NOT_SPECIAL","0","WEIERSTRASS","0","BN","D_TYPE","NEGATIVEX","71","66","128"),
("BN254CX","56","254","1",["-1","-1","0"],"NOT_SPECIAL","0","WEIERSTRASS","0","BN","D_TYPE","NEGATIVEX","76","66","128"),
("BLS12383","58","383","1",["1","1","0"],"NOT_SPECIAL","0","WEIERSTRASS","0","BLS12","M_TYPE","POSITIVEX","68","65","128"),
("BLS12381","58","381","1",["11","-2","-1","11","3"],"NOT_SPECIAL","0","WEIERSTRASS","0","BLS12","M_TYPE","NEGATIVEX","69","65","128"),
("BLS12381","58","381","1",["11","-2","-1","11","3"],"NOT_SPECIAL","0","WEIERSTRASS","0","BLS12","M_TYPE","NEGATIVEX","69","65","128"),
("FP256BN","56","256","1",["1","1","0"],"NOT_SPECIAL","0","WEIERSTRASS","0","BN","M_TYPE","NEGATIVEX","83","66","128"),
("FP512BN","60","512","1",["1","1","0"],"NOT_SPECIAL","0","WEIERSTRASS","0","BN","M_TYPE","POSITIVEX","172","130","128"),
("BLS12443","60","443","1",["-7","1","1","11","3"],"NOT_SPECIAL","0","WEIERSTRASS","0","BLS12","M_TYPE","POSITIVEX","78","75","128"),
Expand Down Expand Up @@ -446,7 +446,6 @@ def interactive_prompt_input():
if (userInput == ''):
return 0
print("Non-integer input, select values between 1 and " + str(miracl_crypto.total_entries))
interactive_prompt_input()


interactive_prompt_print()
Expand Down
4 changes: 2 additions & 2 deletions python/big.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# You can be released from the requirements of the license by purchasing
# You can be released from the requirements of the license by purchasing
# a commercial license. Buying such a license is mandatory as soon as you
# develop commercial activities involving the MIRACL Core Crypto SDK
# without disclosing the source code of your own applications, or shipping
# the MIRACL Core Crypto SDK with a closed source product.
# the MIRACL Core Crypto SDK with a closed source product.
#

# Number Theoretic functions
Expand Down
4 changes: 2 additions & 2 deletions python/bls12381.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# You can be released from the requirements of the license by purchasing
# You can be released from the requirements of the license by purchasing
# a commercial license. Buying such a license is mandatory as soon as you
# develop commercial activities involving the MIRACL Core Crypto SDK
# without disclosing the source code of your own applications, or shipping
# the MIRACL Core Crypto SDK with a closed source product.
# the MIRACL Core Crypto SDK with a closed source product.

# BLS12381 curve constants

Expand Down
4 changes: 2 additions & 2 deletions python/bls12443.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# You can be released from the requirements of the license by purchasing
# You can be released from the requirements of the license by purchasing
# a commercial license. Buying such a license is mandatory as soon as you
# develop commercial activities involving the MIRACL Core Crypto SDK
# without disclosing the source code of your own applications, or shipping
# the MIRACL Core Crypto SDK with a closed source product.
# the MIRACL Core Crypto SDK with a closed source product.

# BLS12443 curve constants

Expand Down
6 changes: 3 additions & 3 deletions python/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# You can be released from the requirements of the license by purchasing
# You can be released from the requirements of the license by purchasing
# a commercial license. Buying such a license is mandatory as soon as you
# develop commercial activities involving the MIRACL Core Crypto SDK
# without disclosing the source code of your own applications, or shipping
# the MIRACL Core Crypto SDK with a closed source product.
# the MIRACL Core Crypto SDK with a closed source product.

# fixed constants

__all__ = ['WEIERSTRASS', 'EDWARDS', 'MONTGOMERY','D_TYPE','M_TYPE','NEGATIVEX','POSITIVEX','BN','BLS','ECDH_INVALID_PUBLIC_KEY','ECDH_ERROR']
__all__ = ['WEIERSTRASS', 'EDWARDS', 'MONTGOMERY','D_TYPE','M_TYPE','NEGATIVEX','POSITIVEX','BN','BLS','ECDH_INVALID_PUBLIC_KEY','ECDH_ERROR']

WEIERSTRASS = 0
EDWARDS = 1
Expand Down
4 changes: 2 additions & 2 deletions python/ecp2.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# You can be released from the requirements of the license by purchasing
# You can be released from the requirements of the license by purchasing
# a commercial license. Buying such a license is mandatory as soon as you
# develop commercial activities involving the MIRACL Core Crypto SDK
# without disclosing the source code of your own applications, or shipping
# the MIRACL Core Crypto SDK with a closed source product.
# the MIRACL Core Crypto SDK with a closed source product.

#
# Elliptic Curve Points over Fp^2
Expand Down
4 changes: 2 additions & 2 deletions python/fp.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# You can be released from the requirements of the license by purchasing
# You can be released from the requirements of the license by purchasing
# a commercial license. Buying such a license is mandatory as soon as you
# develop commercial activities involving the MIRACL Core Crypto SDK
# without disclosing the source code of your own applications, or shipping
# the MIRACL Core Crypto SDK with a closed source product.
# the MIRACL Core Crypto SDK with a closed source product.

#
# bigs modulo n
Expand Down
6 changes: 3 additions & 3 deletions python/fp12.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# You can be released from the requirements of the license by purchasing
# You can be released from the requirements of the license by purchasing
# a commercial license. Buying such a license is mandatory as soon as you
# develop commercial activities involving the MIRACL Core Crypto SDK
# without disclosing the source code of your own applications, or shipping
# the MIRACL Core Crypto SDK with a closed source product.
# the MIRACL Core Crypto SDK with a closed source product.

#
# Fp^12 CLass - towered over Fp^4
Expand Down Expand Up @@ -250,7 +250,7 @@ def smul(self,other) :
tb=other.a.a+other.a.b
tc=ta*tb
tc-=(w1+w2)

ta=self.a.a+self.c.b
tb=other.a.a+other.c.b
td=ta*tb
Expand Down
Loading