1295009Sjkim/* crypto/camellia/camellia_locl.h */ 2162911Ssimon/* ==================================================================== 3280297Sjkim * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . 4162911Ssimon * ALL RIGHTS RESERVED. 5162911Ssimon * 6162911Ssimon * Intellectual Property information for Camellia: 7162911Ssimon * http://info.isl.ntt.co.jp/crypt/eng/info/chiteki.html 8162911Ssimon * 9162911Ssimon * News Release for Announcement of Camellia open source: 10162911Ssimon * http://www.ntt.co.jp/news/news06e/0604/060413a.html 11162911Ssimon * 12162911Ssimon * The Camellia Code included herein is developed by 13162911Ssimon * NTT (Nippon Telegraph and Telephone Corporation), and is contributed 14162911Ssimon * to the OpenSSL project. 15162911Ssimon * 16162911Ssimon * The Camellia Code is licensed pursuant to the OpenSSL open source 17162911Ssimon * license provided below. 18162911Ssimon */ 19162911Ssimon/* ==================================================================== 20162911Ssimon * Copyright (c) 2006 The OpenSSL Project. All rights reserved. 21162911Ssimon * 22162911Ssimon * Redistribution and use in source and binary forms, with or without 23162911Ssimon * modification, are permitted provided that the following conditions 24162911Ssimon * are met: 25162911Ssimon * 26162911Ssimon * 1. Redistributions of source code must retain the above copyright 27280297Sjkim * notice, this list of conditions and the following disclaimer. 28162911Ssimon * 29162911Ssimon * 2. Redistributions in binary form must reproduce the above copyright 30162911Ssimon * notice, this list of conditions and the following disclaimer in 31162911Ssimon * the documentation and/or other materials provided with the 32162911Ssimon * distribution. 33162911Ssimon * 34162911Ssimon * 3. All advertising materials mentioning features or use of this 35162911Ssimon * software must display the following acknowledgment: 36162911Ssimon * "This product includes software developed by the OpenSSL Project 37162911Ssimon * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 38162911Ssimon * 39162911Ssimon * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 40162911Ssimon * endorse or promote products derived from this software without 41162911Ssimon * prior written permission. For written permission, please contact 42162911Ssimon * openssl-core@openssl.org. 43162911Ssimon * 44162911Ssimon * 5. Products derived from this software may not be called "OpenSSL" 45162911Ssimon * nor may "OpenSSL" appear in their names without prior written 46162911Ssimon * permission of the OpenSSL Project. 47162911Ssimon * 48162911Ssimon * 6. Redistributions of any form whatsoever must retain the following 49162911Ssimon * acknowledgment: 50162911Ssimon * "This product includes software developed by the OpenSSL Project 51162911Ssimon * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 52162911Ssimon * 53162911Ssimon * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 54162911Ssimon * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 55162911Ssimon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 56162911Ssimon * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 57162911Ssimon * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 58162911Ssimon * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 59162911Ssimon * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 60162911Ssimon * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 61162911Ssimon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 62162911Ssimon * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 63162911Ssimon * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 64162911Ssimon * OF THE POSSIBILITY OF SUCH DAMAGE. 65162911Ssimon * ==================================================================== 66162911Ssimon */ 67162911Ssimon 68162911Ssimon#ifndef HEADER_CAMELLIA_LOCL_H 69280297Sjkim# define HEADER_CAMELLIA_LOCL_H 70162911Ssimon 71280297Sjkimtypedef unsigned int u32; 72167612Ssimontypedef unsigned char u8; 73162911Ssimon 74238405Sjkimint Camellia_Ekeygen(int keyBitLength, const u8 *rawKey, 75280297Sjkim KEY_TABLE_TYPE keyTable); 76280297Sjkimvoid Camellia_EncryptBlock_Rounds(int grandRounds, const u8 plaintext[], 77280297Sjkim const KEY_TABLE_TYPE keyTable, 78280297Sjkim u8 ciphertext[]); 79280297Sjkimvoid Camellia_DecryptBlock_Rounds(int grandRounds, const u8 ciphertext[], 80280297Sjkim const KEY_TABLE_TYPE keyTable, 81280297Sjkim u8 plaintext[]); 82280297Sjkimvoid Camellia_EncryptBlock(int keyBitLength, const u8 plaintext[], 83280297Sjkim const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); 84280297Sjkimvoid Camellia_DecryptBlock(int keyBitLength, const u8 ciphertext[], 85280297Sjkim const KEY_TABLE_TYPE keyTable, u8 plaintext[]); 86238405Sjkimint private_Camellia_set_key(const unsigned char *userKey, const int bits, 87280297Sjkim CAMELLIA_KEY *key); 88280297Sjkim#endif /* #ifndef HEADER_CAMELLIA_LOCL_H */ 89