I looked at reviving my serpent port from libgcrypt. As a first step in testing it, it would help if Nettle had the same test vector as libgcrypt. Please consider this patch.
/Simon
2011-05-30 Simon Josefsson simon@josefsson.org
* testsuite/serpent-test.c (test_main): Add test vectors from libgcrypt.
--- serpent-test.c.~1.3.~ 2011-05-20 23:02:54.000000000 +0200 +++ serpent-test.c 2011-05-30 22:46:50.837183923 +0200 @@ -25,6 +25,26 @@ int test_main(void) { + /* From libgcrypt */ + test_cipher(&nettle_serpent128, + HL("0000000000000000 0000000000000000"), + HL("D29D576FCEA3A3A7 ED9099F29273D78E"), + H("B2288B968AE8B086 48D1CE9606FD992D")); + test_cipher(&nettle_serpent192, + HL("0000000000000000 0000000000000000 0000000000000000"), + HL("D29D576FCEABA3A7 ED9899F2927BD78E"), + H("130E353E1037C224 05E8FAEFB2C3C3E9")); + test_cipher(&nettle_serpent256, + HL("0000000000000000 0000000000000000" + "0000000000000000 0000000000000000"), + HL("D095576FCEA3E3A7 ED98D9F29073D78E"), + H("B90EE5862DE69168 F2BDD5125B45472B")); + test_cipher(&nettle_serpent256, + HL("0000000000000000 0000000000000000" + "0000000000000000 0000000000000000"), + HL("0000000001000000 0200000003000000"), + H("2061A42782BD52EC 691EC383B03BA77C")); + /* The first test for each key size from the ecb_vk.txt and ecb_vt.txt * files in the serpent package. */