# HG changeset patch # User Thomas Dixon # Date 1231611314 18000 # Node ID ec23779ee7946cf079b2103d592309b1fa9171ac # Parent 3a57367afe340fb21bc97d1d68a8eea5327013a9 Removed redundant test vector from Blowfish unittest. diff -r 3a57367afe34 -r ec23779ee794 dcrypt/crypto/ciphers/Blowfish.d --- a/dcrypt/crypto/ciphers/Blowfish.d Fri Jan 09 01:24:45 2009 -0500 +++ b/dcrypt/crypto/ciphers/Blowfish.d Sat Jan 10 13:15:14 2009 -0500 @@ -344,7 +344,6 @@ "1111111111111111", "0123456789abcdef", "1111111111111111", - "0000000000000000", "fedcba9876543210" ]; @@ -355,7 +354,6 @@ "1111111111111111", "1111111111111111", "0123456789abcdef", - "0000000000000000", "0123456789abcdef" ]; @@ -366,7 +364,6 @@ "2466dd878b963c9d", "61f9c3802281b096", "7d0cc630afda1ec7", - "4ef997456198dd78", "0aceab0fc6a0a28d" ]; diff -r 3a57367afe34 -r ec23779ee794 dcrypt/crypto/ciphers/RC6.d --- a/dcrypt/crypto/ciphers/RC6.d Fri Jan 09 01:24:45 2009 -0500 +++ b/dcrypt/crypto/ciphers/RC6.d Sat Jan 10 13:15:14 2009 -0500 @@ -134,10 +134,12 @@ uint[] L = new uint[c]; for (int i = 0, j = 0; i < c; i++, j+=4) L[i] = Util.ubytesToUintLittle(key, j); + S[0] = P; for (int i = 1; i <= 2*ROUNDS+3; i++) S[i] = S[i-1] + Q; - uint A, B, i, j, v = 3*(2*ROUNDS+4); // Relying on ints initializing to 0 + + uint A, B, i, j, v = 3*(2*ROUNDS+4); // Relying on ints initializing to 0 for (int s = 1; s <= v; s++) { A = S[i] = Util.rotateLeft(S[i]+A+B, 3); B = L[j] = Util.rotateLeft(L[j]+A+B, A+B); @@ -151,18 +153,13 @@ unittest { static const char[][] test_keys = [ "00000000000000000000000000000000", - "0123456789abcdef0112233445566778", - "00000000000000000000000000000000"~ "0000000000000000", - "0123456789abcdef0112233445566778"~ "899aabbccddeeff0", - "00000000000000000000000000000000"~ "00000000000000000000000000000000", - "0123456789abcdef0112233445566778"~ "899aabbccddeeff01032547698badcfe" ];