Removed RC6 from distributions.
authorPekka Riikonen <priikone@silcnet.org>
Fri, 7 Nov 2003 21:03:11 +0000 (21:03 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 7 Nov 2003 21:03:11 +0000 (21:03 +0000)
CHANGES
apps/irssi/silc.conf
lib/silccrypt/Makefile.am
lib/silccrypt/ciphers.h
lib/silccrypt/rc6.c [deleted file]
lib/silccrypt/rc6.h [deleted file]
lib/silccrypt/rc6_internal.h [deleted file]
lib/silccrypt/silccipher.c
lib/silcsim/Makefile.am
win32/libsilc/libsilc.def

diff --git a/CHANGES b/CHANGES
index f774e96598daa8c07b3afbfd675126f2a42fdce2..0536c5a4a10b7dde2fc76c48d74f2a7881623914 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+Fri Nov  7 23:01:47 EET 2003  Pekka Riikonen <priikone@silcnet.org>
+
+       * Removed RC6 from distributions.
+
 Fri Nov  7 19:38:42 EET 2003  Pekka Riikonen <priikone@silcnet.org>
 
        * Added some better comments to lib/silccrypt/silcpkcs.h,
index c2bd1c69bd57a94aef601fc78943b6c4d2e0fbc6..ba405d717cfc4ef0c8f1656911a2790119c2abf1 100644 (file)
@@ -196,7 +196,6 @@ statusbar = {
 #
 # aes-256-cbc, aes-192-cbc, aes-128-cbc,
 # twofish-256-cbc, twofish-192-cbc, twofish-128-cbc,
-# rc6-256-cbc, rc6-192-cbc, rc6-128-cbc, 
 # cast-256-cbc, cast-192-cbc and cast-128-cbc
 #
 # Available hash functions are (default: sha1):
index 3dd281ca453b60687de3d847b636417272633bcf..d3e6e8426de05fbf7d851a0a8904e82d9c084acb 100644 (file)
@@ -23,7 +23,6 @@ noinst_LTLIBRARIES = libsilccrypt.la
 libsilccrypt_la_SOURCES = \
        none.c \
        rc5.c \
-       rc6.c \
        md5.c \
        aes.c \
        rsa.c \
@@ -58,7 +57,6 @@ include_HEADERS =     \
        none.h          \
        pkcs1.h         \
        rc5.h           \
-       rc6.h           \
        rsa.h           \
        sha1.h          \
        silccipher.h    \
index 2eb7edfcaafddeff1d793ff493b2055c49ca3585..94eeef68f9f79058f87c33c2fa92d4317116468c 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "none.h"
 #include "rc5.h"
-#include "rc6.h"
 #include "twofish.h"
 #include "aes.h"
 #include "blowfish.h"
diff --git a/lib/silccrypt/rc6.c b/lib/silccrypt/rc6.c
deleted file mode 100644 (file)
index 2ca7c83..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-/* Modified for SILC. -Pekka */
-
-/* This is an independent implementation of the encryption algorithm:   */
-/*                                                                      */
-/*         RC6 by Ron Rivest and RSA Labs                               */
-/*                                                                      */
-/* which is a candidate algorithm in the Advanced Encryption Standard   */
-/* programme of the US National Institute of Standards and Technology.  */
-/*                                                                      */
-/* Copyright in this implementation is held by Dr B R Gladman but I     */
-/* hereby give permission for its free direct or derivative use subject */
-/* to acknowledgment of its origin and compliance with any conditions   */
-/* that the originators of the algorithm place on its exploitation.     */
-/*                                                                      */
-/* Dr Brian Gladman (gladman@seven77.demon.co.uk) 14th January 1999     */
-
-/* Timing data for RC6 (rc6.c)
-
-128 bit key:
-Key Setup:    1632 cycles
-Encrypt:       270 cycles =    94.8 mbits/sec
-Decrypt:       226 cycles =   113.3 mbits/sec
-Mean:          248 cycles =   103.2 mbits/sec
-
-192 bit key:
-Key Setup:    1885 cycles
-Encrypt:       267 cycles =    95.9 mbits/sec
-Decrypt:       235 cycles =   108.9 mbits/sec
-Mean:          251 cycles =   102.0 mbits/sec
-
-256 bit key:
-Key Setup:    1877 cycles
-Encrypt:       270 cycles =    94.8 mbits/sec
-Decrypt:       227 cycles =   112.8 mbits/sec
-Mean:          249 cycles =   103.0 mbits/sec
-
-*/
-
-#include "silcincludes.h"
-#include "rc6_internal.h"
-#include "rc6.h"
-
-/* 
- * SILC Crypto API for RC6
- */
-
-/* Sets the key for the cipher. */
-
-SILC_CIPHER_API_SET_KEY(rc6)
-{
-  SilcUInt32 k[8];
-
-  SILC_GET_WORD_KEY(key, k, keylen);
-  rc6_set_key((RC6Context *)context, k, keylen);
-
-  return TRUE;
-}
-
-/* Sets the string as a new key for the cipher. The string is first
-   hashed and then used as a new key. */
-
-SILC_CIPHER_API_SET_KEY_WITH_STRING(rc6)
-{
-  return FALSE;
-}
-
-/* Encrypts with the cipher in CBC mode. Source and destination buffers
-   maybe one and same. */
-
-SILC_CIPHER_API_ENCRYPT_CBC(rc6)
-{
-  SilcUInt32 tiv[4];
-  int i;
-
-  SILC_CBC_GET_IV(tiv, iv);
-
-  SILC_CBC_ENC_PRE(tiv, src);
-  rc6_encrypt((RC6Context *)context, tiv, tiv);
-  SILC_CBC_ENC_POST(tiv, dst, src);
-
-  for (i = 16; i < len; i += 16) {
-    SILC_CBC_ENC_PRE(tiv, src);
-    rc6_encrypt((RC6Context *)context, tiv, tiv);
-    SILC_CBC_ENC_POST(tiv, dst, src);
-  }
-
-  SILC_CBC_PUT_IV(tiv, iv);
-
-  return TRUE;
-}
-
-/* Decrypts with the cipher in CBC mode. Source and destination buffers
-   maybe one and same. */
-
-SILC_CIPHER_API_DECRYPT_CBC(rc6)
-{
-  SilcUInt32 tmp[4], tmp2[4], tiv[4];
-  int i;
-
-  SILC_CBC_GET_IV(tiv, iv);
-
-  SILC_CBC_DEC_PRE(tmp, src);
-  rc6_decrypt((RC6Context *)context, tmp, tmp2);
-  SILC_CBC_DEC_POST(tmp2, dst, src, tmp, tiv);
-
-  for (i = 16; i < len; i += 16) {
-    SILC_CBC_DEC_PRE(tmp, src);
-    rc6_decrypt((RC6Context *)context, tmp, tmp2);
-    SILC_CBC_DEC_POST(tmp2, dst, src, tmp, tiv);
-  }
-  
-  SILC_CBC_PUT_IV(tiv, iv);
-
-  return TRUE;
-}
-
-/* Returns the size of the cipher context. */
-
-SILC_CIPHER_API_CONTEXT_LEN(rc6)
-{
-  return sizeof(RC6Context);
-}
-
-
-#define f_rnd(i,a,b,c,d)                    \
-        u = rotl(d * (d + d + 1), 5);       \
-        t = rotl(b * (b + b + 1), 5);       \
-        a = rotl(a ^ t, u) + l_key[i];      \
-        c = rotl(c ^ u, t) + l_key[i + 1]
-
-#define i_rnd(i,a,b,c,d)                    \
-        u = rotl(d * (d + d + 1), 5);       \
-        t = rotl(b * (b + b + 1), 5);       \
-        c = rotr(c - l_key[i + 1], t) ^ u;  \
-        a = rotr(a - l_key[i], u) ^ t
-
-/* initialise the key schedule from the user supplied key   */
-
-u4byte *rc6_set_key(RC6Context *ctx, 
-                   const u4byte in_key[], const u4byte key_len)
-{   
-    u4byte  i, j, k, a, b, l[8], t;
-    u4byte *l_key = ctx->l_key;
-
-    l_key[0] = 0xb7e15163;
-
-    for(k = 1; k < 44; ++k)
-        
-        l_key[k] = l_key[k - 1] + 0x9e3779b9;
-
-    for(k = 0; k < key_len / 32; ++k)
-
-        l[k] = in_key[k];
-
-    t = (key_len / 32) - 1; /* t = (key_len / 32); */
-
-    a = b = i = j = 0;
-
-    for(k = 0; k < 132; ++k)
-    {   a = rotl(l_key[i] + a + b, 3); b += a;
-        b = rotl(l[j] + b, b);
-        l_key[i] = a; l[j] = b;
-        i = (i == 43 ? 0 : i + 1); /* i = (i + 1) % 44; */
-        j = (j == t ? 0 : j + 1);  /* j = (j + 1) % t; */
-    }
-
-    return l_key;
-};
-
-/* encrypt a block of text  */
-
-void rc6_encrypt(RC6Context *ctx,
-                const u4byte in_blk[4], u4byte out_blk[4])
-{   
-    u4byte  a,b,c,d,t,u;
-    u4byte *l_key = ctx->l_key;
-
-    a = in_blk[0]; b = in_blk[1] + l_key[0];
-    c = in_blk[2]; d = in_blk[3] + l_key[1];
-
-    f_rnd( 2,a,b,c,d); f_rnd( 4,b,c,d,a);
-    f_rnd( 6,c,d,a,b); f_rnd( 8,d,a,b,c);
-    f_rnd(10,a,b,c,d); f_rnd(12,b,c,d,a);
-    f_rnd(14,c,d,a,b); f_rnd(16,d,a,b,c);
-    f_rnd(18,a,b,c,d); f_rnd(20,b,c,d,a);
-    f_rnd(22,c,d,a,b); f_rnd(24,d,a,b,c);
-    f_rnd(26,a,b,c,d); f_rnd(28,b,c,d,a);
-    f_rnd(30,c,d,a,b); f_rnd(32,d,a,b,c);
-    f_rnd(34,a,b,c,d); f_rnd(36,b,c,d,a);
-    f_rnd(38,c,d,a,b); f_rnd(40,d,a,b,c);
-
-    out_blk[0] = a + l_key[42]; out_blk[1] = b;
-    out_blk[2] = c + l_key[43]; out_blk[3] = d;
-};
-
-/* decrypt a block of text  */
-
-void rc6_decrypt(RC6Context *ctx,
-                const u4byte in_blk[4], u4byte out_blk[4])
-{   
-    u4byte  a,b,c,d,t,u;
-    u4byte *l_key = ctx->l_key;
-
-    d = in_blk[3]; c = in_blk[2] - l_key[43]; 
-    b = in_blk[1]; a = in_blk[0] - l_key[42];
-
-    i_rnd(40,d,a,b,c); i_rnd(38,c,d,a,b);
-    i_rnd(36,b,c,d,a); i_rnd(34,a,b,c,d);
-    i_rnd(32,d,a,b,c); i_rnd(30,c,d,a,b);
-    i_rnd(28,b,c,d,a); i_rnd(26,a,b,c,d);
-    i_rnd(24,d,a,b,c); i_rnd(22,c,d,a,b);
-    i_rnd(20,b,c,d,a); i_rnd(18,a,b,c,d);
-    i_rnd(16,d,a,b,c); i_rnd(14,c,d,a,b);
-    i_rnd(12,b,c,d,a); i_rnd(10,a,b,c,d);
-    i_rnd( 8,d,a,b,c); i_rnd( 6,c,d,a,b);
-    i_rnd( 4,b,c,d,a); i_rnd( 2,a,b,c,d);
-
-    out_blk[3] = d - l_key[1]; out_blk[2] = c; 
-    out_blk[1] = b - l_key[0]; out_blk[0] = a; 
-};
diff --git a/lib/silccrypt/rc6.h b/lib/silccrypt/rc6.h
deleted file mode 100644 (file)
index c1d2ec0..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-
-  rc6.h
-
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
-
-  Copyright (C) 1997 - 2000 Pekka Riikonen
-
-  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 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.
-
-*/
-
-#ifndef RC6_H
-#define RC6_H
-
-/* 
- * SILC Crypto API for RC6
- */
-
-SILC_CIPHER_API_SET_KEY(rc6);
-SILC_CIPHER_API_SET_KEY_WITH_STRING(rc6);
-SILC_CIPHER_API_CONTEXT_LEN(rc6);
-SILC_CIPHER_API_ENCRYPT_CBC(rc6);
-SILC_CIPHER_API_DECRYPT_CBC(rc6);
-
-#endif
diff --git a/lib/silccrypt/rc6_internal.h b/lib/silccrypt/rc6_internal.h
deleted file mode 100644 (file)
index 1b69306..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-
-  rc6_internal.h
-
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
-
-  Copyright (C) 1997 - 2000 Pekka Riikonen
-
-  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 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.
-
-*/
-
-#ifndef RC6_INTERNAL_H
-#define RC6_INTERNAL_H
-
-#include "ciphers_def.h"
-
-/* Cipher's context */
-typedef struct {
-  u4byte l_key[44];
-} RC6Context;
-
-/* Prototypes */
-u4byte *rc6_set_key(RC6Context *ctx, 
-                   const u4byte in_key[], const u4byte key_len);
-void rc6_encrypt(RC6Context *ctx,
-                const u4byte in_blk[4], u4byte out_blk[4]);
-void rc6_decrypt(RC6Context *ctx,
-                const u4byte in_blk[4], u4byte out_blk[4]);
-
-#endif
index 53c938b69a17e475d44ba9f7392bf993911a99ea..ddaeee010e43539c0a16eb9bf3021bce4b5141ee 100644 (file)
@@ -58,15 +58,6 @@ const SilcCipherObject silc_default_ciphers[] =
     silc_twofish_set_key_with_string,
     silc_twofish_encrypt_cbc, silc_twofish_decrypt_cbc, 
     silc_twofish_context_len },
-  { "rc6-256-cbc", 16, 256, silc_rc6_set_key, silc_rc6_set_key_with_string,
-    silc_rc6_encrypt_cbc, silc_rc6_decrypt_cbc, 
-    silc_rc6_context_len },
-  { "rc6-192-cbc", 16, 192, silc_rc6_set_key, silc_rc6_set_key_with_string,
-    silc_rc6_encrypt_cbc, silc_rc6_decrypt_cbc, 
-    silc_rc6_context_len },
-  { "rc6-128-cbc", 16, 128, silc_rc6_set_key, silc_rc6_set_key_with_string,
-    silc_rc6_encrypt_cbc, silc_rc6_decrypt_cbc, 
-    silc_rc6_context_len },
   { "cast-256-cbc", 16, 256, silc_cast_set_key, silc_cast_set_key_with_string,
     silc_cast_encrypt_cbc, silc_cast_decrypt_cbc, 
     silc_cast_context_len },
index 3e45d3d7521ff8b513100b8bd6570ad39613957b..c4eb761f2d403d710c8a345cbfbbc43e58b00ead 100644 (file)
@@ -35,7 +35,6 @@ SIM_CIPHER_OBJS = \
         none.o \
         blowfish.o \
         rc5.o \
-        rc6.o \
         aes.o \
         rsa.o \
         twofish.o \
index 822bafd501e40fda2773fb916b541c6fe252d505..4f59ecf942f081323843cf30a3f59ffe13ce6e30 100644 (file)
@@ -370,11 +370,6 @@ EXPORTS
        silc_rc5_encrypt_cbc @ 612 ;
        silc_rc5_set_key @ 613 ;
        silc_rc5_set_key_with_string @ 614 ;
-       silc_rc6_context_len @ 615 ;
-       silc_rc6_decrypt_cbc @ 616 ;
-       silc_rc6_encrypt_cbc @ 617 ;
-       silc_rc6_set_key @ 618 ;
-       silc_rc6_set_key_with_string @ 619 ;
        silc_realloc @ 620 ;
        silc_rng_add_noise @ 621 ;
        silc_rng_alloc @ 622 ;