From f6c47e9eacdcd096b5d112d73b96f7e84f908f61 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 07:16:01 -0700 Subject: Started trying to document symmetric encryption --- docs/index.rst | 1 + docs/primitives/index.rst | 7 +++++++ docs/primitives/symmetric-encryption.rst | 22 ++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 docs/primitives/index.rst create mode 100644 docs/primitives/symmetric-encryption.rst (limited to 'docs') diff --git a/docs/index.rst b/docs/index.rst index 28975f30..1d8ffda6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -14,4 +14,5 @@ Contents: :maxdepth: 2 architecture + primitives/index community diff --git a/docs/primitives/index.rst b/docs/primitives/index.rst new file mode 100644 index 00000000..1066e30e --- /dev/null +++ b/docs/primitives/index.rst @@ -0,0 +1,7 @@ +Primitives +========== + +.. toctree:: + :maxdepth: 1 + + symmetric-encryption diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst new file mode 100644 index 00000000..acb5fc17 --- /dev/null +++ b/docs/primitives/symmetric-encryption.rst @@ -0,0 +1,22 @@ +Symmetric Encryption +==================== + +Symmetric encryption is a way to encrypt (hide the plaintext value) material +where the encrypter and decrypter both use the same key. + +Block ciphers +------------- + +Block ciphers work by encrypting content in chunks, often 64- or 128-bits. They +combine an underlying algorithm (such as AES), with a mode (such as CBC, CTR, +or GCM). A simple example of encrypting content with AES is: + +.. code-block:: pycon + + >>> from cryptography.primitives import BlockCipher, CBC + >>> from cryptography.primitives.aes import AES + >>> cipher = BlockCipher(AES(key), CBC(iv)) + >>> cipher.encrypt("my secret message") + cipher.finalize() + # The ciphertext + [...] + -- cgit v1.2.3 From 0ca7fdbd09184648939214ccdc83675b112e86c9 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 07:35:26 -0700 Subject: Begin to describe the methods --- docs/primitives/symmetric-encryption.rst | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index acb5fc17..cf92437a 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -20,3 +20,11 @@ or GCM). A simple example of encrypting content with AES is: # The ciphertext [...] +Here ``key`` is the encryption key (which must be kept secret), and ``iv`` is +the initialization vector (which should be random). Exactly what form these +values should take is described for each of the ciphers and modes. + +``encrypt()`` should be called repeatedly with additional plaintext, and it +will return the encrypted bytes, if there isn't enough data, it will buffer it +internally. ``finalize()`` should be called at the end, and will return +whatever data is left. -- cgit v1.2.3 From d96d10000fa28b395516b511d9a3ed73bbd2286e Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 07:37:26 -0700 Subject: Start stubbing out subheadings --- docs/primitives/symmetric-encryption.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index cf92437a..6aa7ed25 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -28,3 +28,15 @@ values should take is described for each of the ciphers and modes. will return the encrypted bytes, if there isn't enough data, it will buffer it internally. ``finalize()`` should be called at the end, and will return whatever data is left. + +Ciphers +~~~~~~~ + +AES ++++ + +Modes +~~~~~ + +CBC ++++ -- cgit v1.2.3 From e7869438c416104dbc8872abcf9ac48f5f0959db Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 07:39:26 -0700 Subject: Crypto is seriously hard --- docs/primitives/symmetric-encryption.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index 6aa7ed25..7081e014 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -21,7 +21,7 @@ or GCM). A simple example of encrypting content with AES is: [...] Here ``key`` is the encryption key (which must be kept secret), and ``iv`` is -the initialization vector (which should be random). Exactly what form these +the initialization vector (which must be random). Exactly what form these values should take is described for each of the ciphers and modes. ``encrypt()`` should be called repeatedly with additional plaintext, and it -- cgit v1.2.3 From 5ba2dfa1c03f7f923d99f0879e084aee373f6f34 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 11:04:44 -0700 Subject: Attempt to document AES --- docs/primitives/symmetric-encryption.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index 7081e014..750ab88d 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -32,8 +32,14 @@ whatever data is left. Ciphers ~~~~~~~ -AES -+++ +.. class:: cryptography.primitives.aes.AES(key) + + AES (Advanced encryption standard) is a block cipher standardized by NIST. + AES is both fast, and cryptographically strong. It is a good default + choice for encryption. + + :param bytes key: The secret key, either ``128``, ``192``, or ``256`` bits. + Modes ~~~~~ -- cgit v1.2.3 From 48ec9a30b0a9c5d0818625dab627a576b57797cf Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 11:13:46 -0700 Subject: Try to document CBC --- docs/primitives/symmetric-encryption.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index 750ab88d..4675ebfc 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -39,10 +39,17 @@ Ciphers choice for encryption. :param bytes key: The secret key, either ``128``, ``192``, or ``256`` bits. + This must be kept secret. Modes ~~~~~ -CBC -+++ +.. class:: cryptographically.primitives.CBC(initialization_vector) + + CBC (Cipher block chaining) is a mode of operation for block ciphers. It is + considered cryptographically strong. + + :param bytes initialization_vector: Must be random bytes. They do not need + to be kept secret (they can be included + in a transmitted message). -- cgit v1.2.3 From c651f76b500bc749efc720af91f2edd773e8b52f Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 11:17:56 -0700 Subject: Document how long iv should be --- docs/primitives/symmetric-encryption.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index 4675ebfc..c0b36084 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -52,4 +52,6 @@ Modes :param bytes initialization_vector: Must be random bytes. They do not need to be kept secret (they can be included - in a transmitted message). + in a transmitted message). Should be + the same number of bytes as the ``key`` + for the cipher. -- cgit v1.2.3 From 1c1bad6b334ed18e5b8bb5dd21d33730503e4227 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 11:27:47 -0700 Subject: Document that IVs should not be reused. --- docs/primitives/symmetric-encryption.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index c0b36084..be6ed2ba 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -55,3 +55,5 @@ Modes in a transmitted message). Should be the same number of bytes as the ``key`` for the cipher. + ``initialization_vectors`` should never + be reused across different messages. -- cgit v1.2.3 From a4f529e2dbbe5e30b77c1f41ea203012f49b064b Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 11:29:06 -0700 Subject: fix spelling errors, move module --- docs/primitives/symmetric-encryption.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index be6ed2ba..7c77f295 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -13,8 +13,8 @@ or GCM). A simple example of encrypting content with AES is: .. code-block:: pycon - >>> from cryptography.primitives import BlockCipher, CBC >>> from cryptography.primitives.aes import AES + >>> from cryptography.primitives.block import BlockCipher, CBC >>> cipher = BlockCipher(AES(key), CBC(iv)) >>> cipher.encrypt("my secret message") + cipher.finalize() # The ciphertext @@ -45,7 +45,7 @@ Ciphers Modes ~~~~~ -.. class:: cryptographically.primitives.CBC(initialization_vector) +.. class:: cryptography.primitives.block.CBC(initialization_vector) CBC (Cipher block chaining) is a mode of operation for block ciphers. It is considered cryptographically strong. -- cgit v1.2.3 From 1e3f81fe709067b94ddbabc23b16563ee6a44c68 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 11:31:43 -0700 Subject: All caps --- docs/primitives/symmetric-encryption.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index 7c77f295..182c9e46 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -34,7 +34,7 @@ Ciphers .. class:: cryptography.primitives.aes.AES(key) - AES (Advanced encryption standard) is a block cipher standardized by NIST. + AES (Advanced Encryption Standard) is a block cipher standardized by NIST. AES is both fast, and cryptographically strong. It is a good default choice for encryption. -- cgit v1.2.3 From c4a5f069c4e05e5f09faae3bbd676ef9051ca0fb Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 11:35:20 -0700 Subject: This is a lie --- docs/primitives/symmetric-encryption.rst | 2 -- 1 file changed, 2 deletions(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index 182c9e46..2b1816c9 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -55,5 +55,3 @@ Modes in a transmitted message). Should be the same number of bytes as the ``key`` for the cipher. - ``initialization_vectors`` should never - be reused across different messages. -- cgit v1.2.3 From a1b98f9ba3ce90d6f70a9c67e9d7c4eef7c960eb Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 11:37:25 -0700 Subject: Fix --- docs/primitives/symmetric-encryption.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index 2b1816c9..4e02907d 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -53,5 +53,5 @@ Modes :param bytes initialization_vector: Must be random bytes. They do not need to be kept secret (they can be included in a transmitted message). Should be - the same number of bytes as the ``key`` - for the cipher. + the same number of bytes as the + ``block_size`` of the cipher. -- cgit v1.2.3 From 4dd1c2701ae098325d7fdbebfcf721b1c5a51167 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 11:39:21 -0700 Subject: Move the modules around --- docs/primitives/symmetric-encryption.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index 4e02907d..f79bcacb 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -13,9 +13,8 @@ or GCM). A simple example of encrypting content with AES is: .. code-block:: pycon - >>> from cryptography.primitives.aes import AES - >>> from cryptography.primitives.block import BlockCipher, CBC - >>> cipher = BlockCipher(AES(key), CBC(iv)) + >>> from cryptography.primitives.block import BlockCipher, cipher, mode + >>> cipher = BlockCipher(cipher.AES(key), mode.CBC(iv)) >>> cipher.encrypt("my secret message") + cipher.finalize() # The ciphertext [...] @@ -32,7 +31,7 @@ whatever data is left. Ciphers ~~~~~~~ -.. class:: cryptography.primitives.aes.AES(key) +.. class:: cryptography.primitives.block.cipher.AES(key) AES (Advanced Encryption Standard) is a block cipher standardized by NIST. AES is both fast, and cryptographically strong. It is a good default @@ -45,7 +44,7 @@ Ciphers Modes ~~~~~ -.. class:: cryptography.primitives.block.CBC(initialization_vector) +.. class:: cryptography.primitives.block.mode.CBC(initialization_vector) CBC (Cipher block chaining) is a mode of operation for block ciphers. It is considered cryptographically strong. -- cgit v1.2.3 From 2dc2b861fac9fccb333f49e032245f8c83ad403a Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 11:58:04 -0700 Subject: more accurate --- docs/primitives/symmetric-encryption.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index f79bcacb..5d2177df 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -51,6 +51,8 @@ Modes :param bytes initialization_vector: Must be random bytes. They do not need to be kept secret (they can be included - in a transmitted message). Should be - the same number of bytes as the + in a transmitted message). Must be the + same number of bytes as the ``block_size`` of the cipher. + Initialization vectors should not be + reused with the same ``key``. -- cgit v1.2.3 From 6badd9b99b68cbd35f0e9b7d164c45b1696f08d3 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 14:59:53 -0700 Subject: New language --- docs/primitives/symmetric-encryption.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index 5d2177df..39a5a630 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -53,6 +53,6 @@ Modes to be kept secret (they can be included in a transmitted message). Must be the same number of bytes as the - ``block_size`` of the cipher. - Initialization vectors should not be - reused with the same ``key``. + ``block_size`` of the cipher. Do not + reuse an ``initialization_vector`` with + a given ``key``. -- cgit v1.2.3 From 65678d05febd580daf00b520dbf7ce943f47bb66 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 15:19:19 -0700 Subject: Document this as a class --- docs/primitives/symmetric-encryption.rst | 35 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index 39a5a630..d056290e 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -4,29 +4,28 @@ Symmetric Encryption Symmetric encryption is a way to encrypt (hide the plaintext value) material where the encrypter and decrypter both use the same key. -Block ciphers -------------- +.. class:: cryptography.primitives.block.BlockCipher(cipher, mode) -Block ciphers work by encrypting content in chunks, often 64- or 128-bits. They -combine an underlying algorithm (such as AES), with a mode (such as CBC, CTR, -or GCM). A simple example of encrypting content with AES is: + Block ciphers work by encrypting content in chunks, often 64- or 128-bits. + Theycombine an underlying algorithm (such as AES), with a mode (such as CBC, + CTR, or GCM). A simple example of encrypting content with AES is: -.. code-block:: pycon + .. code-block:: pycon - >>> from cryptography.primitives.block import BlockCipher, cipher, mode - >>> cipher = BlockCipher(cipher.AES(key), mode.CBC(iv)) - >>> cipher.encrypt("my secret message") + cipher.finalize() - # The ciphertext - [...] + >>> from cryptography.primitives.block import BlockCipher, cipher, mode + >>> cipher = BlockCipher(cipher.AES(key), mode.CBC(iv)) + >>> cipher.encrypt("my secret message") + cipher.finalize() + # The ciphertext + [...] -Here ``key`` is the encryption key (which must be kept secret), and ``iv`` is -the initialization vector (which must be random). Exactly what form these -values should take is described for each of the ciphers and modes. + Here ``key`` is the encryption key (which must be kept secret), and ``iv`` + is the initialization vector (which must be random). Exactly what form + these values should take is described for each of the ciphers and modes. -``encrypt()`` should be called repeatedly with additional plaintext, and it -will return the encrypted bytes, if there isn't enough data, it will buffer it -internally. ``finalize()`` should be called at the end, and will return -whatever data is left. + ``encrypt()`` should be called repeatedly with additional plaintext, and it + will return the encrypted bytes, if there isn't enough data, it will buffer + it internally. ``finalize()`` should be called at the end, and will return + whatever data is left. Ciphers ~~~~~~~ -- cgit v1.2.3 From e62aa40353e34dcbccd55cc8bf62e6453ca203c4 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 15:23:11 -0700 Subject: Describe the methods more explicitly --- docs/primitives/symmetric-encryption.rst | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index d056290e..7b67bee0 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -18,14 +18,17 @@ where the encrypter and decrypter both use the same key. # The ciphertext [...] - Here ``key`` is the encryption key (which must be kept secret), and ``iv`` - is the initialization vector (which must be random). Exactly what form - these values should take is described for each of the ciphers and modes. - - ``encrypt()`` should be called repeatedly with additional plaintext, and it - will return the encrypted bytes, if there isn't enough data, it will buffer - it internally. ``finalize()`` should be called at the end, and will return - whatever data is left. + :param cipher: One of the ciphers described below. + :param mode: One of the modes described below. + + .. method:: encrypt(plaintext) + + :param bytes plaintext: The text you wish to encrypt. + :return bytes: Returns the ciphertext that was added. + + .. method:: finalize() + + :return bytes: Returns the remainder of the ciphertext. Ciphers ~~~~~~~ -- cgit v1.2.3 From 09515f00076fa9cc709183d3e15393a9ce579974 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 15:26:55 -0700 Subject: Descriptive text --- docs/primitives/symmetric-encryption.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index 7b67bee0..fb1a7cfc 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -21,6 +21,9 @@ where the encrypter and decrypter both use the same key. :param cipher: One of the ciphers described below. :param mode: One of the modes described below. + ``encrypt()`` should be called repeatedly with new plaintext, and once the + full plaintext is fed in, ``finalize()`` should be called. + .. method:: encrypt(plaintext) :param bytes plaintext: The text you wish to encrypt. -- cgit v1.2.3 From c2ae2be66ccbdb5ddb9c103ea922679f5b4a7925 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 15:28:48 -0700 Subject: This is where padding goes --- docs/primitives/symmetric-encryption.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index fb1a7cfc..08724a01 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -49,7 +49,7 @@ Ciphers Modes ~~~~~ -.. class:: cryptography.primitives.block.mode.CBC(initialization_vector) +.. class:: cryptography.primitives.block.mode.CBC(initialization_vector, padding) CBC (Cipher block chaining) is a mode of operation for block ciphers. It is considered cryptographically strong. @@ -61,3 +61,7 @@ Modes ``block_size`` of the cipher. Do not reuse an ``initialization_vector`` with a given ``key``. + :param padding: One of the paddings described below. + +Paddings +~~~~~~~~ -- cgit v1.2.3 From 51758ff8f09a054af9300ce96c6ec119ff92df4d Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 15:30:56 -0700 Subject: A padding example --- docs/primitives/symmetric-encryption.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index 08724a01..779f087a 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -12,8 +12,8 @@ where the encrypter and decrypter both use the same key. .. code-block:: pycon - >>> from cryptography.primitives.block import BlockCipher, cipher, mode - >>> cipher = BlockCipher(cipher.AES(key), mode.CBC(iv)) + >>> from cryptography.primitives.block import BlockCipher, cipher, mode, padding + >>> cipher = BlockCipher(cipher.AES(key), mode.CBC(iv, padding.PKCS7())) >>> cipher.encrypt("my secret message") + cipher.finalize() # The ciphertext [...] @@ -65,3 +65,5 @@ Modes Paddings ~~~~~~~~ + +.. class:: cryptography.primitives.block.padding.PKCS7() -- cgit v1.2.3 From b12f76e1a38b8506f8d9884b9928b1cbce6d1509 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 8 Aug 2013 19:05:18 -0700 Subject: Typo fix --- docs/primitives/symmetric-encryption.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index 779f087a..fe074f3e 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -7,8 +7,8 @@ where the encrypter and decrypter both use the same key. .. class:: cryptography.primitives.block.BlockCipher(cipher, mode) Block ciphers work by encrypting content in chunks, often 64- or 128-bits. - Theycombine an underlying algorithm (such as AES), with a mode (such as CBC, - CTR, or GCM). A simple example of encrypting content with AES is: + They combine an underlying algorithm (such as AES), with a mode (such as + CBC, CTR, or GCM). A simple example of encrypting content with AES is: .. code-block:: pycon -- cgit v1.2.3