172c33676SMaxim Ag /* $OpenBSD: cmll_locl.h,v 1.6 2016/12/21 15:49:29 jsing Exp $ */ 2f5b1c8a1SJohn Marino /* ==================================================================== 3f5b1c8a1SJohn Marino * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . 4f5b1c8a1SJohn Marino * ALL RIGHTS RESERVED. 5f5b1c8a1SJohn Marino * 6f5b1c8a1SJohn Marino * Intellectual Property information for Camellia: 7f5b1c8a1SJohn Marino * http://info.isl.ntt.co.jp/crypt/eng/info/chiteki.html 8f5b1c8a1SJohn Marino * 9f5b1c8a1SJohn Marino * News Release for Announcement of Camellia open source: 10f5b1c8a1SJohn Marino * http://www.ntt.co.jp/news/news06e/0604/060413a.html 11f5b1c8a1SJohn Marino * 12f5b1c8a1SJohn Marino * The Camellia Code included herein is developed by 13f5b1c8a1SJohn Marino * NTT (Nippon Telegraph and Telephone Corporation), and is contributed 14f5b1c8a1SJohn Marino * to the OpenSSL project. 15f5b1c8a1SJohn Marino * 16f5b1c8a1SJohn Marino * The Camellia Code is licensed pursuant to the OpenSSL open source 17f5b1c8a1SJohn Marino * license provided below. 18f5b1c8a1SJohn Marino */ 19f5b1c8a1SJohn Marino /* ==================================================================== 20f5b1c8a1SJohn Marino * Copyright (c) 2006 The OpenSSL Project. All rights reserved. 21f5b1c8a1SJohn Marino * 22f5b1c8a1SJohn Marino * Redistribution and use in source and binary forms, with or without 23f5b1c8a1SJohn Marino * modification, are permitted provided that the following conditions 24f5b1c8a1SJohn Marino * are met: 25f5b1c8a1SJohn Marino * 26f5b1c8a1SJohn Marino * 1. Redistributions of source code must retain the above copyright 27f5b1c8a1SJohn Marino * notice, this list of conditions and the following disclaimer. 28f5b1c8a1SJohn Marino * 29f5b1c8a1SJohn Marino * 2. Redistributions in binary form must reproduce the above copyright 30f5b1c8a1SJohn Marino * notice, this list of conditions and the following disclaimer in 31f5b1c8a1SJohn Marino * the documentation and/or other materials provided with the 32f5b1c8a1SJohn Marino * distribution. 33f5b1c8a1SJohn Marino * 34f5b1c8a1SJohn Marino * 3. All advertising materials mentioning features or use of this 35f5b1c8a1SJohn Marino * software must display the following acknowledgment: 36f5b1c8a1SJohn Marino * "This product includes software developed by the OpenSSL Project 37f5b1c8a1SJohn Marino * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 38f5b1c8a1SJohn Marino * 39f5b1c8a1SJohn Marino * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 40f5b1c8a1SJohn Marino * endorse or promote products derived from this software without 41f5b1c8a1SJohn Marino * prior written permission. For written permission, please contact 42f5b1c8a1SJohn Marino * openssl-core@openssl.org. 43f5b1c8a1SJohn Marino * 44f5b1c8a1SJohn Marino * 5. Products derived from this software may not be called "OpenSSL" 45f5b1c8a1SJohn Marino * nor may "OpenSSL" appear in their names without prior written 46f5b1c8a1SJohn Marino * permission of the OpenSSL Project. 47f5b1c8a1SJohn Marino * 48f5b1c8a1SJohn Marino * 6. Redistributions of any form whatsoever must retain the following 49f5b1c8a1SJohn Marino * acknowledgment: 50f5b1c8a1SJohn Marino * "This product includes software developed by the OpenSSL Project 51f5b1c8a1SJohn Marino * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 52f5b1c8a1SJohn Marino * 53f5b1c8a1SJohn Marino * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 54f5b1c8a1SJohn Marino * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 55f5b1c8a1SJohn Marino * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 56f5b1c8a1SJohn Marino * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 57f5b1c8a1SJohn Marino * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 58f5b1c8a1SJohn Marino * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 59f5b1c8a1SJohn Marino * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 60f5b1c8a1SJohn Marino * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 61f5b1c8a1SJohn Marino * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 62f5b1c8a1SJohn Marino * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 63f5b1c8a1SJohn Marino * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 64f5b1c8a1SJohn Marino * OF THE POSSIBILITY OF SUCH DAMAGE. 65f5b1c8a1SJohn Marino * ==================================================================== 66f5b1c8a1SJohn Marino */ 67f5b1c8a1SJohn Marino 68f5b1c8a1SJohn Marino #ifndef HEADER_CAMELLIA_LOCL_H 69f5b1c8a1SJohn Marino #define HEADER_CAMELLIA_LOCL_H 70f5b1c8a1SJohn Marino 7172c33676SMaxim Ag __BEGIN_HIDDEN_DECLS 7272c33676SMaxim Ag 73f5b1c8a1SJohn Marino typedef unsigned int u32; 74f5b1c8a1SJohn Marino typedef unsigned char u8; 75f5b1c8a1SJohn Marino 76f5b1c8a1SJohn Marino int Camellia_Ekeygen(int keyBitLength, const u8 *rawKey, 77f5b1c8a1SJohn Marino KEY_TABLE_TYPE keyTable); 78f5b1c8a1SJohn Marino void Camellia_EncryptBlock_Rounds(int grandRounds, const u8 plaintext[], 79f5b1c8a1SJohn Marino const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); 80f5b1c8a1SJohn Marino void Camellia_DecryptBlock_Rounds(int grandRounds, const u8 ciphertext[], 81f5b1c8a1SJohn Marino const KEY_TABLE_TYPE keyTable, u8 plaintext[]); 82f5b1c8a1SJohn Marino void Camellia_EncryptBlock(int keyBitLength, const u8 plaintext[], 83f5b1c8a1SJohn Marino const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); 84f5b1c8a1SJohn Marino void Camellia_DecryptBlock(int keyBitLength, const u8 ciphertext[], 85f5b1c8a1SJohn Marino const KEY_TABLE_TYPE keyTable, u8 plaintext[]); 86f5b1c8a1SJohn Marino 8772c33676SMaxim Ag __END_HIDDEN_DECLS 8872c33676SMaxim Ag 89f5b1c8a1SJohn Marino #endif /* #ifndef HEADER_CAMELLIA_LOCL_H */ 90