Skip to contentSkip to conversation

TEST: Add KDF leading zero test

PATCH New Mat Martineau 1 participant 1 message Jun 13, 2017 Keys/keyrings

lore
Share & tools
lore
#0 lore raw

PATCH v2 4/6 TEST: Add KDF leading zero test

---
 tests/keyctl/dh_compute/valid/runtest.sh | 6 ++++++
 1 file changed, 6 insertions(+)
tests/keyctl/dh_compute/valid/runtest.sh +6 -0
index 6498eef..e0daba9 100644
@@ -171,6 +171,12 @@ marker "COMPUTE DERIVED KEY FROM DH SHARED SECRET (SHA-256)"
 echo -e -n $otherinfo | dh_compute_kdf_oi $privateid $primeid $xaid 16 "sha256"
 expect_multiline payload "$derived"
 
+xpcreate_key 01 user dh:leadingzero @s
+expect_keyid lzid
+
+marker "COMPUTE DERIVED KEY WITH LEADING ZEROS"
+echo -e -n $otherinfo | dh_compute_kdf_oi $privateid $primeid $lzid 16 "sha256"
+expect_payload payload "0066207b cdab1d64 bbf489b3 d6a0dadc"
 
 # SHA-224
 
Signature · 1 line
2.13.1