-def vko_34102001(curve, prv, pubkey, ukm):
- """ Make Diffie-Hellman computation (34.10-2001, 34.11-94)
+def ukm_unmarshal(ukm):
+ """Unmarshal UKM value
+
+ :type ukm: little-endian bytes
+ :rtype: long
+ """
+ return bytes2long(ukm[::-1])
+
+
+def kek(curve, prv, pub, ukm):
+ key = curve.exp(prv, pub[0], pub[1])
+ key = curve.exp(curve.cofactor * ukm, key[0], key[1])
+ return pub_marshal(key)
+
+
+def kek_34102001(curve, prv, pub, ukm):
+ """Key agreement (34.10-2001, 34.11-94)