tahoe-lafs / pycryptopp

Python bindings to the Crypto++ library
https://tahoe-lafs.org/trac/pycryptopp
Other
49 stars 32 forks source link

Add CRYPTOPP_5_6_3 #29

Closed david415 closed 8 years ago

zookozcash commented 8 years ago

It's interesting that a lot of files were modified "M" but a lot more were "I"... does that mean added? I think that I previously manually removed all the files from crypto++ that we weren't using, in order to speed build time, facilitate code auditing, and minimize chance of error. Perhaps this pull request is putting them all back.

david415 commented 8 years ago

yes that's probably what happened. i'll try to fix it soon.

david415 commented 8 years ago

no additional files were added. in that previous commit but when i did a git force clean i found that the build failed because it was missing an hrtimer.h; i just now pushed another commit with that file and the build succeeded for me.

how do i run the unit tests!?

why don't we use travis to run them and have a status image on the readme?

david415 commented 8 years ago

python setup.py test

running test Traceback (most recent call last): File "setup.py", line 422, in _setup(readmetext) File "setup.py", line 418, in _setup cmdclass=commands, File "/usr/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "setup.py", line 364, in run test = loader.loadTestsFromName(self.test_suite) File "/usr/lib/python2.7/unittest/loader.py", line 91, in loadTestsFromName module = import('.'.join(parts_copy)) File "build/lib.linux-x86_64-2.7/pycryptopp/init.py", line 8, in import _pycryptopp ImportError: build/lib.linux-x86_64-2.7/pycryptopp/_pycryptopp.so: undefined symbol: _ZTVN8CryptoPP5TimerE

david415 commented 8 years ago

the test fails and i'm not sure how to make it pass

zooko commented 8 years ago

You figured out how to run tests. The continuous-integration test display is here: https://tahoe-lafs.org/buildbot-pycryptopp/waterfall

david415 commented 8 years ago

ok i got it to build and pass all the tests... when i did so locally:

(virtenv-pycryptopp) user@subgraph:~/code/pycryptopp$ python setup.py test
running build
running build_py
copying src/pycryptopp/_version.py -> build/lib.linux-x86_64-2.7/pycryptopp
running egg_info
writing requirements to pycryptopp.egg-info/requires.txt
writing pycryptopp.egg-info/PKG-INFO
writing top-level names to pycryptopp.egg-info/top_level.txt
writing dependency_links to pycryptopp.egg-info/dependency_links.txt
reading manifest file 'pycryptopp.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pycryptopp.egg-info/SOURCES.txt'
running build_ext
running test
test_XSalsa (pycryptopp.test.test_xsalsa20.XSalsa20Test) ... ok
test_recursive (pycryptopp.test.test_xsalsa20.XSalsa20Test) ... ok
test_types_and_lengths (pycryptopp.test.test_xsalsa20.XSalsa20Test) ... ok
test_zero_XSalsa20 (pycryptopp.test.test_xsalsa20.XSalsa20Test) ... ok
test_encrypt_zeroes (pycryptopp.test.test_aes.AES128) ... ok
test_encrypt_zeroes_in_two_parts (pycryptopp.test.test_aes.AES128) ... ok
test_init_type_check (pycryptopp.test.test_aes.AES128) ... ok
test_encrypt_zeroes (pycryptopp.test.test_aes.AES256) ... ok
test_encrypt_zeroes_in_two_parts (pycryptopp.test.test_aes.AES256) ... ok
test_init_type_check (pycryptopp.test.test_aes.AES256) ... ok
test_NIST_KAT (pycryptopp.test.test_aes.AES_from_NIST_KAT) ... ok
test_from_Niels_AES128 (pycryptopp.test.test_aes.AES_from_Niels_Ferguson) ... ok
test_from_Niels_AES256 (pycryptopp.test.test_aes.AES_from_Niels_Ferguson) ... ok
test_partial (pycryptopp.test.test_aes.PartialIV) ... ok
test_short (pycryptopp.test.test_ed25519_kat.KnownAnswerTests) ... ok
test_t (pycryptopp.test.test_from_Nikratio.T) ... ok
test_compatibility (pycryptopp.test.test_ecdsa.Compatibility) ... ok
test (pycryptopp.test.test_ecdsa.SignAndVerify) ... ok
test_construct (pycryptopp.test.test_ecdsa.Signer) ... ok
test_construct_bad_arg_type (pycryptopp.test.test_ecdsa.Signer) ... ok
test_construct_from_same_seed_is_reproducible (pycryptopp.test.test_ecdsa.Signer) ... ok
test_construct_short_seed (pycryptopp.test.test_ecdsa.Signer) ... ok
test_sign (pycryptopp.test.test_ecdsa.Signer) ... ok
test_sign_and_verify (pycryptopp.test.test_ecdsa.Signer) ... ok
test_sign_and_verify_emptymsg (pycryptopp.test.test_ecdsa.Signer) ... ok
test_from_signer_and_serialize_and_deserialize (pycryptopp.test.test_ecdsa.Verifier) ... ok
test_OOP (pycryptopp.test.test_ed25519.Basic) ... ok
test_constants (pycryptopp.test.test_ed25519.Basic) ... ok
test_object_identity (pycryptopp.test.test_ed25519.Basic) ... ok
test_publickey (pycryptopp.test.test_ed25519.Basic) ... ok
test_raw (pycryptopp.test.test_ed25519.Basic) ... ok
test_version (pycryptopp.test.test_ed25519.Basic) ... ok
test_serialize_and_deserialize_signing_key_and_test (pycryptopp.test.test_rsa.SignAndVerify) ... ok
test_serialize_and_deserialize_verifying_key_and_test (pycryptopp.test.test_rsa.SignAndVerify) ... ok
test_sign_and_check_a (pycryptopp.test.test_rsa.SignAndVerify) ... ok
test_sign_and_check_random (pycryptopp.test.test_rsa.SignAndVerify) ... ok
test_sign_and_failcheck_a (pycryptopp.test.test_rsa.SignAndVerify) ... ok
test_sign_and_failcheck_random (pycryptopp.test.test_rsa.SignAndVerify) ... ok
test_create_from_string_invalid (pycryptopp.test.test_rsa.Signer) ... ok
test_generate (pycryptopp.test.test_rsa.Signer) ... ok
test_generate_bad_size (pycryptopp.test.test_rsa.Signer) ... ok
test_sign (pycryptopp.test.test_rsa.Signer) ... ok
test_chunksize (pycryptopp.test.test_sha256.SHA256) ... ok
test_constructor_type_check (pycryptopp.test.test_sha256.SHA256) ... ok
test_digest (pycryptopp.test.test_sha256.SHA256) ... ok
test_digest_then_update_fail (pycryptopp.test.test_sha256.SHA256) ... ok
test_digest_twice (pycryptopp.test.test_sha256.SHA256) ... ok
test_hexdigest (pycryptopp.test.test_sha256.SHA256) ... ok
test_onebyte_1 (pycryptopp.test.test_sha256.SHA256) ... ok
test_onebyte_2 (pycryptopp.test.test_sha256.SHA256) ... ok
test_recursive_different_chunksizes (pycryptopp.test.test_sha256.SHA256) ... ok
test_update (pycryptopp.test.test_sha256.SHA256) ... ok
test_update_type_check (pycryptopp.test.test_sha256.SHA256) ... ok
test_long (pycryptopp.test.test_sha256.SHSVectors) ... ok
test_monte (pycryptopp.test.test_sha256.SHSVectors) ... ok
test_short (pycryptopp.test.test_sha256.SHSVectors) ... ok

----------------------------------------------------------------------
Ran 56 tests in 1.250s

OK
(virtenv-pycryptopp) user@subgraph:~/code/pycryptopp$ 
david415 commented 8 years ago

closing this pull request for now because i think we instead want the latest from upstream master branch of crypto++ so that we can easily add blake2 and chacha20: https://github.com/tahoe-lafs/pycryptopp/pull/30