From 71afcbd6d59307b039ff02c7c2fd152fc6bfcec5 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 23 Jun 2026 11:47:46 +0200 Subject: test: add comments with sources --- test/cavp.py | 4 ++++ test/nist.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/test/cavp.py b/test/cavp.py index 86486ed..42998d9 100755 --- a/test/cavp.py +++ b/test/cavp.py @@ -5,6 +5,10 @@ # For details, see https://github.com/egor-tensin/aes-tools. # Distributed under the MIT License. +# This uses the CAVP (Cryptographic Algorithm Validation Program) "Known Answer +# Test Vectors". The .zip archive can be downloaded from the program's page: +# https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/block-ciphers#AES + import argparse from collections import OrderedDict from collections.abc import MutableSequence diff --git a/test/nist.py b/test/nist.py index 274cbbc..d9b0477 100755 --- a/test/nist.py +++ b/test/nist.py @@ -13,6 +13,9 @@ import sys from toolkit import Algorithm, BlockInput, Mode, Tools +# The data is from "Example Vectors for Modes of Operation of the AES": +# https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38a.pdf + _TEST_PLAINTEXTS = [ "6bc1bee22e409f96e93d7e117393172a", "ae2d8a571e03ac9c9eb76fac45af8e51", -- cgit v1.3