diff options
author | Jack Lloyd <[email protected]> | 2017-12-31 10:43:35 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-31 10:43:35 -0500 |
commit | 9cbb2a31bce90e6da7a20b8e742deb314611e1fe (patch) | |
tree | 8c9b1a46522ddd5a58a29754e7c18ca1c5711a06 /src | |
parent | 042bad2f7a7f9e12b4ba6c91f8458875537b5a47 (diff) |
Fix Ed25519 tests
Due to an error in the test data they ended up being skipped at runtime.
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/data/pubkey/ed25519.vec | 7 | ||||
-rw-r--r-- | src/tests/test_ed25519.cpp | 7 |
2 files changed, 4 insertions, 10 deletions
diff --git a/src/tests/data/pubkey/ed25519.vec b/src/tests/data/pubkey/ed25519.vec index e85679b6d..87a9c8684 100644 --- a/src/tests/data/pubkey/ed25519.vec +++ b/src/tests/data/pubkey/ed25519.vec @@ -1,4 +1,4 @@ -[Ed25519] +[Pure] # From http://ed25519.cr.yp.to/python/sign.input @@ -3292,16 +3292,15 @@ Pubkey = 30b20fb320b00e77c4e0a8eb3730af3c0b1c5f5ed9ee2b0562707e4f55c4938b Msg = 606144b7d4f96bef7f112b6d41bcb500d2136c134ceda220e24d0f1524eca12c30f2b102c7f378d6bba259c5b4a5ef8ec9309d5c8da7e8d2ded3792aeeea2108f77d66b23045938ed64751f20d48326be2fb99628cfb1873d7dd27581c105ec13249a952a50784b8b34cb3b2c1a004fa8b628a0767fa9abf058d955df85d134a0fc7f4b7d7fb0c8d31bce345dd0a4282145afb2ff19751f2cc3a1caea242baaf538749bf388000e3dc1d739359dfebae64ae1e10fb6fc17cc9fb950535c2de129587a86859b7be36dfe9b6c1141b25e0915c8d4aa1cceae7046b3d7cfa940bc98d4d69fc5a30dde1dee42fb5272281bf8f8e7f3e1a04397fb4f3adefc57532ddbde36833a676e6f39c82aff6bf4832ec971e03be3829c02a203c82d9eb8c1630ee9693f45d26f5f51a3103ca64d468eceac1b29af4c42eb216d76ec8994836b4bec76489ca5070680c2c2eb457210a77c47fdcbf600172073a53f1453bb5c80439c882f0736de40637b4f5ab1f761ff355c6e9bd4abde7560d5fc113c830159a1b77c4e87bc2c69880a40c5805ecc8aaaf57575bccd8177fc6b83569233c0f5ca223ac4013ca106cac2854706aead714fa29f2860a5f9753268a3671d9f59cde6048cf0b8986050f7f549e4fd7557f2fc3fcdccddcefda586a64b3006e5825f27ca31687caf663bd90a05b1152d7c88d7f1051a9d791748651d888a6a12f22d6c8c3f78c2b86eaf5394b4ef7eefb89797b25e542dc93102d021a1d0bed6a7dcdd8102b8f0430a0bc21d904a3c9346c018343dd9937cb35250007a284825db08e9a11fee31cff7a314c48c42d8b314acc27822af03d1954c7cc8bf9ad4e9e98f4ad4efb355288daa8c90de9037e64a7861f5ee43ada9f0fccde34d0bcf50288550f700f215a7944a5380e2a8e3f04f2b4f5 Signature = d083333fb84e79c9b33e55e8192d571ffc8dc50745b6b5fdd8c44d92a63fd178c4e57c2ab3a1211c0ba2d39da30b06629d8d1cc1d9f2593263d524fa5a2ebc03 +[SHA-256] # From draft-koch-eddsa-for-openpgp-04 - -Hash = SHA-256 Privkey = 1a8b1ff05ded48e18bf50166c664ab023ea70003d78d9e41f5758a91d850f8d2 Pubkey = 3f098994bdd916ed4053197934e4a87c80733a1280d62f8010992e43ee3b2406 Msg = 4f70656e504750040016080006050255f95f9504ff0000000c Signature = 56f90cca98e2102637bd983fdb16c131dfd27ed82bf4dde5606e0d756aed3366d09c4fa11527f038e0f57f2201d82f2ea2c9033265fa6ceb489e854bae61b404 +[Pure] # Same test as above but with Msg replaced by the SHA-256 pre-hash -Hash = Pure Privkey = 1a8b1ff05ded48e18bf50166c664ab023ea70003d78d9e41f5758a91d850f8d2 Pubkey = 3f098994bdd916ed4053197934e4a87c80733a1280d62f8010992e43ee3b2406 Msg = f6220a3f757814f4c2176ffbb68b00249cd4ccdc059c4b34ad871f30b1740280 diff --git a/src/tests/test_ed25519.cpp b/src/tests/test_ed25519.cpp index df9d7928a..e052e9279 100644 --- a/src/tests/test_ed25519.cpp +++ b/src/tests/test_ed25519.cpp @@ -26,7 +26,7 @@ class Ed25519_Signature_Tests final : public PK_Signature_Generation_Test Ed25519_Signature_Tests() : PK_Signature_Generation_Test( "Ed25519", "pubkey/ed25519.vec", - "Privkey,Pubkey,Hash,Msg,Signature") {} + "Privkey,Pubkey,Msg,Signature") {} std::unique_ptr<Botan::Private_Key> load_private_key(const VarMap& vars) override { @@ -42,11 +42,6 @@ class Ed25519_Signature_Tests final : public PK_Signature_Generation_Test return std::unique_ptr<Botan::Private_Key>(key.release()); } - - std::string default_padding(const VarMap& vars) const override - { - return get_opt_str(vars, "Hash", "Pure"); - } }; class Ed25519_Curdle_Format_Tests final : public Test |