-
Notifications
You must be signed in to change notification settings - Fork 27
Description
The encryption algorithms registered in RFC 9053 have fixed IV lengths defined for specific code points. From the current pycose.algorithms interfaces I don't think there is a way to introspect the algorithm objects to determine the correct IV lengths.
For example, with the hash algorithms I can inspect algo.hash_cls.digest_size to determine the hash output size in bytes.
It would be convenient if pycose.algorithms._EncAlg included an abstract interface to get IV length and derived classes like _AesGcm could define the specific length for registered algorithms.
Similar to this, it would be helpful if the base _EncAlg class defined the interface get_tag_length() so that a user could introspect and determine how much longer the AEAD ciphertext will be compared to the plaintext.