summaryrefslogtreecommitdiff
path: root/rsa/common.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix typosKian-Meng, Ang2021-11-241-2/+2
|
* Reformatting with BlackSybren A. Stüvel2021-03-291-5/+4
| | | | No functional changes.
* Fix exception cause in common.pyRam Rachum2020-06-141-2/+2
|
* Add more type hintsAndrey Semakin2020-06-031-1/+1
|
* Drop character encoding markers for Python 2.xAndrey Semakin2020-06-031-2/+0
|
* Added type annotations + some fixes to get them correctSybren A. Stüvel2019-08-041-9/+10
| | | | | | One functional change: `CryptoOperation.read_infile()` now reads bytes from `sys.stdin` instead of text. This is necessary to be consistent with the rest of the code, which all deals with bytes.
* Removed compatibility code for Python 2.7 and 3.4Sybren A. Stüvel2019-08-041-2/+0
|
* Ceiling division implementation (#88)Michael Manganiello2017-04-181-3/+25
| | | | Created as a new function as it will be needed by the new PKCS#1 2.0 implementation. Specifically, for the MGF1 function used in the OAEP encoding/decoding. This allows us not to have `math` dependencies
* Use iterative zip in Python 2 (#85)Michael Manganiello2017-01-171-0/+2
| | | Good catch, thanks!
* No longer require string operations to find bit lengths.Sybren A. Stüvel2016-03-291-37/+4
| | | | | Now that we no longer support Python 2.6, we can use int.bit_length() instead. Co-authored by @adamantike.
* Introduced NotRelativePrimeError exception.Sybren A. Stüvel2016-03-291-1/+10
| | | | | | This makes catching exceptions slightly stronger, as it is now possible to check for this specific exception. Furthermore, information about the not-prime numbers is included in the exception object.
* Added unittest for rsa.common.inverseSybren A. Stüvel2016-03-291-1/+1
| | | | | This unittest tests both execution branches of the function, reducing randomness of code coverage.
* Updated documentation, mostly http -> https changesSybren A. Stüvel2016-02-051-2/+2
| | | | | | Also: - changed http to https in the code - changed header underlines in the documentation to match the header length
* Big refactor to become more PEP8 compliant.Sybren A. Stüvel2016-01-221-33/+36
| | | | | Mostly focused on docstrings (''' → """), indentation, empty lines, and superfluous parenthesis.
* Reverts docstring quoting syntax.Yesudeep Mangalapilly2011-08-241-13/+13
|
* Adds the doctests for bit_size back into the function docstrings.Yesudeep Mangalapilly2011-08-241-0/+23
|
* Fixes a silly error.Yesudeep Mangalapilly2011-08-171-6/+6
|
* Moves incompatible doctests to unit test modules.Yesudeep Mangalapilly2011-08-161-15/+2
|
* Parellelized testing. Caught a lot of bugs.Yesudeep Mangalapilly2011-08-161-32/+11
|
* Adds a much faster bit_size implementation causing an overall speed up.Yesudeep Mangalapilly2011-08-121-1/+43
| | | | | * Note that the machine aligned integer_to_bytes is still faster than the older version.
* Re-implements byte_size using divmod avoiding floating-point calculations.Yesudeep Mangalapilly2011-08-111-2/+7
|
* Added basic Chinese Remainder theorem implementation, not yet used.Sybren A. Stüvel2011-08-101-0/+74
|
* Merged keygen-accurate branch to default branchSybren A. Stüvel2011-07-241-0/+17
|\
| * Added Apache 2 license notice to source filesSybren A. Stüvel2011-07-231-0/+17
| |
* | Better calculation of bit sizeSybren A. Stüvel2011-07-241-2/+29
|/
* Lot of refactorings:Sybren A. Stüvel2011-07-101-0/+13
| | | | | | | | - Added PKCS#1 module - Moved some functionality to common.py - simplified random number generation - improved and extended doctests - added changelog
* Fixed/added doctestsSybren A. Stüvel2011-06-201-2/+11
|
* More separation of the codeSybren A. Stüvel2011-06-201-0/+9