Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompositeDecrypt ¶
type CompositeDecrypt interface { // Decrypt operation: decrypts ciphertext representing a serialized EncryptedData (mainly extracted from a // JWE message) for a given recipient. It extracts the underlying secure material then executes key unwrapping of // the cek and the AEAD decrypt primitive. // returns resulting plaintext extracted from the serialized object. Decrypt(cipherText, additionalData []byte) ([]byte, error) }
CompositeDecrypt will decrypt a `ciphertext` representing a composite encryption with a protected cek for the recipient caller of this interface. In order to get the plaintext embedded, this type is configured with the recipient key type that will decrypt the embedded cek first. This type is used mainly for repudiation requests where the sender identity remains unknown using ECDH-ES key wrapping with an ephemeral sender key.
type CompositeEncrypt ¶
type CompositeEncrypt interface { // Encrypt operation: encrypts plaintext with aad represented as the list of recipient's corresponding public keys // Returns resulting EncryptedData wrapping ciphertext and the recipients protected keys or error if failed. Encrypt(plainText, aad []byte) ([]byte, error) }
CompositeEncrypt will encrypt a `plaintext` using AEAD primitive and ECDH-ES key wrapping by recipient It returns the resulting serialized JWE []byte. This type is used mainly for repudiation requests where the sender identity remains unknown to the recipient in a serialized EncryptedData envelope (used mainly to build JWE messages).