diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2018-07-15 09:15:16 +0530 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2018-07-14 23:45:16 -0400 |
commit | bb23c6c7cbb3f62f1b1b2480f9dc07c6beba3398 (patch) | |
tree | 9e4fe9cecf15bd625558fcf32614ea3fbca5bbc8 /docs/hazmat | |
parent | 33db1c83b7ccb18e3319dedb5c7eb38edb74d8ab (diff) | |
download | cryptography-bb23c6c7cbb3f62f1b1b2480f9dc07c6beba3398.tar.gz cryptography-bb23c6c7cbb3f62f1b1b2480f9dc07c6beba3398.tar.bz2 cryptography-bb23c6c7cbb3f62f1b1b2480f9dc07c6beba3398.zip |
document one shot AEAD length restrictions (#4322)
* document one shot AEAD length restrictions
* write a test that won't consume infinity ram
continue to raise OverflowError since that's what cffi did.
* this applies to associated_data too
* remove unneeded arg
* review feedback on docs
Diffstat (limited to 'docs/hazmat')
-rw-r--r-- | docs/hazmat/primitives/aead.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/aead.rst b/docs/hazmat/primitives/aead.rst index ee4214a1..a54cc6fa 100644 --- a/docs/hazmat/primitives/aead.rst +++ b/docs/hazmat/primitives/aead.rst @@ -60,6 +60,8 @@ also support providing integrity for associated data which is not encrypted. authenticated with the key, but does not need to be encrypted. Can be ``None``. :returns bytes: The ciphertext bytes with the 16 byte tag appended. + :raises OverflowError: If ``data`` or ``associated_data`` is larger + than 2\ :sup:`32` bytes. .. method:: decrypt(nonce, data, associated_data) @@ -128,6 +130,8 @@ also support providing integrity for associated data which is not encrypted. :param bytes associated_data: Additional data that should be authenticated with the key, but is not encrypted. Can be ``None``. :returns bytes: The ciphertext bytes with the 16 byte tag appended. + :raises OverflowError: If ``data`` or ``associated_data`` is larger + than 2\ :sup:`32` bytes. .. method:: decrypt(nonce, data, associated_data) @@ -212,6 +216,8 @@ also support providing integrity for associated data which is not encrypted. :param bytes associated_data: Additional data that should be authenticated with the key, but is not encrypted. Can be ``None``. :returns bytes: The ciphertext bytes with the tag appended. + :raises OverflowError: If ``data`` or ``associated_data`` is larger + than 2\ :sup:`32` bytes. .. method:: decrypt(nonce, data, associated_data) |