File: chacha20.rst

package info (click to toggle)
python-cryptography 43.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,400 kB
  • sloc: python: 49,159; java: 319; makefile: 161
file content (29 lines) | stat: -rw-r--r-- 938 bytes parent folder | download
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
ChaCha20 vector creation
========================

This page documents the code that was used to generate the vectors
to test the counter overflow behavior in ChaCha20 as well as code
used to verify them against another implementation.

Creation
--------

The following Python script was run to generate the vector files.

.. literalinclude:: /development/custom-vectors/chacha20/generate_chacha20_overflow.py

Download link: :download:`generate_chacha20_overflow.py
</development/custom-vectors/chacha20/generate_chacha20_overflow.py>`


Verification
------------

The following Python script was used to verify the vectors. The
counter overflow is handled manually to avoid relying on the same
code that generated the vectors.

.. literalinclude:: /development/custom-vectors/chacha20/verify_chacha20_overflow.py

Download link: :download:`verify_chacha20_overflow.py
</development/custom-vectors/chacha20/verify_chacha20_overflow.py>`