日本語  英語
Last Update: 2008-09-07.

Camellia for Open Source Softwares

Introduction

The Camellia cipher algorithm is 128 bit cipher developed by NTT and Mitsubishi Electric researchers. This site is distributing a patch to support Camellia on free and open source softwares.

A patch for OpenSSH

Camellia-ready OpenSSL is needed for following patches. You can investigate whether your OpenSSL supports Camellia or not by using "openssl ciphers" command.
e.g.)
If supported you will see:
% openssl ciphers -v "CAMELLIA"
ADH-CAMELLIA256-SHA     SSLv3 Kx=DH       Au=None Enc=Camellia(256) Mac=SHA1
DHE-RSA-CAMELLIA256-SHA SSLv3 Kx=DH       Au=RSA  Enc=Camellia(256) Mac=SHA1
DHE-DSS-CAMELLIA256-SHA SSLv3 Kx=DH       Au=DSS  Enc=Camellia(256) Mac=SHA1
CAMELLIA256-SHA         SSLv3 Kx=RSA      Au=RSA  Enc=Camellia(256) Mac=SHA1
ADH-CAMELLIA128-SHA     SSLv3 Kx=DH       Au=None Enc=Camellia(128) Mac=SHA1
DHE-RSA-CAMELLIA128-SHA SSLv3 Kx=DH       Au=RSA  Enc=Camellia(128) Mac=SHA1
DHE-DSS-CAMELLIA128-SHA SSLv3 Kx=DH       Au=DSS  Enc=Camellia(128) Mac=SHA1
CAMELLIA128-SHA         SSLv3 Kx=RSA      Au=RSA  Enc=Camellia(128) Mac=SHA1

If not you will see:
% openssl ciphers -v "CAMELLIA"
(nothing will be shown)
NOTICE: the signature for camellia has changed in OpenSSH 4.7p1 version 0.1 patch.

A patch for using as FreeBSD port

To use the patch, you should install security/openssl before. Fetch patch-yng47p1. Copy it to /usr/ports/security/openssh-portable/files. Then, make and install it. Note that with this patch, Camellia cipher becomes highest priority.

Bug 1340: Support for Camellia block cipher to OpenSSH-portable.

The patch is already posted to Bugzilla for portable OpenSSH.
https://bugzilla.mindrot.org/show_bug.cgi?id=1340
If you like this, please vote.

Camellia for PEAR - PHP Extension and Application Repository

PHP Extension and Application Repository (PEAR) is a set of PHP library. I implemented Crypt_Camellia package for PEAR. Since it is pure PHP implementation, you can use this package just installing it to PEAR directory.

Proposal posted to pear website

I have already posted the following proposal:
Proposal for "Crypt_Camellia"

A patch for libmcrypt

libmcrypt is an implementation of encryption algorithms. It includes arcfour, blowfish, AES, and so on. Following patch will add support for Camellia block cipher to libmcrypt. Note that this patch includes LGPL licensed Camellia sorce code provided by NTT through its website.

[ 2069574 ] Support for Camellia block cipher

The patch is already posted to bug tracking system on lanchpad.
http://sourceforge.net/tracker/index.php?func=detail&aid=2069574&group_id=87941&atid=584896

To use the patch with php5

To enable libmcrypt patch on php5, you needs following patch to register Camellia block cipher.

A patch for OCaml cryptokit

Cryptokit is a module for objective caml (aka. OCaml). This patch will add support for Camellia block cipher to the cryptkit. Note that this patch includes LGPL licensed Camellia sorce code provided by NTT through its website.

A patch for Python Cryptography Toolkit

Python Cryptography Toolkit (aka. PyCrypto) is a collection of cryptographic algorithms and protocols for use from Python. It includes hash functions, such as MD5 and SHA256, block encryption algorithms, and so on. Following patch will add support for Camellia block cipher to the toolkit. Note that the patch includes modified BSD licensed Camellia source code provided by NTT through its website.

Bug 258561: Add support for Camellia block cipher

The patch is already posted to bug tracking system on lanchpad.
https://bugs.launchpad.net/pycrypto/+bug/258561

A patch for GNU TLS (gnutls)

Notice: this patch is merged to the GNU TLS, and this patch will not be updated any more.
This patch needs libgcrypt which support the Camellia block cipher. Because of license limitation, even libgcrypt 1.3.0 will not install Camellia by default. You need to configure libgcrypt by --enable-cipher=camellia and so on. If supported you will see camellia in libgcrypt-config --algorithms.
e.g.)
% libgcrypt-config --algorithms
Symmetric cipher algorithms: arcfour blowfish cast5 des aes twofish serpent rfc2268 seed camellia
Public-key cipher algorithms: dsa elgamal rsa ecc
Message digest algorithms: crc md4 md5 rmd160 sha1 sha256 sha512 tiger whirlpool

Copyright

I transfered my copyright for the gnutls patches to the Free Software Foundation on August 17th, 2007. The patch is imported to GNU TLS source tree from 2.1.1 release. You can try it through GNU TLS test server: http://www.gnu.org/software/gnutls/server.html

A patch for GnuPG and libgcrypt

Since Free Software Foundation, Inc. has already supported camellia for GnuPG after Camellia becomes optional cipher of OpenPGP, I won't update followings.
Since the patch includes an open source program made by NTT, you should agree with the notice you can see:
http://info.isl.ntt.co.jp/crypt/eng/camellia/source.html before you use the patch.

Usage of the patch

You can use the program with patch(1) command like this:
% wget http://www.ring.gr.jp/pub/net/gnupg/gnupg/gnupg-1.4.5.tar.bz2
% bunzip2 -c gnupg-1.4.5.tar.bz2 | tar xf -
% wget http://www.is.titech.ac.jp/~yanagis0/text/camellia/gnupg-1.4.5.patch
% patch -p0 < gnupg-1.4.5.patch
Then, you can use the Camellia encription algorithm with GnuPG after configure and make like this:
% cd gnupg-1.4.5
% ./configure
% make && make install
You can use the Camellia encription algorithm with patched gpg program like this:
% rehash
% gpg --cipher-algo CAMELLIA -c TEST
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information
gpg: WARNING: using experimental cipher algorithm CAMELLIA
Since the patch uses an algorithm number greater than 100, which represent an algorithm for some testing, you will see following warning everytime you use this program with the Camellia encription algorithm:
gpg: WARNING: using experimental cipher algorithm CAMELLIA
If you are the person who know the GnuPG developers, please let them know this patch and let them give an algorithm number to the Camellia encription algorithm.

Attention

News


Copyright © 2006-2008 Yoshisato YANAGISAWA
If you have any questions or opinions, please send me an e-mail.