File: rc2.rst

package info (click to toggle)
python-cryptography 44.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,092 kB
  • sloc: python: 50,509; java: 319; makefile: 161
file content (24 lines) | stat: -rw-r--r-- 871 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
RC2 vector creation
===================

This page documents the code that was used to generate the RC2 CBC test vector.
The CBC vector was generated using Go's internal RC2 implementation and
verified using Go and OpenSSL.

Creation/Verification
---------------------

The program below outputs a test vector in the standard format we use and
also verifies that the encrypted value round trips as expected. The output
was also checked against OpenSSL by modifying ``cryptography`` to support
the algorithm. If you wish to run this program we recommend cloning the
repository, which also contains the requisite ``go.mod`` file.

.. literalinclude:: /development/custom-vectors/rc2/genrc2.go
    :language: go

Download link: :download:`genrc2.go
</development/custom-vectors/rc2/genrc2.go>`

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