Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the NIST CAVS test vectors for CCM #8981

Closed
wants to merge 1 commit into from

Conversation

mattcaswell
Copy link
Member

@mattcaswell mattcaswell commented May 22, 2019

This imports all of the NIST CAVS test vectors for CCM (SP800-38C) and
coverts them for use within evp_test. This commit also adds a script to
convert the .rsp CAVS files into the evp_test format. This script may work
for other CAVS test vectors but this is untested.

@mattcaswell mattcaswell added branch: 1.1.1 Merge to OpenSSL_1_1_1-stable branch branch: master Merge to master branch labels May 22, 2019
# https://www.openssl.org/source/license.html

#Convert CAVS test vectors to a format suitable for evp_test

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add 'use strict; use warnings' ?

{
chomp;

if(/^#\s*"([^-]+)-\w+" information/) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment about what each test matches would be useful.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean put a comment before or after each if/elsif pattern match.

@slontis
Copy link
Member

slontis commented May 22, 2019

This script may work for other CAVS test vectors but this is untested.
That is pretty optimistic :) The cavs data seems to be a different format in each file.

@slontis
Copy link
Member

slontis commented May 22, 2019

I would probably just shorten the description in the .txt file so that it just mentions Cipher (or remove it altogether). It only does one operation so it should be obvious..

This imports all of the NIST CAVS test vectors for CCM (SP800-38C) and
coverts them for use within evp_test. This commit also adds a script to
convert the .rsp CAVS files into the evp_test format.
@mattcaswell
Copy link
Member Author

That is pretty optimistic :) The cavs data seems to be a different format in each file.

I removed that comment from the commit message.

I would probably just shorten the description in the .txt file so that it just mentions Cipher (or remove it altogether). It only does one operation so it should be obvious..

Done

Also made all changes as suggested by @richsalz

Please take another look.

@mattcaswell
Copy link
Member Author

Pushed to master and 1.1.1. Thanks!

levitte pushed a commit that referenced this pull request May 23, 2019
This imports all of the NIST CAVS test vectors for CCM (SP800-38C) and
coverts them for use within evp_test. This commit also adds a script to
convert the .rsp CAVS files into the evp_test format.

Reviewed-by: Shane Lontis <[email protected]>
(Merged from #8981)

(cherry picked from commit ecb0f14)
levitte pushed a commit that referenced this pull request May 23, 2019
This imports all of the NIST CAVS test vectors for CCM (SP800-38C) and
coverts them for use within evp_test. This commit also adds a script to
convert the .rsp CAVS files into the evp_test format.

Reviewed-by: Shane Lontis <[email protected]>
(Merged from #8981)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch: master Merge to master branch branch: 1.1.1 Merge to OpenSSL_1_1_1-stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants