summaryrefslogtreecommitdiffstats
path: root/cryptopp562/safer.h
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2024-10-21 11:09:00 -0400
committerMalfurious <m@lfurio.us>2024-10-24 06:41:41 -0400
commit5494fc310acf0aabb9d828451331e44483eb21c7 (patch)
tree77280a586d52470fca89b9ed73f5f1faaf7907c6 /cryptopp562/safer.h
parent428471d39fb8c205a9fad899c88c30a2cb7df685 (diff)
downloadcompass-5494fc310acf0aabb9d828451331e44483eb21c7.tar.gz
compass-5494fc310acf0aabb9d828451331e44483eb21c7.zip
Remove Crypto++ library
The tracked version of Crypto++ is going on 10 years old and doesn't always compile properly on modern tooling. This removes the entire subdirectory as well as references to files in the build script. Due to the number of files touched by this commit, I opt to add its replacement in the next commit. Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to '')
-rw-r--r--cryptopp562/safer.h86
1 files changed, 0 insertions, 86 deletions
diff --git a/cryptopp562/safer.h b/cryptopp562/safer.h
deleted file mode 100644
index f9a3c9e..0000000
--- a/cryptopp562/safer.h
+++ /dev/null
@@ -1,86 +0,0 @@
-#ifndef CRYPTOPP_SAFER_H
-#define CRYPTOPP_SAFER_H
-
-/** \file
-*/
-
-#include "seckey.h"
-#include "secblock.h"
-
-NAMESPACE_BEGIN(CryptoPP)
-
-/// base class, do not use directly
-class SAFER
-{
-public:
- class CRYPTOPP_NO_VTABLE Base : public BlockCipher
- {
- public:
- unsigned int OptimalDataAlignment() const {return 1;}
- void UncheckedSetKey(const byte *userkey, unsigned int length, const NameValuePairs &params);
-
- protected:
- virtual bool Strengthened() const =0;
-
- SecByteBlock keySchedule;
- static const byte exp_tab[256];
- static const byte log_tab[256];
- };
-
- class CRYPTOPP_NO_VTABLE Enc : public Base
- {
- public:
- void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
- };
-
- class CRYPTOPP_NO_VTABLE Dec : public Base
- {
- public:
- void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
- };
-};
-
-template <class BASE, class INFO, bool STR>
-class CRYPTOPP_NO_VTABLE SAFER_Impl : public BlockCipherImpl<INFO, BASE>
-{
-protected:
- bool Strengthened() const {return STR;}
-};
-
-//! _
-struct SAFER_K_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 8, 16, 8>, public VariableRounds<10, 1, 13>
-{
- static const char *StaticAlgorithmName() {return "SAFER-K";}
-};
-
-/// <a href="http://www.weidai.com/scan-mirror/cs.html#SAFER-K">SAFER-K</a>
-class SAFER_K : public SAFER_K_Info, public SAFER, public BlockCipherDocumentation
-{
-public:
- typedef BlockCipherFinal<ENCRYPTION, SAFER_Impl<Enc, SAFER_K_Info, false> > Encryption;
- typedef BlockCipherFinal<DECRYPTION, SAFER_Impl<Dec, SAFER_K_Info, false> > Decryption;
-};
-
-//! _
-struct SAFER_SK_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 8, 16, 8>, public VariableRounds<10, 1, 13>
-{
- static const char *StaticAlgorithmName() {return "SAFER-SK";}
-};
-
-/// <a href="http://www.weidai.com/scan-mirror/cs.html#SAFER-SK">SAFER-SK</a>
-class SAFER_SK : public SAFER_SK_Info, public SAFER, public BlockCipherDocumentation
-{
-public:
- typedef BlockCipherFinal<ENCRYPTION, SAFER_Impl<Enc, SAFER_SK_Info, true> > Encryption;
- typedef BlockCipherFinal<DECRYPTION, SAFER_Impl<Dec, SAFER_SK_Info, true> > Decryption;
-};
-
-typedef SAFER_K::Encryption SAFER_K_Encryption;
-typedef SAFER_K::Decryption SAFER_K_Decryption;
-
-typedef SAFER_SK::Encryption SAFER_SK_Encryption;
-typedef SAFER_SK::Decryption SAFER_SK_Decryption;
-
-NAMESPACE_END
-
-#endif