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 | RSS feed

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.

Source Distribution

seal2-1.0.tar.gz (13.1 kB view hashes)

Uploaded Source

Built Distribution

seal2-1.0-py2.4-macosx-10.3-i386.egg (11.8 kB view hashes)

Uploaded Source

Supported by

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