|
|
|
@ -590,116 +590,3 @@ diff -uNr a/bundled/aliyun/colorama/demos/demo07.py b/bundled/aliyun/colorama/de
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
diff -uNr a/bundled/aliyun/pycryptodome/Doc/conf.py b/bundled/aliyun/pycryptodome/Doc/conf.py
|
|
|
|
|
--- a/bundled/aliyun/pycryptodome/Doc/conf.py 2018-07-10 21:32:46.000000000 +0200
|
|
|
|
|
+++ b/bundled/aliyun/pycryptodome/Doc/conf.py 2018-10-08 12:08:11.122188094 +0200
|
|
|
|
|
@@ -15,7 +15,7 @@
|
|
|
|
|
|
|
|
|
|
# Modules to document with autodoc are in another directory
|
|
|
|
|
sys.path.insert(0, os.path.abspath('../lib'))
|
|
|
|
|
-print sys.path
|
|
|
|
|
+print(sys.path)
|
|
|
|
|
|
|
|
|
|
# Mock existance of native modules
|
|
|
|
|
from Crypto.Util import _raw_api
|
|
|
|
|
diff -uNr a/bundled/aliyun/pycryptodome/lib/Crypto/Math/Primality.py b/bundled/aliyun/pycryptodome/lib/Crypto/Math/Primality.py
|
|
|
|
|
--- a/bundled/aliyun/pycryptodome/lib/Crypto/Math/Primality.py 2018-07-10 21:32:46.000000000 +0200
|
|
|
|
|
+++ b/bundled/aliyun/pycryptodome/lib/Crypto/Math/Primality.py 2018-10-08 12:08:11.123188075 +0200
|
|
|
|
|
@@ -302,7 +302,7 @@
|
|
|
|
|
randfunc = kwargs.pop("randfunc", None)
|
|
|
|
|
prime_filter = kwargs.pop("prime_filter", lambda x: True)
|
|
|
|
|
if kwargs:
|
|
|
|
|
- print "Unknown parameters:", kwargs.keys()
|
|
|
|
|
+ print("Unknown parameters:", kwargs.keys())
|
|
|
|
|
|
|
|
|
|
if exact_bits is None:
|
|
|
|
|
raise ValueError("Missing exact_bits parameter")
|
|
|
|
|
@@ -341,7 +341,7 @@
|
|
|
|
|
exact_bits = kwargs.pop("exact_bits", None)
|
|
|
|
|
randfunc = kwargs.pop("randfunc", None)
|
|
|
|
|
if kwargs:
|
|
|
|
|
- print "Unknown parameters:", kwargs.keys()
|
|
|
|
|
+ print("Unknown parameters:", kwargs.keys())
|
|
|
|
|
|
|
|
|
|
if randfunc is None:
|
|
|
|
|
randfunc = Random.new().read
|
|
|
|
|
diff -uNr a/bundled/aliyun/pycryptodome/lib/Crypto/PublicKey/ECC.py b/bundled/aliyun/pycryptodome/lib/Crypto/PublicKey/ECC.py
|
|
|
|
|
--- a/bundled/aliyun/pycryptodome/lib/Crypto/PublicKey/ECC.py 2018-07-10 21:32:46.000000000 +0200
|
|
|
|
|
+++ b/bundled/aliyun/pycryptodome/lib/Crypto/PublicKey/ECC.py 2018-10-08 12:08:11.124188057 +0200
|
|
|
|
|
@@ -912,4 +912,4 @@
|
|
|
|
|
count = 30
|
|
|
|
|
for x in xrange(count):
|
|
|
|
|
_ = point * d
|
|
|
|
|
- print (time.time() - start) / count * 1000, "ms"
|
|
|
|
|
+ print((time.time() - start) / count * 1000, "ms")
|
|
|
|
|
diff -uNr a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_AES.py b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_AES.py
|
|
|
|
|
--- a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_AES.py 2018-07-10 21:32:46.000000000 +0200
|
|
|
|
|
+++ b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_AES.py 2018-10-08 12:08:11.124188057 +0200
|
|
|
|
|
@@ -1276,7 +1276,7 @@
|
|
|
|
|
tests += make_block_tests(AES, "AESNI", test_data, {'use_aesni': True})
|
|
|
|
|
tests += [ TestMultipleBlocks(True) ]
|
|
|
|
|
else:
|
|
|
|
|
- print "Skipping AESNI tests"
|
|
|
|
|
+ print("Skipping AESNI tests")
|
|
|
|
|
return tests
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
diff -uNr a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_GCM.py b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_GCM.py
|
|
|
|
|
--- a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_GCM.py 2018-07-10 21:32:46.000000000 +0200
|
|
|
|
|
+++ b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_GCM.py 2018-10-08 12:08:11.125188038 +0200
|
|
|
|
|
@@ -894,7 +894,7 @@
|
|
|
|
|
if config.get('slow_tests'):
|
|
|
|
|
tests += list_test_cases(NISTTestVectorsGCM_no_clmul)
|
|
|
|
|
else:
|
|
|
|
|
- print "Skipping test of PCLMULDQD in AES GCM"
|
|
|
|
|
+ print("Skipping test of PCLMULDQD in AES GCM")
|
|
|
|
|
|
|
|
|
|
return tests
|
|
|
|
|
|
|
|
|
|
diff -uNr a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py
|
|
|
|
|
--- a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py 2018-07-10 21:32:46.000000000 +0200
|
|
|
|
|
+++ b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py 2018-10-08 12:08:11.125188038 +0200
|
|
|
|
|
@@ -39,7 +39,7 @@
|
|
|
|
|
"""Convert a text string with bytes in hex form to a byte string"""
|
|
|
|
|
clean = b(rws(t))
|
|
|
|
|
if len(clean)%2 == 1:
|
|
|
|
|
- print clean
|
|
|
|
|
+ print(clean)
|
|
|
|
|
raise ValueError("Even number of characters expected")
|
|
|
|
|
return a2b_hex(clean)
|
|
|
|
|
|
|
|
|
|
diff -uNr a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/__main__.py b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/__main__.py
|
|
|
|
|
--- a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/__main__.py 2018-07-10 21:32:46.000000000 +0200
|
|
|
|
|
+++ b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/__main__.py 2018-10-08 12:08:11.126188020 +0200
|
|
|
|
|
@@ -25,11 +25,11 @@
|
|
|
|
|
|
|
|
|
|
slow_tests = not "--skip-slow-tests" in sys.argv
|
|
|
|
|
if not slow_tests:
|
|
|
|
|
- print "Skipping slow tests"
|
|
|
|
|
+ print("Skipping slow tests")
|
|
|
|
|
|
|
|
|
|
wycheproof_warnings = "--wycheproof-warnings" in sys.argv
|
|
|
|
|
if wycheproof_warnings:
|
|
|
|
|
- print "Printing Wycheproof warnings"
|
|
|
|
|
+ print("Printing Wycheproof warnings")
|
|
|
|
|
|
|
|
|
|
config = {'slow_tests' : slow_tests, 'wycheproof_warnings' : wycheproof_warnings }
|
|
|
|
|
SelfTest.run(stream=sys.stdout, verbosity=1, config=config)
|
|
|
|
|
diff -uNr a/bundled/aliyun/pycryptodome/lib/Crypto/Util/RFC1751.py b/bundled/aliyun/pycryptodome/lib/Crypto/Util/RFC1751.py
|
|
|
|
|
--- a/bundled/aliyun/pycryptodome/lib/Crypto/Util/RFC1751.py 2018-07-10 21:32:46.000000000 +0200
|
|
|
|
|
+++ b/bundled/aliyun/pycryptodome/lib/Crypto/Util/RFC1751.py 2018-10-08 12:08:11.126188020 +0200
|
|
|
|
|
@@ -369,13 +369,13 @@
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
for key, words in data:
|
|
|
|
|
- print 'Trying key', key
|
|
|
|
|
+ print('Trying key', key)
|
|
|
|
|
key=binascii.a2b_hex(key)
|
|
|
|
|
w2=key_to_english(key)
|
|
|
|
|
if w2!=words:
|
|
|
|
|
- print 'key_to_english fails on key', repr(key), ', producing', str(w2)
|
|
|
|
|
+ print('key_to_english fails on key', repr(key), ', producing', str(w2))
|
|
|
|
|
k2=english_to_key(words)
|
|
|
|
|
if k2!=key:
|
|
|
|
|
- print 'english_to_key fails on key', repr(key), ', producing', repr(k2)
|
|
|
|
|
+ print('english_to_key fails on key', repr(key), ', producing', repr(k2))
|
|
|
|
|