aboutsummaryrefslogtreecommitdiffstats
path: root/docs/fernet.rst
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-01-23 16:24:13 -0600
committerAlex Gaynor <alex.gaynor@gmail.com>2014-01-23 16:24:13 -0600
commitb32b491a9d976165a1b8ca8565a272ce46fc2730 (patch)
treefd97253209bec719bfb44b12b47c37793833adeb /docs/fernet.rst
parent56f81ea267be5339c6d17e19f68a1e8592e52582 (diff)
downloadcryptography-b32b491a9d976165a1b8ca8565a272ce46fc2730.tar.gz
cryptography-b32b491a9d976165a1b8ca8565a272ce46fc2730.tar.bz2
cryptography-b32b491a9d976165a1b8ca8565a272ce46fc2730.zip
DOcument the primitives used in Fernet
Diffstat (limited to 'docs/fernet.rst')
-rw-r--r--docs/fernet.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/fernet.rst b/docs/fernet.rst
index 13295c0c..b0215e32 100644
--- a/docs/fernet.rst
+++ b/docs/fernet.rst
@@ -72,5 +72,22 @@ symmetric (also known as "secret key") authenticated cryptography.
See :meth:`Fernet.decrypt` for more information.
+Implementation
+--------------
+
+Fernet is built on top of a number of standard cryptographic primitives.
+Specifically it uses:
+
+* :class:`~cryptography.hazmat.primitives.ciphers.algorithms.AES` in
+ :class:`~cryptography.hazmat.primitives.ciphers.modes.CBC` mode with a
+ 128-bit key for encryption; using
+ :class:`~cryptography.hazmat.primitives.ciphers.PKCS7` padding.
+* :class:`~cryptography.hazmat.primitives.hmac.HMAC` using
+ :class:`~cryptography.hazmat.primitives.hashes.SHA256` for authentication.
+* Initialization vectors are generated using ``os.urandom()``.
+
+For complete details consult the `specification`_.
+
.. _`Fernet`: https://github.com/fernet/spec/
+.. _`specification`: https://github.com/fernet/spec/blob/master/Spec.md