Skip to main content

Python wrapper around the Camellia encryption library

Project description

= OVERVIEW =

CamCrypt is a simple Python wrapper around one of the open source
implementations of the Camellia encryption library. It makes use of
the Python ctypes module to reference the functions available in the
C library.


= CAVEATS =

The current version is only setup for Unix/Linux environments, but
should be easy to modify for MS-Windows for those familiar with the
Python ctypes modules.


= USAGE =

First, compile the C code into a shared library:
$ make

Next, copy the shared library and Python file to your project:
$ cp camellia.so camcrypt.py DEST/

Import the module into your script:
import camcrypt
Create a CamCrypt object, providing it the shared library path:
mycrypt = camcrypt.CamCrypt(LIBRARY_PATH)
Initialize the keytable with the number of key bits and a key/passphrase:
mycrypt.keygen(128, "password")
Encrypt in blocks of 16 bytes:
ciphertext = mycrypt.encrypt(plaintext)
Or decrypt in blocks of 16 bytes:
plaintext = mycrypt.decrypt(ciphertext)


= BASIC INFORMATION =

Updates and contact information may be found on the project's website:
https://github.com/knowmalware/camcrypt

Current version is 1.2.0, corresponding with the C implementation
included with this module. The C code was copied from:
http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/camellia-GPL-1.2.0.tar.gz

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

camcrypt-1.2.0.tar.gz (20.3 kB view details)

Uploaded Source

File details

Details for the file camcrypt-1.2.0.tar.gz.

File metadata

  • Download URL: camcrypt-1.2.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for camcrypt-1.2.0.tar.gz
Algorithm Hash digest
SHA256 267ca9f08b27013536f82f556c16a4af4026d903954ab69a7da6f6299cedbdbd
MD5 cb988cb827a043785e46ce01de6b7c6b
BLAKE2b-256 ffaee4b22249436e9ffa96f3c80111da42853fe3e541cf73575319132628bee8

See more details on using hashes here.

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