Skip to main content

Pure-Python RSA implementation

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Python-RSA has been archived

Hi folks,

I'm Sybren, one of the original authors and the maintainer of this project. Unfortunately I don't have the time and brain space left to properly maintain Python-RSA. As you can see from the lack of activity on the open issues, and the lack of commits, that has been the case for a while now.

As Python-RSA is included as a dependency in quite a few high-profile projects, I don't feel comfortable handing over the project to someone else. It's just too big of a risk.

Thanks for having used this little library for so long, and in so many projects. I truely didn't expect that when I started working on it. Also big thanks to all the people helping out and improving the project.

There are improvements that haven't made it into a new release. As I said, I don't have the time and the brain space to really investigate and oversee the security impact of all those changes. It's not a decision I've made lightly.

So that's it. If you want to keep the project alive, please fork it. Give it the love it deserves, investigate those yet-unreleased improvements, and have a project that's then already better than how I left this one.

Cheers, Sybren


Pure Python RSA implementation

PyPI Build Status Coverage Status Code Climate

Python-RSA is a pure-Python RSA implementation. It supports encryption and decryption, signing and verifying signatures, and key generation according to PKCS#1 version 1.5. It can be used as a Python library as well as on the commandline. The code was mostly written by Sybren A. Stüvel.

Documentation can be found at the Python-RSA homepage. For all changes, check the changelog.

Download and install using:

pip install rsa

or download it from the Python Package Index.

The source code is maintained at GitHub and is licensed under the Apache License, version 2.0

Security

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.

Setup of Development Environment

python3 -m venv .venv
. ./.venv/bin/activate
pip install poetry
poetry install

Publishing a New Release

Since this project is considered critical on the Python Package Index, two-factor authentication is required. For uploading packages to PyPi, an API key is required; username+password will not work.

First, generate an API token at https://pypi.org/manage/account/token/. Then, use this token when publishing instead of your username and password.

As username, use __token__. As password, use the token itself, including the pypi- prefix.

See https://pypi.org/help/#apitoken for help using API tokens to publish. This is what I have in ~/.pypirc:

[distutils]
index-servers =
    rsa

# Use `twine upload -r rsa` to upload with this token.
[rsa]
  repository = https://upload.pypi.org/legacy/
  username = __token__
  password = pypi-token
. ./.venv/bin/activate
pip install twine

poetry build
twine check dist/rsa-4.9.1.tar.gz dist/rsa-4.9.1-*.whl
twine upload -r rsa dist/rsa-4.9.1.tar.gz dist/rsa-4.9.1-*.whl

The pip install twine is necessary as Python-RSA requires Python >= 3.6, and Twine requires at least version 3.7. This means Poetry refuses to add it as dependency.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rsa-4.9.1.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

rsa-4.9.1-py3-none-any.whl (34.7 kB view details)

Uploaded Python 3

File details

Details for the file rsa-4.9.1.tar.gz.

File metadata

  • Download URL: rsa-4.9.1.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for rsa-4.9.1.tar.gz
Algorithm Hash digest
SHA256 e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75
MD5 a1d93db78c604788f56a84f6df6f1eee
BLAKE2b-256 da8a22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4

See more details on using hashes here.

File details

Details for the file rsa-4.9.1-py3-none-any.whl.

File metadata

  • Download URL: rsa-4.9.1-py3-none-any.whl
  • Upload date:
  • Size: 34.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for rsa-4.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 68635866661c6836b8d39430f97a996acbd61bfa49406748ea243539fe239762
MD5 f3ff51470cb905d924901934238dbed3
BLAKE2b-256 648d0133e4eb4beed9e425d9a98ed6e081a55d195481b7632472be1af08d2f6b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page