

                 pyTomCrypt.py (v0.16)
                 ---------------------


A ctypes Python interface to LibTomCrypt.


Copyright (c) 2007 by Larry Bugbee.
All Rights Reserved.
  
NB: It is my intent to release this into the Public Domain in 
    the coming weeks.  But first, I want private reviews and 
    an opportunity to make this somewhat decent before going 
    public.  Until then, please, no public distribution.


Implements:
  - public key algorithms:  DSA, RSA, ECC
  - hash algorithms:
      md2, md4, md5, rmd128, rmd160, rmd256, rmd320, 
      sha1, sha224, sha256, sha384, sha512, tiger, whirlpool
  - symmetric ciphers:
      aes, rijndael, twofish, blowfish, des, rc2, des3, cast5, 
      kasumi, anubis, kseed, khazad, noekeon, rc5, rc6, xtea,
      skipjack
  - modes: ecb, cbc, ctr, cfb, ofb
  - MACs:  HMAC, OMAC, PMAC, Pelican, XCBC, F9
  - PRNGs:  fortuna, rc4, sprng, yarrow, sober128
  - libtomcrypt 1.16
  - libtommath  0.40

Not (yet?) supported:
  - symmetric cipher: safer
  - modes: lrw, f8
  - hash: chc
  - EC curves other than Tom's base set
  - DSA encrypt/decrypt
  - ASN.1/DER routines
  - EAX, OCB, CCM, GCM
  - Toms fast math


Installed and tested on:
  - miniMac PPC, MacOSX 10.4.8, gcc 4.0.1, Python 2.4.4
  - miniMac PPC, Ubuntu 6.10, gcc 4.1.1, Python 2.4.4c1
  - AMD Athlon, Mandrivia 2006, gcc 3.4.6, Python 2.4.1
Todate there has been no testing on Intel or on Windows.  (Not
anti, just don't have one.)


Examples of use: see contents of demos and test dirs


Prerequisites (compiled and installed):
  - Python 2.4 (with ctypes added) or 2.5 (ctypes is included)
  - LibTomCrypt 1.16
  - LibTomMath 0.40



      libtommath.so                  in /usr/local/lib
           |
      libtomcrypt.so                 in /usr/local/lib
           |   \
           | libtomcrypt_plus.so     in /usr/local/lib
           |   /
      pyTomCrypt.py                  in Python's site-packages
           |
    your Python program


LibTomMath
----------
  Follow Tom's instructions

LibTomCrypt
-----------
  Follow Tom's instructions

LibTomCrypt_plus
----------------
  libtomcrypt_plus.so needs to be accessible from ctypes and 
  perhaps live in /usr/lib or /usr/local/lib.  It cannot be in 
  an egg nor can it be an extension in site-packages, both of 
  which are problematic.
  
  make -f makefile.plus
  sudo make -f makefile.plus install

pyTomCrypt
----------
  sudo python setup.py install


Larry Bugbee
February 24, 2007
Kent, Washington, USA

================================================================
================================================================
================================================================
