aboutsummaryrefslogtreecommitdiffstats
path: root/docs/development/custom-vectors/cast5.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/development/custom-vectors/cast5.rst')
-rw-r--r--docs/development/custom-vectors/cast5.rst31
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/development/custom-vectors/cast5.rst b/docs/development/custom-vectors/cast5.rst
new file mode 100644
index 00000000..bbe155c8
--- /dev/null
+++ b/docs/development/custom-vectors/cast5.rst
@@ -0,0 +1,31 @@
+CAST5 Vector Creation
+=====================
+
+This page documents the code that was used to generate the CAST5 CBC, CFB, and
+OFB test vectors as well as the code used to verify them against another
+implementation. For CAST5 the vectors were generated using OpenSSL and verified
+with Go.
+
+Creation
+--------
+
+``cryptography`` was modified to support CAST5 in CBC, CFB, and OFB modes. Then
+the following python script was run to generate the vector files.
+
+.. literalinclude:: /development/custom-vectors/cast5/generate_cast5.py
+ :linenos:
+ :lines: 7-16
+
+Full code: :download:`generate_cast5.py </development/custom-vectors/cast5/generate_cast5.py>`
+
+
+Verification
+------------
+
+The following go code was used to verify the vectors.
+
+.. literalinclude:: /development/custom-vectors/cast5/verify_cast5.go
+ :linenos:
+ :lines: 36-52
+
+Full code: :download:`verify_cast5.go </development/custom-vectors/cast5/verify_cast5.go>`