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

HMAC Verification Error #46

Closed
AndrewHYang opened this issue Dec 1, 2020 · 4 comments
Closed

HMAC Verification Error #46

AndrewHYang opened this issue Dec 1, 2020 · 4 comments
Assignees

Comments

@AndrewHYang
Copy link

environment
Demo

testSessionId
129547

vsId
397156

After we uploaded the result of the vector set, everything (vector set, result, expected) becomes below response,

"error": "A task was canceled."

@Kritner Kritner self-assigned this Dec 2, 2020
@Kritner
Copy link
Contributor

Kritner commented Dec 2, 2020

Doesn't look like we've actually had people test against non byte aligned macs before, I'll put in a change to support this..

@AndrewHYang
Copy link
Author

Thanks, @Kritner. And our lab user found another two vector sets with the same error when testing with DCDSA. Not sure if they are having the same issue. If not I may need to open up another issue.

/acvp/v1/testSessions/129146/vectorSets/393177

/acvp/v1/testSessions/129146/vectorSets/393180

@Kritner
Copy link
Contributor

Kritner commented Dec 9, 2020

This change is on demo and prod in release v1.1.0.14-1

I'm going to open your comment from today as a new issue so i don't lose track of it.

@Kritner
Copy link
Contributor

Kritner commented Dec 21, 2020

@AndrewHYang from: #52 (comment)

For the ECDSA, our lab users got the formatting issues resolved. However, they got the error below again from HMAC. Since the previous was closed, I attach here anyway. Is it due to the same issue?

"error": "A task was canceled."

Example:
Demo server
Test session: /acvp/v1/testSessions/131631
Vector set: /acvp/v1/testSessions/131631/vectorSets/406502


It looks like this vector set generation did go through after our v1.1.0.14-1 hotfix - which was to correct generation for vector sets that support MACs that aren't byte aligned. It looks like your responses are not being given with enough bits to represent a mac for the group. To demonstrate what I mean about the issue:

{
	"tgId": 2,
	"testType": "AFT",
	"keyLen": 16,
	"msgLen": 128,
	"macLen": 99,
	"tests": [{
			"tcId": 76,
			"key": "2D0B",
			"msg": "D6E0C6CDFA27D92974543535049E76D2"
		},
		{
			"tcId": 77,
			"key": "9C22",
			"msg": "DF502C6D2168657069E0DA517A7349E1"
		}
	]
}

Your responses:

[{
	"tcId": 76,
	"mac": "67AAC5A56F5004A7B8EBCE9B"
}, {
	"tcId": 77,
	"mac": "BCD6A77039F276DD77914472"
}]

Expected responses:

[{
	"tcId": 76,
	"mac": "67AAC5A56F5004A7B8EBCE9B00"
},
{
	"tcId": 77,
	"mac": "BCD6A77039F276DD77914472A0"
}]

You'll notice that the prompt group is for a macLen of 99 bits, but only 12 bytes (96 bits) are given in your response.


We obviously need to have a better method of handling issues such as the above when reporting issues to the user, but the reason you're getting the (bad) response is because there isn't enough bits in your response for non byte aligned mac lengths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants