diff options
-rw-r--r-- | src/tests/data/pbkdf/pbkdf1.vec | 5 | ||||
-rw-r--r-- | src/tests/data/pbkdf/pbkdf2.vec | 14 | ||||
-rw-r--r-- | src/tests/test_pbkdf.cpp | 4 |
3 files changed, 2 insertions, 21 deletions
diff --git a/src/tests/data/pbkdf/pbkdf1.vec b/src/tests/data/pbkdf/pbkdf1.vec index a0eeba6e5..ca5e70605 100644 --- a/src/tests/data/pbkdf/pbkdf1.vec +++ b/src/tests/data/pbkdf/pbkdf1.vec @@ -2,30 +2,25 @@ Salt = 40AC5837560251C275AF5E30A6A3074E57CED38E Iterations = 6 Passphrase = ftlkfbxdtbjbvllvbwiw -OutputLen = 19 Output = 768B277DC970F912DBDD3EDAD48AD2F065D25D Salt = 7008A9DC1B9A81470A2360275C19DAB77F716824 Iterations = 6 Passphrase = xnsosmkvhggzspcncpoc -OutputLen = 20 Output = 4D90E846A4B6AAA02AC548014A00E97E506B2AFB Salt = CCFC44C09339040E55D3F7F76CA6EF838FDE928717241DEB9AC1A4EF45A27711 Iterations = 2001 Passphrase = otilqwlukqts -OutputLen = 20 Output = 71ED1A995E693EFCD33155935E800037DA74EA28 Salt = 8108883FC04A01FEB10661651516425DAD1C93E0 Iterations = 10000 Passphrase = kzneqfflbtvsthnfctaf -OutputLen = 14 Output = F345FB8FBD880206B650266661F6 Salt = BC8BC53D4604977C3ADB1D19C15E87B77A84C2F6 Iterations = 10000 Passphrase = qkxhlqpemxhykmyucjbo -OutputLen = 14 Output = 2D54DFED0C7EF7D20B0945BA414A diff --git a/src/tests/data/pbkdf/pbkdf2.vec b/src/tests/data/pbkdf/pbkdf2.vec index c8a5356be..d4af333b8 100644 --- a/src/tests/data/pbkdf/pbkdf2.vec +++ b/src/tests/data/pbkdf/pbkdf2.vec @@ -2,87 +2,73 @@ Salt = 0001020304050607 Iterations = 10000 Passphrase = -OutputLen = 32 Output = 59B2B1143B4CB1059EC58D9722FB1C72471E0D85C6F7543BA5228526375B0127 Salt = 9B56E55328A4C97A250738F8DBA1B992E8A1B508 Iterations = 10000 Passphrase = jyueqgxrscgglpxdykcf -OutputLen = 14 Output = DF6D9D72872404BF73E708CF3B7D Salt = 57487813CDD2220DFC485D932A2979EE8769EA8B Iterations = 101 Passphrase = aqrqsznzvvzgtksammgo -OutputLen = 40 Output = FA13F40AF1ADE2A30F2FFFD66FC8A659EF95E6388C1682FC0FE4D15A70109517A32942E39C371440 Salt = ED1F39A0A7F3889AAF7E60743B3BC1CC2C738E60 Iterations = 1000 Passphrase = ltexmfeyylmlbrsyikaw -OutputLen = 10 Output = 027AFADD48F4BE8DCC4F Salt = 94AC88200743FB0F6AC51BE62166CBEF08D94C15 Iterations = 1 Passphrase = cxgnyrcgrvllylolsjpo -OutputLen = 32 Output = 7C0D009FC91B48CB6D19BAFBFCCFF3E2CCABFE725EAA234E56BDE1D551C132F2 Salt = 24A1A50B17D63EE8394B69FC70887F4F94883D68 Iterations = 5 Passphrase = xqyfhrxehiedlhewnvbj -OutputLen = 32 Output = 4661301D3517CA4443A6A607B32B2A63F69996299DF75DB75F1E0B98DD0EB7D8 Salt = 9316C80801623CC2734AF74BEC42CF4DBAA3F6D5 Iterations = 100 Passphrase = andaqkpjwabvcfnpnjkl -OutputLen = 30 Output = 82FB44A521448D5AAC94B5158EAD1E4DCD7363081A747B9F7626752BDA2D Salt = 612CC61DF3CF2BDB36E10C4D8C9D73192BDDEE05 Iterations = 100 Passphrase = hsavvyvocloyuztlsniu -OutputLen = 30 Output = F8EC2B0AC817896AC8189D787C6424ED24A6D881436687A4629802C0ECCE Salt = 45248F9D0CEBCB86A18243E76C972A1F3B36772A Iterations = 100 Passphrase = eaimrbzpcopbusaqtkmw -OutputLen = 34 Output = C9A0B2622F13916036E29E7462E206E8BA5B50CE9212752EB8EA2A4AA7B40A4CC1BF Salt = A39B76C6EEC8374A11493AD08C246A3E40DFAE5064F4EE3489C273646178 Iterations = 1000 Passphrase = gwrxpqxumsdsmbmhfhmfdcvlcvngzkig -OutputLen = 64 Output = 4C9DB7BA24955225D5B845F65EF24EF1B0C6E86F2E39C8DDAA4B8ABD26082D1F350381FADEAEB560DC447AFC68A6B47E6EA1E7412F6CF7B2D82342FCCD11D3B4 [PBKDF2(HMAC(SHA-256))] Salt = 0001020304050607 Iterations = 10000 Passphrase = xyz -OutputLen = 48 Output = DEFD2987FA26A4672F4D16D98398432AD95E896BF619F6A6B8D4ED1FAF98E8B531B39FFB66966D0E115A6CD8E70B72D0 [PBKDF2(HMAC(SHA-384))] Salt = 0001020304050607 Iterations = 10000 Passphrase = xyz -OutputLen = 48 Output = 47A3AE920B24EDAA2BB53155808554B13FAB58DF62B81F043D9812E9F2881164DF20BBFFA54E5EE2489FA183B6718A74 [PBKDF2(HMAC(SHA-512))] Salt = 0001020304050607 Iterations = 10000 Passphrase = xyz -OutputLen = 48 Output = DAF8A734327745EB63D19054DBD4018A682CEF11086A1BFB63FDBC16158C2F8B0742802F36AEF1B1DF92ACCBEA5D31A5 [PBKDF2(CMAC(Blowfish))] Salt = 24A1A50B17D63EE8394B69FC70887F4F94883D68 Iterations = 5 Passphrase = xqyfhrxehiedlhewnvbj -OutputLen = 32 Output = 43734BADB91F5D89DB20B469CD2EF376CAABC226EE3952872050428EFB5E3026 diff --git a/src/tests/test_pbkdf.cpp b/src/tests/test_pbkdf.cpp index 88d45e8f6..0e780437b 100644 --- a/src/tests/test_pbkdf.cpp +++ b/src/tests/test_pbkdf.cpp @@ -32,7 +32,7 @@ namespace { class PBKDF_KAT_Tests final : public Text_Based_Test { public: - PBKDF_KAT_Tests() : Text_Based_Test("pbkdf", "Iterations,Salt,Passphrase,Output", "OutputLen") {} + PBKDF_KAT_Tests() : Text_Based_Test("pbkdf", "Iterations,Salt,Passphrase,Output") {} Test::Result run_one_test(const std::string& pbkdf_name, const VarMap& vars) override { @@ -40,7 +40,7 @@ class PBKDF_KAT_Tests final : public Text_Based_Test const std::vector<uint8_t> salt = vars.get_req_bin("Salt"); const std::string passphrase = vars.get_req_str("Passphrase"); const std::vector<uint8_t> expected = vars.get_req_bin("Output"); - const size_t outlen = vars.get_opt_sz("OutputLen", expected.size()); + const size_t outlen = expected.size(); Test::Result result(pbkdf_name); std::unique_ptr<Botan::PBKDF> pbkdf(Botan::PBKDF::create(pbkdf_name)); |