From f51841ba5237952dda3e76df643d3ae13bed3df5 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 11 Aug 2009 02:31:17 +0000 Subject: Change the BlockCipher interface to support multi-block encryption and decryption. Currently only used for counter mode. Doesn't offer much advantage as-is (though might help slightly, in terms of cache effects), but allows for SIMD implementations to process multiple blocks in parallel when possible. Particularly thinking here of Serpent; TEA/XTEA also seem promising in this sense, as is Threefish once that is implemented as a standalone block cipher. --- src/block/xtea/xtea.cpp | 44 ++++++++++++++++++++++++++++---------------- src/block/xtea/xtea.h | 4 ++-- 2 files changed, 30 insertions(+), 18 deletions(-) (limited to 'src/block/xtea') diff --git a/src/block/xtea/xtea.cpp b/src/block/xtea/xtea.cpp index 5047f6594..0dba5f2be 100644 --- a/src/block/xtea/xtea.cpp +++ b/src/block/xtea/xtea.cpp @@ -14,33 +14,45 @@ namespace Botan { /* * XTEA Encryption */ -void XTEA::enc(const byte in[], byte out[]) const +void XTEA::encrypt_n(const byte in[], byte out[], u32bit blocks) const { - u32bit L = load_be(in, 0), R = load_be(in, 1); - - for(u32bit j = 0; j != 32; ++j) + for(u32bit i = 0; i != blocks; ++i) { - L += (((R << 4) ^ (R >> 5)) + R) ^ EK[2*j]; - R += (((L << 4) ^ (L >> 5)) + L) ^ EK[2*j+1]; - } + u32bit L = load_be(in, 0), R = load_be(in, 1); + + for(u32bit j = 0; j != 32; ++j) + { + L += (((R << 4) ^ (R >> 5)) + R) ^ EK[2*j]; + R += (((L << 4) ^ (L >> 5)) + L) ^ EK[2*j+1]; + } - store_be(out, L, R); + store_be(out, L, R); + + in += BLOCK_SIZE; + out += BLOCK_SIZE; + } } /* * XTEA Decryption */ -void XTEA::dec(const byte in[], byte out[]) const +void XTEA::decrypt_n(const byte in[], byte out[], u32bit blocks) const { - u32bit L = load_be(in, 0), R = load_be(in, 1); - - for(u32bit j = 0; j != 32; ++j) + for(u32bit i = 0; i != blocks; ++i) { - R -= (((L << 4) ^ (L >> 5)) + L) ^ EK[63 - 2*j]; - L -= (((R << 4) ^ (R >> 5)) + R) ^ EK[62 - 2*j]; - } + u32bit L = load_be(in, 0), R = load_be(in, 1); + + for(u32bit j = 0; j != 32; ++j) + { + R -= (((L << 4) ^ (L >> 5)) + L) ^ EK[63 - 2*j]; + L -= (((R << 4) ^ (R >> 5)) + R) ^ EK[62 - 2*j]; + } - store_be(out, L, R); + store_be(out, L, R); + + in += BLOCK_SIZE; + out += BLOCK_SIZE; + } } /* diff --git a/src/block/xtea/xtea.h b/src/block/xtea/xtea.h index d9c6066cb..b50f487b4 100644 --- a/src/block/xtea/xtea.h +++ b/src/block/xtea/xtea.h @@ -23,8 +23,8 @@ class BOTAN_DLL XTEA : public BlockCipher BlockCipher* clone() const { return new XTEA; } XTEA() : BlockCipher(8, 16) {} private: - void enc(const byte[], byte[]) const; - void dec(const byte[], byte[]) const; + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); SecureBuffer EK; }; -- cgit v1.2.3 From c8c3d7f6eecd753aa87a882b1458346682e606db Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 11 Aug 2009 19:34:50 +0000 Subject: Make encrypt_n public for all BlockCipher implementations - unlike the enc/dec functions it replaces, these are public interfaces. Add the first bits of a SSE2 implementation of Serpent. Currently incomplete. --- src/block/aes/aes.h | 6 +- src/block/blowfish/blowfish.h | 6 +- src/block/cast/cast128.h | 6 +- src/block/cast/cast256.h | 6 +- src/block/des/des.h | 12 ++- src/block/des/desx.h | 6 +- src/block/gost_28147/gost_28147.h | 5 +- src/block/idea/idea.h | 6 +- src/block/kasumi/kasumi.h | 5 +- src/block/lion/lion.h | 5 +- src/block/lubyrack/lubyrack.h | 6 +- src/block/mars/mars.h | 6 +- src/block/misty1/misty1.h | 6 +- src/block/noekeon/noekeon.h | 6 +- src/block/rc2/rc2.h | 6 +- src/block/rc5/rc5.h | 6 +- src/block/rc6/rc6.h | 6 +- src/block/safer/safer_sk.h | 7 +- src/block/seed/seed.h | 6 +- src/block/serpent/serpent.h | 5 +- src/block/serpent_ia32/serp_ia32.h | 5 +- src/block/serpent_sse2/info.txt | 27 ++++++ src/block/serpent_sse2/serp_sse2.cpp | 170 +++++++++++++++++++++++++++++++++++ src/block/serpent_sse2/serp_sse2.h | 29 ++++++ src/block/skipjack/skipjack.h | 7 +- src/block/square/square.h | 6 +- src/block/tea/tea.h | 6 +- src/block/twofish/twofish.h | 6 +- src/block/xtea/xtea.h | 6 +- src/engine/sse2_eng/eng_sse2.cpp | 23 ++++- src/engine/sse2_eng/eng_sse2.h | 5 +- 31 files changed, 355 insertions(+), 58 deletions(-) create mode 100644 src/block/serpent_sse2/info.txt create mode 100644 src/block/serpent_sse2/serp_sse2.cpp create mode 100644 src/block/serpent_sse2/serp_sse2.h (limited to 'src/block/xtea') diff --git a/src/block/aes/aes.h b/src/block/aes/aes.h index 940e11a48..768bb09e7 100644 --- a/src/block/aes/aes.h +++ b/src/block/aes/aes.h @@ -18,14 +18,16 @@ namespace Botan { class BOTAN_DLL AES : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw(); std::string name() const { return "AES"; } BlockCipher* clone() const { return new AES; } + AES() : BlockCipher(16, 16, 32, 8) { ROUNDS = 14; } AES(u32bit); private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); static u32bit S(u32bit); diff --git a/src/block/blowfish/blowfish.h b/src/block/blowfish/blowfish.h index 3623c2087..345c1ce49 100644 --- a/src/block/blowfish/blowfish.h +++ b/src/block/blowfish/blowfish.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL Blowfish : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw(); std::string name() const { return "Blowfish"; } BlockCipher* clone() const { return new Blowfish; } + Blowfish() : BlockCipher(8, 1, 56) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); void generate_sbox(u32bit[], u32bit, u32bit&, u32bit&) const; diff --git a/src/block/cast/cast128.h b/src/block/cast/cast128.h index 092ee824b..864a4e47e 100644 --- a/src/block/cast/cast128.h +++ b/src/block/cast/cast128.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL CAST_128 : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { MK.clear(); RK.clear(); } std::string name() const { return "CAST-128"; } BlockCipher* clone() const { return new CAST_128; } + CAST_128() : BlockCipher(8, 11, 16) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); static void key_schedule(u32bit[16], u32bit[4]); diff --git a/src/block/cast/cast256.h b/src/block/cast/cast256.h index ea80df65d..1be7fa9cf 100644 --- a/src/block/cast/cast256.h +++ b/src/block/cast/cast256.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL CAST_256 : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { MK.clear(); RK.clear(); } std::string name() const { return "CAST-256"; } BlockCipher* clone() const { return new CAST_256; } + CAST_256() : BlockCipher(16, 4, 32, 4) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); static const u32bit KEY_MASK[192]; diff --git a/src/block/des/des.h b/src/block/des/des.h index 39d1ac404..856aaf60c 100644 --- a/src/block/des/des.h +++ b/src/block/des/des.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL DES : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { round_key.clear(); } std::string name() const { return "DES"; } BlockCipher* clone() const { return new DES; } + DES() : BlockCipher(8, 8) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); SecureBuffer round_key; @@ -36,13 +38,15 @@ class BOTAN_DLL DES : public BlockCipher class BOTAN_DLL TripleDES : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { round_key.clear(); } std::string name() const { return "TripleDES"; } BlockCipher* clone() const { return new TripleDES; } + TripleDES() : BlockCipher(8, 16, 24, 8) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); SecureBuffer round_key; diff --git a/src/block/des/desx.h b/src/block/des/desx.h index d71335071..d22895296 100644 --- a/src/block/des/desx.h +++ b/src/block/des/desx.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL DESX : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { des.clear(); K1.clear(); K2.clear(); } std::string name() const { return "DESX"; } BlockCipher* clone() const { return new DESX; } + DESX() : BlockCipher(8, 24) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); SecureBuffer K1, K2; DES des; diff --git a/src/block/gost_28147/gost_28147.h b/src/block/gost_28147/gost_28147.h index 825e106a2..18c1d0a29 100644 --- a/src/block/gost_28147/gost_28147.h +++ b/src/block/gost_28147/gost_28147.h @@ -44,6 +44,9 @@ class GOST_28147_89_Params class BOTAN_DLL GOST_28147_89 : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { EK.clear(); } std::string name() const { return "GOST-28147-89"; } @@ -54,8 +57,6 @@ class BOTAN_DLL GOST_28147_89 : public BlockCipher GOST_28147_89(const SecureBuffer& other_SBOX) : BlockCipher(8, 32), SBOX(other_SBOX) {} - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); SecureBuffer SBOX; diff --git a/src/block/idea/idea.h b/src/block/idea/idea.h index a3384b667..59484531b 100644 --- a/src/block/idea/idea.h +++ b/src/block/idea/idea.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL IDEA : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { EK.clear(); DK.clear(); } std::string name() const { return "IDEA"; } BlockCipher* clone() const { return new IDEA; } + IDEA() : BlockCipher(8, 16) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); SecureBuffer EK, DK; }; diff --git a/src/block/kasumi/kasumi.h b/src/block/kasumi/kasumi.h index 3b18e675b..0f5a5d182 100644 --- a/src/block/kasumi/kasumi.h +++ b/src/block/kasumi/kasumi.h @@ -18,14 +18,15 @@ namespace Botan { class BOTAN_DLL KASUMI : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { EK.clear(); } std::string name() const { return "KASUMI"; } BlockCipher* clone() const { return new KASUMI; } KASUMI() : BlockCipher(8, 16) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); SecureBuffer EK; diff --git a/src/block/lion/lion.h b/src/block/lion/lion.h index d9f933846..d421771d6 100644 --- a/src/block/lion/lion.h +++ b/src/block/lion/lion.h @@ -20,6 +20,9 @@ namespace Botan { class BOTAN_DLL Lion : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw(); std::string name() const; BlockCipher* clone() const; @@ -27,8 +30,6 @@ class BOTAN_DLL Lion : public BlockCipher Lion(HashFunction*, StreamCipher*, u32bit); ~Lion() { delete hash; delete cipher; } private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); const u32bit LEFT_SIZE, RIGHT_SIZE; diff --git a/src/block/lubyrack/lubyrack.h b/src/block/lubyrack/lubyrack.h index 1e83748a6..940b34603 100644 --- a/src/block/lubyrack/lubyrack.h +++ b/src/block/lubyrack/lubyrack.h @@ -19,6 +19,9 @@ namespace Botan { class BOTAN_DLL LubyRackoff : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw(); std::string name() const; BlockCipher* clone() const; @@ -26,9 +29,8 @@ class BOTAN_DLL LubyRackoff : public BlockCipher LubyRackoff(HashFunction* hash); ~LubyRackoff() { delete hash; } private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); + HashFunction* hash; SecureVector K1, K2; }; diff --git a/src/block/mars/mars.h b/src/block/mars/mars.h index b3d74b179..7d0bfe4fa 100644 --- a/src/block/mars/mars.h +++ b/src/block/mars/mars.h @@ -15,13 +15,15 @@ namespace Botan { class BOTAN_DLL MARS : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { EK.clear(); } std::string name() const { return "MARS"; } BlockCipher* clone() const { return new MARS; } + MARS() : BlockCipher(16, 16, 32, 4) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); void encrypt_round(u32bit&, u32bit&, u32bit&, u32bit&, u32bit) const; diff --git a/src/block/misty1/misty1.h b/src/block/misty1/misty1.h index 14b7c8e45..8db6881de 100644 --- a/src/block/misty1/misty1.h +++ b/src/block/misty1/misty1.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL MISTY1 : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { EK.clear(); DK.clear(); } std::string name() const { return "MISTY1"; } BlockCipher* clone() const { return new MISTY1; } + MISTY1(u32bit = 8); private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); SecureBuffer EK, DK; diff --git a/src/block/noekeon/noekeon.h b/src/block/noekeon/noekeon.h index b4f3980d7..37b24fb7d 100644 --- a/src/block/noekeon/noekeon.h +++ b/src/block/noekeon/noekeon.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL Noekeon : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw(); std::string name() const { return "Noekeon"; } BlockCipher* clone() const { return new Noekeon; } + Noekeon() : BlockCipher(16, 16) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); static const byte RC[17]; diff --git a/src/block/rc2/rc2.h b/src/block/rc2/rc2.h index 0d94d69a2..db623b385 100644 --- a/src/block/rc2/rc2.h +++ b/src/block/rc2/rc2.h @@ -18,15 +18,17 @@ namespace Botan { class BOTAN_DLL RC2 : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + static byte EKB_code(u32bit); void clear() throw() { K.clear(); } std::string name() const { return "RC2"; } BlockCipher* clone() const { return new RC2; } + RC2() : BlockCipher(8, 1, 32) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); SecureBuffer K; diff --git a/src/block/rc5/rc5.h b/src/block/rc5/rc5.h index 1816994dc..ff9204710 100644 --- a/src/block/rc5/rc5.h +++ b/src/block/rc5/rc5.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL RC5 : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { S.clear(); } std::string name() const; BlockCipher* clone() const { return new RC5(ROUNDS); } + RC5(u32bit); private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); SecureVector S; const u32bit ROUNDS; diff --git a/src/block/rc6/rc6.h b/src/block/rc6/rc6.h index f634ebcd9..5171006f5 100644 --- a/src/block/rc6/rc6.h +++ b/src/block/rc6/rc6.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL RC6 : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { S.clear(); } std::string name() const { return "RC6"; } BlockCipher* clone() const { return new RC6; } + RC6() : BlockCipher(16, 1, 32) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); SecureBuffer S; diff --git a/src/block/safer/safer_sk.h b/src/block/safer/safer_sk.h index ae3d4f9a8..4d17bba51 100644 --- a/src/block/safer/safer_sk.h +++ b/src/block/safer/safer_sk.h @@ -18,19 +18,22 @@ namespace Botan { class BOTAN_DLL SAFER_SK : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { EK.clear(); } std::string name() const; BlockCipher* clone() const; + SAFER_SK(u32bit); private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); static const byte EXP[256]; static const byte LOG[512]; static const byte BIAS[208]; static const byte KEY_INDEX[208]; + SecureVector EK; const u32bit ROUNDS; }; diff --git a/src/block/seed/seed.h b/src/block/seed/seed.h index 0c9c2c8af..5a5a512e7 100644 --- a/src/block/seed/seed.h +++ b/src/block/seed/seed.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL SEED : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { K.clear(); } std::string name() const { return "SEED"; } BlockCipher* clone() const { return new SEED; } + SEED() : BlockCipher(16, 16) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); class G_FUNC diff --git a/src/block/serpent/serpent.h b/src/block/serpent/serpent.h index 9c9fb59f2..d919c3008 100644 --- a/src/block/serpent/serpent.h +++ b/src/block/serpent/serpent.h @@ -18,13 +18,14 @@ namespace Botan { class BOTAN_DLL Serpent : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { round_key.clear(); } std::string name() const { return "Serpent"; } BlockCipher* clone() const { return new Serpent; } Serpent() : BlockCipher(16, 16, 32, 8) {} protected: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); SecureBuffer round_key; diff --git a/src/block/serpent_ia32/serp_ia32.h b/src/block/serpent_ia32/serp_ia32.h index 2b4a95d3d..dc6beaf13 100644 --- a/src/block/serpent_ia32/serp_ia32.h +++ b/src/block/serpent_ia32/serp_ia32.h @@ -18,10 +18,11 @@ namespace Botan { class BOTAN_DLL Serpent_IA32 : public Serpent { public: - BlockCipher* clone() const { return new Serpent_IA32; } - private: void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + + BlockCipher* clone() const { return new Serpent_IA32; } + private: void key_schedule(const byte[], u32bit); }; diff --git a/src/block/serpent_sse2/info.txt b/src/block/serpent_sse2/info.txt new file mode 100644 index 000000000..ad8323f53 --- /dev/null +++ b/src/block/serpent_sse2/info.txt @@ -0,0 +1,27 @@ +realname "Serpent (SSE2)" + +define SERPENT_SSE2 + +load_on auto + + +serp_sse2.cpp +serp_sse2.h + + + +pentium-m +pentium4 +prescott +amd64 + + + +gcc +icc + + + +serpent +sse2_eng + diff --git a/src/block/serpent_sse2/serp_sse2.cpp b/src/block/serpent_sse2/serp_sse2.cpp new file mode 100644 index 000000000..759f3e1d6 --- /dev/null +++ b/src/block/serpent_sse2/serp_sse2.cpp @@ -0,0 +1,170 @@ +/* +* Serpent (SSE2) +* (C) 2009 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#include +#include +#include + +namespace Botan { + +namespace { + +#define SBoxE1(b0, b1, b2, b3, b4) \ + do { \ + b3 = _mm_xor_si128(b3, b0); \ + b4 = b1; \ + b1 = _mm_and_si128(b1, b3); \ + b4 = _mm_xor_si128(b4, b2); \ + b1 = _mm_xor_si128(b1, b0); \ + b0 = _mm_or_si128(b0, b3); \ + b0 = _mm_xor_si128(b0, b4); \ + b4 = _mm_xor_si128(b4, b3); \ + b3 = _mm_xor_si128(b3, b2); \ + b2 = _mm_or_si128(b2, b1); \ + b2 = _mm_xor_si128(b2, b4); \ + b4 = _mm_andnot_si128(b4, all_ones); \ + b4 = _mm_or_si128(b4, b1); \ + b1 = _mm_xor_si128(b1, b3); \ + b1 = _mm_xor_si128(b1, b4); \ + b3 = _mm_or_si128(b3, b0); \ + b1 = _mm_xor_si128(b1, b3); \ + b4 = _mm_xor_si128(b4, b3); \ + b3 = b0; b0 = b1; b1 = b4; \ + } while(0); + +#define rotate_left_m128(vec, rot) \ + _mm_or_si128(_mm_slli_epi32(vec, rot), _mm_srli_epi32(vec, 32-rot)) + +#define key_xor(round, b0, b1, b2, b3) \ + do { \ + __m128i key = _mm_loadu_si128(keys + round); \ + b0 = _mm_xor_si128(b0, _mm_shuffle_epi32(key, _MM_SHUFFLE(0,0,0,0))); \ + b1 = _mm_xor_si128(b1, _mm_shuffle_epi32(key, _MM_SHUFFLE(1,1,1,1))); \ + b2 = _mm_xor_si128(b2, _mm_shuffle_epi32(key, _MM_SHUFFLE(2,2,2,2))); \ + b3 = _mm_xor_si128(b3, _mm_shuffle_epi32(key, _MM_SHUFFLE(3,3,3,3))); \ + } while(0); + +#define transform(b0, b1, b2, b3) \ + do \ + { \ + b0 = rotate_left_m128(b0, 13); \ + b2 = rotate_left_m128(b2, 3); \ + b1 = _mm_xor_si128(b1, _mm_xor_si128(b0, b2)); \ + b3 = _mm_xor_si128(b3, _mm_xor_si128(b2, _mm_slli_epi32(b0, 3))); \ + b1 = rotate_left_m128(b1, 1); \ + b3 = rotate_left_m128(b3, 7); \ + b0 = _mm_xor_si128(b0, _mm_xor_si128(b1, b3)); \ + b2 = _mm_xor_si128(b2, _mm_xor_si128(b3, _mm_slli_epi32(b1, 7))); \ + b0 = rotate_left_m128(b0, 5); \ + b2 = rotate_left_m128(b2, 22); \ + } while(0); + +void print_simd(const char* name, __m128i vec) + { + union { __m128i v; int32_t ints[4]; } u = { vec }; + + printf("%s: ", name); + for(u32bit i = 0; i != 4; ++i) + printf("%08X ", u.ints[i]); + printf("\n"); + } + +void serpent_encrypt_4(const byte in[64], + byte out[64], + const u32bit keys_32[132]) + { + const __m128i* keys = (const __m128i*)(keys_32); + + /* + FIXME: figure out a fast way to do this with 4 loads with + _mm_loadu_si128 plus shuffle/interleave ops + */ + union { __m128i v; u32bit u32[4]; } convert; + + convert.u32[0] = load_le(in, 0); + convert.u32[1] = load_le(in, 4); + convert.u32[2] = load_le(in, 8); + convert.u32[3] = load_le(in, 12); + + __m128i b0 = convert.v; + + convert.u32[0] = load_le(in, 1); + convert.u32[1] = load_le(in, 5); + convert.u32[2] = load_le(in, 9); + convert.u32[3] = load_le(in, 13); + + __m128i b1 = convert.v; + + convert.u32[0] = load_le(in, 2); + convert.u32[1] = load_le(in, 6); + convert.u32[2] = load_le(in, 10); + convert.u32[3] = load_le(in, 14); + + __m128i b2 = convert.v; + + convert.u32[0] = load_le(in, 3); + convert.u32[1] = load_le(in, 7); + convert.u32[2] = load_le(in, 11); + convert.u32[3] = load_le(in, 15); + + + __m128i b3 = convert.v; + + __m128i b4; // temp + + const __m128i all_ones = _mm_set1_epi8(0xFF); + + key_xor(0, b0, b1, b2, b3); + SBoxE1(b0, b1, b2, b3, b4); + transform(b0, b1, b2, b3); + + key_xor(b0, b1, b2, b3, 1); + + print_simd("b0", b0); + print_simd("b1", b1); + print_simd("b2", b2); + print_simd("b3", b3); + } + +} + +/* +* Serpent Encryption +*/ +void Serpent_SSE2::encrypt_n(const byte in[], byte out[], u32bit blocks) const + { + while(blocks >= 4) + { + serpent_encrypt_4(in, out, this->round_key); + //Serpent::encrypt_n(in, out, 4); + in += 4 * BLOCK_SIZE; + out += 4 * BLOCK_SIZE; + blocks -= 4; + } + + for(u32bit i = 0; i != blocks; ++i) + { + Serpent::encrypt_n(in, out, 1); + in += BLOCK_SIZE; + out += BLOCK_SIZE; + } + } + +/* +* Serpent Decryption +*/ +void Serpent_SSE2::decrypt_n(const byte in[], byte out[], u32bit blocks) const + { + for(u32bit i = 0; i != blocks; ++i) + { + Serpent::decrypt_n(in, out, 1); + in += BLOCK_SIZE; + out += BLOCK_SIZE; + } + } + +} diff --git a/src/block/serpent_sse2/serp_sse2.h b/src/block/serpent_sse2/serp_sse2.h new file mode 100644 index 000000000..f1e5c2028 --- /dev/null +++ b/src/block/serpent_sse2/serp_sse2.h @@ -0,0 +1,29 @@ +/* +* Serpent (SSE2) +* (C) 2009 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#ifndef BOTAN_SERPENT_SSE2_H__ +#define BOTAN_SERPENT_SSE2_H__ + +#include + +namespace Botan { + +/* +* Serpent +*/ +class BOTAN_DLL Serpent_SSE2 : public Serpent + { + public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + + BlockCipher* clone() const { return new Serpent_SSE2; } + }; + +} + +#endif diff --git a/src/block/skipjack/skipjack.h b/src/block/skipjack/skipjack.h index ec071dfe7..f12032f36 100644 --- a/src/block/skipjack/skipjack.h +++ b/src/block/skipjack/skipjack.h @@ -18,18 +18,21 @@ namespace Botan { class BOTAN_DLL Skipjack : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw(); std::string name() const { return "Skipjack"; } BlockCipher* clone() const { return new Skipjack; } + Skipjack() : BlockCipher(8, 10) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); void step_A(u16bit&, u16bit&, u32bit) const; void step_B(u16bit&, u16bit&, u32bit) const; void step_Ai(u16bit&, u16bit&, u32bit) const; void step_Bi(u16bit&, u16bit&, u32bit) const; + SecureBuffer FTABLE[10]; }; diff --git a/src/block/square/square.h b/src/block/square/square.h index 0de4c20bd..5d9cfc78c 100644 --- a/src/block/square/square.h +++ b/src/block/square/square.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL Square : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw(); std::string name() const { return "Square"; } BlockCipher* clone() const { return new Square; } + Square() : BlockCipher(16, 16) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); static void transform(u32bit[4]); diff --git a/src/block/tea/tea.h b/src/block/tea/tea.h index 141899e88..825a051aa 100644 --- a/src/block/tea/tea.h +++ b/src/block/tea/tea.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL TEA : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { K.clear(); } std::string name() const { return "TEA"; } BlockCipher* clone() const { return new TEA; } + TEA() : BlockCipher(8, 16) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); SecureBuffer K; }; diff --git a/src/block/twofish/twofish.h b/src/block/twofish/twofish.h index 640fb58ad..87b9aa626 100644 --- a/src/block/twofish/twofish.h +++ b/src/block/twofish/twofish.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL Twofish : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw(); std::string name() const { return "Twofish"; } BlockCipher* clone() const { return new Twofish; } + Twofish() : BlockCipher(16, 16, 32, 8) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); static void rs_mul(byte[4], byte, u32bit); diff --git a/src/block/xtea/xtea.h b/src/block/xtea/xtea.h index b50f487b4..de265818d 100644 --- a/src/block/xtea/xtea.h +++ b/src/block/xtea/xtea.h @@ -18,13 +18,15 @@ namespace Botan { class BOTAN_DLL XTEA : public BlockCipher { public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void clear() throw() { EK.clear(); } std::string name() const { return "XTEA"; } BlockCipher* clone() const { return new XTEA; } + XTEA() : BlockCipher(8, 16) {} private: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; void key_schedule(const byte[], u32bit); SecureBuffer EK; }; diff --git a/src/engine/sse2_eng/eng_sse2.cpp b/src/engine/sse2_eng/eng_sse2.cpp index c738b3d96..9f68a070e 100644 --- a/src/engine/sse2_eng/eng_sse2.cpp +++ b/src/engine/sse2_eng/eng_sse2.cpp @@ -1,6 +1,6 @@ /** * SSE2 Assembly Engine -* (C) 1999-2008 Jack Lloyd +* (C) 1999-2009 Jack Lloyd * * Distributed under the terms of the Botan license */ @@ -11,10 +11,27 @@ #include #endif +#if defined(BOTAN_HAS_SERPENT_SSE2) + #include +#endif + namespace Botan { -HashFunction* SSE2_Assembler_Engine::find_hash(const SCAN_Name& request, - Algorithm_Factory&) const +BlockCipher* +SSE2_Assembler_Engine::find_block_cipher(const SCAN_Name& request, + Algorithm_Factory&) const + { +#if defined(BOTAN_HAS_SERPENT_SSE2) + if(request.algo_name() == "Serpent") + return new Serpent_SSE2; +#endif + + return 0; + } + +HashFunction* +SSE2_Assembler_Engine::find_hash(const SCAN_Name& request, + Algorithm_Factory&) const { #if defined(BOTAN_HAS_SHA1_SSE2) if(request.algo_name() == "SHA-160") diff --git a/src/engine/sse2_eng/eng_sse2.h b/src/engine/sse2_eng/eng_sse2.h index 129697e8f..c6b0ce889 100644 --- a/src/engine/sse2_eng/eng_sse2.h +++ b/src/engine/sse2_eng/eng_sse2.h @@ -1,6 +1,6 @@ /** * SSE2 Assembly Engine -* (C) 1999-2008 Jack Lloyd +* (C) 1999-2009 Jack Lloyd * * Distributed under the terms of the Botan license */ @@ -17,6 +17,9 @@ class BOTAN_DLL SSE2_Assembler_Engine : public Engine public: std::string provider_name() const { return "sse2"; } private: + BlockCipher* find_block_cipher(const SCAN_Name&, + Algorithm_Factory&) const; + HashFunction* find_hash(const SCAN_Name& reqeust, Algorithm_Factory&) const; }; -- cgit v1.2.3 From 7c35179056ef9f223eb3ad4c20e16ed8f8540bbb Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 27 Aug 2009 18:15:12 +0000 Subject: Remove unneeded include in xtea.cpp --- src/block/xtea/xtea.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/block/xtea') diff --git a/src/block/xtea/xtea.cpp b/src/block/xtea/xtea.cpp index 0dba5f2be..77543e1e8 100644 --- a/src/block/xtea/xtea.cpp +++ b/src/block/xtea/xtea.cpp @@ -7,7 +7,6 @@ #include #include -#include namespace Botan { -- cgit v1.2.3 From e98ba8ecc6a633c48b486b43ad53bcf7212cee55 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 29 Sep 2009 18:49:29 +0000 Subject: Remove add blocks from block cipher info files --- src/block/aes/info.txt | 8 -------- src/block/blowfish/info.txt | 8 -------- src/block/cast/info.txt | 10 ---------- src/block/des/info.txt | 10 ---------- src/block/gost_28147/info.txt | 7 ------- src/block/idea/info.txt | 7 ------- src/block/kasumi/info.txt | 7 ------- src/block/lion/info.txt | 7 ------- src/block/lubyrack/info.txt | 7 ------- src/block/mars/info.txt | 8 -------- src/block/misty1/info.txt | 7 ------- src/block/noekeon/info.txt | 7 ------- src/block/rc2/info.txt | 7 ------- src/block/rc5/info.txt | 7 ------- src/block/rc6/info.txt | 7 ------- src/block/safer/info.txt | 8 -------- src/block/seed/info.txt | 8 -------- src/block/serpent/info.txt | 7 ------- src/block/serpent_ia32/info.txt | 6 ------ src/block/serpent_sse2/info.txt | 8 -------- src/block/skipjack/info.txt | 7 ------- src/block/square/info.txt | 8 -------- src/block/tea/info.txt | 7 ------- src/block/twofish/info.txt | 8 -------- src/block/xtea/info.txt | 7 ------- 25 files changed, 188 deletions(-) (limited to 'src/block/xtea') diff --git a/src/block/aes/info.txt b/src/block/aes/info.txt index 2803ccc4e..0e11603bb 100644 --- a/src/block/aes/info.txt +++ b/src/block/aes/info.txt @@ -1,11 +1,3 @@ realname "AES" define AES - -load_on auto - - -aes.cpp -aes.h -aes_tab.cpp - diff --git a/src/block/blowfish/info.txt b/src/block/blowfish/info.txt index 0a9d2adc2..c63560989 100644 --- a/src/block/blowfish/info.txt +++ b/src/block/blowfish/info.txt @@ -1,11 +1,3 @@ realname "Blowfish" define BLOWFISH - -load_on auto - - -blfs_tab.cpp -blowfish.cpp -blowfish.h - diff --git a/src/block/cast/info.txt b/src/block/cast/info.txt index 73d3f900f..b9259042d 100644 --- a/src/block/cast/info.txt +++ b/src/block/cast/info.txt @@ -1,13 +1,3 @@ realname "CAST" define CAST - -load_on auto - - -cast128.cpp -cast128.h -cast256.cpp -cast256.h -cast_tab.cpp - diff --git a/src/block/des/info.txt b/src/block/des/info.txt index ed05979c9..6eec591a0 100644 --- a/src/block/des/info.txt +++ b/src/block/des/info.txt @@ -1,13 +1,3 @@ realname "DES" define DES - -load_on auto - - -des.cpp -des.h -des_tab.cpp -desx.h -desx.cpp - diff --git a/src/block/gost_28147/info.txt b/src/block/gost_28147/info.txt index 6e187fd48..9b24d1e22 100644 --- a/src/block/gost_28147/info.txt +++ b/src/block/gost_28147/info.txt @@ -1,10 +1,3 @@ realname "GOST 28147-89" define GOST_28147_89 - -load_on auto - - -gost_28147.cpp -gost_28147.h - diff --git a/src/block/idea/info.txt b/src/block/idea/info.txt index 2da3ffb43..f11b3d224 100644 --- a/src/block/idea/info.txt +++ b/src/block/idea/info.txt @@ -1,10 +1,3 @@ realname "IDEA" define IDEA - -load_on auto - - -idea.cpp -idea.h - diff --git a/src/block/kasumi/info.txt b/src/block/kasumi/info.txt index 8ea879b6d..e310488b3 100644 --- a/src/block/kasumi/info.txt +++ b/src/block/kasumi/info.txt @@ -1,10 +1,3 @@ realname "Kasumi" define KASUMI - -load_on auto - - -kasumi.cpp -kasumi.h - diff --git a/src/block/lion/info.txt b/src/block/lion/info.txt index 81ef58511..64f2989b1 100644 --- a/src/block/lion/info.txt +++ b/src/block/lion/info.txt @@ -2,13 +2,6 @@ realname "Lion" define LION -load_on auto - - -lion.cpp -lion.h - - hash stream diff --git a/src/block/lubyrack/info.txt b/src/block/lubyrack/info.txt index a478526f4..d915781d8 100644 --- a/src/block/lubyrack/info.txt +++ b/src/block/lubyrack/info.txt @@ -2,13 +2,6 @@ realname "Luby-Rackoff" define LUBY_RACKOFF -load_on auto - - -lubyrack.cpp -lubyrack.h - - hash diff --git a/src/block/mars/info.txt b/src/block/mars/info.txt index b0ad8af9c..ec958eaf5 100644 --- a/src/block/mars/info.txt +++ b/src/block/mars/info.txt @@ -1,11 +1,3 @@ realname "MARS" define MARS - -load_on auto - - -mars.cpp -mars.h -mars_tab.cpp - diff --git a/src/block/misty1/info.txt b/src/block/misty1/info.txt index d45058bd4..38087c83d 100644 --- a/src/block/misty1/info.txt +++ b/src/block/misty1/info.txt @@ -1,10 +1,3 @@ realname "MISTY-1" define MISTY1 - -load_on auto - - -misty1.cpp -misty1.h - diff --git a/src/block/noekeon/info.txt b/src/block/noekeon/info.txt index 8025c2073..6e940bb62 100644 --- a/src/block/noekeon/info.txt +++ b/src/block/noekeon/info.txt @@ -1,10 +1,3 @@ realname "Noekeon" define NOEKEON - -load_on auto - - -noekeon.cpp -noekeon.h - diff --git a/src/block/rc2/info.txt b/src/block/rc2/info.txt index 099141de7..7ec018422 100644 --- a/src/block/rc2/info.txt +++ b/src/block/rc2/info.txt @@ -1,10 +1,3 @@ realname "RC2" define RC2 - -load_on auto - - -rc2.cpp -rc2.h - diff --git a/src/block/rc5/info.txt b/src/block/rc5/info.txt index 4a150c3b0..2032b406f 100644 --- a/src/block/rc5/info.txt +++ b/src/block/rc5/info.txt @@ -1,10 +1,3 @@ realname "RC5" define RC5 - -load_on auto - - -rc5.cpp -rc5.h - diff --git a/src/block/rc6/info.txt b/src/block/rc6/info.txt index 1457e78c1..2897bc1f3 100644 --- a/src/block/rc6/info.txt +++ b/src/block/rc6/info.txt @@ -1,10 +1,3 @@ realname "RC6" define RC6 - -load_on auto - - -rc6.cpp -rc6.h - diff --git a/src/block/safer/info.txt b/src/block/safer/info.txt index 973cbff19..7c8067472 100644 --- a/src/block/safer/info.txt +++ b/src/block/safer/info.txt @@ -1,11 +1,3 @@ realname "SAFER" define SAFER - -load_on auto - - -safe_tab.cpp -safer_sk.cpp -safer_sk.h - diff --git a/src/block/seed/info.txt b/src/block/seed/info.txt index d04979335..c66e0c2cd 100644 --- a/src/block/seed/info.txt +++ b/src/block/seed/info.txt @@ -1,11 +1,3 @@ realname "SEED" define SEED - -load_on auto - - -seed.cpp -seed.h -seed_tab.cpp - diff --git a/src/block/serpent/info.txt b/src/block/serpent/info.txt index baaccbf01..4031a3f5f 100644 --- a/src/block/serpent/info.txt +++ b/src/block/serpent/info.txt @@ -1,10 +1,3 @@ realname "Serpent" define SERPENT - -load_on auto - - -serpent.cpp -serpent.h - diff --git a/src/block/serpent_ia32/info.txt b/src/block/serpent_ia32/info.txt index ea0506299..48d589724 100644 --- a/src/block/serpent_ia32/info.txt +++ b/src/block/serpent_ia32/info.txt @@ -4,12 +4,6 @@ define SERPENT_IA32 load_on asm_ok - -serp_ia32_imp.S -serp_ia32.cpp -serp_ia32.h - - ia32 diff --git a/src/block/serpent_sse2/info.txt b/src/block/serpent_sse2/info.txt index b00ab6e88..da7eef6bc 100644 --- a/src/block/serpent_sse2/info.txt +++ b/src/block/serpent_sse2/info.txt @@ -2,14 +2,6 @@ realname "Serpent (SSE2)" define SERPENT_SSE2 -load_on auto - - -serp_sse2.cpp -serp_sse2.h -serp_sse2_sbox.h - - serpent sse2_eng diff --git a/src/block/skipjack/info.txt b/src/block/skipjack/info.txt index 4b38d6d28..9cdddfe6b 100644 --- a/src/block/skipjack/info.txt +++ b/src/block/skipjack/info.txt @@ -1,10 +1,3 @@ realname "Skipjack" define SKIPJACK - -load_on auto - - -skipjack.cpp -skipjack.h - diff --git a/src/block/square/info.txt b/src/block/square/info.txt index a20697923..7c517be71 100644 --- a/src/block/square/info.txt +++ b/src/block/square/info.txt @@ -1,11 +1,3 @@ realname "Square" define SQUARE - -load_on auto - - -sqr_tab.cpp -square.cpp -square.h - diff --git a/src/block/tea/info.txt b/src/block/tea/info.txt index 6a0e76b15..85a19ee4c 100644 --- a/src/block/tea/info.txt +++ b/src/block/tea/info.txt @@ -1,10 +1,3 @@ realname "TEA" define TEA - -load_on auto - - -tea.cpp -tea.h - diff --git a/src/block/twofish/info.txt b/src/block/twofish/info.txt index 35639d858..319da6e6e 100644 --- a/src/block/twofish/info.txt +++ b/src/block/twofish/info.txt @@ -1,11 +1,3 @@ realname "Twofish" define TWOFISH - -load_on auto - - -two_tab.cpp -twofish.cpp -twofish.h - diff --git a/src/block/xtea/info.txt b/src/block/xtea/info.txt index 0120a3bce..1887e6673 100644 --- a/src/block/xtea/info.txt +++ b/src/block/xtea/info.txt @@ -1,10 +1,3 @@ realname "XTEA" define XTEA - -load_on auto - - -xtea.cpp -xtea.h - -- cgit v1.2.3 From bbe91cb8030c2d1a910082650a02a0747a718a8e Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 22 Oct 2009 17:35:04 +0000 Subject: Remove all exception specifications. The way these are designed in C++ is just too fragile and not that useful. Something like Java's checked exceptions might be nice, but simply killing the process entirely if an unexpected exception is thrown is not exactly useful for something trying to be robust. --- src/alloc/mem_pool/mem_pool.cpp | 6 +++--- src/alloc/mem_pool/mem_pool.h | 6 +++--- src/block/aes/aes.cpp | 2 +- src/block/aes/aes.h | 2 +- src/block/block_cipher.h | 2 +- src/block/blowfish/blowfish.cpp | 2 +- src/block/blowfish/blowfish.h | 2 +- src/block/cast/cast128.h | 2 +- src/block/cast/cast256.h | 2 +- src/block/des/des.h | 4 ++-- src/block/des/desx.h | 2 +- src/block/gost_28147/gost_28147.h | 2 +- src/block/idea/idea.h | 2 +- src/block/kasumi/kasumi.h | 2 +- src/block/lion/lion.cpp | 2 +- src/block/lion/lion.h | 2 +- src/block/lubyrack/lubyrack.cpp | 2 +- src/block/lubyrack/lubyrack.h | 2 +- src/block/mars/mars.h | 2 +- src/block/misty1/misty1.h | 2 +- src/block/noekeon/noekeon.cpp | 2 +- src/block/noekeon/noekeon.h | 2 +- src/block/rc2/rc2.h | 2 +- src/block/rc5/rc5.h | 2 +- src/block/rc6/rc6.h | 2 +- src/block/safer/safer_sk.h | 2 +- src/block/seed/seed.h | 2 +- src/block/serpent/serpent.h | 2 +- src/block/skipjack/skipjack.cpp | 2 +- src/block/skipjack/skipjack.h | 2 +- src/block/square/square.cpp | 2 +- src/block/square/square.h | 2 +- src/block/tea/tea.h | 2 +- src/block/twofish/twofish.cpp | 2 +- src/block/twofish/twofish.h | 2 +- src/block/xtea/xtea.h | 2 +- src/checksum/adler32/adler32.h | 2 +- src/checksum/crc24/crc24.h | 2 +- src/checksum/crc32/crc32.h | 2 +- src/engine/openssl/arc4_openssl.cpp | 2 +- src/engine/openssl/ossl_bc.cpp | 4 ++-- src/engine/openssl/ossl_md.cpp | 4 ++-- src/hash/bmw/bmw_512.cpp | 2 +- src/hash/bmw/bmw_512.h | 2 +- src/hash/fork256/fork256.cpp | 2 +- src/hash/fork256/fork256.h | 2 +- src/hash/gost_3411/gost_3411.cpp | 2 +- src/hash/gost_3411/gost_3411.h | 2 +- src/hash/has160/has160.cpp | 2 +- src/hash/has160/has160.h | 2 +- src/hash/hash.h | 2 +- src/hash/md2/md2.cpp | 2 +- src/hash/md2/md2.h | 2 +- src/hash/md4/md4.cpp | 2 +- src/hash/md4/md4.h | 2 +- src/hash/md5/md5.cpp | 2 +- src/hash/md5/md5.h | 2 +- src/hash/mdx_hash/mdx_hash.cpp | 2 +- src/hash/mdx_hash/mdx_hash.h | 2 +- src/hash/par_hash/par_hash.cpp | 2 +- src/hash/par_hash/par_hash.h | 2 +- src/hash/rmd128/rmd128.cpp | 2 +- src/hash/rmd128/rmd128.h | 2 +- src/hash/rmd160/rmd160.cpp | 2 +- src/hash/rmd160/rmd160.h | 2 +- src/hash/sha1/sha160.cpp | 2 +- src/hash/sha1/sha160.h | 2 +- src/hash/sha2/sha2_32.cpp | 6 +++--- src/hash/sha2/sha2_32.h | 6 +++--- src/hash/sha2/sha2_64.cpp | 6 +++--- src/hash/sha2/sha2_64.h | 6 +++--- src/hash/skein/skein_512.cpp | 2 +- src/hash/skein/skein_512.h | 2 +- src/hash/tiger/tiger.cpp | 2 +- src/hash/tiger/tiger.h | 2 +- src/hash/whirlpool/whrlpool.cpp | 2 +- src/hash/whirlpool/whrlpool.h | 2 +- src/mac/cbc_mac/cbc_mac.cpp | 2 +- src/mac/cbc_mac/cbc_mac.h | 2 +- src/mac/cmac/cmac.cpp | 2 +- src/mac/cmac/cmac.h | 2 +- src/mac/hmac/hmac.cpp | 2 +- src/mac/hmac/hmac.h | 2 +- src/mac/mac.h | 2 +- src/mac/ssl3mac/ssl3_mac.cpp | 2 +- src/mac/ssl3mac/ssl3_mac.h | 2 +- src/mac/x919_mac/x919_mac.cpp | 2 +- src/mac/x919_mac/x919_mac.h | 2 +- src/pk_pad/emsa.h | 2 +- src/pk_pad/emsa1/emsa1.cpp | 2 +- src/pk_pad/emsa1/emsa1.h | 2 +- src/pk_pad/emsa2/emsa2.cpp | 2 +- src/pk_pad/emsa2/emsa2.h | 2 +- src/pk_pad/emsa3/emsa3.cpp | 4 ++-- src/pk_pad/emsa3/emsa3.h | 4 ++-- src/pk_pad/emsa4/emsa4.cpp | 2 +- src/pk_pad/emsa4/emsa4.h | 2 +- src/pk_pad/emsa_raw/emsa_raw.cpp | 2 +- src/pk_pad/emsa_raw/emsa_raw.h | 2 +- src/rng/auto_rng/auto_rng.h | 2 +- src/rng/hmac_rng/hmac_rng.cpp | 2 +- src/rng/hmac_rng/hmac_rng.h | 2 +- src/rng/randpool/randpool.cpp | 2 +- src/rng/randpool/randpool.h | 2 +- src/rng/rng.h | 4 ++-- src/rng/x931_rng/x931_rng.cpp | 2 +- src/rng/x931_rng/x931_rng.h | 2 +- src/stream/arc4/arc4.cpp | 2 +- src/stream/arc4/arc4.h | 2 +- src/stream/ctr/ctr.cpp | 2 +- src/stream/ctr/ctr.h | 2 +- src/stream/ofb/ofb.cpp | 2 +- src/stream/ofb/ofb.h | 2 +- src/stream/salsa20/salsa20.cpp | 2 +- src/stream/salsa20/salsa20.h | 2 +- src/stream/stream_cipher.h | 2 +- src/stream/turing/turing.cpp | 2 +- src/stream/turing/turing.h | 2 +- src/stream/wid_wake/wid_wake.cpp | 2 +- src/stream/wid_wake/wid_wake.h | 2 +- src/sym_algo/sym_algo.h | 4 ++-- 121 files changed, 140 insertions(+), 140 deletions(-) (limited to 'src/block/xtea') diff --git a/src/alloc/mem_pool/mem_pool.cpp b/src/alloc/mem_pool/mem_pool.cpp index dabf5e310..e30a7b98a 100644 --- a/src/alloc/mem_pool/mem_pool.cpp +++ b/src/alloc/mem_pool/mem_pool.cpp @@ -42,7 +42,7 @@ Pooling_Allocator::Memory_Block::Memory_Block(void* buf) * See if ptr is contained by this block */ bool Pooling_Allocator::Memory_Block::contains(void* ptr, - u32bit length) const throw() + u32bit length) const { return ((buffer <= ptr) && (buffer_end >= static_cast(ptr) + length * BLOCK_SIZE)); @@ -51,7 +51,7 @@ bool Pooling_Allocator::Memory_Block::contains(void* ptr, /* * Allocate some memory, if possible */ -byte* Pooling_Allocator::Memory_Block::alloc(u32bit n) throw() +byte* Pooling_Allocator::Memory_Block::alloc(u32bit n) { if(n == 0 || n > BITMAP_SIZE) return 0; @@ -91,7 +91,7 @@ byte* Pooling_Allocator::Memory_Block::alloc(u32bit n) throw() /* * Mark this memory as free, if we own it */ -void Pooling_Allocator::Memory_Block::free(void* ptr, u32bit blocks) throw() +void Pooling_Allocator::Memory_Block::free(void* ptr, u32bit blocks) { clear_mem(static_cast(ptr), blocks * BLOCK_SIZE); diff --git a/src/alloc/mem_pool/mem_pool.h b/src/alloc/mem_pool/mem_pool.h index a57800972..51571405e 100644 --- a/src/alloc/mem_pool/mem_pool.h +++ b/src/alloc/mem_pool/mem_pool.h @@ -44,9 +44,9 @@ class BOTAN_DLL Pooling_Allocator : public Allocator static u32bit bitmap_size() { return BITMAP_SIZE; } static u32bit block_size() { return BLOCK_SIZE; } - bool contains(void*, u32bit) const throw(); - byte* alloc(u32bit) throw(); - void free(void*, u32bit) throw(); + bool contains(void*, u32bit) const; + byte* alloc(u32bit); + void free(void*, u32bit); bool operator<(const Memory_Block& other) const { diff --git a/src/block/aes/aes.cpp b/src/block/aes/aes.cpp index 34698ae7f..7ba8136ec 100644 --- a/src/block/aes/aes.cpp +++ b/src/block/aes/aes.cpp @@ -258,7 +258,7 @@ AES::AES(u32bit key_size) : BlockCipher(16, key_size) /** * Clear memory of sensitive data */ -void AES::clear() throw() +void AES::clear() { EK.clear(); DK.clear(); diff --git a/src/block/aes/aes.h b/src/block/aes/aes.h index 768bb09e7..229ce307c 100644 --- a/src/block/aes/aes.h +++ b/src/block/aes/aes.h @@ -21,7 +21,7 @@ class BOTAN_DLL AES : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw(); + void clear(); std::string name() const { return "AES"; } BlockCipher* clone() const { return new AES; } diff --git a/src/block/block_cipher.h b/src/block/block_cipher.h index a27609171..1dcdde7c7 100644 --- a/src/block/block_cipher.h +++ b/src/block/block_cipher.h @@ -87,7 +87,7 @@ class BOTAN_DLL BlockCipher : public SymmetricAlgorithm /** * Zeroize internal state */ - virtual void clear() throw() = 0; + virtual void clear() = 0; BlockCipher(u32bit block_size, u32bit key_min, diff --git a/src/block/blowfish/blowfish.cpp b/src/block/blowfish/blowfish.cpp index 312603c3a..d0b182a84 100644 --- a/src/block/blowfish/blowfish.cpp +++ b/src/block/blowfish/blowfish.cpp @@ -128,7 +128,7 @@ void Blowfish::generate_sbox(u32bit Box[], u32bit size, /* * Clear memory of sensitive data */ -void Blowfish::clear() throw() +void Blowfish::clear() { P.copy(P_INIT, 18); S.copy(S_INIT, 1024); diff --git a/src/block/blowfish/blowfish.h b/src/block/blowfish/blowfish.h index 345c1ce49..5419308ca 100644 --- a/src/block/blowfish/blowfish.h +++ b/src/block/blowfish/blowfish.h @@ -21,7 +21,7 @@ class BOTAN_DLL Blowfish : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw(); + void clear(); std::string name() const { return "Blowfish"; } BlockCipher* clone() const { return new Blowfish; } diff --git a/src/block/cast/cast128.h b/src/block/cast/cast128.h index 864a4e47e..caffb97ea 100644 --- a/src/block/cast/cast128.h +++ b/src/block/cast/cast128.h @@ -21,7 +21,7 @@ class BOTAN_DLL CAST_128 : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { MK.clear(); RK.clear(); } + void clear() { MK.clear(); RK.clear(); } std::string name() const { return "CAST-128"; } BlockCipher* clone() const { return new CAST_128; } diff --git a/src/block/cast/cast256.h b/src/block/cast/cast256.h index 1be7fa9cf..0db3682ba 100644 --- a/src/block/cast/cast256.h +++ b/src/block/cast/cast256.h @@ -21,7 +21,7 @@ class BOTAN_DLL CAST_256 : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { MK.clear(); RK.clear(); } + void clear() { MK.clear(); RK.clear(); } std::string name() const { return "CAST-256"; } BlockCipher* clone() const { return new CAST_256; } diff --git a/src/block/des/des.h b/src/block/des/des.h index 856aaf60c..b28990178 100644 --- a/src/block/des/des.h +++ b/src/block/des/des.h @@ -21,7 +21,7 @@ class BOTAN_DLL DES : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { round_key.clear(); } + void clear() { round_key.clear(); } std::string name() const { return "DES"; } BlockCipher* clone() const { return new DES; } @@ -41,7 +41,7 @@ class BOTAN_DLL TripleDES : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { round_key.clear(); } + void clear() { round_key.clear(); } std::string name() const { return "TripleDES"; } BlockCipher* clone() const { return new TripleDES; } diff --git a/src/block/des/desx.h b/src/block/des/desx.h index d22895296..89664d064 100644 --- a/src/block/des/desx.h +++ b/src/block/des/desx.h @@ -21,7 +21,7 @@ class BOTAN_DLL DESX : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { des.clear(); K1.clear(); K2.clear(); } + void clear() { des.clear(); K1.clear(); K2.clear(); } std::string name() const { return "DESX"; } BlockCipher* clone() const { return new DESX; } diff --git a/src/block/gost_28147/gost_28147.h b/src/block/gost_28147/gost_28147.h index 18c1d0a29..bf6f8178b 100644 --- a/src/block/gost_28147/gost_28147.h +++ b/src/block/gost_28147/gost_28147.h @@ -47,7 +47,7 @@ class BOTAN_DLL GOST_28147_89 : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { EK.clear(); } + void clear() { EK.clear(); } std::string name() const { return "GOST-28147-89"; } BlockCipher* clone() const { return new GOST_28147_89(SBOX); } diff --git a/src/block/idea/idea.h b/src/block/idea/idea.h index 59484531b..c1a79f423 100644 --- a/src/block/idea/idea.h +++ b/src/block/idea/idea.h @@ -21,7 +21,7 @@ class BOTAN_DLL IDEA : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { EK.clear(); DK.clear(); } + void clear() { EK.clear(); DK.clear(); } std::string name() const { return "IDEA"; } BlockCipher* clone() const { return new IDEA; } diff --git a/src/block/kasumi/kasumi.h b/src/block/kasumi/kasumi.h index 0f5a5d182..c3db1cb05 100644 --- a/src/block/kasumi/kasumi.h +++ b/src/block/kasumi/kasumi.h @@ -21,7 +21,7 @@ class BOTAN_DLL KASUMI : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { EK.clear(); } + void clear() { EK.clear(); } std::string name() const { return "KASUMI"; } BlockCipher* clone() const { return new KASUMI; } diff --git a/src/block/lion/lion.cpp b/src/block/lion/lion.cpp index 0ed7b2630..e71091258 100644 --- a/src/block/lion/lion.cpp +++ b/src/block/lion/lion.cpp @@ -95,7 +95,7 @@ BlockCipher* Lion::clone() const /* * Clear memory of sensitive data */ -void Lion::clear() throw() +void Lion::clear() { hash->clear(); cipher->clear(); diff --git a/src/block/lion/lion.h b/src/block/lion/lion.h index d421771d6..f24acdb72 100644 --- a/src/block/lion/lion.h +++ b/src/block/lion/lion.h @@ -23,7 +23,7 @@ class BOTAN_DLL Lion : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw(); + void clear(); std::string name() const; BlockCipher* clone() const; diff --git a/src/block/lubyrack/lubyrack.cpp b/src/block/lubyrack/lubyrack.cpp index 6ad64f2b0..2003d2a89 100644 --- a/src/block/lubyrack/lubyrack.cpp +++ b/src/block/lubyrack/lubyrack.cpp @@ -92,7 +92,7 @@ void LubyRackoff::key_schedule(const byte key[], u32bit length) /* * Clear memory of sensitive data */ -void LubyRackoff::clear() throw() +void LubyRackoff::clear() { K1.clear(); K2.clear(); diff --git a/src/block/lubyrack/lubyrack.h b/src/block/lubyrack/lubyrack.h index 940b34603..7249cf157 100644 --- a/src/block/lubyrack/lubyrack.h +++ b/src/block/lubyrack/lubyrack.h @@ -22,7 +22,7 @@ class BOTAN_DLL LubyRackoff : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw(); + void clear(); std::string name() const; BlockCipher* clone() const; diff --git a/src/block/mars/mars.h b/src/block/mars/mars.h index 7d0bfe4fa..8173fb984 100644 --- a/src/block/mars/mars.h +++ b/src/block/mars/mars.h @@ -18,7 +18,7 @@ class BOTAN_DLL MARS : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { EK.clear(); } + void clear() { EK.clear(); } std::string name() const { return "MARS"; } BlockCipher* clone() const { return new MARS; } diff --git a/src/block/misty1/misty1.h b/src/block/misty1/misty1.h index 8db6881de..000830915 100644 --- a/src/block/misty1/misty1.h +++ b/src/block/misty1/misty1.h @@ -21,7 +21,7 @@ class BOTAN_DLL MISTY1 : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { EK.clear(); DK.clear(); } + void clear() { EK.clear(); DK.clear(); } std::string name() const { return "MISTY1"; } BlockCipher* clone() const { return new MISTY1; } diff --git a/src/block/noekeon/noekeon.cpp b/src/block/noekeon/noekeon.cpp index 1b327aa47..0bfce1882 100644 --- a/src/block/noekeon/noekeon.cpp +++ b/src/block/noekeon/noekeon.cpp @@ -201,7 +201,7 @@ void Noekeon::key_schedule(const byte key[], u32bit) /* * Clear memory of sensitive data */ -void Noekeon::clear() throw() +void Noekeon::clear() { EK.clear(); DK.clear(); diff --git a/src/block/noekeon/noekeon.h b/src/block/noekeon/noekeon.h index 37b24fb7d..4532c1be2 100644 --- a/src/block/noekeon/noekeon.h +++ b/src/block/noekeon/noekeon.h @@ -21,7 +21,7 @@ class BOTAN_DLL Noekeon : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw(); + void clear(); std::string name() const { return "Noekeon"; } BlockCipher* clone() const { return new Noekeon; } diff --git a/src/block/rc2/rc2.h b/src/block/rc2/rc2.h index db623b385..c6e4946f9 100644 --- a/src/block/rc2/rc2.h +++ b/src/block/rc2/rc2.h @@ -23,7 +23,7 @@ class BOTAN_DLL RC2 : public BlockCipher static byte EKB_code(u32bit); - void clear() throw() { K.clear(); } + void clear() { K.clear(); } std::string name() const { return "RC2"; } BlockCipher* clone() const { return new RC2; } diff --git a/src/block/rc5/rc5.h b/src/block/rc5/rc5.h index ff9204710..82931c1d2 100644 --- a/src/block/rc5/rc5.h +++ b/src/block/rc5/rc5.h @@ -21,7 +21,7 @@ class BOTAN_DLL RC5 : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { S.clear(); } + void clear() { S.clear(); } std::string name() const; BlockCipher* clone() const { return new RC5(ROUNDS); } diff --git a/src/block/rc6/rc6.h b/src/block/rc6/rc6.h index 5171006f5..6cd0f54db 100644 --- a/src/block/rc6/rc6.h +++ b/src/block/rc6/rc6.h @@ -21,7 +21,7 @@ class BOTAN_DLL RC6 : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { S.clear(); } + void clear() { S.clear(); } std::string name() const { return "RC6"; } BlockCipher* clone() const { return new RC6; } diff --git a/src/block/safer/safer_sk.h b/src/block/safer/safer_sk.h index 4d17bba51..80d2dc069 100644 --- a/src/block/safer/safer_sk.h +++ b/src/block/safer/safer_sk.h @@ -21,7 +21,7 @@ class BOTAN_DLL SAFER_SK : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { EK.clear(); } + void clear() { EK.clear(); } std::string name() const; BlockCipher* clone() const; diff --git a/src/block/seed/seed.h b/src/block/seed/seed.h index 5a5a512e7..5a4b44057 100644 --- a/src/block/seed/seed.h +++ b/src/block/seed/seed.h @@ -21,7 +21,7 @@ class BOTAN_DLL SEED : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { K.clear(); } + void clear() { K.clear(); } std::string name() const { return "SEED"; } BlockCipher* clone() const { return new SEED; } diff --git a/src/block/serpent/serpent.h b/src/block/serpent/serpent.h index d919c3008..4fa7451b9 100644 --- a/src/block/serpent/serpent.h +++ b/src/block/serpent/serpent.h @@ -21,7 +21,7 @@ class BOTAN_DLL Serpent : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { round_key.clear(); } + void clear() { round_key.clear(); } std::string name() const { return "Serpent"; } BlockCipher* clone() const { return new Serpent; } Serpent() : BlockCipher(16, 16, 32, 8) {} diff --git a/src/block/skipjack/skipjack.cpp b/src/block/skipjack/skipjack.cpp index 6c308c0f8..e8b2cfb8d 100644 --- a/src/block/skipjack/skipjack.cpp +++ b/src/block/skipjack/skipjack.cpp @@ -165,7 +165,7 @@ void Skipjack::key_schedule(const byte key[], u32bit) /* * Clear memory of sensitive data */ -void Skipjack::clear() throw() +void Skipjack::clear() { for(u32bit j = 0; j != 10; ++j) FTABLE[j].clear(); diff --git a/src/block/skipjack/skipjack.h b/src/block/skipjack/skipjack.h index f12032f36..60fad6310 100644 --- a/src/block/skipjack/skipjack.h +++ b/src/block/skipjack/skipjack.h @@ -21,7 +21,7 @@ class BOTAN_DLL Skipjack : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw(); + void clear(); std::string name() const { return "Skipjack"; } BlockCipher* clone() const { return new Skipjack; } diff --git a/src/block/square/square.cpp b/src/block/square/square.cpp index fdd47d3b2..90f2301cf 100644 --- a/src/block/square/square.cpp +++ b/src/block/square/square.cpp @@ -196,7 +196,7 @@ void Square::transform(u32bit round_key[4]) /* * Clear memory of sensitive data */ -void Square::clear() throw() +void Square::clear() { EK.clear(); DK.clear(); diff --git a/src/block/square/square.h b/src/block/square/square.h index 5d9cfc78c..088122181 100644 --- a/src/block/square/square.h +++ b/src/block/square/square.h @@ -21,7 +21,7 @@ class BOTAN_DLL Square : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw(); + void clear(); std::string name() const { return "Square"; } BlockCipher* clone() const { return new Square; } diff --git a/src/block/tea/tea.h b/src/block/tea/tea.h index 825a051aa..c19f272a6 100644 --- a/src/block/tea/tea.h +++ b/src/block/tea/tea.h @@ -21,7 +21,7 @@ class BOTAN_DLL TEA : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { K.clear(); } + void clear() { K.clear(); } std::string name() const { return "TEA"; } BlockCipher* clone() const { return new TEA; } diff --git a/src/block/twofish/twofish.cpp b/src/block/twofish/twofish.cpp index 6a482a8f3..3136837aa 100644 --- a/src/block/twofish/twofish.cpp +++ b/src/block/twofish/twofish.cpp @@ -218,7 +218,7 @@ void Twofish::rs_mul(byte S[4], byte key, u32bit offset) /* * Clear memory of sensitive data */ -void Twofish::clear() throw() +void Twofish::clear() { SBox0.clear(); SBox1.clear(); diff --git a/src/block/twofish/twofish.h b/src/block/twofish/twofish.h index 87b9aa626..71a1e8781 100644 --- a/src/block/twofish/twofish.h +++ b/src/block/twofish/twofish.h @@ -21,7 +21,7 @@ class BOTAN_DLL Twofish : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw(); + void clear(); std::string name() const { return "Twofish"; } BlockCipher* clone() const { return new Twofish; } diff --git a/src/block/xtea/xtea.h b/src/block/xtea/xtea.h index de265818d..f3b554edb 100644 --- a/src/block/xtea/xtea.h +++ b/src/block/xtea/xtea.h @@ -21,7 +21,7 @@ class BOTAN_DLL XTEA : public BlockCipher void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; - void clear() throw() { EK.clear(); } + void clear() { EK.clear(); } std::string name() const { return "XTEA"; } BlockCipher* clone() const { return new XTEA; } diff --git a/src/checksum/adler32/adler32.h b/src/checksum/adler32/adler32.h index 98a28bc81..79804a842 100644 --- a/src/checksum/adler32/adler32.h +++ b/src/checksum/adler32/adler32.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL Adler32 : public HashFunction { public: - void clear() throw() { S1 = 1; S2 = 0; } + void clear() { S1 = 1; S2 = 0; } std::string name() const { return "Adler32"; } HashFunction* clone() const { return new Adler32; } Adler32() : HashFunction(4) { clear(); } diff --git a/src/checksum/crc24/crc24.h b/src/checksum/crc24/crc24.h index bca4d0e89..f59ac4a45 100644 --- a/src/checksum/crc24/crc24.h +++ b/src/checksum/crc24/crc24.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL CRC24 : public HashFunction { public: - void clear() throw() { crc = 0xB704CE; } + void clear() { crc = 0xB704CE; } std::string name() const { return "CRC24"; } HashFunction* clone() const { return new CRC24; } CRC24() : HashFunction(3) { clear(); } diff --git a/src/checksum/crc32/crc32.h b/src/checksum/crc32/crc32.h index 390fb100e..998e8489e 100644 --- a/src/checksum/crc32/crc32.h +++ b/src/checksum/crc32/crc32.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL CRC32 : public HashFunction { public: - void clear() throw() { crc = 0xFFFFFFFF; } + void clear() { crc = 0xFFFFFFFF; } std::string name() const { return "CRC32"; } HashFunction* clone() const { return new CRC32; } CRC32() : HashFunction(4) { clear(); } diff --git a/src/engine/openssl/arc4_openssl.cpp b/src/engine/openssl/arc4_openssl.cpp index 08ed3eb10..793e1faff 100644 --- a/src/engine/openssl/arc4_openssl.cpp +++ b/src/engine/openssl/arc4_openssl.cpp @@ -19,7 +19,7 @@ namespace { class ARC4_OpenSSL : public StreamCipher { public: - void clear() throw() { std::memset(&state, 0, sizeof(state)); } + void clear() { std::memset(&state, 0, sizeof(state)); } std::string name() const; StreamCipher* clone() const { return new ARC4_OpenSSL(SKIP); } diff --git a/src/engine/openssl/ossl_bc.cpp b/src/engine/openssl/ossl_bc.cpp index 9c85439ca..7fdf54e42 100644 --- a/src/engine/openssl/ossl_bc.cpp +++ b/src/engine/openssl/ossl_bc.cpp @@ -18,7 +18,7 @@ namespace { class EVP_BlockCipher : public BlockCipher { public: - void clear() throw(); + void clear(); std::string name() const { return cipher_name; } BlockCipher* clone() const; EVP_BlockCipher(const EVP_CIPHER*, const std::string&); @@ -145,7 +145,7 @@ BlockCipher* EVP_BlockCipher::clone() const /* * Clear memory of sensitive data */ -void EVP_BlockCipher::clear() throw() +void EVP_BlockCipher::clear() { const EVP_CIPHER* algo = EVP_CIPHER_CTX_cipher(&encrypt); diff --git a/src/engine/openssl/ossl_md.cpp b/src/engine/openssl/ossl_md.cpp index 42975c8a3..1e01a6f25 100644 --- a/src/engine/openssl/ossl_md.cpp +++ b/src/engine/openssl/ossl_md.cpp @@ -18,7 +18,7 @@ namespace { class EVP_HashFunction : public HashFunction { public: - void clear() throw(); + void clear(); std::string name() const { return algo_name; } HashFunction* clone() const; EVP_HashFunction(const EVP_MD*, const std::string&); @@ -52,7 +52,7 @@ void EVP_HashFunction::final_result(byte output[]) /* * Clear memory of sensitive data */ -void EVP_HashFunction::clear() throw() +void EVP_HashFunction::clear() { const EVP_MD* algo = EVP_MD_CTX_md(&md); EVP_DigestInit_ex(&md, algo, 0); diff --git a/src/hash/bmw/bmw_512.cpp b/src/hash/bmw/bmw_512.cpp index ad3826351..ae80d5725 100644 --- a/src/hash/bmw/bmw_512.cpp +++ b/src/hash/bmw/bmw_512.cpp @@ -176,7 +176,7 @@ void BMW_512::copy_out(byte output[]) /* * Clear memory of sensitive data */ -void BMW_512::clear() throw() +void BMW_512::clear() { MDx_HashFunction::clear(); M.clear(); diff --git a/src/hash/bmw/bmw_512.h b/src/hash/bmw/bmw_512.h index d1f2539e9..55cd761a9 100644 --- a/src/hash/bmw/bmw_512.h +++ b/src/hash/bmw/bmw_512.h @@ -15,7 +15,7 @@ namespace Botan { class BMW_512 : public MDx_HashFunction { public: - void clear() throw(); + void clear(); std::string name() const { return "BMW512"; } HashFunction* clone() const { return new BMW_512; } BMW_512() : MDx_HashFunction(64, 128, false, true) { clear(); } diff --git a/src/hash/fork256/fork256.cpp b/src/hash/fork256/fork256.cpp index f80bff43a..6718f9f97 100644 --- a/src/hash/fork256/fork256.cpp +++ b/src/hash/fork256/fork256.cpp @@ -133,7 +133,7 @@ void FORK_256::copy_out(byte output[]) /* * Clear memory of sensitive data */ -void FORK_256::clear() throw() +void FORK_256::clear() { MDx_HashFunction::clear(); digest[0] = 0x6A09E667; diff --git a/src/hash/fork256/fork256.h b/src/hash/fork256/fork256.h index 70d336cc9..f535370e6 100644 --- a/src/hash/fork256/fork256.h +++ b/src/hash/fork256/fork256.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL FORK_256 : public MDx_HashFunction { public: - void clear() throw(); + void clear(); std::string name() const { return "FORK-256"; } HashFunction* clone() const { return new FORK_256; } FORK_256() : MDx_HashFunction(32, 64, true, true) { clear(); } diff --git a/src/hash/gost_3411/gost_3411.cpp b/src/hash/gost_3411/gost_3411.cpp index 8f3982fca..90ef3e805 100644 --- a/src/hash/gost_3411/gost_3411.cpp +++ b/src/hash/gost_3411/gost_3411.cpp @@ -23,7 +23,7 @@ GOST_34_11::GOST_34_11() : position = 0; } -void GOST_34_11::clear() throw() +void GOST_34_11::clear() { cipher.clear(); sum.clear(); diff --git a/src/hash/gost_3411/gost_3411.h b/src/hash/gost_3411/gost_3411.h index 960adaa44..7b17bdc1f 100644 --- a/src/hash/gost_3411/gost_3411.h +++ b/src/hash/gost_3411/gost_3411.h @@ -19,7 +19,7 @@ namespace Botan { class BOTAN_DLL GOST_34_11 : public HashFunction { public: - void clear() throw(); + void clear(); std::string name() const { return "GOST-R-34.11-94" ; } HashFunction* clone() const { return new GOST_34_11; } diff --git a/src/hash/has160/has160.cpp b/src/hash/has160/has160.cpp index 9a505d31d..533efe595 100644 --- a/src/hash/has160/has160.cpp +++ b/src/hash/has160/has160.cpp @@ -145,7 +145,7 @@ void HAS_160::copy_out(byte output[]) /* * Clear memory of sensitive data */ -void HAS_160::clear() throw() +void HAS_160::clear() { MDx_HashFunction::clear(); X.clear(); diff --git a/src/hash/has160/has160.h b/src/hash/has160/has160.h index 44bb63b9d..cae66c93a 100644 --- a/src/hash/has160/has160.h +++ b/src/hash/has160/has160.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL HAS_160 : public MDx_HashFunction { public: - void clear() throw(); + void clear(); std::string name() const { return "HAS-160"; } HashFunction* clone() const { return new HAS_160; } HAS_160() : MDx_HashFunction(20, 64, false, true) { clear(); } diff --git a/src/hash/hash.h b/src/hash/hash.h index a30234be0..1098951d8 100644 --- a/src/hash/hash.h +++ b/src/hash/hash.h @@ -38,7 +38,7 @@ class BOTAN_DLL HashFunction : public BufferedComputation /** * Reset the internal state of this object. */ - virtual void clear() throw() = 0; + virtual void clear() = 0; HashFunction(u32bit hash_len, u32bit block_len = 0) : BufferedComputation(hash_len), HASH_BLOCK_SIZE(block_len) {} diff --git a/src/hash/md2/md2.cpp b/src/hash/md2/md2.cpp index c67e72b5a..f03518ec0 100644 --- a/src/hash/md2/md2.cpp +++ b/src/hash/md2/md2.cpp @@ -97,7 +97,7 @@ void MD2::final_result(byte output[]) /** * Clear memory of sensitive data */ -void MD2::clear() throw() +void MD2::clear() { X.clear(); checksum.clear(); diff --git a/src/hash/md2/md2.h b/src/hash/md2/md2.h index 9337c43f4..0a7125759 100644 --- a/src/hash/md2/md2.h +++ b/src/hash/md2/md2.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL MD2 : public HashFunction { public: - void clear() throw(); + void clear(); std::string name() const { return "MD2"; } HashFunction* clone() const { return new MD2; } MD2() : HashFunction(16, 16) { clear(); } diff --git a/src/hash/md4/md4.cpp b/src/hash/md4/md4.cpp index 39e3c8c41..b2870066d 100644 --- a/src/hash/md4/md4.cpp +++ b/src/hash/md4/md4.cpp @@ -95,7 +95,7 @@ void MD4::copy_out(byte output[]) /* * Clear memory of sensitive data */ -void MD4::clear() throw() +void MD4::clear() { MDx_HashFunction::clear(); M.clear(); diff --git a/src/hash/md4/md4.h b/src/hash/md4/md4.h index df6f2292d..0b76a70e4 100644 --- a/src/hash/md4/md4.h +++ b/src/hash/md4/md4.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL MD4 : public MDx_HashFunction { public: - void clear() throw(); + void clear(); std::string name() const { return "MD4"; } HashFunction* clone() const { return new MD4; } MD4() : MDx_HashFunction(16, 64, false, true) { clear(); } diff --git a/src/hash/md5/md5.cpp b/src/hash/md5/md5.cpp index 7c280aab7..163413bec 100644 --- a/src/hash/md5/md5.cpp +++ b/src/hash/md5/md5.cpp @@ -123,7 +123,7 @@ void MD5::copy_out(byte output[]) /* * Clear memory of sensitive data */ -void MD5::clear() throw() +void MD5::clear() { MDx_HashFunction::clear(); M.clear(); diff --git a/src/hash/md5/md5.h b/src/hash/md5/md5.h index 85f684d8b..456a02c28 100644 --- a/src/hash/md5/md5.h +++ b/src/hash/md5/md5.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL MD5 : public MDx_HashFunction { public: - void clear() throw(); + void clear(); std::string name() const { return "MD5"; } HashFunction* clone() const { return new MD5; } MD5() : MDx_HashFunction(16, 64, false, true) { clear(); } diff --git a/src/hash/mdx_hash/mdx_hash.cpp b/src/hash/mdx_hash/mdx_hash.cpp index b630ec227..28402c2c5 100644 --- a/src/hash/mdx_hash/mdx_hash.cpp +++ b/src/hash/mdx_hash/mdx_hash.cpp @@ -28,7 +28,7 @@ MDx_HashFunction::MDx_HashFunction(u32bit hash_len, u32bit block_len, /** * Clear memory of sensitive data */ -void MDx_HashFunction::clear() throw() +void MDx_HashFunction::clear() { buffer.clear(); count = position = 0; diff --git a/src/hash/mdx_hash/mdx_hash.h b/src/hash/mdx_hash/mdx_hash.h index 0c3aa7806..2d70deed3 100644 --- a/src/hash/mdx_hash/mdx_hash.h +++ b/src/hash/mdx_hash/mdx_hash.h @@ -25,7 +25,7 @@ class BOTAN_DLL MDx_HashFunction : public HashFunction void final_result(byte output[]); virtual void compress_n(const byte block[], u32bit block_n) = 0; - void clear() throw(); + void clear(); virtual void copy_out(byte[]) = 0; virtual void write_count(byte[]); private: diff --git a/src/hash/par_hash/par_hash.cpp b/src/hash/par_hash/par_hash.cpp index 4b0c7c466..0ba3f5a4f 100644 --- a/src/hash/par_hash/par_hash.cpp +++ b/src/hash/par_hash/par_hash.cpp @@ -77,7 +77,7 @@ HashFunction* Parallel::clone() const /* * Clear memory of sensitive data */ -void Parallel::clear() throw() +void Parallel::clear() { for(u32bit j = 0; j != hashes.size(); ++j) hashes[j]->clear(); diff --git a/src/hash/par_hash/par_hash.h b/src/hash/par_hash/par_hash.h index 7e75c27be..874e491b1 100644 --- a/src/hash/par_hash/par_hash.h +++ b/src/hash/par_hash/par_hash.h @@ -19,7 +19,7 @@ namespace Botan { class BOTAN_DLL Parallel : public HashFunction { public: - void clear() throw(); + void clear(); std::string name() const; HashFunction* clone() const; diff --git a/src/hash/rmd128/rmd128.cpp b/src/hash/rmd128/rmd128.cpp index 8b2c0ccf8..899e50914 100644 --- a/src/hash/rmd128/rmd128.cpp +++ b/src/hash/rmd128/rmd128.cpp @@ -159,7 +159,7 @@ void RIPEMD_128::copy_out(byte output[]) /* * Clear memory of sensitive data */ -void RIPEMD_128::clear() throw() +void RIPEMD_128::clear() { MDx_HashFunction::clear(); M.clear(); diff --git a/src/hash/rmd128/rmd128.h b/src/hash/rmd128/rmd128.h index 031ae5746..d9cb4ebb4 100644 --- a/src/hash/rmd128/rmd128.h +++ b/src/hash/rmd128/rmd128.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL RIPEMD_128 : public MDx_HashFunction { public: - void clear() throw(); + void clear(); std::string name() const { return "RIPEMD-128"; } HashFunction* clone() const { return new RIPEMD_128; } RIPEMD_128() : MDx_HashFunction(16, 64, false, true) { clear(); } diff --git a/src/hash/rmd160/rmd160.cpp b/src/hash/rmd160/rmd160.cpp index 863de8487..2baf5ab08 100644 --- a/src/hash/rmd160/rmd160.cpp +++ b/src/hash/rmd160/rmd160.cpp @@ -196,7 +196,7 @@ void RIPEMD_160::copy_out(byte output[]) /* * Clear memory of sensitive data */ -void RIPEMD_160::clear() throw() +void RIPEMD_160::clear() { MDx_HashFunction::clear(); M.clear(); diff --git a/src/hash/rmd160/rmd160.h b/src/hash/rmd160/rmd160.h index f2babc582..aee007b98 100644 --- a/src/hash/rmd160/rmd160.h +++ b/src/hash/rmd160/rmd160.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL RIPEMD_160 : public MDx_HashFunction { public: - void clear() throw(); + void clear(); std::string name() const { return "RIPEMD-160"; } HashFunction* clone() const { return new RIPEMD_160; } RIPEMD_160() : MDx_HashFunction(20, 64, false, true) { clear(); } diff --git a/src/hash/sha1/sha160.cpp b/src/hash/sha1/sha160.cpp index 45323a11b..a9e6880a7 100644 --- a/src/hash/sha1/sha160.cpp +++ b/src/hash/sha1/sha160.cpp @@ -130,7 +130,7 @@ void SHA_160::copy_out(byte output[]) /* * Clear memory of sensitive data */ -void SHA_160::clear() throw() +void SHA_160::clear() { MDx_HashFunction::clear(); W.clear(); diff --git a/src/hash/sha1/sha160.h b/src/hash/sha1/sha160.h index 232cf0322..142c6bf17 100644 --- a/src/hash/sha1/sha160.h +++ b/src/hash/sha1/sha160.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL SHA_160 : public MDx_HashFunction { public: - void clear() throw(); + void clear(); std::string name() const { return "SHA-160"; } HashFunction* clone() const { return new SHA_160; } SHA_160(); diff --git a/src/hash/sha2/sha2_32.cpp b/src/hash/sha2/sha2_32.cpp index 9da2ec23f..9fbcae44d 100644 --- a/src/hash/sha2/sha2_32.cpp +++ b/src/hash/sha2/sha2_32.cpp @@ -152,7 +152,7 @@ void SHA_224_256_BASE::copy_out(byte output[]) /* * Clear memory of sensitive data */ -void SHA_224_256_BASE::clear() throw() +void SHA_224_256_BASE::clear() { MDx_HashFunction::clear(); W.clear(); @@ -161,7 +161,7 @@ void SHA_224_256_BASE::clear() throw() /* * Clear memory of sensitive data */ -void SHA_224::clear() throw() +void SHA_224::clear() { SHA_224_256_BASE::clear(); digest[0] = 0xc1059ed8; @@ -177,7 +177,7 @@ void SHA_224::clear() throw() /* * Clear memory of sensitive data */ -void SHA_256::clear() throw() +void SHA_256::clear() { SHA_224_256_BASE::clear(); digest[0] = 0x6A09E667; diff --git a/src/hash/sha2/sha2_32.h b/src/hash/sha2/sha2_32.h index 05083d19d..313eec676 100644 --- a/src/hash/sha2/sha2_32.h +++ b/src/hash/sha2/sha2_32.h @@ -19,7 +19,7 @@ namespace Botan { class BOTAN_DLL SHA_224_256_BASE : public MDx_HashFunction { protected: - void clear() throw(); + void clear(); SHA_224_256_BASE(u32bit out) : MDx_HashFunction(out, 64, true, true) { clear(); } @@ -36,7 +36,7 @@ class BOTAN_DLL SHA_224_256_BASE : public MDx_HashFunction class BOTAN_DLL SHA_224 : public SHA_224_256_BASE { public: - void clear() throw(); + void clear(); std::string name() const { return "SHA-224"; } HashFunction* clone() const { return new SHA_224; } SHA_224() : SHA_224_256_BASE(28) { clear(); } @@ -48,7 +48,7 @@ class BOTAN_DLL SHA_224 : public SHA_224_256_BASE class BOTAN_DLL SHA_256 : public SHA_224_256_BASE { public: - void clear() throw(); + void clear(); std::string name() const { return "SHA-256"; } HashFunction* clone() const { return new SHA_256; } SHA_256() : SHA_224_256_BASE(32) { clear (); } diff --git a/src/hash/sha2/sha2_64.cpp b/src/hash/sha2/sha2_64.cpp index e9b4c2e5a..3c771eb44 100644 --- a/src/hash/sha2/sha2_64.cpp +++ b/src/hash/sha2/sha2_64.cpp @@ -167,7 +167,7 @@ void SHA_384_512_BASE::copy_out(byte output[]) /* * Clear memory of sensitive data */ -void SHA_384_512_BASE::clear() throw() +void SHA_384_512_BASE::clear() { MDx_HashFunction::clear(); W.clear(); @@ -176,7 +176,7 @@ void SHA_384_512_BASE::clear() throw() /* * Clear memory of sensitive data */ -void SHA_384::clear() throw() +void SHA_384::clear() { SHA_384_512_BASE::clear(); digest[0] = 0xCBBB9D5DC1059ED8; @@ -192,7 +192,7 @@ void SHA_384::clear() throw() /* * Clear memory of sensitive data */ -void SHA_512::clear() throw() +void SHA_512::clear() { SHA_384_512_BASE::clear(); digest[0] = 0x6A09E667F3BCC908; diff --git a/src/hash/sha2/sha2_64.h b/src/hash/sha2/sha2_64.h index dcc6dc83b..8e4d171f8 100644 --- a/src/hash/sha2/sha2_64.h +++ b/src/hash/sha2/sha2_64.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL SHA_384_512_BASE : public MDx_HashFunction { protected: - void clear() throw(); + void clear(); SHA_384_512_BASE(u32bit out) : MDx_HashFunction(out, 128, true, true, 16) {} @@ -37,7 +37,7 @@ class BOTAN_DLL SHA_384_512_BASE : public MDx_HashFunction class BOTAN_DLL SHA_384 : public SHA_384_512_BASE { public: - void clear() throw(); + void clear(); std::string name() const { return "SHA-384"; } HashFunction* clone() const { return new SHA_384; } SHA_384() : SHA_384_512_BASE(48) { clear(); } @@ -49,7 +49,7 @@ class BOTAN_DLL SHA_384 : public SHA_384_512_BASE class BOTAN_DLL SHA_512 : public SHA_384_512_BASE { public: - void clear() throw(); + void clear(); std::string name() const { return "SHA-512"; } HashFunction* clone() const { return new SHA_512; } SHA_512() : SHA_384_512_BASE(64) { clear(); } diff --git a/src/hash/skein/skein_512.cpp b/src/hash/skein/skein_512.cpp index a48cfc186..b24efd5f7 100644 --- a/src/hash/skein/skein_512.cpp +++ b/src/hash/skein/skein_512.cpp @@ -183,7 +183,7 @@ HashFunction* Skein_512::clone() const return new Skein_512(output_bits, personalization); } -void Skein_512::clear() throw() +void Skein_512::clear() { H.clear(); T.clear(); diff --git a/src/hash/skein/skein_512.h b/src/hash/skein/skein_512.h index fa558fc0d..db8d3c8b7 100644 --- a/src/hash/skein/skein_512.h +++ b/src/hash/skein/skein_512.h @@ -22,7 +22,7 @@ class BOTAN_DLL Skein_512 : public HashFunction HashFunction* clone() const; std::string name() const; - void clear() throw(); + void clear(); private: void add_data(const byte input[], u32bit length); void final_result(byte out[]); diff --git a/src/hash/tiger/tiger.cpp b/src/hash/tiger/tiger.cpp index e46f2cb77..975ea9b6b 100644 --- a/src/hash/tiger/tiger.cpp +++ b/src/hash/tiger/tiger.cpp @@ -129,7 +129,7 @@ void Tiger::mix(u64bit X[8]) /* * Clear memory of sensitive data */ -void Tiger::clear() throw() +void Tiger::clear() { MDx_HashFunction::clear(); X.clear(); diff --git a/src/hash/tiger/tiger.h b/src/hash/tiger/tiger.h index 63184a938..86ddcd270 100644 --- a/src/hash/tiger/tiger.h +++ b/src/hash/tiger/tiger.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL Tiger : public MDx_HashFunction { public: - void clear() throw(); + void clear(); std::string name() const; HashFunction* clone() const { return new Tiger(OUTPUT_LENGTH); } Tiger(u32bit = 24, u32bit = 3); diff --git a/src/hash/whirlpool/whrlpool.cpp b/src/hash/whirlpool/whrlpool.cpp index 8548d6192..b7a02a9b6 100644 --- a/src/hash/whirlpool/whrlpool.cpp +++ b/src/hash/whirlpool/whrlpool.cpp @@ -136,7 +136,7 @@ void Whirlpool::copy_out(byte output[]) /* * Clear memory of sensitive data */ -void Whirlpool::clear() throw() +void Whirlpool::clear() { MDx_HashFunction::clear(); M.clear(); diff --git a/src/hash/whirlpool/whrlpool.h b/src/hash/whirlpool/whrlpool.h index b72ff609f..34b4d2302 100644 --- a/src/hash/whirlpool/whrlpool.h +++ b/src/hash/whirlpool/whrlpool.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL Whirlpool : public MDx_HashFunction { public: - void clear() throw(); + void clear(); std::string name() const { return "Whirlpool"; } HashFunction* clone() const { return new Whirlpool; } Whirlpool() : MDx_HashFunction(64, 64, true, true, 32) { clear(); } diff --git a/src/mac/cbc_mac/cbc_mac.cpp b/src/mac/cbc_mac/cbc_mac.cpp index f5d9e1567..0617e3e90 100644 --- a/src/mac/cbc_mac/cbc_mac.cpp +++ b/src/mac/cbc_mac/cbc_mac.cpp @@ -62,7 +62,7 @@ void CBC_MAC::key_schedule(const byte key[], u32bit length) /* * Clear memory of sensitive data */ -void CBC_MAC::clear() throw() +void CBC_MAC::clear() { e->clear(); state.clear(); diff --git a/src/mac/cbc_mac/cbc_mac.h b/src/mac/cbc_mac/cbc_mac.h index d17d792d3..15026c0a9 100644 --- a/src/mac/cbc_mac/cbc_mac.h +++ b/src/mac/cbc_mac/cbc_mac.h @@ -19,7 +19,7 @@ namespace Botan { class BOTAN_DLL CBC_MAC : public MessageAuthenticationCode { public: - void clear() throw(); + void clear(); std::string name() const; MessageAuthenticationCode* clone() const; diff --git a/src/mac/cmac/cmac.cpp b/src/mac/cmac/cmac.cpp index 84aa61e03..58923138b 100644 --- a/src/mac/cmac/cmac.cpp +++ b/src/mac/cmac/cmac.cpp @@ -101,7 +101,7 @@ void CMAC::key_schedule(const byte key[], u32bit length) /* * Clear memory of sensitive data */ -void CMAC::clear() throw() +void CMAC::clear() { e->clear(); state.clear(); diff --git a/src/mac/cmac/cmac.h b/src/mac/cmac/cmac.h index 5a6deb7b0..8297e5ea1 100644 --- a/src/mac/cmac/cmac.h +++ b/src/mac/cmac/cmac.h @@ -19,7 +19,7 @@ namespace Botan { class BOTAN_DLL CMAC : public MessageAuthenticationCode { public: - void clear() throw(); + void clear(); std::string name() const; MessageAuthenticationCode* clone() const; diff --git a/src/mac/hmac/hmac.cpp b/src/mac/hmac/hmac.cpp index 717e2640c..99be479fa 100644 --- a/src/mac/hmac/hmac.cpp +++ b/src/mac/hmac/hmac.cpp @@ -58,7 +58,7 @@ void HMAC::key_schedule(const byte key[], u32bit length) /* * Clear memory of sensitive data */ -void HMAC::clear() throw() +void HMAC::clear() { hash->clear(); i_key.clear(); diff --git a/src/mac/hmac/hmac.h b/src/mac/hmac/hmac.h index 932af71fc..62bb69853 100644 --- a/src/mac/hmac/hmac.h +++ b/src/mac/hmac/hmac.h @@ -19,7 +19,7 @@ namespace Botan { class BOTAN_DLL HMAC : public MessageAuthenticationCode { public: - void clear() throw(); + void clear(); std::string name() const; MessageAuthenticationCode* clone() const; diff --git a/src/mac/mac.h b/src/mac/mac.h index 3ec5fff5f..7c73a2900 100644 --- a/src/mac/mac.h +++ b/src/mac/mac.h @@ -43,7 +43,7 @@ class BOTAN_DLL MessageAuthenticationCode : public BufferedComputation, /** * Reset the internal state of this object. */ - virtual void clear() throw() = 0; + virtual void clear() = 0; MessageAuthenticationCode(u32bit mac_len, u32bit key_min, diff --git a/src/mac/ssl3mac/ssl3_mac.cpp b/src/mac/ssl3mac/ssl3_mac.cpp index c29296ced..23a636424 100644 --- a/src/mac/ssl3mac/ssl3_mac.cpp +++ b/src/mac/ssl3mac/ssl3_mac.cpp @@ -46,7 +46,7 @@ void SSL3_MAC::key_schedule(const byte key[], u32bit length) /* * Clear memory of sensitive data */ -void SSL3_MAC::clear() throw() +void SSL3_MAC::clear() { hash->clear(); i_key.clear(); diff --git a/src/mac/ssl3mac/ssl3_mac.h b/src/mac/ssl3mac/ssl3_mac.h index dcaf7f404..828b072ed 100644 --- a/src/mac/ssl3mac/ssl3_mac.h +++ b/src/mac/ssl3mac/ssl3_mac.h @@ -19,7 +19,7 @@ namespace Botan { class BOTAN_DLL SSL3_MAC : public MessageAuthenticationCode { public: - void clear() throw(); + void clear(); std::string name() const; MessageAuthenticationCode* clone() const; diff --git a/src/mac/x919_mac/x919_mac.cpp b/src/mac/x919_mac/x919_mac.cpp index ef89cac9c..52260494a 100644 --- a/src/mac/x919_mac/x919_mac.cpp +++ b/src/mac/x919_mac/x919_mac.cpp @@ -63,7 +63,7 @@ void ANSI_X919_MAC::key_schedule(const byte key[], u32bit length) /* * Clear memory of sensitive data */ -void ANSI_X919_MAC::clear() throw() +void ANSI_X919_MAC::clear() { e->clear(); d->clear(); diff --git a/src/mac/x919_mac/x919_mac.h b/src/mac/x919_mac/x919_mac.h index 1c2a06bee..a4690fdcd 100644 --- a/src/mac/x919_mac/x919_mac.h +++ b/src/mac/x919_mac/x919_mac.h @@ -19,7 +19,7 @@ namespace Botan { class BOTAN_DLL ANSI_X919_MAC : public MessageAuthenticationCode { public: - void clear() throw(); + void clear(); std::string name() const; MessageAuthenticationCode* clone() const; diff --git a/src/pk_pad/emsa.h b/src/pk_pad/emsa.h index e2491e40f..8b19d3cb2 100644 --- a/src/pk_pad/emsa.h +++ b/src/pk_pad/emsa.h @@ -27,7 +27,7 @@ class BOTAN_DLL EMSA RandomNumberGenerator& rng) = 0; virtual bool verify(const MemoryRegion&, const MemoryRegion&, - u32bit) throw() = 0; + u32bit) = 0; virtual ~EMSA() {} }; diff --git a/src/pk_pad/emsa1/emsa1.cpp b/src/pk_pad/emsa1/emsa1.cpp index 26d709c28..0ae7e8d2d 100644 --- a/src/pk_pad/emsa1/emsa1.cpp +++ b/src/pk_pad/emsa1/emsa1.cpp @@ -72,7 +72,7 @@ SecureVector EMSA1::encoding_of(const MemoryRegion& msg, * EMSA1 Decode/Verify Operation */ bool EMSA1::verify(const MemoryRegion& coded, - const MemoryRegion& raw, u32bit key_bits) throw() + const MemoryRegion& raw, u32bit key_bits) { try { if(raw.size() != hash->OUTPUT_LENGTH) diff --git a/src/pk_pad/emsa1/emsa1.h b/src/pk_pad/emsa1/emsa1.h index a5dac07e2..d86020966 100644 --- a/src/pk_pad/emsa1/emsa1.h +++ b/src/pk_pad/emsa1/emsa1.h @@ -31,7 +31,7 @@ class BOTAN_DLL EMSA1 : public EMSA RandomNumberGenerator& rng); bool verify(const MemoryRegion&, const MemoryRegion&, - u32bit) throw(); + u32bit); HashFunction* hash; }; diff --git a/src/pk_pad/emsa2/emsa2.cpp b/src/pk_pad/emsa2/emsa2.cpp index 168f9209e..74a045931 100644 --- a/src/pk_pad/emsa2/emsa2.cpp +++ b/src/pk_pad/emsa2/emsa2.cpp @@ -79,7 +79,7 @@ SecureVector EMSA2::encoding_of(const MemoryRegion& msg, */ bool EMSA2::verify(const MemoryRegion& coded, const MemoryRegion& raw, - u32bit key_bits) throw() + u32bit key_bits) { try { diff --git a/src/pk_pad/emsa2/emsa2.h b/src/pk_pad/emsa2/emsa2.h index 76888d1f6..7efc80873 100644 --- a/src/pk_pad/emsa2/emsa2.h +++ b/src/pk_pad/emsa2/emsa2.h @@ -29,7 +29,7 @@ class BOTAN_DLL EMSA2 : public EMSA RandomNumberGenerator& rng); bool verify(const MemoryRegion&, const MemoryRegion&, - u32bit) throw(); + u32bit); SecureVector empty_hash; HashFunction* hash; diff --git a/src/pk_pad/emsa3/emsa3.cpp b/src/pk_pad/emsa3/emsa3.cpp index 4d50abd84..dc905a464 100644 --- a/src/pk_pad/emsa3/emsa3.cpp +++ b/src/pk_pad/emsa3/emsa3.cpp @@ -72,7 +72,7 @@ SecureVector EMSA3::encoding_of(const MemoryRegion& msg, */ bool EMSA3::verify(const MemoryRegion& coded, const MemoryRegion& raw, - u32bit key_bits) throw() + u32bit key_bits) { if(raw.size() != hash->OUTPUT_LENGTH) return false; @@ -137,7 +137,7 @@ SecureVector EMSA3_Raw::encoding_of(const MemoryRegion& msg, */ bool EMSA3_Raw::verify(const MemoryRegion& coded, const MemoryRegion& raw, - u32bit key_bits) throw() + u32bit key_bits) { try { diff --git a/src/pk_pad/emsa3/emsa3.h b/src/pk_pad/emsa3/emsa3.h index 301f2142a..c4a3d658b 100644 --- a/src/pk_pad/emsa3/emsa3.h +++ b/src/pk_pad/emsa3/emsa3.h @@ -32,7 +32,7 @@ class BOTAN_DLL EMSA3 : public EMSA RandomNumberGenerator& rng); bool verify(const MemoryRegion&, const MemoryRegion&, - u32bit) throw(); + u32bit); private: HashFunction* hash; SecureVector hash_id; @@ -54,7 +54,7 @@ class BOTAN_DLL EMSA3_Raw : public EMSA RandomNumberGenerator& rng); bool verify(const MemoryRegion&, const MemoryRegion&, - u32bit) throw(); + u32bit); private: SecureVector message; diff --git a/src/pk_pad/emsa4/emsa4.cpp b/src/pk_pad/emsa4/emsa4.cpp index cff9a1537..dba248662 100644 --- a/src/pk_pad/emsa4/emsa4.cpp +++ b/src/pk_pad/emsa4/emsa4.cpp @@ -68,7 +68,7 @@ SecureVector EMSA4::encoding_of(const MemoryRegion& msg, * EMSA4 Decode/Verify Operation */ bool EMSA4::verify(const MemoryRegion& const_coded, - const MemoryRegion& raw, u32bit key_bits) throw() + const MemoryRegion& raw, u32bit key_bits) { const u32bit HASH_SIZE = hash->OUTPUT_LENGTH; const u32bit KEY_BYTES = (key_bits + 7) / 8; diff --git a/src/pk_pad/emsa4/emsa4.h b/src/pk_pad/emsa4/emsa4.h index b716178a9..9e37684f5 100644 --- a/src/pk_pad/emsa4/emsa4.h +++ b/src/pk_pad/emsa4/emsa4.h @@ -31,7 +31,7 @@ class BOTAN_DLL EMSA4 : public EMSA SecureVector encoding_of(const MemoryRegion&, u32bit, RandomNumberGenerator& rng); bool verify(const MemoryRegion&, const MemoryRegion&, - u32bit) throw(); + u32bit); u32bit SALT_SIZE; HashFunction* hash; diff --git a/src/pk_pad/emsa_raw/emsa_raw.cpp b/src/pk_pad/emsa_raw/emsa_raw.cpp index d5973ee55..5dfe20a50 100644 --- a/src/pk_pad/emsa_raw/emsa_raw.cpp +++ b/src/pk_pad/emsa_raw/emsa_raw.cpp @@ -42,7 +42,7 @@ SecureVector EMSA_Raw::encoding_of(const MemoryRegion& msg, */ bool EMSA_Raw::verify(const MemoryRegion& coded, const MemoryRegion& raw, - u32bit) throw() + u32bit) { return (coded == raw); } diff --git a/src/pk_pad/emsa_raw/emsa_raw.h b/src/pk_pad/emsa_raw/emsa_raw.h index 1b0ad516e..5f2eaa2fe 100644 --- a/src/pk_pad/emsa_raw/emsa_raw.h +++ b/src/pk_pad/emsa_raw/emsa_raw.h @@ -24,7 +24,7 @@ class BOTAN_DLL EMSA_Raw : public EMSA SecureVector encoding_of(const MemoryRegion&, u32bit, RandomNumberGenerator&); bool verify(const MemoryRegion&, const MemoryRegion&, - u32bit) throw(); + u32bit); SecureVector message; }; diff --git a/src/rng/auto_rng/auto_rng.h b/src/rng/auto_rng/auto_rng.h index f18f8e5cd..a15b11b13 100644 --- a/src/rng/auto_rng/auto_rng.h +++ b/src/rng/auto_rng/auto_rng.h @@ -23,7 +23,7 @@ class BOTAN_DLL AutoSeeded_RNG : public RandomNumberGenerator { rng->randomize(out, len); } bool is_seeded() const { return rng->is_seeded(); } - void clear() throw() { rng->clear(); } + void clear() { rng->clear(); } std::string name() const { return "AutoSeeded(" + rng->name() + ")"; } diff --git a/src/rng/hmac_rng/hmac_rng.cpp b/src/rng/hmac_rng/hmac_rng.cpp index 8444b1083..9d5ee97e4 100644 --- a/src/rng/hmac_rng/hmac_rng.cpp +++ b/src/rng/hmac_rng/hmac_rng.cpp @@ -147,7 +147,7 @@ void HMAC_RNG::add_entropy_source(EntropySource* src) /* * Clear memory of sensitive data */ -void HMAC_RNG::clear() throw() +void HMAC_RNG::clear() { extractor->clear(); prf->clear(); diff --git a/src/rng/hmac_rng/hmac_rng.h b/src/rng/hmac_rng/hmac_rng.h index 318e2a931..97b0baf15 100644 --- a/src/rng/hmac_rng/hmac_rng.h +++ b/src/rng/hmac_rng/hmac_rng.h @@ -29,7 +29,7 @@ class BOTAN_DLL HMAC_RNG : public RandomNumberGenerator public: void randomize(byte buf[], u32bit len); bool is_seeded() const { return seeded; } - void clear() throw(); + void clear(); std::string name() const; void reseed(u32bit poll_bits); diff --git a/src/rng/randpool/randpool.cpp b/src/rng/randpool/randpool.cpp index fe83f4361..9ec92267d 100644 --- a/src/rng/randpool/randpool.cpp +++ b/src/rng/randpool/randpool.cpp @@ -149,7 +149,7 @@ void Randpool::add_entropy_source(EntropySource* src) /** * Clear memory of sensitive data */ -void Randpool::clear() throw() +void Randpool::clear() { cipher->clear(); mac->clear(); diff --git a/src/rng/randpool/randpool.h b/src/rng/randpool/randpool.h index b6a3adda4..ab6ed6748 100644 --- a/src/rng/randpool/randpool.h +++ b/src/rng/randpool/randpool.h @@ -23,7 +23,7 @@ class BOTAN_DLL Randpool : public RandomNumberGenerator public: void randomize(byte[], u32bit); bool is_seeded() const { return seeded; } - void clear() throw(); + void clear(); std::string name() const; void reseed(u32bit bits_to_collect); diff --git a/src/rng/rng.h b/src/rng/rng.h index 41904dbef..c53d8e22d 100644 --- a/src/rng/rng.h +++ b/src/rng/rng.h @@ -47,7 +47,7 @@ class BOTAN_DLL RandomNumberGenerator /** * Clear all internally held values of this RNG. */ - virtual void clear() throw() = 0; + virtual void clear() = 0; /** * Return the name of this object @@ -89,7 +89,7 @@ class BOTAN_DLL Null_RNG : public RandomNumberGenerator { public: void randomize(byte[], u32bit) { throw PRNG_Unseeded("Null_RNG"); } - void clear() throw() {} + void clear() {} std::string name() const { return "Null_RNG"; } void reseed(u32bit) {} diff --git a/src/rng/x931_rng/x931_rng.cpp b/src/rng/x931_rng/x931_rng.cpp index e239bce84..64d57ac1c 100644 --- a/src/rng/x931_rng/x931_rng.cpp +++ b/src/rng/x931_rng/x931_rng.cpp @@ -108,7 +108,7 @@ bool ANSI_X931_RNG::is_seeded() const /** * Clear memory of sensitive data */ -void ANSI_X931_RNG::clear() throw() +void ANSI_X931_RNG::clear() { cipher->clear(); prng->clear(); diff --git a/src/rng/x931_rng/x931_rng.h b/src/rng/x931_rng/x931_rng.h index 44e9b4428..d5ba2e9eb 100644 --- a/src/rng/x931_rng/x931_rng.h +++ b/src/rng/x931_rng/x931_rng.h @@ -21,7 +21,7 @@ class BOTAN_DLL ANSI_X931_RNG : public RandomNumberGenerator public: void randomize(byte[], u32bit); bool is_seeded() const; - void clear() throw(); + void clear(); std::string name() const; void reseed(u32bit poll_bits); diff --git a/src/stream/arc4/arc4.cpp b/src/stream/arc4/arc4.cpp index 0f78f7362..293a0a336 100644 --- a/src/stream/arc4/arc4.cpp +++ b/src/stream/arc4/arc4.cpp @@ -87,7 +87,7 @@ std::string ARC4::name() const /* * Clear memory of sensitive data */ -void ARC4::clear() throw() +void ARC4::clear() { state.clear(); buffer.clear(); diff --git a/src/stream/arc4/arc4.h b/src/stream/arc4/arc4.h index 3f92fa914..ae37cb165 100644 --- a/src/stream/arc4/arc4.h +++ b/src/stream/arc4/arc4.h @@ -21,7 +21,7 @@ class BOTAN_DLL ARC4 : public StreamCipher public: void cipher(const byte in[], byte out[], u32bit length); - void clear() throw(); + void clear(); std::string name() const; StreamCipher* clone() const { return new ARC4(SKIP); } diff --git a/src/stream/ctr/ctr.cpp b/src/stream/ctr/ctr.cpp index 5ef5e447f..5f0880fa5 100644 --- a/src/stream/ctr/ctr.cpp +++ b/src/stream/ctr/ctr.cpp @@ -37,7 +37,7 @@ CTR_BE::~CTR_BE() /* * Zeroize */ -void CTR_BE::clear() throw() +void CTR_BE::clear() { permutation->clear(); buffer.clear(); diff --git a/src/stream/ctr/ctr.h b/src/stream/ctr/ctr.h index f60f21b5a..5f94170cc 100644 --- a/src/stream/ctr/ctr.h +++ b/src/stream/ctr/ctr.h @@ -31,7 +31,7 @@ class BOTAN_DLL CTR_BE : public StreamCipher CTR_BE* clone() const { return new CTR_BE(permutation->clone()); } - void clear() throw(); + void clear(); CTR_BE(BlockCipher*); ~CTR_BE(); diff --git a/src/stream/ofb/ofb.cpp b/src/stream/ofb/ofb.cpp index 577f61cbf..0d12d23bd 100644 --- a/src/stream/ofb/ofb.cpp +++ b/src/stream/ofb/ofb.cpp @@ -35,7 +35,7 @@ OFB::~OFB() /* * Zeroize */ -void OFB::clear() throw() +void OFB::clear() { permutation->clear(); buffer.clear(); diff --git a/src/stream/ofb/ofb.h b/src/stream/ofb/ofb.h index 5cd48716b..1985ae5a9 100644 --- a/src/stream/ofb/ofb.h +++ b/src/stream/ofb/ofb.h @@ -31,7 +31,7 @@ class BOTAN_DLL OFB : public StreamCipher OFB* clone() const { return new OFB(permutation->clone()); } - void clear() throw(); + void clear(); OFB(BlockCipher*); ~OFB(); diff --git a/src/stream/salsa20/salsa20.cpp b/src/stream/salsa20/salsa20.cpp index a147cdb45..3aae64eae 100644 --- a/src/stream/salsa20/salsa20.cpp +++ b/src/stream/salsa20/salsa20.cpp @@ -197,7 +197,7 @@ std::string Salsa20::name() const /* * Clear memory of sensitive data */ -void Salsa20::clear() throw() +void Salsa20::clear() { state.clear(); buffer.clear(); diff --git a/src/stream/salsa20/salsa20.h b/src/stream/salsa20/salsa20.h index a3e9a3706..3ca781ea2 100644 --- a/src/stream/salsa20/salsa20.h +++ b/src/stream/salsa20/salsa20.h @@ -25,7 +25,7 @@ class BOTAN_DLL Salsa20 : public StreamCipher bool valid_iv_length(u32bit iv_len) const { return (iv_len == 8); } - void clear() throw(); + void clear(); std::string name() const; StreamCipher* clone() const { return new Salsa20; } diff --git a/src/stream/stream_cipher.h b/src/stream/stream_cipher.h index d6abb37fc..29c16c8b5 100644 --- a/src/stream/stream_cipher.h +++ b/src/stream/stream_cipher.h @@ -61,7 +61,7 @@ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm /** * Zeroize internal state */ - virtual void clear() throw() = 0; + virtual void clear() = 0; /** * StreamCipher constructor diff --git a/src/stream/turing/turing.cpp b/src/stream/turing/turing.cpp index 8336a70a7..810f65ca4 100644 --- a/src/stream/turing/turing.cpp +++ b/src/stream/turing/turing.cpp @@ -295,7 +295,7 @@ void Turing::set_iv(const byte iv[], u32bit length) /* * Clear memory of sensitive data */ -void Turing::clear() throw() +void Turing::clear() { S0.clear(); S1.clear(); diff --git a/src/stream/turing/turing.h b/src/stream/turing/turing.h index 59290f640..7291647ea 100644 --- a/src/stream/turing/turing.h +++ b/src/stream/turing/turing.h @@ -24,7 +24,7 @@ class BOTAN_DLL Turing : public StreamCipher bool valid_iv_length(u32bit iv_len) const { return (iv_len % 4 == 0 && iv_len <= 16); } - void clear() throw(); + void clear(); std::string name() const { return "Turing"; } StreamCipher* clone() const { return new Turing; } Turing() : StreamCipher(4, 32, 4) { position = 0; } diff --git a/src/stream/wid_wake/wid_wake.cpp b/src/stream/wid_wake/wid_wake.cpp index 56f938fac..2a8946649 100644 --- a/src/stream/wid_wake/wid_wake.cpp +++ b/src/stream/wid_wake/wid_wake.cpp @@ -136,7 +136,7 @@ void WiderWake_41_BE::set_iv(const byte iv[], u32bit length) /* * Clear memory of sensitive data */ -void WiderWake_41_BE::clear() throw() +void WiderWake_41_BE::clear() { position = 0; t_key.clear(); diff --git a/src/stream/wid_wake/wid_wake.h b/src/stream/wid_wake/wid_wake.h index a037a056e..23e1eacab 100644 --- a/src/stream/wid_wake/wid_wake.h +++ b/src/stream/wid_wake/wid_wake.h @@ -24,7 +24,7 @@ class BOTAN_DLL WiderWake_41_BE : public StreamCipher bool valid_iv_length(u32bit iv_len) const { return (iv_len == 8); } - void clear() throw(); + void clear(); std::string name() const { return "WiderWake4+1-BE"; } StreamCipher* clone() const { return new WiderWake_41_BE; } WiderWake_41_BE() : StreamCipher(16, 16, 1) {} diff --git a/src/sym_algo/sym_algo.h b/src/sym_algo/sym_algo.h index 1c8b816fd..929f2a6f0 100644 --- a/src/sym_algo/sym_algo.h +++ b/src/sym_algo/sym_algo.h @@ -46,7 +46,7 @@ class BOTAN_DLL SymmetricAlgorithm * Set the symmetric key of this object. * @param key the SymmetricKey to be set. */ - void set_key(const SymmetricKey& key) throw(Invalid_Key_Length) + void set_key(const SymmetricKey& key) { set_key(key.begin(), key.length()); } /** @@ -54,7 +54,7 @@ class BOTAN_DLL SymmetricAlgorithm * @param key the to be set as a byte array. * @param the length of the byte array. */ - void set_key(const byte key[], u32bit length) throw(Invalid_Key_Length) + void set_key(const byte key[], u32bit length) { if(!valid_keylength(length)) throw Invalid_Key_Length(name(), length); -- cgit v1.2.3 From a6fc4c8a57b6a65f1b893b4f6de59b74c66ff84b Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 23 Oct 2009 01:13:56 +0000 Subject: Simply unrolling the loop in XTEA and processing 4 blocks worth of data at a time more than doubles performance (from 38 MB/s to 90 MB/s on Core2 Q6600). Could do even better with SIMD, I'm sure, but this is fast and easy, and works everywhere. Probably will hurt on 32-bit x86 from the register pressure. --- src/block/xtea/xtea.cpp | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'src/block/xtea') diff --git a/src/block/xtea/xtea.cpp b/src/block/xtea/xtea.cpp index 77543e1e8..83c7d9ce5 100644 --- a/src/block/xtea/xtea.cpp +++ b/src/block/xtea/xtea.cpp @@ -8,13 +8,75 @@ #include #include +#include + namespace Botan { +namespace { + +void xtea_encrypt_4(const byte in[32], byte out[32], const u32bit EK[64]) + { + u32bit L0 = load_be(in, 0), R0 = load_be(in, 1); + u32bit L1 = load_be(in, 2), R1 = load_be(in, 3); + u32bit L2 = load_be(in, 4), R2 = load_be(in, 5); + u32bit L3 = load_be(in, 6), R3 = load_be(in, 7); + + for(u32bit i = 0; i != 32; ++i) + { + L0 += (((R0 << 4) ^ (R0 >> 5)) + R0) ^ EK[2*i]; + L1 += (((R1 << 4) ^ (R1 >> 5)) + R1) ^ EK[2*i]; + L2 += (((R2 << 4) ^ (R2 >> 5)) + R2) ^ EK[2*i]; + L3 += (((R3 << 4) ^ (R3 >> 5)) + R3) ^ EK[2*i]; + + R0 += (((L0 << 4) ^ (L0 >> 5)) + L0) ^ EK[2*i+1]; + R1 += (((L1 << 4) ^ (L1 >> 5)) + L1) ^ EK[2*i+1]; + R2 += (((L2 << 4) ^ (L2 >> 5)) + L2) ^ EK[2*i+1]; + R3 += (((L3 << 4) ^ (L3 >> 5)) + L3) ^ EK[2*i+1]; + } + + store_be(out , L0, R0, L1, R1); + store_be(out + 16, L2, R2, L3, R3); + } + +void xtea_decrypt_4(const byte in[32], byte out[32], const u32bit EK[64]) + { + u32bit L0 = load_be(in, 0), R0 = load_be(in, 1); + u32bit L1 = load_be(in, 2), R1 = load_be(in, 3); + u32bit L2 = load_be(in, 4), R2 = load_be(in, 5); + u32bit L3 = load_be(in, 6), R3 = load_be(in, 7); + + for(u32bit i = 0; i != 32; ++i) + { + R0 -= (((L0 << 4) ^ (L0 >> 5)) + L0) ^ EK[63 - 2*i]; + R1 -= (((L1 << 4) ^ (L1 >> 5)) + L1) ^ EK[63 - 2*i]; + R2 -= (((L2 << 4) ^ (L2 >> 5)) + L2) ^ EK[63 - 2*i]; + R3 -= (((L3 << 4) ^ (L3 >> 5)) + L3) ^ EK[63 - 2*i]; + + L0 -= (((R0 << 4) ^ (R0 >> 5)) + R0) ^ EK[62 - 2*i]; + L1 -= (((R1 << 4) ^ (R1 >> 5)) + R1) ^ EK[62 - 2*i]; + L2 -= (((R2 << 4) ^ (R2 >> 5)) + R2) ^ EK[62 - 2*i]; + L3 -= (((R3 << 4) ^ (R3 >> 5)) + R3) ^ EK[62 - 2*i]; + } + + store_be(out , L0, R0, L1, R1); + store_be(out + 16, L2, R2, L3, R3); + } + +} + /* * XTEA Encryption */ void XTEA::encrypt_n(const byte in[], byte out[], u32bit blocks) const { + while(blocks >= 4) + { + xtea_encrypt_4(in, out, this->EK); + in += 4 * BLOCK_SIZE; + out += 4 * BLOCK_SIZE; + blocks -= 4; + } + for(u32bit i = 0; i != blocks; ++i) { u32bit L = load_be(in, 0), R = load_be(in, 1); @@ -37,6 +99,14 @@ void XTEA::encrypt_n(const byte in[], byte out[], u32bit blocks) const */ void XTEA::decrypt_n(const byte in[], byte out[], u32bit blocks) const { + while(blocks >= 4) + { + xtea_decrypt_4(in, out, this->EK); + in += 4 * BLOCK_SIZE; + out += 4 * BLOCK_SIZE; + blocks -= 4; + } + for(u32bit i = 0; i != blocks; ++i) { u32bit L = load_be(in, 0), R = load_be(in, 1); -- cgit v1.2.3 From 7cb65e4e768115b9475d6e14c4fe7660c481e841 Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 23 Oct 2009 01:26:05 +0000 Subject: Use new load/store ops in xtea x4 code --- src/block/xtea/xtea.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/block/xtea') diff --git a/src/block/xtea/xtea.cpp b/src/block/xtea/xtea.cpp index 83c7d9ce5..1179d011a 100644 --- a/src/block/xtea/xtea.cpp +++ b/src/block/xtea/xtea.cpp @@ -16,10 +16,8 @@ namespace { void xtea_encrypt_4(const byte in[32], byte out[32], const u32bit EK[64]) { - u32bit L0 = load_be(in, 0), R0 = load_be(in, 1); - u32bit L1 = load_be(in, 2), R1 = load_be(in, 3); - u32bit L2 = load_be(in, 4), R2 = load_be(in, 5); - u32bit L3 = load_be(in, 6), R3 = load_be(in, 7); + u32bit L0, R0, L1, R1, L2, R2, L3, R3; + load_be(in, L0, R0, L1, R1, L2, R2, L3, R3); for(u32bit i = 0; i != 32; ++i) { @@ -34,16 +32,13 @@ void xtea_encrypt_4(const byte in[32], byte out[32], const u32bit EK[64]) R3 += (((L3 << 4) ^ (L3 >> 5)) + L3) ^ EK[2*i+1]; } - store_be(out , L0, R0, L1, R1); - store_be(out + 16, L2, R2, L3, R3); + store_be(out, L0, R0, L1, R1, L2, R2, L3, R3); } void xtea_decrypt_4(const byte in[32], byte out[32], const u32bit EK[64]) { - u32bit L0 = load_be(in, 0), R0 = load_be(in, 1); - u32bit L1 = load_be(in, 2), R1 = load_be(in, 3); - u32bit L2 = load_be(in, 4), R2 = load_be(in, 5); - u32bit L3 = load_be(in, 6), R3 = load_be(in, 7); + u32bit L0, R0, L1, R1, L2, R2, L3, R3; + load_be(in, L0, R0, L1, R1, L2, R2, L3, R3); for(u32bit i = 0; i != 32; ++i) { @@ -58,8 +53,7 @@ void xtea_decrypt_4(const byte in[32], byte out[32], const u32bit EK[64]) L3 -= (((R3 << 4) ^ (R3 >> 5)) + R3) ^ EK[62 - 2*i]; } - store_be(out , L0, R0, L1, R1); - store_be(out + 16, L2, R2, L3, R3); + store_be(out, L0, R0, L1, R1, L2, R2, L3, R3); } } -- cgit v1.2.3 From a25f42bb52627a9fd38288e0bc345f93998cc942 Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 23 Oct 2009 01:27:12 +0000 Subject: Kill stdio include --- src/block/xtea/xtea.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/block/xtea') diff --git a/src/block/xtea/xtea.cpp b/src/block/xtea/xtea.cpp index 1179d011a..fc14c0a57 100644 --- a/src/block/xtea/xtea.cpp +++ b/src/block/xtea/xtea.cpp @@ -8,8 +8,6 @@ #include #include -#include - namespace Botan { namespace { -- cgit v1.2.3 From 49896908c8a7893586271e353c431bb91b5215a8 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 26 Oct 2009 17:37:44 +0000 Subject: Add a wrapper for a set of SSE2 operations with convenient syntax for 4x32 operations. Also add a pure scalar code version. Convert Serpent to use this new interface, and add an implementation of XTEA in SIMD. The wrappers plus the scalar version allow SIMD-ish code to work on all platforms. This is often a win due to better ILP being visible to the processor (as with the recent XTEA optimizations). Only real danger is register starvation, mostly an issue on x86 these days. So it may (or may not) be a win to consolidate the standard C++ versions and the SIMD versions together. Future work: - Add AltiVec/VMX version - Maybe also for ARM's NEON extension? Less pressing, I would think. - Convert SHA-1 code to use SIMD_32 - Add XTEA SIMD decryption (currently only encrypt) - Change SSE2 engine to SIMD_engine - Modify configure.py to set BOTAN_TARGET_CPU_HAS_[SSE2|ALTIVEC|NEON|XXX] macros --- src/block/serpent_sse2/serp_sse2.cpp | 142 +++----- src/block/serpent_sse2/serp_sse2_sbox.h | 622 ++++++++++++++++---------------- src/block/xtea/xtea.h | 2 +- src/block/xtea_sse2/info.txt | 15 + src/block/xtea_sse2/xtea_sse2.cpp | 88 +++++ src/block/xtea_sse2/xtea_sse2.h | 28 ++ src/engine/sse2_eng/eng_sse2.cpp | 9 + src/utils/simd_32/info.txt | 18 + src/utils/simd_32/simd_32.h | 29 ++ src/utils/simd_32/simd_scalar.h | 172 +++++++++ src/utils/simd_32/simd_sse.h | 141 ++++++++ 11 files changed, 862 insertions(+), 404 deletions(-) create mode 100644 src/block/xtea_sse2/info.txt create mode 100644 src/block/xtea_sse2/xtea_sse2.cpp create mode 100644 src/block/xtea_sse2/xtea_sse2.h create mode 100644 src/utils/simd_32/info.txt create mode 100644 src/utils/simd_32/simd_32.h create mode 100644 src/utils/simd_32/simd_scalar.h create mode 100644 src/utils/simd_32/simd_sse.h (limited to 'src/block/xtea') diff --git a/src/block/serpent_sse2/serp_sse2.cpp b/src/block/serpent_sse2/serp_sse2.cpp index c51bb69ab..be79e870d 100644 --- a/src/block/serpent_sse2/serp_sse2.cpp +++ b/src/block/serpent_sse2/serp_sse2.cpp @@ -1,5 +1,5 @@ /* -* Serpent (SSE2) +* Serpent (SIMD) * (C) 2009 Jack Lloyd * * Distributed under the terms of the Botan license @@ -7,72 +7,50 @@ #include #include +#include #include -#include namespace Botan { namespace { -#define key_xor(round, B0, B1, B2, B3) \ - do { \ - __m128i key = _mm_loadu_si128(keys + round); \ - B0 = _mm_xor_si128(B0, _mm_shuffle_epi32(key, _MM_SHUFFLE(0,0,0,0))); \ - B1 = _mm_xor_si128(B1, _mm_shuffle_epi32(key, _MM_SHUFFLE(1,1,1,1))); \ - B2 = _mm_xor_si128(B2, _mm_shuffle_epi32(key, _MM_SHUFFLE(2,2,2,2))); \ - B3 = _mm_xor_si128(B3, _mm_shuffle_epi32(key, _MM_SHUFFLE(3,3,3,3))); \ +#define key_xor(round, B0, B1, B2, B3) \ + do { \ + B0 ^= SIMD_32(keys[4*round ]); \ + B1 ^= SIMD_32(keys[4*round+1]); \ + B2 ^= SIMD_32(keys[4*round+2]); \ + B3 ^= SIMD_32(keys[4*round+3]); \ } while(0); /* * Serpent's linear transformations */ -#define rotate_left_m128(vec, rot) \ - _mm_or_si128(_mm_slli_epi32(vec, rot), _mm_srli_epi32(vec, 32-rot)) - -#define rotate_right_m128(vec, rot) \ - _mm_or_si128(_mm_srli_epi32(vec, rot), _mm_slli_epi32(vec, 32-rot)) - -#define transform(B0, B1, B2, B3) \ - do { \ - B0 = rotate_left_m128(B0, 13); \ - B2 = rotate_left_m128(B2, 3); \ - B1 = _mm_xor_si128(B1, _mm_xor_si128(B0, B2)); \ - B3 = _mm_xor_si128(B3, _mm_xor_si128(B2, _mm_slli_epi32(B0, 3))); \ - B1 = rotate_left_m128(B1, 1); \ - B3 = rotate_left_m128(B3, 7); \ - B0 = _mm_xor_si128(B0, _mm_xor_si128(B1, B3)); \ - B2 = _mm_xor_si128(B2, _mm_xor_si128(B3, _mm_slli_epi32(B1, 7))); \ - B0 = rotate_left_m128(B0, 5); \ - B2 = rotate_left_m128(B2, 22); \ +#define transform(B0, B1, B2, B3) \ + do { \ + B0.rotate_left(13); \ + B2.rotate_left(3); \ + B1 ^= B0 ^ B2; \ + B3 ^= B2 ^ (B0 << 3); \ + B1.rotate_left(1); \ + B3.rotate_left(7); \ + B0 ^= B1 ^ B3; \ + B2 ^= B3 ^ (B1 << 7); \ + B0.rotate_left(5); \ + B2.rotate_left(22); \ } while(0); -#define i_transform(B0, B1, B2, B3) \ - do { \ - B2 = rotate_right_m128(B2, 22); \ - B0 = rotate_right_m128(B0, 5); \ - B2 = _mm_xor_si128(B2, _mm_xor_si128(B3, _mm_slli_epi32(B1, 7))); \ - B0 = _mm_xor_si128(B0, _mm_xor_si128(B1, B3)); \ - B3 = rotate_right_m128(B3, 7); \ - B1 = rotate_right_m128(B1, 1); \ - B3 = _mm_xor_si128(B3, _mm_xor_si128(B2, _mm_slli_epi32(B0, 3))); \ - B1 = _mm_xor_si128(B1, _mm_xor_si128(B0, B2)); \ - B2 = rotate_right_m128(B2, 3); \ - B0 = rotate_right_m128(B0, 13); \ - } while(0); - -/* -* 4x4 SSE2 integer matrix transpose -*/ -#define transpose(B0, B1, B2, B3) \ - do { \ - __m128i T0 = _mm_unpacklo_epi32(B0, B1); \ - __m128i T1 = _mm_unpacklo_epi32(B2, B3); \ - __m128i T2 = _mm_unpackhi_epi32(B0, B1); \ - __m128i T3 = _mm_unpackhi_epi32(B2, B3); \ - B0 = _mm_unpacklo_epi64(T0, T1); \ - B1 = _mm_unpackhi_epi64(T0, T1); \ - B2 = _mm_unpacklo_epi64(T2, T3); \ - B3 = _mm_unpackhi_epi64(T2, T3); \ +#define i_transform(B0, B1, B2, B3) \ + do { \ + B2.rotate_right(22); \ + B0.rotate_right(5); \ + B2 ^= B3 ^ (B1 << 7); \ + B0 ^= B1 ^ B3; \ + B3.rotate_right(7); \ + B1.rotate_right(1); \ + B3 ^= B2 ^ (B0 << 3); \ + B1 ^= B0 ^ B2; \ + B2.rotate_right(3); \ + B0.rotate_right(13); \ } while(0); /* @@ -80,20 +58,14 @@ namespace { */ void serpent_encrypt_4(const byte in[64], byte out[64], - const u32bit keys_32[132]) + const u32bit keys[132]) { - const __m128i all_ones = _mm_set1_epi8(0xFF); + SIMD_32 B0 = SIMD_32::load_le(in); + SIMD_32 B1 = SIMD_32::load_le(in + 16); + SIMD_32 B2 = SIMD_32::load_le(in + 32); + SIMD_32 B3 = SIMD_32::load_le(in + 48); - const __m128i* keys = (const __m128i*)(keys_32); - __m128i* out_mm = (__m128i*)(out); - __m128i* in_mm = (__m128i*)(in); - - __m128i B0 = _mm_loadu_si128(in_mm); - __m128i B1 = _mm_loadu_si128(in_mm + 1); - __m128i B2 = _mm_loadu_si128(in_mm + 2); - __m128i B3 = _mm_loadu_si128(in_mm + 3); - - transpose(B0, B1, B2, B3); + SIMD_32::transpose(B0, B1, B2, B3); key_xor( 0,B0,B1,B2,B3); SBoxE1(B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor( 1,B0,B1,B2,B3); SBoxE2(B0,B1,B2,B3); transform(B0,B1,B2,B3); @@ -131,12 +103,12 @@ void serpent_encrypt_4(const byte in[64], key_xor(30,B0,B1,B2,B3); SBoxE7(B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(31,B0,B1,B2,B3); SBoxE8(B0,B1,B2,B3); key_xor(32,B0,B1,B2,B3); - transpose(B0, B1, B2, B3); + SIMD_32::transpose(B0, B1, B2, B3); - _mm_storeu_si128(out_mm , B0); - _mm_storeu_si128(out_mm + 1, B1); - _mm_storeu_si128(out_mm + 2, B2); - _mm_storeu_si128(out_mm + 3, B3); + B0.store_le(out); + B1.store_le(out + 16); + B2.store_le(out + 32); + B3.store_le(out + 48); } /* @@ -144,20 +116,14 @@ void serpent_encrypt_4(const byte in[64], */ void serpent_decrypt_4(const byte in[64], byte out[64], - const u32bit keys_32[132]) + const u32bit keys[132]) { - const __m128i all_ones = _mm_set1_epi8(0xFF); - - const __m128i* keys = (const __m128i*)(keys_32); - __m128i* out_mm = (__m128i*)(out); - __m128i* in_mm = (__m128i*)(in); - - __m128i B0 = _mm_loadu_si128(in_mm); - __m128i B1 = _mm_loadu_si128(in_mm + 1); - __m128i B2 = _mm_loadu_si128(in_mm + 2); - __m128i B3 = _mm_loadu_si128(in_mm + 3); + SIMD_32 B0 = SIMD_32::load_le(in); + SIMD_32 B1 = SIMD_32::load_le(in + 16); + SIMD_32 B2 = SIMD_32::load_le(in + 32); + SIMD_32 B3 = SIMD_32::load_le(in + 48); - transpose(B0, B1, B2, B3); + SIMD_32::transpose(B0, B1, B2, B3); key_xor(32,B0,B1,B2,B3); SBoxD8(B0,B1,B2,B3); key_xor(31,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD7(B0,B1,B2,B3); key_xor(30,B0,B1,B2,B3); @@ -195,12 +161,12 @@ void serpent_decrypt_4(const byte in[64], i_transform(B0,B1,B2,B3); SBoxD2(B0,B1,B2,B3); key_xor( 1,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD1(B0,B1,B2,B3); key_xor( 0,B0,B1,B2,B3); - transpose(B0, B1, B2, B3); + SIMD_32::transpose(B0, B1, B2, B3); - _mm_storeu_si128(out_mm , B0); - _mm_storeu_si128(out_mm + 1, B1); - _mm_storeu_si128(out_mm + 2, B2); - _mm_storeu_si128(out_mm + 3, B3); + B0.store_le(out); + B1.store_le(out + 16); + B2.store_le(out + 32); + B3.store_le(out + 48); } } diff --git a/src/block/serpent_sse2/serp_sse2_sbox.h b/src/block/serpent_sse2/serp_sse2_sbox.h index 40c552e87..6e3da7359 100644 --- a/src/block/serpent_sse2/serp_sse2_sbox.h +++ b/src/block/serpent_sse2/serp_sse2_sbox.h @@ -1,33 +1,33 @@ /* -* Serpent Sboxes in SSE2 form +* Serpent Sboxes in SIMD form * (C) 2009 Jack Lloyd * * Distributed under the terms of the Botan license */ -#ifndef SERPENT_SSE2_SBOXES_H__ -#define SERPENT_SSE2_SBOXES_H__ +#ifndef SERPENT_SIMD_SBOXES_H__ +#define SERPENT_SIMD_SBOXES_H__ #define SBoxE1(B0, B1, B2, B3) \ do { \ - B3 = _mm_xor_si128(B3, B0); \ - __m128i B4 = B1; \ - B1 = _mm_and_si128(B1, B3); \ - B4 = _mm_xor_si128(B4, B2); \ - B1 = _mm_xor_si128(B1, B0); \ - B0 = _mm_or_si128(B0, B3); \ - B0 = _mm_xor_si128(B0, B4); \ - B4 = _mm_xor_si128(B4, B3); \ - B3 = _mm_xor_si128(B3, B2); \ - B2 = _mm_or_si128(B2, B1); \ - B2 = _mm_xor_si128(B2, B4); \ - B4 = _mm_xor_si128(B4, all_ones); \ - B4 = _mm_or_si128(B4, B1); \ - B1 = _mm_xor_si128(B1, B3); \ - B1 = _mm_xor_si128(B1, B4); \ - B3 = _mm_or_si128(B3, B0); \ - B1 = _mm_xor_si128(B1, B3); \ - B4 = _mm_xor_si128(B4, B3); \ + B3 ^= B0; \ + SIMD_32 B4 = B1; \ + B1 &= B3; \ + B4 ^= B2; \ + B1 ^= B0; \ + B0 |= B3; \ + B0 ^= B4; \ + B4 ^= B3; \ + B3 ^= B2; \ + B2 |= B1; \ + B2 ^= B4; \ + B4 = ~B4; \ + B4 |= B1; \ + B1 ^= B3; \ + B1 ^= B4; \ + B3 |= B0; \ + B1 ^= B3; \ + B4 ^= B3; \ B3 = B0; \ B0 = B1; \ B1 = B4; \ @@ -35,24 +35,24 @@ #define SBoxE2(B0, B1, B2, B3) \ do { \ - B0 = _mm_xor_si128(B0, all_ones); \ - B2 = _mm_xor_si128(B2, all_ones); \ - __m128i B4 = B0; \ - B0 = _mm_and_si128(B0, B1); \ - B2 = _mm_xor_si128(B2, B0); \ - B0 = _mm_or_si128(B0, B3); \ - B3 = _mm_xor_si128(B3, B2); \ - B1 = _mm_xor_si128(B1, B0); \ - B0 = _mm_xor_si128(B0, B4); \ - B4 = _mm_or_si128(B4, B1); \ - B1 = _mm_xor_si128(B1, B3); \ - B2 = _mm_or_si128(B2, B0); \ - B2 = _mm_and_si128(B2, B4); \ - B0 = _mm_xor_si128(B0, B1); \ - B1 = _mm_and_si128(B1, B2); \ - B1 = _mm_xor_si128(B1, B0); \ - B0 = _mm_and_si128(B0, B2); \ - B4 = _mm_xor_si128(B4, B0); \ + B0 = ~B0; \ + B2 = ~B2; \ + SIMD_32 B4 = B0; \ + B0 &= B1; \ + B2 ^= B0; \ + B0 |= B3; \ + B3 ^= B2; \ + B1 ^= B0; \ + B0 ^= B4; \ + B4 |= B1; \ + B1 ^= B3; \ + B2 |= B0; \ + B2 &= B4; \ + B0 ^= B1; \ + B1 &= B2; \ + B1 ^= B0; \ + B0 &= B2; \ + B4 ^= B0; \ B0 = B2; \ B2 = B3; \ B3 = B1; \ @@ -61,22 +61,22 @@ #define SBoxE3(B0, B1, B2, B3) \ do { \ - __m128i B4 = B0; \ - B0 = _mm_and_si128(B0, B2); \ - B0 = _mm_xor_si128(B0, B3); \ - B2 = _mm_xor_si128(B2, B1); \ - B2 = _mm_xor_si128(B2, B0); \ - B3 = _mm_or_si128(B3, B4); \ - B3 = _mm_xor_si128(B3, B1); \ - B4 = _mm_xor_si128(B4, B2); \ + SIMD_32 B4 = B0; \ + B0 &= B2; \ + B0 ^= B3; \ + B2 ^= B1; \ + B2 ^= B0; \ + B3 |= B4; \ + B3 ^= B1; \ + B4 ^= B2; \ B1 = B3; \ - B3 = _mm_or_si128(B3, B4); \ - B3 = _mm_xor_si128(B3, B0); \ - B0 = _mm_and_si128(B0, B1); \ - B4 = _mm_xor_si128(B4, B0); \ - B1 = _mm_xor_si128(B1, B3); \ - B1 = _mm_xor_si128(B1, B4); \ - B4 = _mm_xor_si128(B4, all_ones); \ + B3 |= B4; \ + B3 ^= B0; \ + B0 &= B1; \ + B4 ^= B0; \ + B1 ^= B3; \ + B1 ^= B4; \ + B4 = ~B4; \ B0 = B2; \ B2 = B1; \ B1 = B3; \ @@ -85,25 +85,25 @@ #define SBoxE4(B0, B1, B2, B3) \ do { \ - __m128i B4 = B0; \ - B0 = _mm_or_si128(B0, B3); \ - B3 = _mm_xor_si128(B3, B1); \ - B1 = _mm_and_si128(B1, B4); \ - B4 = _mm_xor_si128(B4, B2); \ - B2 = _mm_xor_si128(B2, B3); \ - B3 = _mm_and_si128(B3, B0); \ - B4 = _mm_or_si128(B4, B1); \ - B3 = _mm_xor_si128(B3, B4); \ - B0 = _mm_xor_si128(B0, B1); \ - B4 = _mm_and_si128(B4, B0); \ - B1 = _mm_xor_si128(B1, B3); \ - B4 = _mm_xor_si128(B4, B2); \ - B1 = _mm_or_si128(B1, B0); \ - B1 = _mm_xor_si128(B1, B2); \ - B0 = _mm_xor_si128(B0, B3); \ + SIMD_32 B4 = B0; \ + B0 |= B3; \ + B3 ^= B1; \ + B1 &= B4; \ + B4 ^= B2; \ + B2 ^= B3; \ + B3 &= B0; \ + B4 |= B1; \ + B3 ^= B4; \ + B0 ^= B1; \ + B4 &= B0; \ + B1 ^= B3; \ + B4 ^= B2; \ + B1 |= B0; \ + B1 ^= B2; \ + B0 ^= B3; \ B2 = B1; \ - B1 = _mm_or_si128(B1, B3); \ - B0 = _mm_xor_si128(B0, B1); \ + B1 |= B3; \ + B0 ^= B1; \ B1 = B2; \ B2 = B3; \ B3 = B4; \ @@ -111,26 +111,26 @@ #define SBoxE5(B0, B1, B2, B3) \ do { \ - B1 = _mm_xor_si128(B1, B3); \ - B3 = _mm_xor_si128(B3, all_ones); \ - B2 = _mm_xor_si128(B2, B3); \ - B3 = _mm_xor_si128(B3, B0); \ - __m128i B4 = B1; \ - B1 = _mm_and_si128(B1, B3); \ - B1 = _mm_xor_si128(B1, B2); \ - B4 = _mm_xor_si128(B4, B3); \ - B0 = _mm_xor_si128(B0, B4); \ - B2 = _mm_and_si128(B2, B4); \ - B2 = _mm_xor_si128(B2, B0); \ - B0 = _mm_and_si128(B0, B1); \ - B3 = _mm_xor_si128(B3, B0); \ - B4 = _mm_or_si128(B4, B1); \ - B4 = _mm_xor_si128(B4, B0); \ - B0 = _mm_or_si128(B0, B3); \ - B0 = _mm_xor_si128(B0, B2); \ - B2 = _mm_and_si128(B2, B3); \ - B0 = _mm_xor_si128(B0, all_ones); \ - B4 = _mm_xor_si128(B4, B2); \ + B1 ^= B3; \ + B3 = ~B3; \ + B2 ^= B3; \ + B3 ^= B0; \ + SIMD_32 B4 = B1; \ + B1 &= B3; \ + B1 ^= B2; \ + B4 ^= B3; \ + B0 ^= B4; \ + B2 &= B4; \ + B2 ^= B0; \ + B0 &= B1; \ + B3 ^= B0; \ + B4 |= B1; \ + B4 ^= B0; \ + B0 |= B3; \ + B0 ^= B2; \ + B2 &= B3; \ + B0 = ~B0; \ + B4 ^= B2; \ B2 = B0; \ B0 = B1; \ B1 = B4; \ @@ -138,25 +138,25 @@ #define SBoxE6(B0, B1, B2, B3) \ do { \ - B0 = _mm_xor_si128(B0, B1); \ - B1 = _mm_xor_si128(B1, B3); \ - B3 = _mm_xor_si128(B3, all_ones); \ - __m128i B4 = B1; \ - B1 = _mm_and_si128(B1, B0); \ - B2 = _mm_xor_si128(B2, B3); \ - B1 = _mm_xor_si128(B1, B2); \ - B2 = _mm_or_si128(B2, B4); \ - B4 = _mm_xor_si128(B4, B3); \ - B3 = _mm_and_si128(B3, B1); \ - B3 = _mm_xor_si128(B3, B0); \ - B4 = _mm_xor_si128(B4, B1); \ - B4 = _mm_xor_si128(B4, B2); \ - B2 = _mm_xor_si128(B2, B0); \ - B0 = _mm_and_si128(B0, B3); \ - B2 = _mm_xor_si128(B2, all_ones); \ - B0 = _mm_xor_si128(B0, B4); \ - B4 = _mm_or_si128(B4, B3); \ - B4 = _mm_xor_si128(B4, B2); \ + B0 ^= B1; \ + B1 ^= B3; \ + B3 = ~B3; \ + SIMD_32 B4 = B1; \ + B1 &= B0; \ + B2 ^= B3; \ + B1 ^= B2; \ + B2 |= B4; \ + B4 ^= B3; \ + B3 &= B1; \ + B3 ^= B0; \ + B4 ^= B1; \ + B4 ^= B2; \ + B2 ^= B0; \ + B0 &= B3; \ + B2 = ~B2; \ + B0 ^= B4; \ + B4 |= B3; \ + B4 ^= B2; \ B2 = B0; \ B0 = B1; \ B1 = B3; \ @@ -165,49 +165,49 @@ #define SBoxE7(B0, B1, B2, B3) \ do { \ - B2 = _mm_xor_si128(B2, all_ones); \ - __m128i B4 = B3; \ - B3 = _mm_and_si128(B3, B0); \ - B0 = _mm_xor_si128(B0, B4); \ - B3 = _mm_xor_si128(B3, B2); \ - B2 = _mm_or_si128(B2, B4); \ - B1 = _mm_xor_si128(B1, B3); \ - B2 = _mm_xor_si128(B2, B0); \ - B0 = _mm_or_si128(B0, B1); \ - B2 = _mm_xor_si128(B2, B1); \ - B4 = _mm_xor_si128(B4, B0); \ - B0 = _mm_or_si128(B0, B3); \ - B0 = _mm_xor_si128(B0, B2); \ - B4 = _mm_xor_si128(B4, B3); \ - B4 = _mm_xor_si128(B4, B0); \ - B3 = _mm_xor_si128(B3, all_ones); \ - B2 = _mm_and_si128(B2, B4); \ - B3 = _mm_xor_si128(B3, B2); \ + B2 = ~B2; \ + SIMD_32 B4 = B3; \ + B3 &= B0; \ + B0 ^= B4; \ + B3 ^= B2; \ + B2 |= B4; \ + B1 ^= B3; \ + B2 ^= B0; \ + B0 |= B1; \ + B2 ^= B1; \ + B4 ^= B0; \ + B0 |= B3; \ + B0 ^= B2; \ + B4 ^= B3; \ + B4 ^= B0; \ + B3 = ~B3; \ + B2 &= B4; \ + B3 ^= B2; \ B2 = B4; \ } while(0); #define SBoxE8(B0, B1, B2, B3) \ do { \ - __m128i B4 = B1; \ - B1 = _mm_or_si128(B1, B2); \ - B1 = _mm_xor_si128(B1, B3); \ - B4 = _mm_xor_si128(B4, B2); \ - B2 = _mm_xor_si128(B2, B1); \ - B3 = _mm_or_si128(B3, B4); \ - B3 = _mm_and_si128(B3, B0); \ - B4 = _mm_xor_si128(B4, B2); \ - B3 = _mm_xor_si128(B3, B1); \ - B1 = _mm_or_si128(B1, B4); \ - B1 = _mm_xor_si128(B1, B0); \ - B0 = _mm_or_si128(B0, B4); \ - B0 = _mm_xor_si128(B0, B2); \ - B1 = _mm_xor_si128(B1, B4); \ - B2 = _mm_xor_si128(B2, B1); \ - B1 = _mm_and_si128(B1, B0); \ - B1 = _mm_xor_si128(B1, B4); \ - B2 = _mm_xor_si128(B2, all_ones); \ - B2 = _mm_or_si128(B2, B0); \ - B4 = _mm_xor_si128(B4, B2); \ + SIMD_32 B4 = B1; \ + B1 |= B2; \ + B1 ^= B3; \ + B4 ^= B2; \ + B2 ^= B1; \ + B3 |= B4; \ + B3 &= B0; \ + B4 ^= B2; \ + B3 ^= B1; \ + B1 |= B4; \ + B1 ^= B0; \ + B0 |= B4; \ + B0 ^= B2; \ + B1 ^= B4; \ + B2 ^= B1; \ + B1 &= B0; \ + B1 ^= B4; \ + B2 = ~B2; \ + B2 |= B0; \ + B4 ^= B2; \ B2 = B1; \ B1 = B3; \ B3 = B0; \ @@ -215,53 +215,51 @@ } while(0); #define SBoxD1(B0, B1, B2, B3) \ - do \ - { \ - B2 = _mm_xor_si128(B2, all_ones); \ - __m128i B4 = B1; \ - B1 = _mm_or_si128(B1, B0); \ - B4 = _mm_xor_si128(B4, all_ones); \ - B1 = _mm_xor_si128(B1, B2); \ - B2 = _mm_or_si128(B2, B4); \ - B1 = _mm_xor_si128(B1, B3); \ - B0 = _mm_xor_si128(B0, B4); \ - B2 = _mm_xor_si128(B2, B0); \ - B0 = _mm_and_si128(B0, B3); \ - B4 = _mm_xor_si128(B4, B0); \ - B0 = _mm_or_si128(B0, B1); \ - B0 = _mm_xor_si128(B0, B2); \ - B3 = _mm_xor_si128(B3, B4); \ - B2 = _mm_xor_si128(B2, B1); \ - B3 = _mm_xor_si128(B3, B0); \ - B3 = _mm_xor_si128(B3, B1); \ - B2 = _mm_and_si128(B2, B3); \ - B4 = _mm_xor_si128(B4, B2); \ + do { \ + B2 = ~B2; \ + SIMD_32 B4 = B1; \ + B1 |= B0; \ + B4 = ~B4; \ + B1 ^= B2; \ + B2 |= B4; \ + B1 ^= B3; \ + B0 ^= B4; \ + B2 ^= B0; \ + B0 &= B3; \ + B4 ^= B0; \ + B0 |= B1; \ + B0 ^= B2; \ + B3 ^= B4; \ + B2 ^= B1; \ + B3 ^= B0; \ + B3 ^= B1; \ + B2 &= B3; \ + B4 ^= B2; \ B2 = B1; \ B1 = B4; \ } while(0); #define SBoxD2(B0, B1, B2, B3) \ - do \ - { \ - __m128i B4 = B1; \ - B1 = _mm_xor_si128(B1, B3); \ - B3 = _mm_and_si128(B3, B1); \ - B4 = _mm_xor_si128(B4, B2); \ - B3 = _mm_xor_si128(B3, B0); \ - B0 = _mm_or_si128(B0, B1); \ - B2 = _mm_xor_si128(B2, B3); \ - B0 = _mm_xor_si128(B0, B4); \ - B0 = _mm_or_si128(B0, B2); \ - B1 = _mm_xor_si128(B1, B3); \ - B0 = _mm_xor_si128(B0, B1); \ - B1 = _mm_or_si128(B1, B3); \ - B1 = _mm_xor_si128(B1, B0); \ - B4 = _mm_xor_si128(B4, all_ones); \ - B4 = _mm_xor_si128(B4, B1); \ - B1 = _mm_or_si128(B1, B0); \ - B1 = _mm_xor_si128(B1, B0); \ - B1 = _mm_or_si128(B1, B4); \ - B3 = _mm_xor_si128(B3, B1); \ + do { \ + SIMD_32 B4 = B1; \ + B1 ^= B3; \ + B3 &= B1; \ + B4 ^= B2; \ + B3 ^= B0; \ + B0 |= B1; \ + B2 ^= B3; \ + B0 ^= B4; \ + B0 |= B2; \ + B1 ^= B3; \ + B0 ^= B1; \ + B1 |= B3; \ + B1 ^= B0; \ + B4 = ~B4; \ + B4 ^= B1; \ + B1 |= B0; \ + B1 ^= B0; \ + B1 |= B4; \ + B3 ^= B1; \ B1 = B0; \ B0 = B4; \ B4 = B2; \ @@ -270,52 +268,50 @@ } while(0); #define SBoxD3(B0, B1, B2, B3) \ - do \ - { \ - B2 = _mm_xor_si128(B2, B3); \ - B3 = _mm_xor_si128(B3, B0); \ - __m128i B4 = B3; \ - B3 = _mm_and_si128(B3, B2); \ - B3 = _mm_xor_si128(B3, B1); \ - B1 = _mm_or_si128(B1, B2); \ - B1 = _mm_xor_si128(B1, B4); \ - B4 = _mm_and_si128(B4, B3); \ - B2 = _mm_xor_si128(B2, B3); \ - B4 = _mm_and_si128(B4, B0); \ - B4 = _mm_xor_si128(B4, B2); \ - B2 = _mm_and_si128(B2, B1); \ - B2 = _mm_or_si128(B2, B0); \ - B3 = _mm_xor_si128(B3, all_ones); \ - B2 = _mm_xor_si128(B2, B3); \ - B0 = _mm_xor_si128(B0, B3); \ - B0 = _mm_and_si128(B0, B1); \ - B3 = _mm_xor_si128(B3, B4); \ - B3 = _mm_xor_si128(B3, B0); \ + do { \ + B2 ^= B3; \ + B3 ^= B0; \ + SIMD_32 B4 = B3; \ + B3 &= B2; \ + B3 ^= B1; \ + B1 |= B2; \ + B1 ^= B4; \ + B4 &= B3; \ + B2 ^= B3; \ + B4 &= B0; \ + B4 ^= B2; \ + B2 &= B1; \ + B2 |= B0; \ + B3 = ~B3; \ + B2 ^= B3; \ + B0 ^= B3; \ + B0 &= B1; \ + B3 ^= B4; \ + B3 ^= B0; \ B0 = B1; \ B1 = B4; \ } while(0); #define SBoxD4(B0, B1, B2, B3) \ - do \ - { \ - __m128i B4 = B2; \ - B2 = _mm_xor_si128(B2, B1); \ - B0 = _mm_xor_si128(B0, B2); \ - B4 = _mm_and_si128(B4, B2); \ - B4 = _mm_xor_si128(B4, B0); \ - B0 = _mm_and_si128(B0, B1); \ - B1 = _mm_xor_si128(B1, B3); \ - B3 = _mm_or_si128(B3, B4); \ - B2 = _mm_xor_si128(B2, B3); \ - B0 = _mm_xor_si128(B0, B3); \ - B1 = _mm_xor_si128(B1, B4); \ - B3 = _mm_and_si128(B3, B2); \ - B3 = _mm_xor_si128(B3, B1); \ - B1 = _mm_xor_si128(B1, B0); \ - B1 = _mm_or_si128(B1, B2); \ - B0 = _mm_xor_si128(B0, B3); \ - B1 = _mm_xor_si128(B1, B4); \ - B0 = _mm_xor_si128(B0, B1); \ + do { \ + SIMD_32 B4 = B2; \ + B2 ^= B1; \ + B0 ^= B2; \ + B4 &= B2; \ + B4 ^= B0; \ + B0 &= B1; \ + B1 ^= B3; \ + B3 |= B4; \ + B2 ^= B3; \ + B0 ^= B3; \ + B1 ^= B4; \ + B3 &= B2; \ + B3 ^= B1; \ + B1 ^= B0; \ + B1 |= B2; \ + B0 ^= B3; \ + B1 ^= B4; \ + B0 ^= B1; \ B4 = B0; \ B0 = B2; \ B2 = B3; \ @@ -323,54 +319,52 @@ } while(0); #define SBoxD5(B0, B1, B2, B3) \ - do \ - { \ - __m128i B4 = B2; \ - B2 = _mm_and_si128(B2, B3); \ - B2 = _mm_xor_si128(B2, B1); \ - B1 = _mm_or_si128(B1, B3); \ - B1 = _mm_and_si128(B1, B0); \ - B4 = _mm_xor_si128(B4, B2); \ - B4 = _mm_xor_si128(B4, B1); \ - B1 = _mm_and_si128(B1, B2); \ - B0 = _mm_xor_si128(B0, all_ones); \ - B3 = _mm_xor_si128(B3, B4); \ - B1 = _mm_xor_si128(B1, B3); \ - B3 = _mm_and_si128(B3, B0); \ - B3 = _mm_xor_si128(B3, B2); \ - B0 = _mm_xor_si128(B0, B1); \ - B2 = _mm_and_si128(B2, B0); \ - B3 = _mm_xor_si128(B3, B0); \ - B2 = _mm_xor_si128(B2, B4); \ - B2 = _mm_or_si128(B2, B3); \ - B3 = _mm_xor_si128(B3, B0); \ - B2 = _mm_xor_si128(B2, B1); \ + do { \ + SIMD_32 B4 = B2; \ + B2 &= B3; \ + B2 ^= B1; \ + B1 |= B3; \ + B1 &= B0; \ + B4 ^= B2; \ + B4 ^= B1; \ + B1 &= B2; \ + B0 = ~B0; \ + B3 ^= B4; \ + B1 ^= B3; \ + B3 &= B0; \ + B3 ^= B2; \ + B0 ^= B1; \ + B2 &= B0; \ + B3 ^= B0; \ + B2 ^= B4; \ + B2 |= B3; \ + B3 ^= B0; \ + B2 ^= B1; \ B1 = B3; \ B3 = B4; \ } while(0); #define SBoxD6(B0, B1, B2, B3) \ - do \ - { \ - B1 = _mm_xor_si128(B1, all_ones); \ - __m128i B4 = B3; \ - B2 = _mm_xor_si128(B2, B1); \ - B3 = _mm_or_si128(B3, B0); \ - B3 = _mm_xor_si128(B3, B2); \ - B2 = _mm_or_si128(B2, B1); \ - B2 = _mm_and_si128(B2, B0); \ - B4 = _mm_xor_si128(B4, B3); \ - B2 = _mm_xor_si128(B2, B4); \ - B4 = _mm_or_si128(B4, B0); \ - B4 = _mm_xor_si128(B4, B1); \ - B1 = _mm_and_si128(B1, B2); \ - B1 = _mm_xor_si128(B1, B3); \ - B4 = _mm_xor_si128(B4, B2); \ - B3 = _mm_and_si128(B3, B4); \ - B4 = _mm_xor_si128(B4, B1); \ - B3 = _mm_xor_si128(B3, B4); \ - B4 = _mm_xor_si128(B4, all_ones); \ - B3 = _mm_xor_si128(B3, B0); \ + do { \ + B1 = ~B1; \ + SIMD_32 B4 = B3; \ + B2 ^= B1; \ + B3 |= B0; \ + B3 ^= B2; \ + B2 |= B1; \ + B2 &= B0; \ + B4 ^= B3; \ + B2 ^= B4; \ + B4 |= B0; \ + B4 ^= B1; \ + B1 &= B2; \ + B1 ^= B3; \ + B4 ^= B2; \ + B3 &= B4; \ + B4 ^= B1; \ + B3 ^= B4; \ + B4 = ~B4; \ + B3 ^= B0; \ B0 = B1; \ B1 = B4; \ B4 = B3; \ @@ -379,52 +373,50 @@ } while(0); #define SBoxD7(B0, B1, B2, B3) \ - do \ - { \ - B0 = _mm_xor_si128(B0, B2); \ - __m128i B4 = B2; \ - B2 = _mm_and_si128(B2, B0); \ - B4 = _mm_xor_si128(B4, B3); \ - B2 = _mm_xor_si128(B2, all_ones); \ - B3 = _mm_xor_si128(B3, B1); \ - B2 = _mm_xor_si128(B2, B3); \ - B4 = _mm_or_si128(B4, B0); \ - B0 = _mm_xor_si128(B0, B2); \ - B3 = _mm_xor_si128(B3, B4); \ - B4 = _mm_xor_si128(B4, B1); \ - B1 = _mm_and_si128(B1, B3); \ - B1 = _mm_xor_si128(B1, B0); \ - B0 = _mm_xor_si128(B0, B3); \ - B0 = _mm_or_si128(B0, B2); \ - B3 = _mm_xor_si128(B3, B1); \ - B4 = _mm_xor_si128(B4, B0); \ + do { \ + B0 ^= B2; \ + SIMD_32 B4 = B2; \ + B2 &= B0; \ + B4 ^= B3; \ + B2 = ~B2; \ + B3 ^= B1; \ + B2 ^= B3; \ + B4 |= B0; \ + B0 ^= B2; \ + B3 ^= B4; \ + B4 ^= B1; \ + B1 &= B3; \ + B1 ^= B0; \ + B0 ^= B3; \ + B0 |= B2; \ + B3 ^= B1; \ + B4 ^= B0; \ B0 = B1; \ B1 = B2; \ B2 = B4; \ } while(0); #define SBoxD8(B0, B1, B2, B3) \ - do \ - { \ - __m128i B4 = B2; \ - B2 = _mm_xor_si128(B2, B0); \ - B0 = _mm_and_si128(B0, B3); \ - B4 = _mm_or_si128(B4, B3); \ - B2 = _mm_xor_si128(B2, all_ones); \ - B3 = _mm_xor_si128(B3, B1); \ - B1 = _mm_or_si128(B1, B0); \ - B0 = _mm_xor_si128(B0, B2); \ - B2 = _mm_and_si128(B2, B4); \ - B3 = _mm_and_si128(B3, B4); \ - B1 = _mm_xor_si128(B1, B2); \ - B2 = _mm_xor_si128(B2, B0); \ - B0 = _mm_or_si128(B0, B2); \ - B4 = _mm_xor_si128(B4, B1); \ - B0 = _mm_xor_si128(B0, B3); \ - B3 = _mm_xor_si128(B3, B4); \ - B4 = _mm_or_si128(B4, B0); \ - B3 = _mm_xor_si128(B3, B2); \ - B4 = _mm_xor_si128(B4, B2); \ + do { \ + SIMD_32 B4 = B2; \ + B2 ^= B0; \ + B0 &= B3; \ + B4 |= B3; \ + B2 = ~B2; \ + B3 ^= B1; \ + B1 |= B0; \ + B0 ^= B2; \ + B2 &= B4; \ + B3 &= B4; \ + B1 ^= B2; \ + B2 ^= B0; \ + B0 |= B2; \ + B4 ^= B1; \ + B0 ^= B3; \ + B3 ^= B4; \ + B4 |= B0; \ + B3 ^= B2; \ + B4 ^= B2; \ B2 = B1; \ B1 = B0; \ B0 = B3; \ diff --git a/src/block/xtea/xtea.h b/src/block/xtea/xtea.h index f3b554edb..9982d0712 100644 --- a/src/block/xtea/xtea.h +++ b/src/block/xtea/xtea.h @@ -26,7 +26,7 @@ class BOTAN_DLL XTEA : public BlockCipher BlockCipher* clone() const { return new XTEA; } XTEA() : BlockCipher(8, 16) {} - private: + protected: void key_schedule(const byte[], u32bit); SecureBuffer EK; }; diff --git a/src/block/xtea_sse2/info.txt b/src/block/xtea_sse2/info.txt new file mode 100644 index 000000000..edcdd114d --- /dev/null +++ b/src/block/xtea_sse2/info.txt @@ -0,0 +1,15 @@ +realname "XTEA (SSE2)" + +define XTEA_SSE2 + +load_on auto + + +xtea_sse2.cpp +xtea_sse2.h + + + +xtea +sse2_eng + diff --git a/src/block/xtea_sse2/xtea_sse2.cpp b/src/block/xtea_sse2/xtea_sse2.cpp new file mode 100644 index 000000000..db7775103 --- /dev/null +++ b/src/block/xtea_sse2/xtea_sse2.cpp @@ -0,0 +1,88 @@ +/* +* XTEA SSE2 +* (C) 2009 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#include +#include +#include + +namespace Botan { + +namespace { + +void xtea_encrypt_8(const byte in[64], byte out[64], const u32bit EK[64]) + { + SIMD_32 L0 = SIMD_32::load_be(in ); + SIMD_32 R0 = SIMD_32::load_be(in + 16); + SIMD_32 L1 = SIMD_32::load_be(in + 32); + SIMD_32 R1 = SIMD_32::load_be(in + 48); + + SIMD_32::transpose(L0, R0, L1, R1); + + for(u32bit i = 0; i != 32; i += 2) + { + SIMD_32 K0(EK[2*i]), K1(EK[2*i+1]), K2(EK[2*i+2]), K3(EK[2*i+3]); + + L0 += (((R0 << 4) ^ (R0 >> 5)) + R0) ^ K0; + L1 += (((R1 << 4) ^ (R1 >> 5)) + R1) ^ K0; + + R0 += (((L0 << 4) ^ (L0 >> 5)) + L0) ^ K1; + R1 += (((L1 << 4) ^ (L1 >> 5)) + L1) ^ K1; + + L0 += (((R0 << 4) ^ (R0 >> 5)) + R0) ^ K2; + L1 += (((R1 << 4) ^ (R1 >> 5)) + R1) ^ K2; + + R0 += (((L0 << 4) ^ (L0 >> 5)) + L0) ^ K3; + R1 += (((L1 << 4) ^ (L1 >> 5)) + L1) ^ K3; + } + + SIMD_32::transpose(L0, R0, L1, R1); + + L0.store_be(out); + R0.store_be(out + 16); + L1.store_be(out + 32); + R1.store_be(out + 48); + } + +} + +/* +* XTEA Encryption +*/ +void XTEA_SSE2::encrypt_n(const byte in[], byte out[], u32bit blocks) const + { + memset(out, 0, blocks * BLOCK_SIZE); + + while(blocks >= 8) + { + xtea_encrypt_8(in, out, this->EK); + in += 8 * BLOCK_SIZE; + out += 8 * BLOCK_SIZE; + blocks -= 8; + } + + XTEA::encrypt_n(in, out, blocks); + } + +/* +* XTEA Decryption +*/ +void XTEA_SSE2::decrypt_n(const byte in[], byte out[], u32bit blocks) const + { +#if 0 + while(blocks >= 4) + { + xtea_decrypt_4(in, out, this->EK); + in += 4 * BLOCK_SIZE; + out += 4 * BLOCK_SIZE; + blocks -= 4; + } +#endif + + XTEA::decrypt_n(in, out, blocks); + } + +} diff --git a/src/block/xtea_sse2/xtea_sse2.h b/src/block/xtea_sse2/xtea_sse2.h new file mode 100644 index 000000000..e691e5c40 --- /dev/null +++ b/src/block/xtea_sse2/xtea_sse2.h @@ -0,0 +1,28 @@ +/* +* XTEA in SSE2 +* (C) 2009 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#ifndef BOTAN_XTEA_SSE2_H__ +#define BOTAN_XTEA_SSE2_H__ + +#include + +namespace Botan { + +/* +* XTEA (SSE2 variant) +*/ +class BOTAN_DLL XTEA_SSE2 : public XTEA + { + public: + void encrypt_n(const byte in[], byte out[], u32bit blocks) const; + void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + BlockCipher* clone() const { return new XTEA_SSE2; } + }; + +} + +#endif diff --git a/src/engine/sse2_eng/eng_sse2.cpp b/src/engine/sse2_eng/eng_sse2.cpp index 07c625c7c..51b7d04e3 100644 --- a/src/engine/sse2_eng/eng_sse2.cpp +++ b/src/engine/sse2_eng/eng_sse2.cpp @@ -16,6 +16,10 @@ #include #endif +#if defined(BOTAN_HAS_XTEA_SSE2) + #include +#endif + namespace Botan { BlockCipher* @@ -30,6 +34,11 @@ SSE2_Assembler_Engine::find_block_cipher(const SCAN_Name& request, return new Serpent_SSE2; #endif +#if defined(BOTAN_HAS_XTEA_SSE2) + if(request.algo_name() == "XTEA") + return new XTEA_SSE2; +#endif + return 0; } diff --git a/src/utils/simd_32/info.txt b/src/utils/simd_32/info.txt new file mode 100644 index 000000000..c72f2a6ed --- /dev/null +++ b/src/utils/simd_32/info.txt @@ -0,0 +1,18 @@ +realname "SIMD" + +define SIMD_32 + +load_on always + + +pentium-m +pentium4 +prescott +amd64 + + + +gcc +icc +msvc + diff --git a/src/utils/simd_32/simd_32.h b/src/utils/simd_32/simd_32.h new file mode 100644 index 000000000..d9fac0d3d --- /dev/null +++ b/src/utils/simd_32/simd_32.h @@ -0,0 +1,29 @@ +/** +* Lightweight wrappers for SIMD operations +*/ + +#ifndef BOTAN_SIMD_32_H__ +#define BOTAN_SIMD_32_H__ + +#include + +//#define BOTAN_TARGET_CPU_HAS_SSE2 + +#if defined(BOTAN_TARGET_CPU_HAS_SSE2) + + #include + namespace Botan { typedef SIMD_SSE2 SIMD_32; } + +#elif defined(BOTAN_TARGET_CPU_HAS_ALTIVEC) + + #include + namespace Botan { typedef SIMD_Altivec SIMD_32; } + +#else + + #include + namespace Botan { typedef SIMD_Scalar SIMD_32; } + +#endif + +#endif diff --git a/src/utils/simd_32/simd_scalar.h b/src/utils/simd_32/simd_scalar.h new file mode 100644 index 000000000..a6067f115 --- /dev/null +++ b/src/utils/simd_32/simd_scalar.h @@ -0,0 +1,172 @@ +/** +* Scalar emulation of SIMD operations +*/ + +#ifndef BOTAN_SIMD_SCALAR_H__ +#define BOTAN_SIMD_SCALAR_H__ + +#include + +namespace Botan { + +class SIMD_Scalar + { + public: + SIMD_Scalar(const u32bit B[4]) + { + R0 = B[0]; + R1 = B[1]; + R2 = B[2]; + R3 = B[3]; + } + + SIMD_Scalar(u32bit B0, u32bit B1, u32bit B2, u32bit B3) + { + R0 = B0; + R1 = B1; + R2 = B2; + R3 = B3; + } + + SIMD_Scalar(u32bit B) + { + R0 = B; + R1 = B; + R2 = B; + R3 = B; + } + + static SIMD_Scalar load_le(const void* in) + { + const byte* in_b = static_cast(in); + return SIMD_Scalar(Botan::load_le(in_b, 0), + Botan::load_le(in_b, 1), + Botan::load_le(in_b, 2), + Botan::load_le(in_b, 3)); + } + + static SIMD_Scalar load_be(const void* in) + { + const byte* in_b = static_cast(in); + return SIMD_Scalar(Botan::load_be(in_b, 0), + Botan::load_be(in_b, 1), + Botan::load_be(in_b, 2), + Botan::load_be(in_b, 3)); + } + + void store_le(byte out[]) const + { + Botan::store_le(out, R0, R1, R2, R3); + } + + void store_be(byte out[]) const + { + Botan::store_be(out, R0, R1, R2, R3); + } + + void rotate_left(u32bit rot) + { + R0 = Botan::rotate_left(R0, rot); + R1 = Botan::rotate_left(R1, rot); + R2 = Botan::rotate_left(R2, rot); + R3 = Botan::rotate_left(R3, rot); + } + + void rotate_right(u32bit rot) + { + R0 = Botan::rotate_right(R0, rot); + R1 = Botan::rotate_right(R1, rot); + R2 = Botan::rotate_right(R2, rot); + R3 = Botan::rotate_right(R3, rot); + } + + void operator+=(const SIMD_Scalar& other) + { + R0 += other.R0; + R1 += other.R1; + R2 += other.R2; + R3 += other.R3; + } + + SIMD_Scalar operator+(const SIMD_Scalar& other) const + { + return SIMD_Scalar(R0 + other.R0, + R1 + other.R1, + R2 + other.R2, + R3 + other.R3); + } + + void operator^=(const SIMD_Scalar& other) + { + R0 ^= other.R0; + R1 ^= other.R1; + R2 ^= other.R2; + R3 ^= other.R3; + } + + SIMD_Scalar operator^(const SIMD_Scalar& other) const + { + return SIMD_Scalar(R0 ^ other.R0, + R1 ^ other.R1, + R2 ^ other.R2, + R3 ^ other.R3); + } + + void operator|=(const SIMD_Scalar& other) + { + R0 |= other.R0; + R1 |= other.R1; + R2 |= other.R2; + R3 |= other.R3; + } + + void operator&=(const SIMD_Scalar& other) + { + R0 &= other.R0; + R1 &= other.R1; + R2 &= other.R2; + R3 &= other.R3; + } + + SIMD_Scalar operator<<(u32bit shift) const + { + return SIMD_Scalar(R0 << shift, + R1 << shift, + R2 << shift, + R3 << shift); + } + + SIMD_Scalar operator>>(u32bit shift) const + { + return SIMD_Scalar(R0 >> shift, + R1 >> shift, + R2 >> shift, + R3 >> shift); + } + + SIMD_Scalar operator~() const + { + return SIMD_Scalar(~R0, ~R1, ~R2, ~R3); + } + + static void transpose(SIMD_Scalar& B0, SIMD_Scalar& B1, + SIMD_Scalar& B2, SIMD_Scalar& B3) + { + SIMD_Scalar T0(B0.R0, B1.R0, B2.R0, B3.R0); + SIMD_Scalar T1(B0.R1, B1.R1, B2.R1, B3.R1); + SIMD_Scalar T2(B0.R2, B1.R2, B2.R2, B3.R2); + SIMD_Scalar T3(B0.R3, B1.R3, B2.R3, B3.R3); + + B0 = T0; + B1 = T1; + B2 = T2; + B3 = T3; + } + + private: + u32bit R0, R1, R2, R3; + }; + +} + +#endif diff --git a/src/utils/simd_32/simd_sse.h b/src/utils/simd_32/simd_sse.h new file mode 100644 index 000000000..d9135f1c7 --- /dev/null +++ b/src/utils/simd_32/simd_sse.h @@ -0,0 +1,141 @@ +/** +* Lightweight wrappers for SSE2 intrinsics for 32-bit operations +*/ + +#ifndef BOTAN_SIMD_SSE_H__ +#define BOTAN_SIMD_SSE_H__ + +#include +#include + +namespace Botan { + +class SIMD_SSE2 + { + public: + SIMD_SSE2(const u32bit B[4]) + { + reg = _mm_loadu_si128((const __m128i*)B); + } + + SIMD_SSE2(u32bit B0, u32bit B1, u32bit B2, u32bit B3) + { + reg = _mm_set_epi32(B0, B1, B2, B3); + } + + SIMD_SSE2(u32bit B) + { + reg = _mm_set1_epi32(B); + } + + static SIMD_SSE2 load_le(const void* in) + { + return _mm_loadu_si128((const __m128i*)in); + } + + static SIMD_SSE2 load_be(const void* in) + { + return SIMD_SSE2(_mm_loadu_si128((const __m128i*)in)).bswap(); + } + + void store_le(byte out[]) const + { + _mm_storeu_si128((__m128i*)out, reg); + } + + void store_be(byte out[]) const + { + bswap().store_le(out); + } + + void rotate_left(u32bit rot) + { + reg = _mm_or_si128(_mm_slli_epi32(reg, rot), + _mm_srli_epi32(reg, 32-rot)); + } + + void rotate_right(u32bit rot) + { + reg = _mm_or_si128(_mm_srli_epi32(reg, rot), + _mm_slli_epi32(reg, 32-rot)); + } + + void operator+=(const SIMD_SSE2& other) + { + reg = _mm_add_epi32(reg, other.reg); + } + + SIMD_SSE2 operator+(const SIMD_SSE2& other) const + { + return _mm_add_epi32(reg, other.reg); + } + + void operator^=(const SIMD_SSE2& other) + { + reg = _mm_xor_si128(reg, other.reg); + } + + SIMD_SSE2 operator^(const SIMD_SSE2& other) const + { + return _mm_xor_si128(reg, other.reg); + } + + void operator|=(const SIMD_SSE2& other) + { + reg = _mm_or_si128(reg, other.reg); + } + + void operator&=(const SIMD_SSE2& other) + { + reg = _mm_and_si128(reg, other.reg); + } + + SIMD_SSE2 operator<<(u32bit shift) const + { + return _mm_slli_epi32(reg, shift); + } + + SIMD_SSE2 operator>>(u32bit shift) const + { + return _mm_srli_epi32(reg, shift); + } + + SIMD_SSE2 operator~() const + { + static const __m128i all_ones = _mm_set1_epi32(0xFFFFFFFF); + return _mm_xor_si128(reg, all_ones); + } + + static void transpose(SIMD_SSE2& B0, SIMD_SSE2& B1, + SIMD_SSE2& B2, SIMD_SSE2& B3) + { + __m128i T0 = _mm_unpacklo_epi32(B0.reg, B1.reg); + __m128i T1 = _mm_unpacklo_epi32(B2.reg, B3.reg); + __m128i T2 = _mm_unpackhi_epi32(B0.reg, B1.reg); + __m128i T3 = _mm_unpackhi_epi32(B2.reg, B3.reg); + B0.reg = _mm_unpacklo_epi64(T0, T1); + B1.reg = _mm_unpackhi_epi64(T0, T1); + B2.reg = _mm_unpacklo_epi64(T2, T3); + B3.reg = _mm_unpackhi_epi64(T2, T3); + } + + private: + SIMD_SSE2(__m128i in) { reg = in; } + + SIMD_SSE2 bswap() const + { + __m128i T = reg; + + T = _mm_shufflehi_epi16(T, _MM_SHUFFLE(2, 3, 0, 1)); + T = _mm_shufflelo_epi16(T, _MM_SHUFFLE(2, 3, 0, 1)); + + return _mm_or_si128(_mm_srli_epi16(T, 8), + _mm_slli_epi16(T, 8)); + } + + __m128i reg; + }; + +} + +#endif -- cgit v1.2.3 From 50b4840e6dfd893ae2feecc3bd6ec49071796354 Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 29 Oct 2009 01:38:50 +0000 Subject: Remove the 'realname' attribute on all modules and cc/cpu/os info files. Pretty much useless and unused, except for listing the module names in build.h and the short versions totally suffice for that. --- configure.py | 15 +++++---------- src/algo_factory/info.txt | 2 -- src/alloc/alloc_mmap/info.txt | 2 -- src/alloc/info.txt | 2 -- src/alloc/mem_pool/info.txt | 2 -- src/alloc/system_alloc/info.txt | 2 -- src/aont/info.txt | 2 -- src/asn1/info.txt | 2 -- src/benchmark/info.txt | 2 -- src/block/aes/info.txt | 2 -- src/block/blowfish/info.txt | 2 -- src/block/cast/info.txt | 2 -- src/block/des/info.txt | 2 -- src/block/gost_28147/info.txt | 2 -- src/block/idea/info.txt | 2 -- src/block/info.txt | 2 -- src/block/kasumi/info.txt | 2 -- src/block/lion/info.txt | 2 -- src/block/lubyrack/info.txt | 2 -- src/block/mars/info.txt | 2 -- src/block/misty1/info.txt | 2 -- src/block/noekeon/info.txt | 2 -- src/block/rc2/info.txt | 2 -- src/block/rc5/info.txt | 2 -- src/block/rc6/info.txt | 2 -- src/block/safer/info.txt | 2 -- src/block/seed/info.txt | 2 -- src/block/serpent/info.txt | 2 -- src/block/serpent_ia32/info.txt | 2 -- src/block/serpent_sse2/info.txt | 2 -- src/block/skipjack/info.txt | 2 -- src/block/square/info.txt | 2 -- src/block/tea/info.txt | 2 -- src/block/twofish/info.txt | 2 -- src/block/xtea/info.txt | 2 -- src/build-data/arch/alpha.txt | 2 -- src/build-data/arch/amd64.txt | 2 -- src/build-data/arch/arm.txt | 2 -- src/build-data/arch/hitachi-sh.txt | 2 -- src/build-data/arch/hppa.txt | 2 -- src/build-data/arch/ia32.txt | 2 -- src/build-data/arch/ia64.txt | 2 -- src/build-data/arch/m68k.txt | 2 -- src/build-data/arch/mips32.txt | 2 -- src/build-data/arch/mips64.txt | 2 -- src/build-data/arch/ppc.txt | 2 -- src/build-data/arch/ppc64.txt | 2 -- src/build-data/arch/s390.txt | 2 -- src/build-data/arch/s390x.txt | 2 -- src/build-data/arch/sparc32.txt | 3 --- src/build-data/arch/sparc64.txt | 2 -- src/build-data/cc/bcc.txt | 2 -- src/build-data/cc/clang.txt | 2 -- src/build-data/cc/compaq.txt | 2 -- src/build-data/cc/ekopath.txt | 2 -- src/build-data/cc/gcc.txt | 2 -- src/build-data/cc/hpcc.txt | 2 -- src/build-data/cc/icc.txt | 2 -- src/build-data/cc/kai.txt | 2 -- src/build-data/cc/mipspro.txt | 2 -- src/build-data/cc/msvc.txt | 2 -- src/build-data/cc/open64.txt | 2 -- src/build-data/cc/pgi.txt | 2 -- src/build-data/cc/sgipro64.txt | 2 -- src/build-data/cc/sunwspro.txt | 2 -- src/build-data/cc/xlc.txt | 2 -- src/build-data/os/aix.txt | 2 -- src/build-data/os/beos.txt | 2 -- src/build-data/os/cygwin.txt | 2 -- src/build-data/os/darwin.txt | 2 -- src/build-data/os/dragonfly.txt | 2 -- src/build-data/os/freebsd.txt | 2 -- src/build-data/os/hpux.txt | 2 -- src/build-data/os/irix.txt | 2 -- src/build-data/os/linux.txt | 2 -- src/build-data/os/mingw.txt | 1 - src/build-data/os/netbsd.txt | 2 -- src/build-data/os/openbsd.txt | 2 -- src/build-data/os/qnx.txt | 2 -- src/build-data/os/solaris.txt | 2 -- src/build-data/os/tru64.txt | 2 -- src/build-data/os/windows.txt | 2 -- src/cert/cvc/info.txt | 2 -- src/cert/x509/info.txt | 2 -- src/checksum/adler32/info.txt | 2 -- src/checksum/crc24/info.txt | 2 -- src/checksum/crc32/info.txt | 2 -- src/cms/info.txt | 2 -- src/codec/base64/info.txt | 2 -- src/codec/bzip2/info.txt | 1 - src/codec/hex/info.txt | 2 -- src/codec/openpgp/info.txt | 2 -- src/codec/pem/info.txt | 2 -- src/codec/zlib/info.txt | 1 - src/cryptobox/info.txt | 2 -- src/engine/amd64_eng/info.txt | 2 -- src/engine/def_engine/info.txt | 2 -- src/engine/gnump/info.txt | 2 -- src/engine/ia32_eng/info.txt | 2 -- src/engine/info.txt | 2 -- src/engine/openssl/info.txt | 2 -- src/engine/sse2_eng/info.txt | 2 -- src/entropy/beos_stats/info.txt | 2 -- src/entropy/cryptoapi_rng/info.txt | 2 -- src/entropy/dev_random/info.txt | 2 -- src/entropy/egd/info.txt | 2 -- src/entropy/info.txt | 2 -- src/entropy/proc_walk/info.txt | 2 -- src/entropy/unix_procs/info.txt | 2 -- src/entropy/win32_stats/info.txt | 2 -- src/filters/fd_unix/info.txt | 2 -- src/filters/info.txt | 2 -- src/hash/bmw/info.txt | 2 -- src/hash/fork256/info.txt | 2 -- src/hash/gost_3411/info.txt | 2 -- src/hash/has160/info.txt | 2 -- src/hash/info.txt | 2 -- src/hash/md2/info.txt | 2 -- src/hash/md4/info.txt | 2 -- src/hash/md4_ia32/info.txt | 2 -- src/hash/md5/info.txt | 2 -- src/hash/md5_ia32/info.txt | 2 -- src/hash/mdx_hash/info.txt | 2 -- src/hash/par_hash/info.txt | 2 -- src/hash/rmd128/info.txt | 2 -- src/hash/rmd160/info.txt | 2 -- src/hash/sha1/info.txt | 2 -- src/hash/sha1_amd64/info.txt | 2 -- src/hash/sha1_ia32/info.txt | 2 -- src/hash/sha1_sse2/info.txt | 2 -- src/hash/sha2/info.txt | 2 -- src/hash/skein/info.txt | 2 -- src/hash/tiger/info.txt | 2 -- src/hash/whirlpool/info.txt | 2 -- src/kdf/info.txt | 2 -- src/kdf/kdf1/info.txt | 2 -- src/kdf/kdf2/info.txt | 2 -- src/kdf/mgf1/info.txt | 2 -- src/kdf/ssl_prf/info.txt | 2 -- src/kdf/tls_prf/info.txt | 2 -- src/kdf/x942_prf/info.txt | 2 -- src/libstate/info.txt | 2 -- src/libstate/oid_lookup/info.txt | 2 -- src/mac/cbc_mac/info.txt | 2 -- src/mac/cmac/info.txt | 2 -- src/mac/hmac/info.txt | 2 -- src/mac/info.txt | 2 -- src/mac/ssl3mac/info.txt | 2 -- src/mac/x919_mac/info.txt | 2 -- src/math/bigint/info.txt | 2 -- src/math/bigint/monty_amd64/info.txt | 2 -- src/math/bigint/monty_generic/info.txt | 2 -- src/math/bigint/mp_amd64/info.txt | 2 -- src/math/bigint/mp_asm64/info.txt | 2 -- src/math/bigint/mp_generic/info.txt | 2 -- src/math/bigint/mp_ia32/info.txt | 2 -- src/math/bigint/mp_ia32_msvc/info.txt | 2 -- src/math/bigint/mulop_amd64/info.txt | 2 -- src/math/bigint/mulop_generic/info.txt | 2 -- src/math/bigint/mulop_ia32/info.txt | 2 -- src/math/gfpmath/info.txt | 2 -- src/math/numbertheory/info.txt | 2 -- src/modes/cbc/info.txt | 2 -- src/modes/cfb/info.txt | 3 --- src/modes/cts/info.txt | 2 -- src/modes/eax/info.txt | 2 -- src/modes/ecb/info.txt | 2 -- src/modes/info.txt | 2 -- src/modes/mode_pad/info.txt | 2 -- src/modes/xts/info.txt | 2 -- src/mutex/info.txt | 2 -- src/mutex/noop_mutex/info.txt | 2 -- src/mutex/pthreads/info.txt | 2 -- src/mutex/qt_mutex/info.txt | 2 -- src/mutex/win32_crit_section/info.txt | 2 -- src/pbe/info.txt | 2 -- src/pbe/pbes1/info.txt | 2 -- src/pbe/pbes2/info.txt | 2 -- src/pk_pad/eme1/info.txt | 2 -- src/pk_pad/eme_pkcs/info.txt | 2 -- src/pk_pad/emsa1/info.txt | 2 -- src/pk_pad/emsa1_bsi/info.txt | 2 -- src/pk_pad/emsa2/info.txt | 2 -- src/pk_pad/emsa3/info.txt | 2 -- src/pk_pad/emsa4/info.txt | 2 -- src/pk_pad/emsa_raw/info.txt | 2 -- src/pk_pad/hash_id/info.txt | 2 -- src/pk_pad/info.txt | 2 -- src/pubkey/dh/info.txt | 2 -- src/pubkey/dl_algo/info.txt | 2 -- src/pubkey/dl_group/info.txt | 2 -- src/pubkey/dlies/info.txt | 2 -- src/pubkey/dsa/info.txt | 2 -- src/pubkey/ec_dompar/info.txt | 2 -- src/pubkey/ecc_key/info.txt | 2 -- src/pubkey/ecdsa/info.txt | 2 -- src/pubkey/eckaeg/info.txt | 2 -- src/pubkey/elgamal/info.txt | 2 -- src/pubkey/if_algo/info.txt | 2 -- src/pubkey/info.txt | 2 -- src/pubkey/keypair/info.txt | 2 -- src/pubkey/nr/info.txt | 2 -- src/pubkey/pk_codecs/info.txt | 2 -- src/pubkey/rsa/info.txt | 2 -- src/pubkey/rw/info.txt | 2 -- src/rng/auto_rng/info.txt | 2 -- src/rng/hmac_rng/info.txt | 2 -- src/rng/info.txt | 2 -- src/rng/randpool/info.txt | 2 -- src/rng/x931_rng/info.txt | 2 -- src/s2k/info.txt | 2 -- src/s2k/pbkdf1/info.txt | 2 -- src/s2k/pbkdf2/info.txt | 2 -- src/s2k/pgps2k/info.txt | 2 -- src/selftest/info.txt | 2 -- src/stream/arc4/info.txt | 2 -- src/stream/ctr/info.txt | 3 --- src/stream/info.txt | 2 -- src/stream/ofb/info.txt | 2 -- src/stream/salsa20/info.txt | 2 -- src/stream/turing/info.txt | 2 -- src/stream/wid_wake/info.txt | 2 -- src/sym_algo/info.txt | 2 -- src/timer/cpu_counter/info.txt | 2 -- src/timer/gettimeofday/info.txt | 3 --- src/timer/info.txt | 2 -- src/timer/posix_rt/info.txt | 3 --- src/timer/win32_query_perf_ctr/info.txt | 3 --- src/tss/info.txt | 2 -- src/utils/asm_amd64/info.txt | 2 -- src/utils/asm_ia32/info.txt | 2 -- src/utils/buf_comp/info.txt | 2 -- src/utils/datastor/info.txt | 2 -- src/utils/info.txt | 2 -- 234 files changed, 5 insertions(+), 479 deletions(-) (limited to 'src/block/xtea') diff --git a/configure.py b/configure.py index 88eb45963..be5cf7ad2 100755 --- a/configure.py +++ b/configure.py @@ -357,8 +357,7 @@ class ModuleInfo(object): lex_me_harder(infofile, self, ['add', 'requires', 'os', 'arch', 'cc', 'libs'], - { 'realname': '', - 'load_on': 'auto', + { 'load_on': 'auto', 'define': None, 'modset': None, 'uses_tr1': 'false', @@ -425,8 +424,7 @@ class ArchInfo(object): def __init__(self, infofile): lex_me_harder(infofile, self, ['aliases', 'submodels', 'submodel_aliases'], - { 'realname': '', - 'default_submodel': None, + { 'default_submodel': None, 'endian': None, 'unaligned': 'no' }) @@ -471,8 +469,7 @@ class CompilerInfo(object): def __init__(self, infofile): lex_me_harder(infofile, self, ['so_link_flags', 'mach_opt', 'mach_abi_linking'], - { 'realname': '', - 'binary_name': None, + { 'binary_name': None, 'macro_name': None, 'compile_option': '-c ', 'output_to_option': '-o ', @@ -572,8 +569,7 @@ class OsInfo(object): def __init__(self, infofile): lex_me_harder(infofile, self, ['aliases', 'target_features', 'supports_shared'], - { 'realname': '', - 'os_type': None, + { 'os_type': None, 'obj_suffix': 'o', 'so_suffix': 'so', 'static_suffix': 'a', @@ -833,8 +829,7 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): 'doc_files': makefile_list(build_config.doc_files()), - 'mod_list': '\n'.join(['%s (%s)' % (m.basename, m.realname) - for m in sorted(modules)]), + 'mod_list': '\n'.join(sorted([m.basename for m in modules])), 'python_version': '.'.join(map(str, sys.version_info[0:2])) } diff --git a/src/algo_factory/info.txt b/src/algo_factory/info.txt index dfc42230a..4b25c7fc5 100644 --- a/src/algo_factory/info.txt +++ b/src/algo_factory/info.txt @@ -1,5 +1,3 @@ -realname "Algorithm Factory" - load_on auto define ALGORITHM_FACTORY diff --git a/src/alloc/alloc_mmap/info.txt b/src/alloc/alloc_mmap/info.txt index 65d9b2977..e6bded3fb 100644 --- a/src/alloc/alloc_mmap/info.txt +++ b/src/alloc/alloc_mmap/info.txt @@ -1,5 +1,3 @@ -realname "Disk Based Allocation System" - define ALLOC_MMAP modset unix diff --git a/src/alloc/info.txt b/src/alloc/info.txt index fa50aa09f..99dbe3a4d 100644 --- a/src/alloc/info.txt +++ b/src/alloc/info.txt @@ -1,5 +1,3 @@ -realname "Allocator" - load_on auto diff --git a/src/alloc/mem_pool/info.txt b/src/alloc/mem_pool/info.txt index 0a762ccc4..73a548292 100644 --- a/src/alloc/mem_pool/info.txt +++ b/src/alloc/mem_pool/info.txt @@ -1,5 +1,3 @@ -realname "Memory Pool Allocator" - load_on auto diff --git a/src/alloc/system_alloc/info.txt b/src/alloc/system_alloc/info.txt index 5fade38cf..8b9a2f067 100644 --- a/src/alloc/system_alloc/info.txt +++ b/src/alloc/system_alloc/info.txt @@ -1,5 +1,3 @@ -realname "Default (Malloc) Allocators" - load_on auto diff --git a/src/aont/info.txt b/src/aont/info.txt index a0387f358..533b70eb5 100644 --- a/src/aont/info.txt +++ b/src/aont/info.txt @@ -1,5 +1,3 @@ -realname "All or Nothing Transforms" - define PACKAGE_TRANSFORM load_on auto diff --git a/src/asn1/info.txt b/src/asn1/info.txt index 7b8110c10..d836b4c0b 100644 --- a/src/asn1/info.txt +++ b/src/asn1/info.txt @@ -1,5 +1,3 @@ -realname "ASN.1/BER/DER module" - define ASN1 load_on auto diff --git a/src/benchmark/info.txt b/src/benchmark/info.txt index 0fbcdb2de..f148ae5ce 100644 --- a/src/benchmark/info.txt +++ b/src/benchmark/info.txt @@ -1,5 +1,3 @@ -realname "Benchmarking" - define RUNTIME_BENCHMARKING load_on auto diff --git a/src/block/aes/info.txt b/src/block/aes/info.txt index 0e11603bb..480973100 100644 --- a/src/block/aes/info.txt +++ b/src/block/aes/info.txt @@ -1,3 +1 @@ -realname "AES" - define AES diff --git a/src/block/blowfish/info.txt b/src/block/blowfish/info.txt index c63560989..c935fb3ab 100644 --- a/src/block/blowfish/info.txt +++ b/src/block/blowfish/info.txt @@ -1,3 +1 @@ -realname "Blowfish" - define BLOWFISH diff --git a/src/block/cast/info.txt b/src/block/cast/info.txt index b9259042d..faba491c2 100644 --- a/src/block/cast/info.txt +++ b/src/block/cast/info.txt @@ -1,3 +1 @@ -realname "CAST" - define CAST diff --git a/src/block/des/info.txt b/src/block/des/info.txt index 6eec591a0..8e4f4e82d 100644 --- a/src/block/des/info.txt +++ b/src/block/des/info.txt @@ -1,3 +1 @@ -realname "DES" - define DES diff --git a/src/block/gost_28147/info.txt b/src/block/gost_28147/info.txt index 9b24d1e22..530f147e5 100644 --- a/src/block/gost_28147/info.txt +++ b/src/block/gost_28147/info.txt @@ -1,3 +1 @@ -realname "GOST 28147-89" - define GOST_28147_89 diff --git a/src/block/idea/info.txt b/src/block/idea/info.txt index f11b3d224..a868d7cc7 100644 --- a/src/block/idea/info.txt +++ b/src/block/idea/info.txt @@ -1,3 +1 @@ -realname "IDEA" - define IDEA diff --git a/src/block/info.txt b/src/block/info.txt index f5840bf79..b4302a6d8 100644 --- a/src/block/info.txt +++ b/src/block/info.txt @@ -1,5 +1,3 @@ -realname "Block Ciphers" - define BLOCK_CIPHER diff --git a/src/block/kasumi/info.txt b/src/block/kasumi/info.txt index e310488b3..cb8340fad 100644 --- a/src/block/kasumi/info.txt +++ b/src/block/kasumi/info.txt @@ -1,3 +1 @@ -realname "Kasumi" - define KASUMI diff --git a/src/block/lion/info.txt b/src/block/lion/info.txt index 64f2989b1..9562be1d0 100644 --- a/src/block/lion/info.txt +++ b/src/block/lion/info.txt @@ -1,5 +1,3 @@ -realname "Lion" - define LION diff --git a/src/block/lubyrack/info.txt b/src/block/lubyrack/info.txt index d915781d8..41c395097 100644 --- a/src/block/lubyrack/info.txt +++ b/src/block/lubyrack/info.txt @@ -1,5 +1,3 @@ -realname "Luby-Rackoff" - define LUBY_RACKOFF diff --git a/src/block/mars/info.txt b/src/block/mars/info.txt index ec958eaf5..afdcebe67 100644 --- a/src/block/mars/info.txt +++ b/src/block/mars/info.txt @@ -1,3 +1 @@ -realname "MARS" - define MARS diff --git a/src/block/misty1/info.txt b/src/block/misty1/info.txt index 38087c83d..290b8b1d7 100644 --- a/src/block/misty1/info.txt +++ b/src/block/misty1/info.txt @@ -1,3 +1 @@ -realname "MISTY-1" - define MISTY1 diff --git a/src/block/noekeon/info.txt b/src/block/noekeon/info.txt index 6e940bb62..31f7e7de3 100644 --- a/src/block/noekeon/info.txt +++ b/src/block/noekeon/info.txt @@ -1,3 +1 @@ -realname "Noekeon" - define NOEKEON diff --git a/src/block/rc2/info.txt b/src/block/rc2/info.txt index 7ec018422..7eee38d6b 100644 --- a/src/block/rc2/info.txt +++ b/src/block/rc2/info.txt @@ -1,3 +1 @@ -realname "RC2" - define RC2 diff --git a/src/block/rc5/info.txt b/src/block/rc5/info.txt index 2032b406f..3da32710d 100644 --- a/src/block/rc5/info.txt +++ b/src/block/rc5/info.txt @@ -1,3 +1 @@ -realname "RC5" - define RC5 diff --git a/src/block/rc6/info.txt b/src/block/rc6/info.txt index 2897bc1f3..fc7d2acb4 100644 --- a/src/block/rc6/info.txt +++ b/src/block/rc6/info.txt @@ -1,3 +1 @@ -realname "RC6" - define RC6 diff --git a/src/block/safer/info.txt b/src/block/safer/info.txt index 7c8067472..0ca49602d 100644 --- a/src/block/safer/info.txt +++ b/src/block/safer/info.txt @@ -1,3 +1 @@ -realname "SAFER" - define SAFER diff --git a/src/block/seed/info.txt b/src/block/seed/info.txt index c66e0c2cd..96f4b75f2 100644 --- a/src/block/seed/info.txt +++ b/src/block/seed/info.txt @@ -1,3 +1 @@ -realname "SEED" - define SEED diff --git a/src/block/serpent/info.txt b/src/block/serpent/info.txt index 4031a3f5f..5fcc14f74 100644 --- a/src/block/serpent/info.txt +++ b/src/block/serpent/info.txt @@ -1,3 +1 @@ -realname "Serpent" - define SERPENT diff --git a/src/block/serpent_ia32/info.txt b/src/block/serpent_ia32/info.txt index 48d589724..fa6d9b9d9 100644 --- a/src/block/serpent_ia32/info.txt +++ b/src/block/serpent_ia32/info.txt @@ -1,5 +1,3 @@ -realname "Serpent (IA-32)" - define SERPENT_IA32 load_on asm_ok diff --git a/src/block/serpent_sse2/info.txt b/src/block/serpent_sse2/info.txt index da7eef6bc..a4ec561a8 100644 --- a/src/block/serpent_sse2/info.txt +++ b/src/block/serpent_sse2/info.txt @@ -1,5 +1,3 @@ -realname "Serpent (SSE2)" - define SERPENT_SSE2 diff --git a/src/block/skipjack/info.txt b/src/block/skipjack/info.txt index 9cdddfe6b..7dfffda4e 100644 --- a/src/block/skipjack/info.txt +++ b/src/block/skipjack/info.txt @@ -1,3 +1 @@ -realname "Skipjack" - define SKIPJACK diff --git a/src/block/square/info.txt b/src/block/square/info.txt index 7c517be71..d33379815 100644 --- a/src/block/square/info.txt +++ b/src/block/square/info.txt @@ -1,3 +1 @@ -realname "Square" - define SQUARE diff --git a/src/block/tea/info.txt b/src/block/tea/info.txt index 85a19ee4c..67ed5a656 100644 --- a/src/block/tea/info.txt +++ b/src/block/tea/info.txt @@ -1,3 +1 @@ -realname "TEA" - define TEA diff --git a/src/block/twofish/info.txt b/src/block/twofish/info.txt index 319da6e6e..88eae9ce7 100644 --- a/src/block/twofish/info.txt +++ b/src/block/twofish/info.txt @@ -1,3 +1 @@ -realname "Twofish" - define TWOFISH diff --git a/src/block/xtea/info.txt b/src/block/xtea/info.txt index 1887e6673..d9d37607c 100644 --- a/src/block/xtea/info.txt +++ b/src/block/xtea/info.txt @@ -1,3 +1 @@ -realname "XTEA" - define XTEA diff --git a/src/build-data/arch/alpha.txt b/src/build-data/arch/alpha.txt index 60b264396..b1d939ed1 100644 --- a/src/build-data/arch/alpha.txt +++ b/src/build-data/arch/alpha.txt @@ -1,5 +1,3 @@ -realname "DEC Alpha" - default_submodel alpha-ev4 endian little diff --git a/src/build-data/arch/amd64.txt b/src/build-data/arch/amd64.txt index 216588e7b..96da0e3a9 100644 --- a/src/build-data/arch/amd64.txt +++ b/src/build-data/arch/amd64.txt @@ -1,5 +1,3 @@ -realname "x86-64" - default_submodel opteron endian little diff --git a/src/build-data/arch/arm.txt b/src/build-data/arch/arm.txt index c6be4ad46..5f05d4cad 100644 --- a/src/build-data/arch/arm.txt +++ b/src/build-data/arch/arm.txt @@ -1,5 +1,3 @@ -realname "ARM" - default_submodel arm2 diff --git a/src/build-data/arch/hitachi-sh.txt b/src/build-data/arch/hitachi-sh.txt index 8e9f7eee3..85a741f59 100644 --- a/src/build-data/arch/hitachi-sh.txt +++ b/src/build-data/arch/hitachi-sh.txt @@ -1,5 +1,3 @@ -realname "Hitachi SH" - default_submodel hitachi-sh1 diff --git a/src/build-data/arch/hppa.txt b/src/build-data/arch/hppa.txt index 4cdd40889..67bca263d 100644 --- a/src/build-data/arch/hppa.txt +++ b/src/build-data/arch/hppa.txt @@ -1,5 +1,3 @@ -realname "HP-PA" - default_submodel hppa1.0 diff --git a/src/build-data/arch/ia32.txt b/src/build-data/arch/ia32.txt index aafcf9a77..0fe665e68 100644 --- a/src/build-data/arch/ia32.txt +++ b/src/build-data/arch/ia32.txt @@ -1,5 +1,3 @@ -realname "IA-32" - default_submodel i386 endian little diff --git a/src/build-data/arch/ia64.txt b/src/build-data/arch/ia64.txt index 7ca84c007..65309f0ff 100644 --- a/src/build-data/arch/ia64.txt +++ b/src/build-data/arch/ia64.txt @@ -1,5 +1,3 @@ -realname "IA-64" - # This is safe: only affects tuning, not ISA default_submodel itanium2 diff --git a/src/build-data/arch/m68k.txt b/src/build-data/arch/m68k.txt index 759a3dac1..3a8b5e8b3 100644 --- a/src/build-data/arch/m68k.txt +++ b/src/build-data/arch/m68k.txt @@ -1,5 +1,3 @@ -realname "Motorola 680x0" - default_submodel 68020 endian big diff --git a/src/build-data/arch/mips32.txt b/src/build-data/arch/mips32.txt index 9846c8fb2..ec9d4b5bf 100644 --- a/src/build-data/arch/mips32.txt +++ b/src/build-data/arch/mips32.txt @@ -1,5 +1,3 @@ -realname "MIPS" - default_submodel r3000 diff --git a/src/build-data/arch/mips64.txt b/src/build-data/arch/mips64.txt index dbb49d028..666ba7e18 100644 --- a/src/build-data/arch/mips64.txt +++ b/src/build-data/arch/mips64.txt @@ -1,5 +1,3 @@ -realname "MIPS64" - default_submodel r4400 diff --git a/src/build-data/arch/ppc.txt b/src/build-data/arch/ppc.txt index e2dfa6ea2..254643fdd 100644 --- a/src/build-data/arch/ppc.txt +++ b/src/build-data/arch/ppc.txt @@ -1,5 +1,3 @@ -realname "PowerPC" - endian big unaligned ok diff --git a/src/build-data/arch/ppc64.txt b/src/build-data/arch/ppc64.txt index 7c8944faf..f044ba98d 100644 --- a/src/build-data/arch/ppc64.txt +++ b/src/build-data/arch/ppc64.txt @@ -1,5 +1,3 @@ -realname "PowerPC 64" - endian big default_submodel power4 diff --git a/src/build-data/arch/s390.txt b/src/build-data/arch/s390.txt index 312b262c4..8024a4315 100644 --- a/src/build-data/arch/s390.txt +++ b/src/build-data/arch/s390.txt @@ -1,5 +1,3 @@ -realname "S/390 31-bit" - default_submodel s390 endian big diff --git a/src/build-data/arch/s390x.txt b/src/build-data/arch/s390x.txt index 9fe6bd615..00daab8b4 100644 --- a/src/build-data/arch/s390x.txt +++ b/src/build-data/arch/s390x.txt @@ -1,5 +1,3 @@ -realname "S/390 64-bit" - default_submodel s390x endian big diff --git a/src/build-data/arch/sparc32.txt b/src/build-data/arch/sparc32.txt index 6b752df87..57b19c519 100644 --- a/src/build-data/arch/sparc32.txt +++ b/src/build-data/arch/sparc32.txt @@ -1,5 +1,3 @@ -realname "SPARC" - # V7 doesn't have integer multiply, so it will be bitterly slow for some things # (especially BigInt). Also, it's fairly rare nowadays, so we default to V8. default_submodel sparc32-v8 @@ -31,4 +29,3 @@ sparc-v7 -> sparc32-v7 sparc-v8 -> sparc32-v8 sparc-v9 -> sparc32-v9 - diff --git a/src/build-data/arch/sparc64.txt b/src/build-data/arch/sparc64.txt index c0575efc4..e308055fa 100644 --- a/src/build-data/arch/sparc64.txt +++ b/src/build-data/arch/sparc64.txt @@ -1,5 +1,3 @@ -realname "SPARC64" - default_submodel sparc64-ultra diff --git a/src/build-data/cc/bcc.txt b/src/build-data/cc/bcc.txt index fe88c270e..4315c379f 100644 --- a/src/build-data/cc/bcc.txt +++ b/src/build-data/cc/bcc.txt @@ -1,5 +1,3 @@ -realname "Borland C++" - macro_name "BORLAND" binary_name "bcc32" diff --git a/src/build-data/cc/clang.txt b/src/build-data/cc/clang.txt index 480794faf..18f3580ce 100644 --- a/src/build-data/cc/clang.txt +++ b/src/build-data/cc/clang.txt @@ -1,5 +1,3 @@ -realname "Clang/LLVM" - # Largely copied from the gcc config macro_name "CLANG" diff --git a/src/build-data/cc/compaq.txt b/src/build-data/cc/compaq.txt index 94075e888..9ad6514ab 100644 --- a/src/build-data/cc/compaq.txt +++ b/src/build-data/cc/compaq.txt @@ -1,5 +1,3 @@ -realname "Compaq C++" - macro_name "COMPAQ" binary_name "cxx" diff --git a/src/build-data/cc/ekopath.txt b/src/build-data/cc/ekopath.txt index 38516e2f3..ecd813629 100644 --- a/src/build-data/cc/ekopath.txt +++ b/src/build-data/cc/ekopath.txt @@ -1,5 +1,3 @@ -realname "PathScale EKOPath C++" - macro_name "PATHSCALE" binary_name "pathCC" diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt index 9adef8cfb..370bb84d7 100644 --- a/src/build-data/cc/gcc.txt +++ b/src/build-data/cc/gcc.txt @@ -1,5 +1,3 @@ -realname "GNU C++" - macro_name "GCC" binary_name "g++" diff --git a/src/build-data/cc/hpcc.txt b/src/build-data/cc/hpcc.txt index 9c0d4a784..5bde87de9 100644 --- a/src/build-data/cc/hpcc.txt +++ b/src/build-data/cc/hpcc.txt @@ -1,5 +1,3 @@ -realname "HP-UX C++" - macro_name "HP_ACC" binary_name "aCC" diff --git a/src/build-data/cc/icc.txt b/src/build-data/cc/icc.txt index 9595714f6..628a59e2d 100644 --- a/src/build-data/cc/icc.txt +++ b/src/build-data/cc/icc.txt @@ -1,5 +1,3 @@ -realname "Intel C++" - macro_name "INTEL" binary_name "icpc" diff --git a/src/build-data/cc/kai.txt b/src/build-data/cc/kai.txt index 52ddba4ab..d0ff1c28a 100644 --- a/src/build-data/cc/kai.txt +++ b/src/build-data/cc/kai.txt @@ -1,5 +1,3 @@ -realname "KAI C++" - macro_name "KAI" binary_name "KCC" diff --git a/src/build-data/cc/mipspro.txt b/src/build-data/cc/mipspro.txt index a4cfbd1ee..c518f4c26 100644 --- a/src/build-data/cc/mipspro.txt +++ b/src/build-data/cc/mipspro.txt @@ -1,5 +1,3 @@ -realname "SGI MIPSPro C++" - macro_name "MIPSPRO" binary_name "CC" diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt index c19d93e2b..603ea449b 100644 --- a/src/build-data/cc/msvc.txt +++ b/src/build-data/cc/msvc.txt @@ -1,5 +1,3 @@ -realname "Visual C++" - macro_name "MSVC" binary_name "cl.exe" diff --git a/src/build-data/cc/open64.txt b/src/build-data/cc/open64.txt index 0157440cf..e794c755e 100644 --- a/src/build-data/cc/open64.txt +++ b/src/build-data/cc/open64.txt @@ -1,5 +1,3 @@ -realname "Open64" - macro_name "OPEN64" binary_name "openCC" diff --git a/src/build-data/cc/pgi.txt b/src/build-data/cc/pgi.txt index c4fdb9e70..a6d2416ab 100644 --- a/src/build-data/cc/pgi.txt +++ b/src/build-data/cc/pgi.txt @@ -1,5 +1,3 @@ -realname "Portland Group C++" - macro_name "PORTLAND_GROUP" binary_name "pgCC" diff --git a/src/build-data/cc/sgipro64.txt b/src/build-data/cc/sgipro64.txt index be91ac69a..073f2fec0 100644 --- a/src/build-data/cc/sgipro64.txt +++ b/src/build-data/cc/sgipro64.txt @@ -1,5 +1,3 @@ -realname "SGI Pro64" - macro_name "SGI_PRO64" binary_name "sgiCC" diff --git a/src/build-data/cc/sunwspro.txt b/src/build-data/cc/sunwspro.txt index 9756f8538..7065d4129 100644 --- a/src/build-data/cc/sunwspro.txt +++ b/src/build-data/cc/sunwspro.txt @@ -1,5 +1,3 @@ -realname "Sun Workshop Pro C++" - macro_name "SUN_WORKSHOP" binary_name "CC" diff --git a/src/build-data/cc/xlc.txt b/src/build-data/cc/xlc.txt index 6d06b4c43..521624395 100644 --- a/src/build-data/cc/xlc.txt +++ b/src/build-data/cc/xlc.txt @@ -1,5 +1,3 @@ -realname "IBM XL C/C++" - macro_name "IBM_XLC" binary_name "xlC" diff --git a/src/build-data/os/aix.txt b/src/build-data/os/aix.txt index cec818580..0063948c7 100644 --- a/src/build-data/os/aix.txt +++ b/src/build-data/os/aix.txt @@ -1,5 +1,3 @@ -realname "AIX" - os_type unix diff --git a/src/build-data/os/beos.txt b/src/build-data/os/beos.txt index 2b12792bb..b843bd525 100644 --- a/src/build-data/os/beos.txt +++ b/src/build-data/os/beos.txt @@ -1,5 +1,3 @@ -realname "BeOS" - os_type beos install_root /boot/beos diff --git a/src/build-data/os/cygwin.txt b/src/build-data/os/cygwin.txt index c2aadea98..7290648c2 100644 --- a/src/build-data/os/cygwin.txt +++ b/src/build-data/os/cygwin.txt @@ -1,5 +1,3 @@ -realname "Cygwin" - os_type unix install_root c:\Botan diff --git a/src/build-data/os/darwin.txt b/src/build-data/os/darwin.txt index 298621216..fb18ee191 100644 --- a/src/build-data/os/darwin.txt +++ b/src/build-data/os/darwin.txt @@ -1,5 +1,3 @@ -realname "Darwin / MacOS X" - os_type unix so_suffix dylib diff --git a/src/build-data/os/dragonfly.txt b/src/build-data/os/dragonfly.txt index 7e3663435..6823de5b6 100644 --- a/src/build-data/os/dragonfly.txt +++ b/src/build-data/os/dragonfly.txt @@ -1,5 +1,3 @@ -realname "DragonFly" - os_type unix diff --git a/src/build-data/os/freebsd.txt b/src/build-data/os/freebsd.txt index ea96b0c88..6823de5b6 100644 --- a/src/build-data/os/freebsd.txt +++ b/src/build-data/os/freebsd.txt @@ -1,5 +1,3 @@ -realname "FreeBSD" - os_type unix diff --git a/src/build-data/os/hpux.txt b/src/build-data/os/hpux.txt index 6e17d3b73..9ff0f7f62 100644 --- a/src/build-data/os/hpux.txt +++ b/src/build-data/os/hpux.txt @@ -1,5 +1,3 @@ -realname "HP-UX" - os_type unix so_suffix sl diff --git a/src/build-data/os/irix.txt b/src/build-data/os/irix.txt index fd8b43287..0063948c7 100644 --- a/src/build-data/os/irix.txt +++ b/src/build-data/os/irix.txt @@ -1,5 +1,3 @@ -realname "IRIX" - os_type unix diff --git a/src/build-data/os/linux.txt b/src/build-data/os/linux.txt index 53528511a..3a92f9dd7 100644 --- a/src/build-data/os/linux.txt +++ b/src/build-data/os/linux.txt @@ -1,5 +1,3 @@ -realname "Linux" - os_type unix diff --git a/src/build-data/os/mingw.txt b/src/build-data/os/mingw.txt index eb25017fc..2b7a16cf7 100644 --- a/src/build-data/os/mingw.txt +++ b/src/build-data/os/mingw.txt @@ -1,4 +1,3 @@ -realname "MS Windows (MinGW)" os_type windows obj_suffix o diff --git a/src/build-data/os/netbsd.txt b/src/build-data/os/netbsd.txt index 435d8f5e8..0063948c7 100644 --- a/src/build-data/os/netbsd.txt +++ b/src/build-data/os/netbsd.txt @@ -1,5 +1,3 @@ -realname "NetBSD" - os_type unix diff --git a/src/build-data/os/openbsd.txt b/src/build-data/os/openbsd.txt index cb44bd115..0063948c7 100644 --- a/src/build-data/os/openbsd.txt +++ b/src/build-data/os/openbsd.txt @@ -1,5 +1,3 @@ -realname "OpenBSD" - os_type unix diff --git a/src/build-data/os/qnx.txt b/src/build-data/os/qnx.txt index 28bc8dea9..0063948c7 100644 --- a/src/build-data/os/qnx.txt +++ b/src/build-data/os/qnx.txt @@ -1,5 +1,3 @@ -realname "QNX" - os_type unix diff --git a/src/build-data/os/solaris.txt b/src/build-data/os/solaris.txt index 8610b4898..47b06dcc4 100644 --- a/src/build-data/os/solaris.txt +++ b/src/build-data/os/solaris.txt @@ -1,5 +1,3 @@ -realname "Solaris" - os_type unix diff --git a/src/build-data/os/tru64.txt b/src/build-data/os/tru64.txt index e320c1df4..8fc301d79 100644 --- a/src/build-data/os/tru64.txt +++ b/src/build-data/os/tru64.txt @@ -1,5 +1,3 @@ -realname "Tru64" - os_type unix diff --git a/src/build-data/os/windows.txt b/src/build-data/os/windows.txt index a04d609b8..e2e8bb665 100644 --- a/src/build-data/os/windows.txt +++ b/src/build-data/os/windows.txt @@ -1,5 +1,3 @@ -realname "MS Windows" - os_type windows obj_suffix obj diff --git a/src/cert/cvc/info.txt b/src/cert/cvc/info.txt index e3e11f5fe..bdd496614 100644 --- a/src/cert/cvc/info.txt +++ b/src/cert/cvc/info.txt @@ -1,5 +1,3 @@ -realname "Card Verifiable Certificates" - define CARD_VERIFIABLE_CERTIFICATES uses_tr1 yes diff --git a/src/cert/x509/info.txt b/src/cert/x509/info.txt index 552e2aacb..37faea9fa 100644 --- a/src/cert/x509/info.txt +++ b/src/cert/x509/info.txt @@ -1,5 +1,3 @@ -realname "X.509" - define X509 load_on auto diff --git a/src/checksum/adler32/info.txt b/src/checksum/adler32/info.txt index 76662cdec..53bc66354 100644 --- a/src/checksum/adler32/info.txt +++ b/src/checksum/adler32/info.txt @@ -1,5 +1,3 @@ -realname "Adler32" - define ADLER32 load_on auto diff --git a/src/checksum/crc24/info.txt b/src/checksum/crc24/info.txt index 33b86a9da..8c61aa58b 100644 --- a/src/checksum/crc24/info.txt +++ b/src/checksum/crc24/info.txt @@ -1,5 +1,3 @@ -realname "CRC-24" - define CRC24 load_on auto diff --git a/src/checksum/crc32/info.txt b/src/checksum/crc32/info.txt index 15933b375..d86848cf4 100644 --- a/src/checksum/crc32/info.txt +++ b/src/checksum/crc32/info.txt @@ -1,5 +1,3 @@ -realname "CRC-32" - define CRC32 load_on auto diff --git a/src/cms/info.txt b/src/cms/info.txt index 82c31b564..55d559f83 100644 --- a/src/cms/info.txt +++ b/src/cms/info.txt @@ -1,5 +1,3 @@ -realname "CMS" - define CMS load_on auto diff --git a/src/codec/base64/info.txt b/src/codec/base64/info.txt index d4ed80976..1d36b948e 100644 --- a/src/codec/base64/info.txt +++ b/src/codec/base64/info.txt @@ -1,5 +1,3 @@ -realname "Base64 Codec" - define BASE64_CODEC load_on auto diff --git a/src/codec/bzip2/info.txt b/src/codec/bzip2/info.txt index 1be84e405..7fd426f90 100644 --- a/src/codec/bzip2/info.txt +++ b/src/codec/bzip2/info.txt @@ -1,6 +1,5 @@ # This module was written by Peter J. Jones -realname "Bzip2 Compressor" define COMPRESSOR_BZIP2 modset compression diff --git a/src/codec/hex/info.txt b/src/codec/hex/info.txt index 512a5de8b..817ff1a00 100644 --- a/src/codec/hex/info.txt +++ b/src/codec/hex/info.txt @@ -1,5 +1,3 @@ -realname "Hex Codec" - define HEX_CODEC load_on auto diff --git a/src/codec/openpgp/info.txt b/src/codec/openpgp/info.txt index 6b30850d0..f7774b147 100644 --- a/src/codec/openpgp/info.txt +++ b/src/codec/openpgp/info.txt @@ -1,5 +1,3 @@ -realname "OpenPGP Codec" - define OPENPGP_CODEC load_on auto diff --git a/src/codec/pem/info.txt b/src/codec/pem/info.txt index bbe8d4c70..5544e1bb0 100644 --- a/src/codec/pem/info.txt +++ b/src/codec/pem/info.txt @@ -1,5 +1,3 @@ -realname "PEM Codec" - define PEM_CODEC load_on auto diff --git a/src/codec/zlib/info.txt b/src/codec/zlib/info.txt index 9b1c35d84..267c3be92 100644 --- a/src/codec/zlib/info.txt +++ b/src/codec/zlib/info.txt @@ -1,4 +1,3 @@ -realname "Zlib Compressor" #realname "Zlib/Gzip Compressor" define COMPRESSOR_ZLIB diff --git a/src/cryptobox/info.txt b/src/cryptobox/info.txt index b9b98060f..0780f55aa 100644 --- a/src/cryptobox/info.txt +++ b/src/cryptobox/info.txt @@ -1,5 +1,3 @@ -realname "Crypto Box" - load_on auto define CRYPTO_BOX diff --git a/src/engine/amd64_eng/info.txt b/src/engine/amd64_eng/info.txt index 47f891445..03baf76ee 100644 --- a/src/engine/amd64_eng/info.txt +++ b/src/engine/amd64_eng/info.txt @@ -1,5 +1,3 @@ -realname "AMD64 Assembler Engine" - define ENGINE_AMD64_ASSEMBLER load_on dep diff --git a/src/engine/def_engine/info.txt b/src/engine/def_engine/info.txt index fd31ee2d0..e307fbf8e 100644 --- a/src/engine/def_engine/info.txt +++ b/src/engine/def_engine/info.txt @@ -1,5 +1,3 @@ -realname "Default Engine" - define DEFAULT_ENGINE load_on auto diff --git a/src/engine/gnump/info.txt b/src/engine/gnump/info.txt index 67a9bcd70..0805c1ba8 100644 --- a/src/engine/gnump/info.txt +++ b/src/engine/gnump/info.txt @@ -1,5 +1,3 @@ -realname "GMP Engine" - define ENGINE_GNU_MP load_on request diff --git a/src/engine/ia32_eng/info.txt b/src/engine/ia32_eng/info.txt index 3bf2a7f2b..98fd1f2cc 100644 --- a/src/engine/ia32_eng/info.txt +++ b/src/engine/ia32_eng/info.txt @@ -1,5 +1,3 @@ -realname "IA32 Assembler Engine" - define ENGINE_IA32_ASSEMBLER load_on dep diff --git a/src/engine/info.txt b/src/engine/info.txt index eef3c03b6..dcb26d9d6 100644 --- a/src/engine/info.txt +++ b/src/engine/info.txt @@ -1,5 +1,3 @@ -realname "Engines" - define ENGINES load_on auto diff --git a/src/engine/openssl/info.txt b/src/engine/openssl/info.txt index 3f2f1ab14..9f8c84b31 100644 --- a/src/engine/openssl/info.txt +++ b/src/engine/openssl/info.txt @@ -1,5 +1,3 @@ -realname "OpenSSL Engine" - define ENGINE_OPENSSL load_on request diff --git a/src/engine/sse2_eng/info.txt b/src/engine/sse2_eng/info.txt index 7508b9874..43df92343 100644 --- a/src/engine/sse2_eng/info.txt +++ b/src/engine/sse2_eng/info.txt @@ -1,5 +1,3 @@ -realname "SSE2 Assembler Engine" - define ENGINE_SSE2_ASSEMBLER load_on dep diff --git a/src/entropy/beos_stats/info.txt b/src/entropy/beos_stats/info.txt index a7e62cfb3..84ecf601d 100644 --- a/src/entropy/beos_stats/info.txt +++ b/src/entropy/beos_stats/info.txt @@ -1,5 +1,3 @@ -realname "BeOS Entropy Source" - define ENTROPY_SRC_BEOS modset beos diff --git a/src/entropy/cryptoapi_rng/info.txt b/src/entropy/cryptoapi_rng/info.txt index 643c67d2e..d7a5dbca0 100644 --- a/src/entropy/cryptoapi_rng/info.txt +++ b/src/entropy/cryptoapi_rng/info.txt @@ -1,5 +1,3 @@ -realname "Win32 CryptoAPI Entropy Source" - define ENTROPY_SRC_CAPI load_on auto modset win32 diff --git a/src/entropy/dev_random/info.txt b/src/entropy/dev_random/info.txt index 5231b2901..376f3b4ba 100644 --- a/src/entropy/dev_random/info.txt +++ b/src/entropy/dev_random/info.txt @@ -1,5 +1,3 @@ -realname "RNG Device Reader" - define ENTROPY_SRC_DEVICE load_on auto diff --git a/src/entropy/egd/info.txt b/src/entropy/egd/info.txt index 85ba86c00..77e7197dc 100644 --- a/src/entropy/egd/info.txt +++ b/src/entropy/egd/info.txt @@ -1,5 +1,3 @@ -realname "EGD Entropy Source" - define ENTROPY_SRC_EGD load_on auto diff --git a/src/entropy/info.txt b/src/entropy/info.txt index ec3be5f58..5f3d39dd5 100644 --- a/src/entropy/info.txt +++ b/src/entropy/info.txt @@ -1,5 +1,3 @@ -realname "Entropy Sources" - load_on auto diff --git a/src/entropy/proc_walk/info.txt b/src/entropy/proc_walk/info.txt index b82929a73..f6302df1a 100644 --- a/src/entropy/proc_walk/info.txt +++ b/src/entropy/proc_walk/info.txt @@ -1,5 +1,3 @@ -realname "File Tree Walking Entropy Source" - define ENTROPY_SRC_FTW load_on auto diff --git a/src/entropy/unix_procs/info.txt b/src/entropy/unix_procs/info.txt index 928ec13b3..de88cc1b8 100644 --- a/src/entropy/unix_procs/info.txt +++ b/src/entropy/unix_procs/info.txt @@ -1,5 +1,3 @@ -realname "Generic Unix Entropy Source" - define ENTROPY_SRC_UNIX modset unix,beos diff --git a/src/entropy/win32_stats/info.txt b/src/entropy/win32_stats/info.txt index ca7100923..da8ea72ff 100644 --- a/src/entropy/win32_stats/info.txt +++ b/src/entropy/win32_stats/info.txt @@ -1,5 +1,3 @@ -realname "Win32 Entropy Source" - # Probably not much of an issue anymore #note "This module will not run under NT4" diff --git a/src/filters/fd_unix/info.txt b/src/filters/fd_unix/info.txt index d87978cb0..bdd9b957f 100644 --- a/src/filters/fd_unix/info.txt +++ b/src/filters/fd_unix/info.txt @@ -1,5 +1,3 @@ -realname "Unix I/O support for Pipe" - define PIPE_UNIXFD_IO modset unix,beos diff --git a/src/filters/info.txt b/src/filters/info.txt index fb8108659..a76b6b4fe 100644 --- a/src/filters/info.txt +++ b/src/filters/info.txt @@ -1,5 +1,3 @@ -realname "Pipe/Filter" - load_on auto define FILTERS diff --git a/src/hash/bmw/info.txt b/src/hash/bmw/info.txt index 27e069c0a..7170223d7 100644 --- a/src/hash/bmw/info.txt +++ b/src/hash/bmw/info.txt @@ -1,5 +1,3 @@ -realname "Blue Midnight Wish" - define BMW_512 diff --git a/src/hash/fork256/info.txt b/src/hash/fork256/info.txt index 7c3c5bb94..c2f8c47f2 100644 --- a/src/hash/fork256/info.txt +++ b/src/hash/fork256/info.txt @@ -1,5 +1,3 @@ -realname "FORK-256" - define FORK_256 diff --git a/src/hash/gost_3411/info.txt b/src/hash/gost_3411/info.txt index 353ceb3e5..c4cb4e1a5 100644 --- a/src/hash/gost_3411/info.txt +++ b/src/hash/gost_3411/info.txt @@ -1,5 +1,3 @@ -realname "GOST 34.11" - define GOST_34_11 diff --git a/src/hash/has160/info.txt b/src/hash/has160/info.txt index 98cbc5155..f862bdb20 100644 --- a/src/hash/has160/info.txt +++ b/src/hash/has160/info.txt @@ -1,5 +1,3 @@ -realname "HAS-160" - define HAS_160 diff --git a/src/hash/info.txt b/src/hash/info.txt index ce55f7ddc..0e45806f8 100644 --- a/src/hash/info.txt +++ b/src/hash/info.txt @@ -1,5 +1,3 @@ -realname "Hash Functions" - load_on auto diff --git a/src/hash/md2/info.txt b/src/hash/md2/info.txt index 4428584fd..2359c5df7 100644 --- a/src/hash/md2/info.txt +++ b/src/hash/md2/info.txt @@ -1,3 +1 @@ -realname "MD2" - define MD2 diff --git a/src/hash/md4/info.txt b/src/hash/md4/info.txt index 6aa4a5d59..2b276e168 100644 --- a/src/hash/md4/info.txt +++ b/src/hash/md4/info.txt @@ -1,5 +1,3 @@ -realname "MD4" - define MD4 diff --git a/src/hash/md4_ia32/info.txt b/src/hash/md4_ia32/info.txt index 217c3fc21..732285c56 100644 --- a/src/hash/md4_ia32/info.txt +++ b/src/hash/md4_ia32/info.txt @@ -1,5 +1,3 @@ -realname "MD4 (IA-32)" - define MD4_IA32 load_on asm_ok diff --git a/src/hash/md5/info.txt b/src/hash/md5/info.txt index 14861d635..a4ad1462c 100644 --- a/src/hash/md5/info.txt +++ b/src/hash/md5/info.txt @@ -1,5 +1,3 @@ -realname "MD5" - define MD5 diff --git a/src/hash/md5_ia32/info.txt b/src/hash/md5_ia32/info.txt index d298f2005..48a8b4a10 100644 --- a/src/hash/md5_ia32/info.txt +++ b/src/hash/md5_ia32/info.txt @@ -1,5 +1,3 @@ -realname "MD5 (IA-32)" - define MD5_IA32 load_on asm_ok diff --git a/src/hash/mdx_hash/info.txt b/src/hash/mdx_hash/info.txt index ee4ccd6da..0c30a1a54 100644 --- a/src/hash/mdx_hash/info.txt +++ b/src/hash/mdx_hash/info.txt @@ -1,5 +1,3 @@ -realname "MDx Hash Base" - define MDX_HASH_FUNCTION load_on dep diff --git a/src/hash/par_hash/info.txt b/src/hash/par_hash/info.txt index 029939cb5..d641a9cee 100644 --- a/src/hash/par_hash/info.txt +++ b/src/hash/par_hash/info.txt @@ -1,3 +1 @@ -realname "Parallel Hash" - define PARALLEL_HASH diff --git a/src/hash/rmd128/info.txt b/src/hash/rmd128/info.txt index 0a1ef2c74..11e4181f4 100644 --- a/src/hash/rmd128/info.txt +++ b/src/hash/rmd128/info.txt @@ -1,5 +1,3 @@ -realname "RIPEMD-128" - define RIPEMD_128 diff --git a/src/hash/rmd160/info.txt b/src/hash/rmd160/info.txt index 225106afc..28be6854d 100644 --- a/src/hash/rmd160/info.txt +++ b/src/hash/rmd160/info.txt @@ -1,5 +1,3 @@ -realname "RIPEMD-160" - define RIPEMD_160 diff --git a/src/hash/sha1/info.txt b/src/hash/sha1/info.txt index 8915f9ebd..56403db21 100644 --- a/src/hash/sha1/info.txt +++ b/src/hash/sha1/info.txt @@ -1,5 +1,3 @@ -realname "SHA-1" - define SHA1 diff --git a/src/hash/sha1_amd64/info.txt b/src/hash/sha1_amd64/info.txt index 183658ac7..e54b032ca 100644 --- a/src/hash/sha1_amd64/info.txt +++ b/src/hash/sha1_amd64/info.txt @@ -1,5 +1,3 @@ -realname "SHA-1 (x86-64 assembler)" - define SHA1_AMD64 load_on asm_ok diff --git a/src/hash/sha1_ia32/info.txt b/src/hash/sha1_ia32/info.txt index e7709454f..0361395fe 100644 --- a/src/hash/sha1_ia32/info.txt +++ b/src/hash/sha1_ia32/info.txt @@ -1,5 +1,3 @@ -realname "SHA-1 (IA-32)" - define SHA1_IA32 load_on asm_ok diff --git a/src/hash/sha1_sse2/info.txt b/src/hash/sha1_sse2/info.txt index 4a7a1b5e9..ad61aa5fa 100644 --- a/src/hash/sha1_sse2/info.txt +++ b/src/hash/sha1_sse2/info.txt @@ -1,5 +1,3 @@ -realname "SHA-1 (SSE2)" - define SHA1_SSE2 diff --git a/src/hash/sha2/info.txt b/src/hash/sha2/info.txt index 8cc50fa41..e12f2b694 100644 --- a/src/hash/sha2/info.txt +++ b/src/hash/sha2/info.txt @@ -1,5 +1,3 @@ -realname "SHA-2 (224, 256, 384, 512)" - define SHA2 diff --git a/src/hash/skein/info.txt b/src/hash/skein/info.txt index 908033852..427f59121 100644 --- a/src/hash/skein/info.txt +++ b/src/hash/skein/info.txt @@ -1,5 +1,3 @@ -realname "Skein" - define SKEIN_512 diff --git a/src/hash/tiger/info.txt b/src/hash/tiger/info.txt index 92b5519c0..b50b745e3 100644 --- a/src/hash/tiger/info.txt +++ b/src/hash/tiger/info.txt @@ -1,5 +1,3 @@ -realname "Tiger" - define TIGER diff --git a/src/hash/whirlpool/info.txt b/src/hash/whirlpool/info.txt index 4fe4b2b25..7bec0c6cf 100644 --- a/src/hash/whirlpool/info.txt +++ b/src/hash/whirlpool/info.txt @@ -1,5 +1,3 @@ -realname "Whirlpool" - define WHIRLPOOL diff --git a/src/kdf/info.txt b/src/kdf/info.txt index 1965a2098..8eb4fc6e9 100644 --- a/src/kdf/info.txt +++ b/src/kdf/info.txt @@ -1,5 +1,3 @@ -realname "KDF Base Class" - define KDF_BASE load_on auto diff --git a/src/kdf/kdf1/info.txt b/src/kdf/kdf1/info.txt index ede10017e..2557f9472 100644 --- a/src/kdf/kdf1/info.txt +++ b/src/kdf/kdf1/info.txt @@ -1,5 +1,3 @@ -realname "KDF1" - define KDF1 load_on auto diff --git a/src/kdf/kdf2/info.txt b/src/kdf/kdf2/info.txt index 1858f8929..b71595449 100644 --- a/src/kdf/kdf2/info.txt +++ b/src/kdf/kdf2/info.txt @@ -1,5 +1,3 @@ -realname "KDF2" - define KDF2 load_on auto diff --git a/src/kdf/mgf1/info.txt b/src/kdf/mgf1/info.txt index f9e952f82..0f104c3b3 100644 --- a/src/kdf/mgf1/info.txt +++ b/src/kdf/mgf1/info.txt @@ -1,5 +1,3 @@ -realname "MGF1" - define MGF1 load_on dep diff --git a/src/kdf/ssl_prf/info.txt b/src/kdf/ssl_prf/info.txt index f862905a2..b306721b9 100644 --- a/src/kdf/ssl_prf/info.txt +++ b/src/kdf/ssl_prf/info.txt @@ -1,5 +1,3 @@ -realname "SSLv3 PRF" - define SSL_V3_PRF load_on auto diff --git a/src/kdf/tls_prf/info.txt b/src/kdf/tls_prf/info.txt index f95ef9c24..11a0d44f5 100644 --- a/src/kdf/tls_prf/info.txt +++ b/src/kdf/tls_prf/info.txt @@ -1,5 +1,3 @@ -realname "TLS v1.0 PRF" - define TLS_V10_PRF load_on auto diff --git a/src/kdf/x942_prf/info.txt b/src/kdf/x942_prf/info.txt index 295c2cde6..e38b2aac1 100644 --- a/src/kdf/x942_prf/info.txt +++ b/src/kdf/x942_prf/info.txt @@ -1,5 +1,3 @@ -realname "X942 PRF" - define X942_PRF load_on auto diff --git a/src/libstate/info.txt b/src/libstate/info.txt index 6eaa2f70b..e8271ce99 100644 --- a/src/libstate/info.txt +++ b/src/libstate/info.txt @@ -1,5 +1,3 @@ -realname "Botan Libstate Module" - load_on always define LIBSTATE_MODULE diff --git a/src/libstate/oid_lookup/info.txt b/src/libstate/oid_lookup/info.txt index 609eb9199..e0f6f099c 100644 --- a/src/libstate/oid_lookup/info.txt +++ b/src/libstate/oid_lookup/info.txt @@ -1,5 +1,3 @@ -realname "OID Lookup" - load_on dep define OID_LOOKUP diff --git a/src/mac/cbc_mac/info.txt b/src/mac/cbc_mac/info.txt index 3a5434974..80adc5fd0 100644 --- a/src/mac/cbc_mac/info.txt +++ b/src/mac/cbc_mac/info.txt @@ -1,5 +1,3 @@ -realname "CBC-MAC" - define CBC_MAC load_on auto diff --git a/src/mac/cmac/info.txt b/src/mac/cmac/info.txt index b593c9d38..5dad789de 100644 --- a/src/mac/cmac/info.txt +++ b/src/mac/cmac/info.txt @@ -1,5 +1,3 @@ -realname "CMAC" - define CMAC load_on auto diff --git a/src/mac/hmac/info.txt b/src/mac/hmac/info.txt index cdf2e67ab..26da83533 100644 --- a/src/mac/hmac/info.txt +++ b/src/mac/hmac/info.txt @@ -1,5 +1,3 @@ -realname "HMAC" - define HMAC load_on auto diff --git a/src/mac/info.txt b/src/mac/info.txt index 239eb633f..9a839d04d 100644 --- a/src/mac/info.txt +++ b/src/mac/info.txt @@ -1,5 +1,3 @@ -realname "Message Authentication Codes" - load_on auto diff --git a/src/mac/ssl3mac/info.txt b/src/mac/ssl3mac/info.txt index f8791169c..c4ef54629 100644 --- a/src/mac/ssl3mac/info.txt +++ b/src/mac/ssl3mac/info.txt @@ -1,5 +1,3 @@ -realname "SSLv3 MAC" - define SSL3_MAC load_on auto diff --git a/src/mac/x919_mac/info.txt b/src/mac/x919_mac/info.txt index f2ebd5b35..16955816c 100644 --- a/src/mac/x919_mac/info.txt +++ b/src/mac/x919_mac/info.txt @@ -1,5 +1,3 @@ -realname "ANSI X9.19 MAC" - define ANSI_X919_MAC load_on auto diff --git a/src/math/bigint/info.txt b/src/math/bigint/info.txt index 513703deb..30018b795 100644 --- a/src/math/bigint/info.txt +++ b/src/math/bigint/info.txt @@ -1,5 +1,3 @@ -realname "BigInt" - load_on auto define BIGINT diff --git a/src/math/bigint/monty_amd64/info.txt b/src/math/bigint/monty_amd64/info.txt index a897045b2..657cd0353 100644 --- a/src/math/bigint/monty_amd64/info.txt +++ b/src/math/bigint/monty_amd64/info.txt @@ -1,5 +1,3 @@ -realname "Montgomery Reduction (x86-64)" - mp_bits 64 load_on never diff --git a/src/math/bigint/monty_generic/info.txt b/src/math/bigint/monty_generic/info.txt index 6f5f0e722..c709229e6 100644 --- a/src/math/bigint/monty_generic/info.txt +++ b/src/math/bigint/monty_generic/info.txt @@ -1,5 +1,3 @@ -realname "Montgomery Reduction" - load_on dep diff --git a/src/math/bigint/mp_amd64/info.txt b/src/math/bigint/mp_amd64/info.txt index 84a5bcf53..a7da8806e 100644 --- a/src/math/bigint/mp_amd64/info.txt +++ b/src/math/bigint/mp_amd64/info.txt @@ -1,5 +1,3 @@ -realname "MPI Core (x86-64)" - mp_bits 64 load_on dep diff --git a/src/math/bigint/mp_asm64/info.txt b/src/math/bigint/mp_asm64/info.txt index 5c112c490..7bdbffb2c 100644 --- a/src/math/bigint/mp_asm64/info.txt +++ b/src/math/bigint/mp_asm64/info.txt @@ -1,5 +1,3 @@ -realname "MPI Core (Alpha/IA-64/MIPS64/PowerPC-64/SPARC64)" - mp_bits 64 load_on dep diff --git a/src/math/bigint/mp_generic/info.txt b/src/math/bigint/mp_generic/info.txt index 8bf75fec3..28f258ebb 100644 --- a/src/math/bigint/mp_generic/info.txt +++ b/src/math/bigint/mp_generic/info.txt @@ -1,5 +1,3 @@ -realname "MPI Core (C++)" - load_on dep diff --git a/src/math/bigint/mp_ia32/info.txt b/src/math/bigint/mp_ia32/info.txt index 51f98fda8..6e093a7e5 100644 --- a/src/math/bigint/mp_ia32/info.txt +++ b/src/math/bigint/mp_ia32/info.txt @@ -1,5 +1,3 @@ -realname "MPI Core (IA-32)" - mp_bits 32 load_on asm_ok diff --git a/src/math/bigint/mp_ia32_msvc/info.txt b/src/math/bigint/mp_ia32_msvc/info.txt index 9c7ac9b43..52839d89b 100644 --- a/src/math/bigint/mp_ia32_msvc/info.txt +++ b/src/math/bigint/mp_ia32_msvc/info.txt @@ -1,5 +1,3 @@ -realname "x86 MPI Assembler Core (MSVC)" - mp_bits 32 load_on dep diff --git a/src/math/bigint/mulop_amd64/info.txt b/src/math/bigint/mulop_amd64/info.txt index 77990df80..704e4dad8 100644 --- a/src/math/bigint/mulop_amd64/info.txt +++ b/src/math/bigint/mulop_amd64/info.txt @@ -1,5 +1,3 @@ -realname "BigInt Multiply-Add (x86-64)" - mp_bits 64 load_on never diff --git a/src/math/bigint/mulop_generic/info.txt b/src/math/bigint/mulop_generic/info.txt index 28ebe41eb..8fa2a40c9 100644 --- a/src/math/bigint/mulop_generic/info.txt +++ b/src/math/bigint/mulop_generic/info.txt @@ -1,5 +1,3 @@ -realname "BigInt Multiply-Add" - load_on dep diff --git a/src/math/bigint/mulop_ia32/info.txt b/src/math/bigint/mulop_ia32/info.txt index b995dd8d7..dd554773f 100644 --- a/src/math/bigint/mulop_ia32/info.txt +++ b/src/math/bigint/mulop_ia32/info.txt @@ -1,5 +1,3 @@ -realname "BigInt Multiply-Add (IA-32)" - mp_bits 32 # Out of date, still implements bigint_mul_add_words diff --git a/src/math/gfpmath/info.txt b/src/math/gfpmath/info.txt index 1a52144b7..abbdb0a47 100644 --- a/src/math/gfpmath/info.txt +++ b/src/math/gfpmath/info.txt @@ -1,5 +1,3 @@ -realname "GF(p) Math" - uses_tr1 yes load_on auto diff --git a/src/math/numbertheory/info.txt b/src/math/numbertheory/info.txt index 1595c7305..527f4fa29 100644 --- a/src/math/numbertheory/info.txt +++ b/src/math/numbertheory/info.txt @@ -1,5 +1,3 @@ -realname "Math Functions" - load_on auto define BIGINT_MATH diff --git a/src/modes/cbc/info.txt b/src/modes/cbc/info.txt index de81dcb8c..9b4be1b58 100644 --- a/src/modes/cbc/info.txt +++ b/src/modes/cbc/info.txt @@ -1,5 +1,3 @@ -realname "CBC block cipher mode" - define CBC load_on auto diff --git a/src/modes/cfb/info.txt b/src/modes/cfb/info.txt index d66df1ee7..b68afc7d0 100644 --- a/src/modes/cfb/info.txt +++ b/src/modes/cfb/info.txt @@ -1,5 +1,3 @@ -realname "CFB block cipher mode" - define CFB load_on auto @@ -12,4 +10,3 @@ cfb.h modes - diff --git a/src/modes/cts/info.txt b/src/modes/cts/info.txt index 9eb16add5..773254a30 100644 --- a/src/modes/cts/info.txt +++ b/src/modes/cts/info.txt @@ -1,5 +1,3 @@ -realname "CTS block cipher mode" - define CTS load_on auto diff --git a/src/modes/eax/info.txt b/src/modes/eax/info.txt index d1fc7e0e3..143944f03 100644 --- a/src/modes/eax/info.txt +++ b/src/modes/eax/info.txt @@ -1,5 +1,3 @@ -realname "EAX block cipher mode" - define EAX load_on auto diff --git a/src/modes/ecb/info.txt b/src/modes/ecb/info.txt index 06b7b4fd2..f5c831169 100644 --- a/src/modes/ecb/info.txt +++ b/src/modes/ecb/info.txt @@ -1,5 +1,3 @@ -realname "ECB block cipher mode" - define ECB load_on auto diff --git a/src/modes/info.txt b/src/modes/info.txt index e089e74a9..420233b46 100644 --- a/src/modes/info.txt +++ b/src/modes/info.txt @@ -1,5 +1,3 @@ -realname "Cipher Mode Base Class" - define CIPHER_MODEBASE load_on auto diff --git a/src/modes/mode_pad/info.txt b/src/modes/mode_pad/info.txt index f22cf7411..9629a7202 100644 --- a/src/modes/mode_pad/info.txt +++ b/src/modes/mode_pad/info.txt @@ -1,5 +1,3 @@ -realname "Cipher Mode Padding Method" - define CIPHER_MODE_PADDING load_on auto diff --git a/src/modes/xts/info.txt b/src/modes/xts/info.txt index 65c7df2f8..871bb987a 100644 --- a/src/modes/xts/info.txt +++ b/src/modes/xts/info.txt @@ -1,5 +1,3 @@ -realname "XTS block cipher mode" - define XTS load_on auto diff --git a/src/mutex/info.txt b/src/mutex/info.txt index ff79bf753..0f2836b64 100644 --- a/src/mutex/info.txt +++ b/src/mutex/info.txt @@ -1,5 +1,3 @@ -realname "Mutex Wrappers" - define MUTEX_WRAPPERS load_on auto diff --git a/src/mutex/noop_mutex/info.txt b/src/mutex/noop_mutex/info.txt index 1f49f5e1c..6025959c2 100644 --- a/src/mutex/noop_mutex/info.txt +++ b/src/mutex/noop_mutex/info.txt @@ -1,5 +1,3 @@ -realname "No-Op Mutex" - load_on auto define MUTEX_NOOP diff --git a/src/mutex/pthreads/info.txt b/src/mutex/pthreads/info.txt index f135dea48..7315c186a 100644 --- a/src/mutex/pthreads/info.txt +++ b/src/mutex/pthreads/info.txt @@ -1,5 +1,3 @@ -realname "Pthread Mutex" - define MUTEX_PTHREAD load_on auto diff --git a/src/mutex/qt_mutex/info.txt b/src/mutex/qt_mutex/info.txt index a21108c79..922c38ed1 100644 --- a/src/mutex/qt_mutex/info.txt +++ b/src/mutex/qt_mutex/info.txt @@ -1,5 +1,3 @@ -realname "Qt Mutex" - define MUTEX_QT note "You'll probably have to add -I/-L flags to the Makefile to find Qt" diff --git a/src/mutex/win32_crit_section/info.txt b/src/mutex/win32_crit_section/info.txt index a2d339c3b..ffa8a98e3 100644 --- a/src/mutex/win32_crit_section/info.txt +++ b/src/mutex/win32_crit_section/info.txt @@ -1,5 +1,3 @@ -realname "Win32 Mutex" - define MUTEX_WIN32 modset win32 diff --git a/src/pbe/info.txt b/src/pbe/info.txt index c4210b2a7..f58ed1da4 100644 --- a/src/pbe/info.txt +++ b/src/pbe/info.txt @@ -1,5 +1,3 @@ -realname "PBE Base" - load_on dep define PASSWORD_BASED_ENCRYPTION diff --git a/src/pbe/pbes1/info.txt b/src/pbe/pbes1/info.txt index 70c6baeee..5dcbf9510 100644 --- a/src/pbe/pbes1/info.txt +++ b/src/pbe/pbes1/info.txt @@ -1,5 +1,3 @@ -realname "PKCS5 v1.5 PBE" - define PBE_PKCS_V15 load_on auto diff --git a/src/pbe/pbes2/info.txt b/src/pbe/pbes2/info.txt index cd37b1e69..71fb6ea72 100644 --- a/src/pbe/pbes2/info.txt +++ b/src/pbe/pbes2/info.txt @@ -1,5 +1,3 @@ -realname "PKCS5 v2.0 PBE" - define PBE_PKCS_V20 load_on auto diff --git a/src/pk_pad/eme1/info.txt b/src/pk_pad/eme1/info.txt index 2f61265e2..794254e8e 100644 --- a/src/pk_pad/eme1/info.txt +++ b/src/pk_pad/eme1/info.txt @@ -1,5 +1,3 @@ -realname "EME1" - define EME1 load_on auto diff --git a/src/pk_pad/eme_pkcs/info.txt b/src/pk_pad/eme_pkcs/info.txt index 88d9caf17..95c568452 100644 --- a/src/pk_pad/eme_pkcs/info.txt +++ b/src/pk_pad/eme_pkcs/info.txt @@ -1,5 +1,3 @@ -realname "PKCSv1 v1.5 EME" - define EME_PKCS1v15 load_on auto diff --git a/src/pk_pad/emsa1/info.txt b/src/pk_pad/emsa1/info.txt index 086270b96..55832307b 100644 --- a/src/pk_pad/emsa1/info.txt +++ b/src/pk_pad/emsa1/info.txt @@ -1,5 +1,3 @@ -realname "EMSA1" - define EMSA1 load_on auto diff --git a/src/pk_pad/emsa1_bsi/info.txt b/src/pk_pad/emsa1_bsi/info.txt index 14a9fd396..5e8fe09ca 100644 --- a/src/pk_pad/emsa1_bsi/info.txt +++ b/src/pk_pad/emsa1_bsi/info.txt @@ -1,5 +1,3 @@ -realname "EMSA1 (BSI variant)" - define EMSA1_BSI load_on auto diff --git a/src/pk_pad/emsa2/info.txt b/src/pk_pad/emsa2/info.txt index 1c8161c5e..a6fff2a02 100644 --- a/src/pk_pad/emsa2/info.txt +++ b/src/pk_pad/emsa2/info.txt @@ -1,5 +1,3 @@ -realname "EMSA2" - define EMSA2 load_on auto diff --git a/src/pk_pad/emsa3/info.txt b/src/pk_pad/emsa3/info.txt index 90e4b9bfc..babd98711 100644 --- a/src/pk_pad/emsa3/info.txt +++ b/src/pk_pad/emsa3/info.txt @@ -1,5 +1,3 @@ -realname "EMSA3" - define EMSA3 load_on auto diff --git a/src/pk_pad/emsa4/info.txt b/src/pk_pad/emsa4/info.txt index 29ef4e0cf..ea1db30a1 100644 --- a/src/pk_pad/emsa4/info.txt +++ b/src/pk_pad/emsa4/info.txt @@ -1,5 +1,3 @@ -realname "EMSA4" - define EMSA4 load_on auto diff --git a/src/pk_pad/emsa_raw/info.txt b/src/pk_pad/emsa_raw/info.txt index 2a88d10fa..4bd850e11 100644 --- a/src/pk_pad/emsa_raw/info.txt +++ b/src/pk_pad/emsa_raw/info.txt @@ -1,5 +1,3 @@ -realname "EMSA-Raw" - define EMSA_RAW load_on auto diff --git a/src/pk_pad/hash_id/info.txt b/src/pk_pad/hash_id/info.txt index 935432588..af9f5cd4f 100644 --- a/src/pk_pad/hash_id/info.txt +++ b/src/pk_pad/hash_id/info.txt @@ -1,5 +1,3 @@ -realname "Hash Function Identifiers" - define HASH_ID load_on auto diff --git a/src/pk_pad/info.txt b/src/pk_pad/info.txt index c281b1563..14b05f458 100644 --- a/src/pk_pad/info.txt +++ b/src/pk_pad/info.txt @@ -1,5 +1,3 @@ -realname "Public Key EME/EMSA Padding Modes" - define PK_PADDING load_on auto diff --git a/src/pubkey/dh/info.txt b/src/pubkey/dh/info.txt index 33af9a8e5..8295a74f4 100644 --- a/src/pubkey/dh/info.txt +++ b/src/pubkey/dh/info.txt @@ -1,5 +1,3 @@ -realname "Diffie-Hellman Key Agreement" - define DIFFIE_HELLMAN load_on auto diff --git a/src/pubkey/dl_algo/info.txt b/src/pubkey/dl_algo/info.txt index 15a77516b..0ac91c887 100644 --- a/src/pubkey/dl_algo/info.txt +++ b/src/pubkey/dl_algo/info.txt @@ -1,5 +1,3 @@ -realname "Discrete Logarithm PK Algorithms" - define DL_PUBLIC_KEY_FAMILY load_on auto diff --git a/src/pubkey/dl_group/info.txt b/src/pubkey/dl_group/info.txt index 6b9884a4d..2e5273ac4 100644 --- a/src/pubkey/dl_group/info.txt +++ b/src/pubkey/dl_group/info.txt @@ -1,5 +1,3 @@ -realname "DL Group" - load_on auto define DL_GROUP diff --git a/src/pubkey/dlies/info.txt b/src/pubkey/dlies/info.txt index 5138aafc5..d3e950427 100644 --- a/src/pubkey/dlies/info.txt +++ b/src/pubkey/dlies/info.txt @@ -1,5 +1,3 @@ -realname "DLIES" - define DLIES load_on auto diff --git a/src/pubkey/dsa/info.txt b/src/pubkey/dsa/info.txt index c70e02d90..776a5da28 100644 --- a/src/pubkey/dsa/info.txt +++ b/src/pubkey/dsa/info.txt @@ -1,5 +1,3 @@ -realname "DSA" - define DSA load_on auto diff --git a/src/pubkey/ec_dompar/info.txt b/src/pubkey/ec_dompar/info.txt index 212783725..f32e4fc2f 100644 --- a/src/pubkey/ec_dompar/info.txt +++ b/src/pubkey/ec_dompar/info.txt @@ -1,5 +1,3 @@ -realname "ECC Domain Parameters" - define ECC_DOMAIN_PARAMATERS load_on auto diff --git a/src/pubkey/ecc_key/info.txt b/src/pubkey/ecc_key/info.txt index 2a3c9a3b2..f45533129 100644 --- a/src/pubkey/ecc_key/info.txt +++ b/src/pubkey/ecc_key/info.txt @@ -1,5 +1,3 @@ -realname "ECC Public Key" - define ECC_PUBLIC_KEY_CRYPTO load_on auto diff --git a/src/pubkey/ecdsa/info.txt b/src/pubkey/ecdsa/info.txt index 743440f8f..3da73dd34 100644 --- a/src/pubkey/ecdsa/info.txt +++ b/src/pubkey/ecdsa/info.txt @@ -1,5 +1,3 @@ -realname "ECDSA" - define ECDSA load_on auto diff --git a/src/pubkey/eckaeg/info.txt b/src/pubkey/eckaeg/info.txt index 6b78f7de5..3a9768df1 100644 --- a/src/pubkey/eckaeg/info.txt +++ b/src/pubkey/eckaeg/info.txt @@ -1,5 +1,3 @@ -realname "ECKAEG" - define ECKAEG load_on auto diff --git a/src/pubkey/elgamal/info.txt b/src/pubkey/elgamal/info.txt index d7ae614ea..8c55eb909 100644 --- a/src/pubkey/elgamal/info.txt +++ b/src/pubkey/elgamal/info.txt @@ -1,5 +1,3 @@ -realname "ElGamal" - define ELGAMAL load_on auto diff --git a/src/pubkey/if_algo/info.txt b/src/pubkey/if_algo/info.txt index d2142f42f..ec948aec3 100644 --- a/src/pubkey/if_algo/info.txt +++ b/src/pubkey/if_algo/info.txt @@ -1,5 +1,3 @@ -realname "Integer Factorization Algorithms" - define IF_PUBLIC_KEY_FAMILY load_on dep diff --git a/src/pubkey/info.txt b/src/pubkey/info.txt index 63af86c47..13cac9ca0 100644 --- a/src/pubkey/info.txt +++ b/src/pubkey/info.txt @@ -1,5 +1,3 @@ -realname "Public Key Base" - define PUBLIC_KEY_CRYPTO load_on auto diff --git a/src/pubkey/keypair/info.txt b/src/pubkey/keypair/info.txt index 9e758643f..360d317c5 100644 --- a/src/pubkey/keypair/info.txt +++ b/src/pubkey/keypair/info.txt @@ -1,5 +1,3 @@ -realname "Keypair Testing" - define KEYPAIR_TESTING load_on auto diff --git a/src/pubkey/nr/info.txt b/src/pubkey/nr/info.txt index c89820aeb..dcf22033e 100644 --- a/src/pubkey/nr/info.txt +++ b/src/pubkey/nr/info.txt @@ -1,5 +1,3 @@ -realname "Nyberg-Rueppel" - define NYBERG_RUEPPEL load_on auto diff --git a/src/pubkey/pk_codecs/info.txt b/src/pubkey/pk_codecs/info.txt index 96511a663..55c71b0c9 100644 --- a/src/pubkey/pk_codecs/info.txt +++ b/src/pubkey/pk_codecs/info.txt @@ -1,5 +1,3 @@ -realname "PK codecs (PKCS8, X.509)" - load_on auto diff --git a/src/pubkey/rsa/info.txt b/src/pubkey/rsa/info.txt index 7729fd83d..c8bde68d0 100644 --- a/src/pubkey/rsa/info.txt +++ b/src/pubkey/rsa/info.txt @@ -1,5 +1,3 @@ -realname "RSA" - define RSA load_on auto diff --git a/src/pubkey/rw/info.txt b/src/pubkey/rw/info.txt index ada6c37d6..39857bccc 100644 --- a/src/pubkey/rw/info.txt +++ b/src/pubkey/rw/info.txt @@ -1,5 +1,3 @@ -realname "Rabin-Williams" - define RW load_on auto diff --git a/src/rng/auto_rng/info.txt b/src/rng/auto_rng/info.txt index 7d5d5ddcc..d5abfc757 100644 --- a/src/rng/auto_rng/info.txt +++ b/src/rng/auto_rng/info.txt @@ -1,5 +1,3 @@ -realname "Auto-seeded Random Number Generator" - define AUTO_SEEDING_RNG load_on auto diff --git a/src/rng/hmac_rng/info.txt b/src/rng/hmac_rng/info.txt index 2c7f13e0a..f6135ee5a 100644 --- a/src/rng/hmac_rng/info.txt +++ b/src/rng/hmac_rng/info.txt @@ -1,5 +1,3 @@ -realname "HMAC RNG" - define HMAC_RNG load_on auto diff --git a/src/rng/info.txt b/src/rng/info.txt index 44a41665d..eea122cf9 100644 --- a/src/rng/info.txt +++ b/src/rng/info.txt @@ -1,5 +1,3 @@ -realname "Random Number Generators" - load_on auto diff --git a/src/rng/randpool/info.txt b/src/rng/randpool/info.txt index cc7f61552..cab276e15 100644 --- a/src/rng/randpool/info.txt +++ b/src/rng/randpool/info.txt @@ -1,5 +1,3 @@ -realname "Randpool RNG" - define RANDPOOL load_on auto diff --git a/src/rng/x931_rng/info.txt b/src/rng/x931_rng/info.txt index 633eb0268..35836b33b 100644 --- a/src/rng/x931_rng/info.txt +++ b/src/rng/x931_rng/info.txt @@ -1,5 +1,3 @@ -realname "ANSI X9.31 PRNG" - define X931_RNG load_on auto diff --git a/src/s2k/info.txt b/src/s2k/info.txt index e603fd937..17f2a8c42 100644 --- a/src/s2k/info.txt +++ b/src/s2k/info.txt @@ -1,5 +1,3 @@ -realname "String to Key Functions" - load_on auto diff --git a/src/s2k/pbkdf1/info.txt b/src/s2k/pbkdf1/info.txt index 4c5b27546..387043f1b 100644 --- a/src/s2k/pbkdf1/info.txt +++ b/src/s2k/pbkdf1/info.txt @@ -1,5 +1,3 @@ -realname "Pbkdf1" - define PBKDF1 load_on auto diff --git a/src/s2k/pbkdf2/info.txt b/src/s2k/pbkdf2/info.txt index 921aeb1ab..56359d13d 100644 --- a/src/s2k/pbkdf2/info.txt +++ b/src/s2k/pbkdf2/info.txt @@ -1,5 +1,3 @@ -realname "Pbkdf2" - define PBKDF2 load_on auto diff --git a/src/s2k/pgps2k/info.txt b/src/s2k/pgps2k/info.txt index 14b75a02b..a1f5b3dfd 100644 --- a/src/s2k/pgps2k/info.txt +++ b/src/s2k/pgps2k/info.txt @@ -1,5 +1,3 @@ -realname "Pgps2k" - define PGPS2K load_on auto diff --git a/src/selftest/info.txt b/src/selftest/info.txt index c4b61bb99..079fd5030 100644 --- a/src/selftest/info.txt +++ b/src/selftest/info.txt @@ -1,5 +1,3 @@ -realname "Selftests" - define SELFTESTS load_on auto diff --git a/src/stream/arc4/info.txt b/src/stream/arc4/info.txt index e4689cf69..bb373dbc5 100644 --- a/src/stream/arc4/info.txt +++ b/src/stream/arc4/info.txt @@ -1,5 +1,3 @@ -realname "ARC4" - define ARC4 load_on auto diff --git a/src/stream/ctr/info.txt b/src/stream/ctr/info.txt index 04d14518a..ac4f3f710 100644 --- a/src/stream/ctr/info.txt +++ b/src/stream/ctr/info.txt @@ -1,5 +1,3 @@ -realname "CTR mode" - define CTR_BE load_on auto @@ -13,4 +11,3 @@ ctr.h block stream - diff --git a/src/stream/info.txt b/src/stream/info.txt index f8f4b22d5..213c42137 100644 --- a/src/stream/info.txt +++ b/src/stream/info.txt @@ -1,5 +1,3 @@ -realname "Stream Ciphers" - load_on auto define STREAM_CIPHER diff --git a/src/stream/ofb/info.txt b/src/stream/ofb/info.txt index 444fe0ffe..a01e9e1a6 100644 --- a/src/stream/ofb/info.txt +++ b/src/stream/ofb/info.txt @@ -1,5 +1,3 @@ -realname "OFB block cipher mode" - define OFB load_on auto diff --git a/src/stream/salsa20/info.txt b/src/stream/salsa20/info.txt index db938307b..8171708b0 100644 --- a/src/stream/salsa20/info.txt +++ b/src/stream/salsa20/info.txt @@ -1,5 +1,3 @@ -realname "Salsa20" - define SALSA20 load_on auto diff --git a/src/stream/turing/info.txt b/src/stream/turing/info.txt index c251a0a30..dede0dd39 100644 --- a/src/stream/turing/info.txt +++ b/src/stream/turing/info.txt @@ -1,5 +1,3 @@ -realname "Turing" - define TURING load_on auto diff --git a/src/stream/wid_wake/info.txt b/src/stream/wid_wake/info.txt index 94416417e..6289e0369 100644 --- a/src/stream/wid_wake/info.txt +++ b/src/stream/wid_wake/info.txt @@ -1,5 +1,3 @@ -realname "WiderWake" - define WID_WAKE load_on auto diff --git a/src/sym_algo/info.txt b/src/sym_algo/info.txt index 03804a92d..fab46270e 100644 --- a/src/sym_algo/info.txt +++ b/src/sym_algo/info.txt @@ -1,5 +1,3 @@ -realname "Symmetric Algorithms" - load_on auto diff --git a/src/timer/cpu_counter/info.txt b/src/timer/cpu_counter/info.txt index 025663a84..d95e0fec5 100644 --- a/src/timer/cpu_counter/info.txt +++ b/src/timer/cpu_counter/info.txt @@ -1,5 +1,3 @@ -realname "Hardware Timer" - define TIMER_HARDWARE load_on asm_ok diff --git a/src/timer/gettimeofday/info.txt b/src/timer/gettimeofday/info.txt index a58e8088d..f8b65b4ba 100644 --- a/src/timer/gettimeofday/info.txt +++ b/src/timer/gettimeofday/info.txt @@ -1,5 +1,3 @@ -realname "Unix Timer" - define TIMER_UNIX load_on auto @@ -30,4 +28,3 @@ tru64 timer - diff --git a/src/timer/info.txt b/src/timer/info.txt index 6408dca45..1dff5ab6f 100644 --- a/src/timer/info.txt +++ b/src/timer/info.txt @@ -1,5 +1,3 @@ -realname "Timer Base Class" - define TIMER load_on auto diff --git a/src/timer/posix_rt/info.txt b/src/timer/posix_rt/info.txt index fa530ea1a..4b23a74fc 100644 --- a/src/timer/posix_rt/info.txt +++ b/src/timer/posix_rt/info.txt @@ -1,5 +1,3 @@ -realname "POSIX Timer" - define TIMER_POSIX load_on auto @@ -26,4 +24,3 @@ dragonfly timer - diff --git a/src/timer/win32_query_perf_ctr/info.txt b/src/timer/win32_query_perf_ctr/info.txt index 4bb1ddb34..d8611027a 100644 --- a/src/timer/win32_query_perf_ctr/info.txt +++ b/src/timer/win32_query_perf_ctr/info.txt @@ -1,5 +1,3 @@ -realname "Win32 Timer" - define TIMER_WIN32 modset win32 @@ -23,4 +21,3 @@ windows -> user32.lib timer - diff --git a/src/tss/info.txt b/src/tss/info.txt index af4e0b930..11cc471d2 100644 --- a/src/tss/info.txt +++ b/src/tss/info.txt @@ -1,5 +1,3 @@ -realname "Threshold Secret Sharing" - hash rng diff --git a/src/utils/asm_amd64/info.txt b/src/utils/asm_amd64/info.txt index 6fa4d1de5..a5588669c 100644 --- a/src/utils/asm_amd64/info.txt +++ b/src/utils/asm_amd64/info.txt @@ -1,5 +1,3 @@ -realname "Assembler Macros (x86-64)" - load_on dep diff --git a/src/utils/asm_ia32/info.txt b/src/utils/asm_ia32/info.txt index 8485d33b9..63b57e0f8 100644 --- a/src/utils/asm_ia32/info.txt +++ b/src/utils/asm_ia32/info.txt @@ -1,5 +1,3 @@ -realname "Assembler Macros (IA-32)" - load_on dep diff --git a/src/utils/buf_comp/info.txt b/src/utils/buf_comp/info.txt index bcbbc23e2..7aea580ce 100644 --- a/src/utils/buf_comp/info.txt +++ b/src/utils/buf_comp/info.txt @@ -1,5 +1,3 @@ -realname "Buffered Computation" - load_on auto diff --git a/src/utils/datastor/info.txt b/src/utils/datastor/info.txt index 8c38a3ac8..9c995adaf 100644 --- a/src/utils/datastor/info.txt +++ b/src/utils/datastor/info.txt @@ -1,5 +1,3 @@ -realname "Datastore" - load_on auto diff --git a/src/utils/info.txt b/src/utils/info.txt index 6380fd6c2..3d024fa09 100644 --- a/src/utils/info.txt +++ b/src/utils/info.txt @@ -1,5 +1,3 @@ -realname "Utility Functions" - define UTIL_FUNCTIONS load_on always -- cgit v1.2.3