handle new FIPS test vector format
parent
b040459503
commit
ce5e051e42
|
|
@ -746,13 +746,11 @@ protected:
|
||||||
|
|
||||||
if (m_algorithm == "RNG")
|
if (m_algorithm == "RNG")
|
||||||
{
|
{
|
||||||
key.resize(16);
|
key.resize(24);
|
||||||
HexDecoder hexDec(new ArraySink(key, key.size()));
|
StringSource(m_data["Key1"] + m_data["Key2"] + m_data["Key3"], true, new HexDecoder(new ArraySink(key, key.size())));
|
||||||
StringSource(m_data["Key1"], true, new Redirector(hexDec));
|
|
||||||
StringSource(m_data["Key2"], true, new Redirector(hexDec));
|
|
||||||
|
|
||||||
SecByteBlock seed(m_data2[INPUT]), dt(m_data2[IV]), r(8);
|
SecByteBlock seed(m_data2[INPUT]), dt(m_data2[IV]), r(8);
|
||||||
X917RNG rng(new DES_EDE2::Encryption(key), seed, dt);
|
X917RNG rng(new DES_EDE3::Encryption(key, key.size()), seed, dt);
|
||||||
|
|
||||||
if (m_test == "MCT")
|
if (m_test == "MCT")
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue