Skip to content

Commit af50c93

Browse files
authored
Merge pull request #29 from hyves42/fix_concatkdf_otherinfo
Fix otherInfo serialization according to RFC 7518
2 parents 948bec2 + ac477b8 commit af50c93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cryptojwt/jwe/jwe_ec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def ecdh_derive_key(key, epk, apu, apv, alg, dk_len):
3434
shared_key = key.exchange(ec.ECDH(), epk)
3535
# Derive the key
3636
# AlgorithmID || PartyUInfo || PartyVInfo || SuppPubInfo
37-
otherInfo = bytes(alg) + \
37+
otherInfo = struct.pack("!I", len(alg)) + bytes(alg) + \
3838
struct.pack("!I", len(apu)) + apu + \
3939
struct.pack("!I", len(apv)) + apv + \
4040
struct.pack("!I", dk_len)

0 commit comments

Comments
 (0)