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 wycheproof tests for AES CMAC #4344

Merged
merged 2 commits into from Jul 17, 2018
Merged

Conversation

reaperhulk
Copy link
Member

refs #3331

tag = binascii.unhexlify(wycheproof.testcase["tag"])

# skip truncated tags, which we don't support in the API
if wycheproof.valid and not len(tag) != 16:
Copy link
Member

Choose a reason for hiding this comment

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

This simplies to wycheproof.valid and len(tag) == 16


@pytest.mark.requires_backend_interface(interface=CipherBackend)
@pytest.mark.wycheproof_tests("aes_cmac_test.json")
def test_keywrap_with_padding(backend, wycheproof):
Copy link
Member

Choose a reason for hiding this comment

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

not right

from cryptography.hazmat.primitives.cmac import CMAC


@pytest.mark.requires_backend_interface(interface=CipherBackend)
Copy link
Member

Choose a reason for hiding this comment

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

CMACBackend

@alex alex merged commit 14faf3c into pyca:master Jul 17, 2018
@reaperhulk reaperhulk deleted the wycheproof-cmac branch July 17, 2018 14:42
amauryfa pushed a commit to amauryfa/cryptography that referenced this pull request Jul 22, 2018
* add wycheproof tests for AES CMAC

* review feedback
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants