Skip to main content

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

This version

1.0

Download files

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

Files for seal2, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size seal2-1.0-py2.4-macosx-10.3-i386.egg (11.8 kB) File type Egg Python version 2.4 Upload date Hashes View
Filename, size seal2-1.0.tar.gz (13.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page