@@ -160,6 +160,8 @@ def apply(
160160 recipient_key : Optional [COSEKeyInterface ] = None ,
161161 salt : Optional [bytes ] = None ,
162162 context : Optional [Union [List [Any ], Dict [str , Any ]]] = None ,
163+ external_aad : bytes = b"" ,
164+ aad_context : str = "Enc_Recipient" ,
163165 ) -> COSEKeyInterface :
164166 """
165167 Applies a COSEKey as a material to prepare a MAC/encryption key with
@@ -179,6 +181,9 @@ def apply(
179181 salt (Optional[bytes]): A salt used for deriving a key.
180182 context (Optional[Union[List[Any], Dict[str, Any]]]): Context
181183 information structure.
184+ external_aad (bytes): External additional authenticated data for AEAD.
185+ aad_context (bytes): An additional authenticated data context to build
186+ an Enc_structure internally.
182187 Returns:
183188 COSEKeyInterface: A generated key or passed-throug key which is used
184189 as ``key`` parameter of COSE.encode_* functions.
@@ -233,7 +238,9 @@ def decrypt(
233238 key (COSEKeyInterface): The external key to be used for extracting the key.
234239 alg (Optional[int]): The algorithm of the key extracted.
235240 context (Optional[Union[List[Any], Dict[str, Any]]]): Context information structure.
236- external_aad (bytes): External additional authenticated data.
241+ external_aad (bytes): External additional authenticated data for AEAD.
242+ aad_context (bytes): An additional authenticated data context to build
243+ an Enc_structure internally.
237244 Returns:
238245 bytes: The decrypted plain text.
239246 Raises:
0 commit comments