Expand description
Pure-Rust JWE compact serialization (RFC 7516) for the algorithms used by Webex KMS.
Supported algorithms:
- RSA-OAEP + A256GCM (encrypt only — initial ECDH handshake)
- A256KW + A256GCM (encrypt + decrypt — key retrieval, message decryption)
- ECDH-ES + A256GCM (decrypt only — ECDH handshake response)
- ECDH-ES+A256KW + A256GCM (decrypt only — ECDH handshake response variant)
Enums§
- JweKey
- Key types for JWE decryption.
Functions§
- decrypt_
a256kw_ a256gcm - Decrypt a JWE compact serialization token using A256KW + A256GCM.
- decrypt_
dir_ a256gcm - Decrypt a JWE compact serialization token using dir + A256GCM (direct key).
- decrypt_
ecdh_ es - Decrypt a JWE compact serialization token encrypted with ECDH-ES (or ECDH-ES+A256KW).
- decrypt_
jwe - Generic JWE decryption that auto-detects the algorithm from the header.
- decrypt_
message_ jwe - Decrypt a JWE message, auto-detecting “dir” vs “A256KW” from the header.
- encrypt_
a256kw_ a256gcm - Encrypt plaintext using A256KW + A256GCM and return JWE compact serialization.
- encrypt_
dir_ a256gcm - Encrypt plaintext using dir + A256GCM (direct encryption — key is CEK).
- encrypt_
rsa_ oaep_ a256gcm - Encrypt plaintext using RSA-OAEP + A256GCM and return JWE compact serialization.
- unwrap_
kms_ response - Unwrap a KMS response — may be JWE (encrypted, 5 parts) or JWS (signed, 3 parts). For JWS, the payload is extracted directly (arrives over authenticated Mercury channel).