2025 System ServicesPrivacy & Security
WWDC25 · 20 min · System Services / Privacy & Security
Get ahead with quantum-secure cryptography
Learn how to protect your app’s sensitive user data from the emerging threat of quantum computing, and safeguard user privacy. We’ll explore different quantum attacks, their impact on existing cryptographic protocols, and how to defend against them using quantum-secure cryptography. You’ll learn how to use quantum-secure TLS to secure network data, and use CryptoKit’s quantum-secure APIs for securing application data.
Watch at developer.apple.com ↗Chapters
Code shown on screen · 1 snippet
HPKE code sample
let ciphersuite = HPKE.Ciphersuite.XWingMLKEM768X25519_SHA256_AES_GCM_256
// Recipient
let privateKey = try XWingMLKEM768X25519.PrivateKey.generate()
let publicKey = privateKey.publicKey
// Sender
var sender = try HPKE.Sender(recipientKey: publicKey, ciphersuite: ciphersuite, info: info)
let encapsulatedKey = sender.encapsulatedKey
// Recipient
var recipient = try HPKE.Recipient(privateKey: privateKey, ciphersuite: ciphersuite, info: info, encapsulatedKey: encapsulatedKey)
// Sender encrypts data
let ciphertext = try sender.seal(userData, authenticating: metadata)
// Recipient decrypts message
let decryptedData = try recipient.open(ciphertext, authenticating: metadata)
#expect(userData == decryptedData)