Pure Python implementation of the Serpent block cipher with CBC mode and PKCS#7 padding
Project description
pyserpent
Pure Python implementation of the Serpent block cipher with CBC mode and PKCS#7 padding.
Install
pip install pyserpent
## Example
from pyserpent import Serpent, serpent_cbc_encrypt, serpent_cbc_decrypt
key = Serpent.generate_key()
iv = Serpent.generateIV()
data = "Hello, Serpent!"
encrypted = serpent_cbc_encrypt(key, data, iv)
decrypted = serpent_cbc_decrypt(key, encrypted, iv)
print(decrypted.decode())
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
pyserpent-1.0.1.tar.gz
(9.3 kB
view details)
File details
Details for the file pyserpent-1.0.1.tar.gz.
File metadata
- Download URL: pyserpent-1.0.1.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ab39111643eda93c596593fc58d31526c9f4ba85f73ea65f8c659250aac748c
|
|
| MD5 |
0b070c95fad2690372fd37a783a88eee
|
|
| BLAKE2b-256 |
8d1a4cf4c959c4c24b2498c528ddcf301595df65b9fb327ba6a2392fa68e50a4
|