| 1 |
Metadata-Version: 2.1 |
| 2 |
Name: rsa |
| 3 |
Version: 4.9 |
| 4 |
Summary: Pure-Python RSA implementation |
| 5 |
Home-page: https://stuvel.eu/rsa |
| 6 |
License: Apache-2.0 |
| 7 |
Author: Sybren A. Stüvel |
| 8 |
Author-email: [email protected] |
| 9 |
Requires-Python: >=3.6,<4 |
| 10 |
Classifier: Development Status :: 5 - Production/Stable |
| 11 |
Classifier: Intended Audience :: Developers |
| 12 |
Classifier: Intended Audience :: Education |
| 13 |
Classifier: Intended Audience :: Information Technology |
| 14 |
Classifier: License :: OSI Approved :: Apache Software License |
| 15 |
Classifier: Operating System :: OS Independent |
| 16 |
Classifier: Programming Language :: Python |
| 17 |
Classifier: Programming Language :: Python :: 3 |
| 18 |
Classifier: Programming Language :: Python :: 3.10 |
| 19 |
Classifier: Programming Language :: Python :: 3.6 |
| 20 |
Classifier: Programming Language :: Python :: 3.7 |
| 21 |
Classifier: Programming Language :: Python :: 3.8 |
| 22 |
Classifier: Programming Language :: Python :: 3.9 |
| 23 |
Classifier: Programming Language :: Python :: Implementation :: CPython |
| 24 |
Classifier: Programming Language :: Python :: Implementation :: PyPy |
| 25 |
Classifier: Topic :: Security :: Cryptography |
| 26 |
Requires-Dist: pyasn1 (>=0.1.3) |
| 27 |
Project-URL: Repository, https://github.com/sybrenstuvel/python-rsa |
| 28 |
Description-Content-Type: text/markdown |
| 29 |
|
| 30 |
# Pure Python RSA implementation |
| 31 |
|
| 32 |
[](https://pypi.org/project/rsa/) |
| 33 |
[](https://travis-ci.org/sybrenstuvel/python-rsa) |
| 34 |
[](https://coveralls.io/github/sybrenstuvel/python-rsa?branch=master) |
| 35 |
[](https://codeclimate.com/github/codeclimate/codeclimate/maintainability) |
| 36 |
|
| 37 |
[Python-RSA](https://stuvel.eu/rsa) is a pure-Python RSA implementation. It supports |
| 38 |
encryption and decryption, signing and verifying signatures, and key |
| 39 |
generation according to PKCS#1 version 1.5. It can be used as a Python |
| 40 |
library as well as on the commandline. The code was mostly written by |
| 41 |
Sybren A. Stüvel. |
| 42 |
|
| 43 |
Documentation can be found at the [Python-RSA homepage](https://stuvel.eu/rsa). For all changes, check [the changelog](https://github.com/sybrenstuvel/python-rsa/blob/master/CHANGELOG.md). |
| 44 |
|
| 45 |
Download and install using: |
| 46 |
|
| 47 |
pip install rsa |
| 48 |
|
| 49 |
or download it from the [Python Package Index](https://pypi.org/project/rsa/). |
| 50 |
|
| 51 |
The source code is maintained at [GitHub](https://github.com/sybrenstuvel/python-rsa/) and is |
| 52 |
licensed under the [Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| 53 |
|
| 54 |
## Security |
| 55 |
|
| 56 |
Because of how Python internally stores numbers, it is very hard (if not impossible) to make a pure-Python program secure against timing attacks. This library is no exception, so use it with care. See https://securitypitfalls.wordpress.com/2018/08/03/constant-time-compare-in-python/ for more info. |
| 57 |
|
| 58 |
## Setup of Development Environment |
| 59 |
|
| 60 |
``` |
| 61 |
python3 -m venv .venv |
| 62 |
. ./.venv/bin/activate |
| 63 |
pip install poetry |
| 64 |
poetry install |
| 65 |
``` |
| 66 |
|
| 67 |
## Publishing a New Release |
| 68 |
|
| 69 |
Since this project is considered critical on the Python Package Index, |
| 70 |
two-factor authentication is required. For uploading packages to PyPi, an API |
| 71 |
key is required; username+password will not work. |
| 72 |
|
| 73 |
First, generate an API token at https://pypi.org/manage/account/token/. Then, |
| 74 |
use this token when publishing instead of your username and password. |
| 75 |
|
| 76 |
As username, use `__token__`. |
| 77 |
As password, use the token itself, including the `pypi-` prefix. |
| 78 |
|
| 79 |
See https://pypi.org/help/#apitoken for help using API tokens to publish. This |
| 80 |
is what I have in `~/.pypirc`: |
| 81 |
|
| 82 |
``` |
| 83 |
[distutils] |
| 84 |
index-servers = |
| 85 |
rsa |
| 86 |
|
| 87 |
# Use `twine upload -r rsa` to upload with this token. |
| 88 |
[rsa] |
| 89 |
repository = https://upload.pypi.org/legacy/ |
| 90 |
username = __token__ |
| 91 |
password = pypi-token |
| 92 |
``` |
| 93 |
|
| 94 |
``` |
| 95 |
. ./.venv/bin/activate |
| 96 |
pip install twine |
| 97 |
|
| 98 |
poetry build |
| 99 |
twine check dist/rsa-4.9.tar.gz dist/rsa-4.9-*.whl |
| 100 |
twine upload -r rsa dist/rsa-4.9.tar.gz dist/rsa-4.9-*.whl |
| 101 |
``` |
| 102 |
|
| 103 |
The `pip install twine` is necessary as Python-RSA requires Python >= 3.6, and |
| 104 |
Twine requires at least version 3.7. This means Poetry refuses to add it as |
| 105 |
dependency. |
| 106 |
|