From 5af3043b9f8ab5fa2b2e4aa16bba0c00d044055a Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 22 Oct 2015 11:31:20 -0500 Subject: update a comment --- src/cryptography/hazmat/primitives/keywrap.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cryptography/hazmat/primitives/keywrap.py b/src/cryptography/hazmat/primitives/keywrap.py index 89925f3d..6e79ab6b 100644 --- a/src/cryptography/hazmat/primitives/keywrap.py +++ b/src/cryptography/hazmat/primitives/keywrap.py @@ -29,8 +29,9 @@ def aes_key_wrap(wrapping_key, key_to_wrap, backend): n = len(r) for j in range(6): for i in range(n): - # every encryption operation is a discrete 16 byte chunk so - # it is safe to reuse the encryptor for the entire operation + # every encryption operation is a discrete 16 byte chunk (because + # AES has a 128-bit block size) and since we're using ECB it is + # safe to reuse the encryptor for the entire operation b = encryptor.update(a + r[i]) # pack/unpack are safe as these are always 64-bit chunks a = struct.pack( -- cgit v1.2.3