aboutsummaryrefslogtreecommitdiffstats
path: root/docs/development/custom-vectors/cast5.rst
blob: 98c5ba75ec306304bbdb8b29416da3576eea17ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
CAST5 vector creation
=====================

This page documents the code that was used to generate the CAST5 CBC, CFB, OFB,
and CTR test vectors as well as the code used to verify them against another
implementation. For CAST5 the CBC, CFB, and OFB vectors were generated using
OpenSSL and the CTR vectors were generated using Apple's CommonCrypto. All the
generated vectors were 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

Download link: :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
    :language: go

Download link: :download:`verify_cast5.go </development/custom-vectors/cast5/verify_cast5.go>`