2004-07-07 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Wed, 7 Jul 2004 17:06:02 +0000 (17:06 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Wed, 7 Jul 2004 17:06:02 +0000 (17:06 -0000)
* DES.cs: Fixed FeedbackSizeValue to 8.
* RC2.cs: Fixed FeedbackSizeValue to 8.
* RC2CryptoServiceProvider.cs: When key size is different from
effective key size we throw CryptographicUnexpectedOperationException.
* TripleDES.cs: Fixed FeedbackSizeValue to 8.

svn path=/trunk/mcs/; revision=30846

mcs/class/corlib/System.Security.Cryptography/ChangeLog
mcs/class/corlib/System.Security.Cryptography/DES.cs
mcs/class/corlib/System.Security.Cryptography/RC2.cs
mcs/class/corlib/System.Security.Cryptography/RC2CryptoServiceProvider.cs
mcs/class/corlib/System.Security.Cryptography/TripleDES.cs

index ade78ff80a58acaebf0c4e71bf7f8d5e2466f596..e523b5e5181482623b45facf455630b5451e0c83 100644 (file)
@@ -1,3 +1,11 @@
+2004-07-07  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * DES.cs: Fixed FeedbackSizeValue to 8.
+       * RC2.cs: Fixed FeedbackSizeValue to 8.
+       * RC2CryptoServiceProvider.cs: When key size is different from 
+       effective key size we throw CryptographicUnexpectedOperationException.
+       * TripleDES.cs: Fixed FeedbackSizeValue to 8.
+
 2004-07-07  Sebastien Pouliot  <sebastien@ximian.com>
 
        * CryptoAPITransform.cs: Added the new Reset method for NET_2_0. This
index a775477b4369ab9525044d44f2e0e0c514c61c6e..cb678113d6ca512876990a675fe3956584249b7f 100644 (file)
@@ -6,10 +6,6 @@
 //     Sebastien Pouliot <sebastien@ximian.com>
 //
 // Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com)
-// (C) 2004 Novell (http://www.novell.com)
-//
-
-//
 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
@@ -50,7 +46,7 @@ public abstract class DES : SymmetricAlgorithm {
        {
                KeySizeValue = 64; 
                BlockSizeValue = 64; 
-               FeedbackSizeValue = 64;
+               FeedbackSizeValue = 8;
 
                LegalKeySizesValue = new KeySizes[1];
                LegalKeySizesValue[0] = new KeySizes(64, 64, 0);
index 58566078d5fa5fd1d0deb8e5c53f8833c17510a4..70119078722b5da2f65815b47320b229fd56af63 100644 (file)
@@ -4,10 +4,6 @@
 // Authors: 
 //     Andrew Birkett (andy@nobugs.org)
 //     Sebastien Pouliot (sebastien@ximian.com)
-//
-// (C) 2004 Novell (http://www.novell.com)
-//          
-
 //
 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
 //
@@ -77,7 +73,7 @@ namespace System.Security.Cryptography {
                {
                        KeySizeValue = 128;
                        BlockSizeValue = 64;
-                       FeedbackSizeValue = 64;
+                       FeedbackSizeValue = 8;
 
                        // The RFC allows keys of 1 to 128 bytes, but MS impl only supports
                        // 40 to 128 bits, sigh.
index 42a46eb9a72fb20f5915ca6bcd25c087d24d8bbf..6f214f0d3bc39243840839676cb5ea426fa3bda1 100644 (file)
@@ -51,7 +51,11 @@ namespace System.Security.Cryptography {
                        get { return base.EffectiveKeySize; }
                        set {
                                if (value != KeySizeValue) {
+#if NET_1_1
+                                       throw new CryptographicUnexpectedOperationException (
+#else
                                        throw new CryptographicException (
+#endif
                                                Locale.GetText ("Effective key size must match key size for compatibility"));
                                }
                                base.EffectiveKeySize = value; 
index 54969879d16d245e3831a711e20f73e499a1cf15..add883b6ce8757948ae5b9242de87647aa25c8f1 100644 (file)
@@ -5,10 +5,6 @@
 //     Sebastien Pouliot <sebastien@ximian.com>
 //
 // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
-// (C) 2004 Novell (http://www.novell.com)
-//
-
-//
 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
@@ -51,7 +47,7 @@ public abstract class TripleDES : SymmetricAlgorithm {
                // from SymmetricAlgorithm
                KeySizeValue = 192;
                BlockSizeValue = 64;
-               FeedbackSizeValue = 64;
+               FeedbackSizeValue = 8;
 
                LegalKeySizesValue = new KeySizes [1];
                LegalKeySizesValue [0] = new KeySizes (128, 192, 64);