diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-10-16 16:55:40 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-10-16 16:55:40 -0700 |
commit | e761f8b33519104605b14cf8a24e9f68bd23b624 (patch) | |
tree | 672968fa7c23790bc9f5c9cd3c779adce09fae8c /docs/primitives | |
parent | 62ebc7e212a92a13c3836de5d129cb93f40a128d (diff) | |
parent | 169dee88faa7c46b5551b89cf97a1b30c0a1c6ea (diff) | |
download | cryptography-e761f8b33519104605b14cf8a24e9f68bd23b624.tar.gz cryptography-e761f8b33519104605b14cf8a24e9f68bd23b624.tar.bz2 cryptography-e761f8b33519104605b14cf8a24e9f68bd23b624.zip |
Merge branch 'master' into triple-des
Also moved most of the tests to the new format except for one which doesn't yet
have an obvious translation
Conflicts:
cryptography/primitives/block/ciphers.py
tests/primitives/test_nist.py
Diffstat (limited to 'docs/primitives')
-rw-r--r-- | docs/primitives/symmetric-encryption.rst | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst index ce3b13e8..77d97911 100644 --- a/docs/primitives/symmetric-encryption.rst +++ b/docs/primitives/symmetric-encryption.rst @@ -51,6 +51,15 @@ Ciphers :param bytes key: The secret key, either ``128``, ``192``, or ``256`` bits. This must be kept secret. +.. class:: cryptography.primitives.block.ciphers.Camellia(key) + + Camellia is a block cipher approved for use by CRYPTREC and ISO/IEC. + It is considered to have comparable security and performance to AES, but + is not as widely studied or deployed. + + :param bytes key: The secret key, either ``128``, ``192``, or ``256`` bits. + This must be kept secret. + Insecure Ciphers ---------------- @@ -86,3 +95,46 @@ Modes ``block_size`` of the cipher. Do not reuse an ``initialization_vector`` with a given ``key``. + +.. class:: cryptography.primitives.block.modes.OFB(initialization_vector) + + OFB (Output Feedback) is a mode of operation for block ciphers. It + transforms a block cipher into a stream cipher. + + :param bytes initialization_vector: Must be random bytes. They do not need + 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. Do not + reuse an ``initialization_vector`` with + a given ``key``. + +.. class:: cryptography.primitives.block.modes.CFB(initialization_vector) + + CFB (Cipher Feedback) is a mode of operation for block ciphers. It + transforms a block cipher into a stream cipher. + + :param bytes initialization_vector: Must be random bytes. They do not need + 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. Do not + reuse an ``initialization_vector`` with + a given ``key``. + + +Insecure Modes +-------------- + +.. warning:: + + These modes are insecure. New applications should never make use of them, + and existing applications should strongly consider migrating away. + + +.. class:: cryptography.primitives.block.modes.ECB() + + ECB (Electronic Code Book) is the simplest mode of operation for block + ciphers. Each block of data is encrypted in the same way. This means + identical plaintext blocks will always result in identical ciphertext + blocks, and thus result in information leakage |