Post

Replies

Boosts

Views

Activity

Reply to Can CryptoKit ECDH Public Keys be identity keys?
A heads up: as far as I can tell, this may not be true. Based on someone else's report that their experiment seemed to conclude that CryptoKit wasn't validating points, I also did an experiment. I indeed seem to be able to create a PublicKey using the DER representation of what I believe is the point at infinity. The following test fails using CryptoKit: XCTAssertThrowsError(try P256.KeyAgreement.PublicKey(derRepresentation: Data(base64Encoded: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==")!)) The same test succeeds using Swift Crypto.
Topic: Privacy & Security SubTopic: General Tags:
Feb ’23
Reply to Can CryptoKit ECDH Public Keys be identity keys?
A heads up: as far as I can tell, this may not be true. Based on someone else's report that their experiment seemed to conclude that CryptoKit wasn't validating points, I also did an experiment. I indeed seem to be able to create a PublicKey using the DER representation of what I believe is the point at infinity. The following test fails using CryptoKit: XCTAssertThrowsError(try P256.KeyAgreement.PublicKey(derRepresentation: Data(base64Encoded: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==")!)) The same test succeeds using Swift Crypto.
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’23