Welcome to python-camellia’s documentation!

This is the documentation of python-camellia, a cryptographic library implementing the Camellia cipher in python.

>>> import camellia
>>> plain = b"This is a text. "
>>> c1 = camellia.CamelliaCipher(key=b'16 byte long key', IV=b'16 byte iv. xxxx', mode=camellia.MODE_CBC)
>>> encrypted = c1.encrypt(plain)
>>> c2 = camellia.CamelliaCipher(key=b'16 byte long key', IV=b'16 byte iv. xxxx', mode=camellia.MODE_CBC)
>>> c2.decrypt(encrypted)
b'This is a text. '

Installation

Install with pip:

$ pip install python-camellia

API

The new constructor

Modes of operation

The CamelliaCipher class

Low-level camellia functions

Licenses

python-camellia is dual licensed:

  • The Python code is MIT licensed,
  • the C code is 2-Clause-BSD licensed.