############################################################

camellia_rb

############################################################

About Camellia

Camellia is a symmetric key block cipher developed jointly in 2000 by world top class encryption
researchers at NTT and Mitsubishi Electric Corporation. Technologically speaking, Camellia naturally
has not only a high level of security, but also excellent efficiency and practical characteristics.
It can be implemented at high performance by software on various platforms. In regard to hardware
implementation, compact, and low-power consumption type implementation as well as high-speed
implementation is possible.

Based on these technological advantages, Camellia has been internationally recognized,
for example the selection project on the European recommendation of strong cryptographic primitives,
NESSIE, evaluated Camellia to have "many similarities to the AES, so much of the analysis for the AES
is also applicable to Camellia." Currently, Camellia is the only cipher internationally recognized
which has the same level of security and performance as AES, and is selected for many international
standard/recommended ciphers. In particular, as Japanese domestic ciphers, this is the first case
to be approved as IETF standard ciphers (Proposed Standard RFC) .

Camellia Website : http://info.isl.ntt.co.jp/crypt/eng/camellia/index.html


About camellia_rb

camellia_rb is a Camellia package for Ruby. Camellia engine is implemented in "C".
Camellia implimentation is imported from
http://info.isl.ntt.co.jp/crypt/camellia/dl/camellia-BSD-1.2.0.tar.gz

Supported key length : 128bit/192bit/256bit
Supported modes of operation : ECB/CFB/CBC
license : see License.txt


How to install

% ruby extconf.rb
% make
% make install


How to use

Interfaces

Camellia.new('key')

#ECB
Camellia#encrypt('plain text 16byte')
Camellia#decrypt('cipher text 16byte')

#CFB
Camellia#cfb_salt('salt 16byte')
Camellia#cfb_encrypt('plain text')
Camellia#cfb_decrypt('cipher text')

#CBC
Camellia#cbc_salt('salt 16byte')
Camellia#cbc_pchar('padding character')
Camellia#cbc_encrypt('plain text')
Camellia#cbc_decryp('cipher text')


Sample program(camellia-example.rb)

# ruby camellia-example.rb

deadbeefdeadbeef
now is the time for all good men to come to the aid of thei.chr country.
now is the time for all good men to come to the aid of thei.chr country.



############################################################

* Copyright (c) 2008
* NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved.

############################################################