summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* PKCS#1 2.0: Implementation of MGF1 (#89)Michael Manganiello2017-06-101-0/+83
| | | | Implementation of the Mask Generation Function `MGF1` used in the OAEP encoding step. For more information, the MGF1 specification is at https://tools.ietf.org/html/rfc2437#section-10.2.1
* Support signing a pre-calculated hash (#87)Justin Simon2017-05-071-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | * Split the hashing out of the sign method This code change adds support to split the hashing of a message and the actual signing of the message. * Updating unit test and documentation This commit updates the unit test and usage docs. In addition, This change removes a redundant error check inside rsa.sign(). * Refactore unit tests and code comments Removed the print statements from the unit test and refactored a few code comments to improve readability. * Rename hash function The new hash function had the same name as a function in the standard library. This commit changes the name to avoid conflicts. * Rename hash function to compute_hash() This commit renames the hash function to compute_hash().
* Feature request #78: Expose function to find the hash method of a signatureSybren A. Stüvel2017-04-101-1/+9
| | | | | | I've not used the name "find_method_hash" suggested in #78, as it's a bit vague. It's ok-ish for a private function `_find_method_hash`, but I thought `find_signature_hash` would be more descriptive.
* Don't print in unit testsSybren A. Stüvel2017-04-101-3/+0
|
* Implementation of bitwise XOR function for bytes object (#72)Michael Manganiello2017-01-161-1/+46
|
* Create PY2 constant to simplify compatibility decisions (#82)Michael Manganiello2017-01-152-15/+12
| | | It's about time to get this merged, thanks again!
* Remove custom PrivateKey exponents/coefficient (#71)Michael Manganiello2017-01-052-1/+47
| | | Thanks for the improvements!
* Drop byte_literal in favour of b''adamantike2016-05-087-46/+42
|
* xrange compatibility optimization for Python 2 (#69)Michael Manganiello2016-05-082-1/+2
|
* Use 'assertEqual' instead of deprecated alias (#73)Michael Manganiello2016-05-081-10/+10
|
* Fix edge case for byte() call at pkcs1 test (#64)Michael Manganiello2016-04-231-1/+2
| | | Nice catch :)
* Unit test for Mersenne primesadamantike2016-04-231-0/+19
|
* Trivial fix on primality testingadamantike2016-04-161-3/+3
|
* Set Miller-Rabin rounds based on bitsizeadamantike2016-04-151-0/+14
|
* Implemented __hash__ function for key objects.Sybren A. Stüvel2016-03-291-0/+11
| | | | | | Overriding __eq__ blocks inheritance of __hash__ in Python 3. Fixes issue #55
* No longer require string operations to find bit lengths.Sybren A. Stüvel2016-03-291-7/+16
| | | | | Now that we no longer support Python 2.6, we can use int.bit_length() instead. Co-authored by @adamantike.
* More tests with hard-coded 'random' values.Sybren A. Stüvel2016-03-292-1/+35
| | | | This reduces noise in the code coverage measurements.
* Added unittest for rsa.key.gen_keysSybren A. Stüvel2016-03-291-0/+17
| | | | | This unittest tests both execution branches of the function (keys relatively prime or not), reducing randomness of code coverage.
* Added unittest for rsa.common.inverseSybren A. Stüvel2016-03-291-1/+11
| | | | | This unittest tests both execution branches of the function, reducing randomness of code coverage.
* Removed monkey-patch of unittestSybren A. Stüvel2016-03-291-13/+0
| | | | This was required for Python 2.6, which we no longer support.
* Added unit test for rsa.util.private_to_public()Sybren A. Stüvel2016-03-171-0/+19
|
* More CLI tests & clearer bytes stuffSybren A. Stüvel2016-03-175-12/+178
| | | | | Ensuring that bytes are written correctly on all supported Python versions, including when writing to stdout.
* Attempt at unit-testing CLI commandsSybren A. Stüvel2016-03-171-0/+149
|
* Ensuring that PEM output is always in bytes.Sybren A. Stüvel2016-03-171-1/+15
| | | | | This may break some applications. However, it does make the RSA library easier to use on different Python versions.
* Removed deprecated functionality.Sybren A. Stüvel2016-03-172-161/+0
| | | | | | | | | | | The following modules have been removed: - rsa._version133 - rsa._version200 - rsa.bigfile - rsa.varblock The encrypt/decrypt-bigfile CLI commands have also been removed.
* Allow loading PEM from strings (not just bytes), closes issue #49Sybren A. Stüvel2016-03-171-2/+49
|
* Reintroduced test for rsa.prime.is_primeSybren A. Stüvel2016-03-171-0/+23
|
* Remove Solovay-Strassen implementationadamantike2016-03-171-193/+0
|
* Add Jacobi test for table of valuesadamantike2016-02-051-0/+214
|
* Updated documentation, mostly http -> https changesSybren A. Stüvel2016-02-0510-10/+10
| | | | | | Also: - changed http to https in the code - changed header underlines in the documentation to match the header length
* Fix #18: Add an 'exponent' argument to key.newkeys()Sybren A. Stüvel2016-01-271-2/+14
| | | | | | | | Adds the possibility to create a new key using a custom exponent. Mostly for compatibility. Also removed the unused parameter nbits from calculate_keys(). I added a new function calculate_keys_custom_exponent() so that people still passing a value to nbits don't accidentally use it as the exponent.
* Simplified test structure a bit, so we no longer need to set PYTHONPATHSybren A. Stüvel2016-01-274-57/+1
| | | | | The u'' string prefix was reintroduced in Python 3.3, and since we've dropped py3.2 support we can avoid the whole py{2k,3k}constants.py mess.
* Fix #12 Allow pickling of keys.Sybren A. Stüvel2016-01-221-0/+20
| | | | | Pickling is now possible, with the added note that one should never unpickle from an untrusted or unauthenticated source.
* Fix #19: Implemented blinding when decrypting.Sybren A. Stüvel2016-01-221-0/+30
| | | | | This prevents side-channel (such as timing) attacks, see: https://en.wikipedia.org/wiki/Blinding_%28cryptography%29
* Big refactor to become more PEP8 compliant.Sybren A. Stüvel2016-01-2210-72/+53
| | | | | Mostly focused on docstrings (''' → """), indentation, empty lines, and superfluous parenthesis.
* Fix #27: Close Pipes at parallel version of genprime.Sybren A. Stüvel2016-01-221-0/+20
| | | | Now closing pipes after reading result, and added a unittest.
* Updated key loading example and included it as unit test, fixes bug #31Sybren A. Stüvel2016-01-212-0/+17
|
* No longer using obsolete base64 interface, fixes bug #30Sybren A. Stüvel2016-01-211-2/+2
|
* Removed dependency on unittest2, also merged requirements.txt for py 2.x and 3.xSybren A. Stüvel2016-01-219-22/+22
|
* Added character encoding markers for Python 2.xSybren A. Stüvel2015-11-056-0/+6
|
* Added per-file licensesRoy Kokkelkoren2015-10-2513-2/+188
|
* rsa.pkcs1.verify() should return True when successfulTim Heckman2012-10-172-2/+2
| | | | | | | | | | | | | | | - when verification passes verify() will return True, instead of None. If verification fails the function will still raise a rsa.pkcs1.VerificationError for legacy purposes. - update the docs to note that the verify() function returns True when successful - write unit tests to verify this new behavior This commit passes all build tests: Ran 44 tests in 1.217s OK
* Tweaked unittests for Python 3.xSybren A. Stüvel2012-06-181-12/+0
|
* Fixed unittesting with toxSybren A. Stüvel2011-11-061-1/+1
|
* Reverts docstring quoting syntax.Yesudeep Mangalapilly2011-08-246-30/+30
|
* Reorganizes tests.Yesudeep Mangalapilly2011-08-171-4/+3
|
* Fixes a silly error.Yesudeep Mangalapilly2011-08-171-2/+11
|
* Moves incompatible doctests to unit test modules.Yesudeep Mangalapilly2011-08-162-0/+26
|
* Adds common includes and tests.Yesudeep Mangalapilly2011-08-161-0/+3
|
* Parellelized testing. Caught a lot of bugs.Yesudeep Mangalapilly2011-08-167-30/+80
|