One Logo Pool Ball
CryptoKit · IOS API REFERENCE

HPKE.Ciphersuite

struct · iOS 17.0+ · SDK 27.1

struct Ciphersuite

Cipher suites to use in hybrid public key encryption (HPKE). HPKE cipher suites identify the authenticated encryption with additional data (AEAD) algorithm for encrypting and decrypting messages, the key derivation function (KDF) for deriving the shared key, and the key encapsulation mechanism (KEM) for sharing the symmetric key. The sender and recipient of encrypted messages need to use the same cipher suite.

Members (9)

get · iOS 17.0+

P256_SHA256_AES_GCM_256

TypeScript
static get P256_SHA256_AES_GCM_256(): HPKE_Ciphersuite
Swift declaration
static let P256_SHA256_AES_GCM_256: HPKE.Ciphersuite

A cipher suite for HPKE that uses NIST P-256 elliptic curve key agreement, SHA-2 key derivation with a 256-bit digest, and the Advanced Encryption Standard cipher in Galois/Counter Mode with a key length of 256 bits.

get · iOS 17.0+

P384_SHA384_AES_GCM_256

TypeScript
static get P384_SHA384_AES_GCM_256(): HPKE_Ciphersuite
Swift declaration
static let P384_SHA384_AES_GCM_256: HPKE.Ciphersuite

A cipher suite that you use for HPKE using NIST P-384 elliptic curve key agreement, SHA-2 key derivation with a 384-bit digest, and the Advanced Encryption Standard cipher in Galois/Counter Mode with a key length of 256 bits.

get · iOS 17.0+

P521_SHA512_AES_GCM_256

TypeScript
static get P521_SHA512_AES_GCM_256(): HPKE_Ciphersuite
Swift declaration
static let P521_SHA512_AES_GCM_256: HPKE.Ciphersuite

A cipher suite for HPKE that uses NIST P-521 elliptic curve key agreement, SHA-2 key derivation with a 512-bit digest, and the Advanced Encryption Standard cipher in Galois/Counter Mode with a key length of 256 bits.

get · iOS 17.0+

Curve25519_SHA256_ChachaPoly

TypeScript
static get Curve25519_SHA256_ChachaPoly(): HPKE_Ciphersuite
Swift declaration
static let Curve25519_SHA256_ChachaPoly: HPKE.Ciphersuite

A cipher suite for HPKE that uses X25519 elliptic curve key agreement, SHA-2 key derivation with a 256-bit digest, and the ChaCha20 stream cipher with the Poly1305 message authentication code.

get · iOS 26.0+

XWingMLKEM768X25519_SHA256_AES_GCM_256

TypeScript
static get XWingMLKEM768X25519_SHA256_AES_GCM_256(): HPKE_Ciphersuite
Swift declaration
static let XWingMLKEM768X25519_SHA256_AES_GCM_256: HPKE.Ciphersuite

A cipher suite for HPKE that uses the X-Wing KEM (ML-KEM-768 with X25519), SHA-2 key derivation with a 256-bit digest, and the Advanced Encryption Standard cipher in Galois/Counter Mode with a key length of 256 bits.

get · iOS 17.0+

kdf

TypeScript
get kdf(): HPKE_KDF
Swift declaration
let kdf: HPKE.KDF

The key derivation function (KDF) for deriving the symmetric key.

init · iOS 17.0+

init

TypeScript
static init(kem: HPKE_KEM, kdf: HPKE_KDF, aead: HPKE_AEAD): HPKE_Ciphersuite
Swift declaration
init(kem: HPKE.KEM, kdf: HPKE.KDF, aead: HPKE.AEAD)

Creates an HPKE cipher suite. - Parameters: - kem: The key encapsulation mechanism for encapsulating the symmetric key. - kdf: The key derivation function for deriving the symmetric key. - aead: The authenticated encryption with additional data (AEAD) algorithm for encrypting and decrypting messages.

get · iOS 17.0+

kem

TypeScript
get kem(): HPKE_KEM
Swift declaration
let kem: HPKE.KEM

The key encapsulation mechanism (KEM) for encapsulating the symmetric key.

get · iOS 17.0+

aead

TypeScript
get aead(): HPKE_AEAD
Swift declaration
let aead: HPKE.AEAD

The authenticated encryption with additional data (AEAD) algorithm for encrypting and decrypting messages.

Skipped declarations

No declarations were skipped in this snapshot.

All CryptoKit types →