https://github.com/dheurtev/cryptopyutils
A high-level Python3 cryptography library using cryptography
https://github.com/dheurtev/cryptopyutils
administration cryptography development python python-3 python3
Last synced: about 1 year ago
JSON representation
A high-level Python3 cryptography library using cryptography
- Host: GitHub
- URL: https://github.com/dheurtev/cryptopyutils
- Owner: dheurtev
- License: apache-2.0
- Created: 2022-07-09T14:14:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-09T17:19:34.000Z (almost 4 years ago)
- Last Synced: 2025-04-20T17:04:44.854Z (about 1 year ago)
- Topics: administration, cryptography, development, python, python-3, python3
- Language: Python
- Homepage:
- Size: 161 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
.. image:: https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold
:alt: Project generated with PyScaffold
:target: https://pyscaffold.org/
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:alt: Style follow black
:target: https://github.com/psf/black
.. _cryptographyurl: https://cryptography.io/en/latest/
##############
cryptopyutils
##############
High-level Python3 cryptography library using `cryptography `_ with sensible configurable defaults and CLI scripts.
``cryptopyutils`` can be used to :
* encrypt ("derive") and verify passwords.
* generate, save and load Asymmetric encryption keys and certificates :
* private keys/public keys (RSA, ED25519, ECDSA, DSA, etc).
* generate, save and load x509 Certificate Signing Request (CSR).
* generate, save and load x509 Certificates, particularly self-signed certificates, to be used in SSL applications.
* encrypt or decrypt messages with RSA.
* sign and verify messages with asymetric encryption. It works with small messages or in digest mode.
* perform constant time comparisons between two series of bytes (prevents timing attacks).
Please provide feedback to `@dheurtevent1`_.
.. _@dheurtevent1: http://twitter.com/dheurtevent1
***********
Disclaimer
***********
.. caution:: USE AT YOUR OWN RISK. Has been tested only on Ubuntu 20.04 (Linux) with python 3.9.12.
****************
How to install
****************
Requirements
=============
This library requires python ``cryptography``, ``distro`` and ``pyaml`` (for the CLI examples)
.. code-block:: console
$ pip install cryptography distro pyaml
`cryptography `_ uses openSSL as its backend engine.
Install the library
======================
.. code-block:: console
$ pip install cryptopyutils
.. _usage:
******
Usage
******
* ``cryptopyutils`` is free open source software. It is released under `the Apache 2.0 licence `_.
* You are free to incorporate the library and/or its CLI in your open-source or proprietary projects.
**To use the library**
You can read the following how to guides:
* `How to : private key `_
* `How to : public key `_
* `How to : password `_
You can also read the source code of other examples.
In addition, you can have a look at the `API `_ and at the source code
in the `Github repository `_.
**To use the CLI examples**
You can have a look at the CLI page.
***************************
Code quality and stability
***************************
* The code is documented, tested (>70 tests) and provided with examples.
* Defaults can be provided at run time by developers or can be modified in the config.py file.
* The default values use the NIST recommendations and recommendations of the `cryptography` packages, as well as :
* https://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.html
* https://soatok.blog/2022/05/19/guidance-for-choosing-an-elliptic-curve-signature-algorithm-in-2022
* https://www.keylength.com/en/4/
* `cryptopyutils` has a goal of strong API stability policy:
* Public API shall not be removed or renamed without providing a compatibility alias.
* The behavior of existing APIs shall not change.
* Exceptions to API stability are for security purposes to resolve security issues or harden the library against a possible attack or underlying changes in `cryptography`.