mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
Remove EncryptBlockCipher
The test mode EncryptBlockCipher is not needed. datatest.cpp is versatile enough to handle variable block sizes under test mode Encrypt
This commit is contained in:
parent
3bee1f57cf
commit
0de44edde1
@ -82,6 +82,5 @@ NotVerify - signature/digest/MAC verification should not pass
|
||||
DeterministicSign - sign message using given seed, and the resulting
|
||||
signature should equal the given signature
|
||||
Encrypt - plaintext encrypts to ciphertext
|
||||
EncryptBlockSize - plaintext encrypts to ciphertext under a key and blocksize
|
||||
DecryptMatch - ciphertext decrypts to plaintext
|
||||
(more to come here)
|
||||
|
@ -363,7 +363,7 @@ void TestSymmetricCipher(TestData &v, const NameValuePairs &overrideParameters)
|
||||
TestDataNameValuePairs testDataPairs(v);
|
||||
CombinedNameValuePairs pairs(overrideParameters, testDataPairs);
|
||||
|
||||
if (test == "Encrypt" || test == "EncryptBlockSize" || test == "EncryptXorDigest" || test == "Resync" || test == "EncryptionMCT" || test == "DecryptionMCT")
|
||||
if (test == "Encrypt" || test == "EncryptXorDigest" || test == "Resync" || test == "EncryptionMCT" || test == "DecryptionMCT")
|
||||
{
|
||||
static member_ptr<SymmetricCipher> encryptor, decryptor;
|
||||
static std::string lastName;
|
||||
@ -375,9 +375,8 @@ void TestSymmetricCipher(TestData &v, const NameValuePairs &overrideParameters)
|
||||
lastName = name;
|
||||
}
|
||||
|
||||
int blockSize = 0;
|
||||
if (test == "EncryptBlockSize" && !pairs.GetValue(Name::BlockSize(), blockSize))
|
||||
SignalTestFailure();
|
||||
// Most block ciphers don't specify this. Kalyna and Threefish use it.
|
||||
int blockSize = pairs.GetIntValueWithDefault(Name::BlockSize(), 0);
|
||||
|
||||
ConstByteArrayParameter iv;
|
||||
if (pairs.GetValue(Name::IV(), iv) && iv.size() != encryptor->IVSize() && (int)iv.size() != blockSize)
|
||||
|
@ -135,6 +135,7 @@ void RegisterFactories2()
|
||||
RegisterSymmetricCipherDefaultFactories<ECB_Mode<SEED> >();
|
||||
RegisterSymmetricCipherDefaultFactories<CTR_Mode<SEED> >();
|
||||
RegisterSymmetricCipherDefaultFactories<ECB_Mode<Kalyna> >(); // Test Vectors
|
||||
RegisterSymmetricCipherDefaultFactories<CBC_Mode<Kalyna> >(); // Test Vectors
|
||||
RegisterSymmetricCipherDefaultFactories<CTR_Mode<Kalyna> >(); // Benchmarks
|
||||
|
||||
RegisterDefaultFactoryFor<KeyDerivationFunction, HKDF<SHA1> >();
|
||||
|
Loading…
Reference in New Issue
Block a user