SEAL2 encryption
Project description
Introduction
This module implements the SEAL2 algorithm. SEAL2 is the second version of the stream cipher, SEAL, designed by Don Coppersmith and Phillip Rogaway.
Using it is very simple. First you have to create a SEAL2 context initialize with a 20-byte key”
>>> import seal2 >>> context=seal2.new("x"*20)
You can now encrypt data using the encrypt method:
>>> context.encrypt("Hello, world") '\xfb\xfd\x81\xa3\x0e\x05i\x9e\xc6\xbdU\xe7'
Decryption works very similar:
>>> context=seal2.new("x"*20) >>> context.decrypt("\xfb\xfd\x81\xa3\x0e\x05i\x9e\xc6\xbdU\xe7") 'Hello, world'
Caveat
SEAL2 is designed to generate up to 2^48 bytes of output per seed. In 1997, Handschuh and Gilbert showed, however, that the output stream can be distinguished from a random sequence after only seeing roughly 2^34 bytes of output. Thus, it is prudent to avoid using the same seed for more than 2^34 bytes of output.
Requirements & Installation
seal2 requires python 2.4 or later. You also need setuptools.
To install it you will need a working C compiler and the python development libraries and include files.
Installing it is simple: you can use the standard setup.py interface:
python setup.py install
seal2 1.0
First release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for seal2-1.0-py2.4-macosx-10.3-i386.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 252ffe8dc351c985e06879c5f62d4b798483c6d26f913b9d9192a4381681f4b4 |
|
MD5 | 748526a188134caf967dfdaae524ed34 |
|
BLAKE2b-256 | 2914af50f27c38d083a166b40b3873aca713844859288fb47794b71eb9f07277 |