Skip to main content

Pure-Python implementation of cryptographic algorithms (RSA, ElGamal, AES, DES, Diffie-Hellman)

Project description

sps-crypto

A Python library providing implementations of various cryptographic algorithms. This project includes classical ciphers, modern symmetric and asymmetric encryption algorithms, digital signatures, and related utilities. It is primarily intended for educational purposes and developers interested in exploring cryptography.

Note: This library is currently in Stable status (version 1.0.6).

Features

The library currently includes implementations for:

Classical Ciphers:

  • Caesar Cipher
  • Vigenere Cipher
  • Hill Cipher
  • Playfair Cipher

Symmetric Encryption:

  • DES (Data Encryption Standard)
  • S-DES (Simplified DES)
  • AES (Advanced Encryption Standard) - Currently includes MixColumns/InvMixColumns operations.

Asymmetric Encryption:

  • RSA (Rivest–Shamir–Adleman)
  • ElGamal Encryption System

Digital Signatures:

  • RSA Digital Signature
  • ElGamal Digital Signature

Key Exchange:

  • Diffie-Hellman Key Exchange (including simulation of Man-in-the-Middle attack)

Utilities:

  • Prime number generation and testing
  • Primitive root finding
  • Modular exponentiation and modular inverse
  • Hashing (SHA-256 used internally for signatures)
  • Text/Integer conversions for cryptographic operations

Networking:

  • Basic client/server socket implementation (details in examples/sockets.py)

Installation

You can install the library using pip:

pip install sps-crypto

Requires Python version 3.6 or higher.

Usage Examples
Here are a few basic examples of how to use the library.
Usage examples can be found in the examples/dir


Author
Shourya Pratap Singh - sp.singh@gmail.com
Project Links
GitHub Repository: https://github.com/amspsingh04/sps_crypto
Bug Reports: https://github.com/amspsingh04/sps_crypto/issues
Contributing
Contributions, issues, and feature requests are welcome. Please refer to the GitHub repository and issue tracker.

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

sps_crypto-1.0.62.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sps_crypto-1.0.62-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file sps_crypto-1.0.62.tar.gz.

File metadata

  • Download URL: sps_crypto-1.0.62.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for sps_crypto-1.0.62.tar.gz
Algorithm Hash digest
SHA256 4e2d8e2db41d4d387113b4a0e55bd6ba3f190b2f6c6b4395dcdd2ff13ffac2ac
MD5 8a697774dc95ac408c8ff6e0065e5a94
BLAKE2b-256 e9aa3d57b8c3263c5b82929852558f9f755d68eaf5f7166b9ec110a08fd9f8ee

See more details on using hashes here.

File details

Details for the file sps_crypto-1.0.62-py3-none-any.whl.

File metadata

  • Download URL: sps_crypto-1.0.62-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for sps_crypto-1.0.62-py3-none-any.whl
Algorithm Hash digest
SHA256 2faf897a5d0567f0d5e22f22b78714b24120d80706e9a72f8dad4ed44dc6ebd2
MD5 5c9308bb44145f15b1de992da7136a0f
BLAKE2b-256 0f45bae729c2dfe12c444a9f5820c3c92f46552b44e4ec90b87d5faebe3a7fcb

See more details on using hashes here.

Supported by

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