As title suggests, this is download and instructional page for Camellia assembler implementation. The downloadable tar-ball was updated on 25th of January 2009. The update addresses minor problem in x86_64 Camellia_cbc_encrypt and Win64 exception handler. For background information about Camellia cipher see NTT site:
Intellectual Property information for Camellia: http://info.isl.ntt.co.jp/crypt/eng/info/chiteki.html
News Release for Announcement of Camellia open source: http://www.ntt.co.jp/news/news06e/0604/060413a.html.
Back to assembler. Just like NTT's this implementation is licensed under multiple licenses and may be used under the terms of either the GNU General Public License version 2 or later, the GNU Lesser General Public License version 2.1 or later, the Mozilla Public License version 1.1 or the BSD License. Licensing terms apply to downloadable tar-ball as whole, as well as to specific modules generated by platform scripts. In OpenSSL context usage is effectively governed by the BSD License.
Currently only x86 and x86_64 implementations are provided. Assembler codes are binary compatible with NTT Camellia API version 1.2.0 and can be used as drop-in repacement for C compiler generated code. While being backward compatible this implementation modifies return value for Camellia_Ekeygen and adds three additional interfaces:
int Camellia_Ekeygen(int keyBitLength, const unsigned char *rawKey, KEY_TABLE_TYPE keyTable); void Camellia_EncryptBlock_Rounds(int grandRounds, const unsigned char *plaintext, const KEY_TABLE_TYPE keyTable, unsigned char *ciphertext); void Camellia_DecryptBlock_Rounds(int grandRounds, const unsigned char *ciphertext, const KEY_TABLE_TYPE keyTable, unsigned char *plaintext); void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t length, const CAMELLIA_KEY *key, unsigned char *ivec, int enc);
For more information about these modifications see accompanying camellia.h.
Deliverables are two sets of perl scripts that generate actual assembler code for a range of platforms. In order to generate particular code invoke relevant processor platform script and pass assembler flavor as argument, e.g.:
perl x86/cmll-x86.pl elf > cmll-x86.s
Supported assembler flavors for x86/cmll-x86.pl code are:
elf suitable for platforms using ELF executable format, e.g. Linux, Solaris, contemporary *BSD. a.out suitable for platforms using a.out executable format, e.g. DJGPP, OpenBSD prior v3.4... coff suitable for Cygwin and MinGW. win32 suitable for Microsoft Macro Assembler, MASM, version 8.0 or later. win32n suitable for nasm -f win32. macosx suitable for Mac OS X.
Supported assembler flavors for x86_64/cmll-x86_64.pl code are:
elf suitable for platforms using ELF executable format, e.g. Linux, Solaris, *BSD. masm suitable for Microsoft Macro Assembler (x64), ml64, version 8.0.50727 and later. nasm suitable for nasm -f win64, version 2.03 and later. mingw64 suitable for MinGW64. macosx suitable for Mac OS X.