Skip to content

Commit

Permalink
testing aead algorithms in pqc public test
Browse files Browse the repository at this point in the history
  • Loading branch information
falko-strenzke authored and TJ-91 committed Oct 14, 2024
1 parent 6a39f47 commit 1de9a9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tests/cli_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4609,8 +4609,10 @@ def test_zzz_encryption_and_signing_pqc(self):
# non-PQC subkey.
ALGO = [25, 27, 28, 29, 30, 32, 32, 32, 24, ]
ALGO_PARAM = [None, None, None, None, None, 1, 2, 6, None, ]
aead_list = []
passwds = [ ]
for x in range(len(ALGO)): passwds.append('testpw' if x % 1 == 0 else '')
for x in range(len(ALGO)): aead_list.append(None if x % 3 == 0 else ('ocb' if x % 3 == 1 else 'eax' ))
if any(len(USERIDS) != len(x) for x in [ALGO, ALGO_PARAM]):
raise RuntimeError("test_zzz_encryption_and_signing_pqc: internal error: lengths of test data arrays matching")
# Generate multiple keys and import to GnuPG
Expand All @@ -4634,7 +4636,7 @@ def test_zzz_encryption_and_signing_pqc(self):
signerpws = [passwds[i]]

rnp_encrypt_and_sign_file(src, dst, recipients, passwords, signers,
signerpws)
signerpws, aead=[aead_list[i]])
# Decrypt file with each of the keys, we have different password for each key
rnp_decrypt_file(dst, dec, passwds[i])
remove_files(dec)
Expand Down

0 comments on commit 1de9a9f

Please sign in to comment.