svn commit: lorikeet r788 - in trunk/heimdal/lib/hcrypto: .
abartlet at samba.org
abartlet at samba.org
Tue Mar 18 00:36:04 GMT 2008
Author: abartlet
Date: 2008-03-18 00:36:03 +0000 (Tue, 18 Mar 2008)
New Revision: 788
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=788
Log:
Change to the GPL, rather than looks-like-BSD licenced versions of the
camellia cypher.
Downloaded from http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/camellia-GPL-1.2.0.tar.gz
Andrew Bartlett
Modified:
trunk/heimdal/lib/hcrypto/camellia-ntt.c
trunk/heimdal/lib/hcrypto/camellia-ntt.h
Changeset:
Modified: trunk/heimdal/lib/hcrypto/camellia-ntt.c
===================================================================
--- trunk/heimdal/lib/hcrypto/camellia-ntt.c 2008-03-13 05:39:49 UTC (rev 787)
+++ trunk/heimdal/lib/hcrypto/camellia-ntt.c 2008-03-18 00:36:03 UTC (rev 788)
@@ -1,28 +1,21 @@
-/* camellia.c ver 1.2.0
+/* camellia.h ver 1.2.0
*
- * Copyright (c) 2006,2007
- * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved.
+ * Copyright (C) 2006,2007
+ * NTT (Nippon Telegraph and Telephone Corporation).
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer as
- * the first lines of this file unmodified.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
- * THIS SOFTWARE IS PROVIDED BY NTT ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL NTT BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*
@@ -30,15 +23,13 @@
* http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html
*/
-
#include <string.h>
#include <stdlib.h>
-#include <krb5-types.h>
-#include "camellia-ntt.h"
+#include "camellia.h"
/* u32 must be 32bit word */
-typedef uint32_t u32;
+typedef unsigned int u32;
typedef unsigned char u8;
/* key constants */
@@ -453,7 +444,7 @@
#define subl(x) subL[(x)]
#define subr(x) subR[(x)]
-static void camellia_setup128(const unsigned char *key, u32 *subkey)
+void camellia_setup128(const unsigned char *key, u32 *subkey)
{
u32 kll, klr, krl, krr;
u32 il, ir, t0, t1, w0, w1;
@@ -664,7 +655,7 @@
return;
}
-static void camellia_setup256(const unsigned char *key, u32 *subkey)
+void camellia_setup256(const unsigned char *key, u32 *subkey)
{
u32 kll,klr,krl,krr; /* left half of key */
u32 krll,krlr,krrl,krrr; /* right half of key */
@@ -950,7 +941,7 @@
return;
}
-static void camellia_setup192(const unsigned char *key, u32 *subkey)
+void camellia_setup192(const unsigned char *key, u32 *subkey)
{
unsigned char kk[32];
u32 krll, krlr, krrl,krrr;
@@ -972,7 +963,7 @@
*
* "io" must be 4byte aligned and big-endian data.
*/
-static void camellia_encrypt128(const u32 *subkey, u32 *io)
+void camellia_encrypt128(const u32 *subkey, u32 *io)
{
u32 il, ir, t0, t1;
@@ -1062,7 +1053,7 @@
return;
}
-static void camellia_decrypt128(const u32 *subkey, u32 *io)
+void camellia_decrypt128(const u32 *subkey, u32 *io)
{
u32 il,ir,t0,t1; /* temporary valiables */
@@ -1155,7 +1146,7 @@
/**
* stuff for 192 and 256bit encryption/decryption
*/
-static void camellia_encrypt256(const u32 *subkey, u32 *io)
+void camellia_encrypt256(const u32 *subkey, u32 *io)
{
u32 il,ir,t0,t1; /* temporary valiables */
@@ -1269,7 +1260,7 @@
return;
}
-static void camellia_decrypt256(const u32 *subkey, u32 *io)
+void camellia_decrypt256(const u32 *subkey, u32 *io)
{
u32 il,ir,t0,t1; /* temporary valiables */
Modified: trunk/heimdal/lib/hcrypto/camellia-ntt.h
===================================================================
--- trunk/heimdal/lib/hcrypto/camellia-ntt.h 2008-03-13 05:39:49 UTC (rev 787)
+++ trunk/heimdal/lib/hcrypto/camellia-ntt.h 2008-03-18 00:36:03 UTC (rev 788)
@@ -1,28 +1,21 @@
-/* camellia.h ver 1.2.0
+/* camellia.h ver 1.2.0
*
- * Copyright (c) 2006,2007
- * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved.
+ * Copyright (C) 2006,2007
+ * NTT (Nippon Telegraph and Telephone Corporation).
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer as
- * the first lines of this file unmodified.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
- * THIS SOFTWARE IS PROVIDED BY NTT ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL NTT BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef HEADER_CAMELLIA_H
More information about the samba-cvs
mailing list