Ensure P256 derived field length

This commit is contained in:
Leon Böttger authored and Leon Böttger committed 2026-03-16 21:26:20 +01:00
1 parent f244572508
commit bd93961c59
3 files changed
+5 -21

No files matched your search

@@ -628,7 +628,7 @@ public class NearbyConnectionManager: NSObject, NetServiceDelegate, InboundNearb
var keyData = Data()
keyData.append(contentsOf: [0, 0, 2])
keyData.append(Data(pubKey.w.x.asSignedBytes()).suffixOfAtMost(numBytes: 32))
keyData.append(Data(pubKey.w.x.asSignedBytes()).ensureLength(length: 32))
let ikm = SymmetricKey(data: keyData)