Conversation
| const Span<const uint8_t> info = args[3]; | ||
| const Span<const uint8_t> out_len_bytes = args[4]; | ||
|
|
||
| uint32_t out_len; |
There was a problem hiding this comment.
warning: variable 'out_len' is not initialized [cppcoreguidelines-init-variables]
| uint32_t out_len; | |
| uint32_t out_len = 0; |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3010 +/- ##
==========================================
+ Coverage 78.31% 78.35% +0.03%
==========================================
Files 689 689
Lines 120995 121025 +30
Branches 16971 16963 -8
==========================================
+ Hits 94758 94827 +69
+ Misses 25341 25304 -37
+ Partials 896 894 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
skmcgrail
left a comment
There was a problem hiding this comment.
Have you tested this with the ACVP demo server?
| EphemeralXHex string `json:"ephemeralPublicIutX,omitempty"` | ||
| EphemeralYHex string `json:"ephemeralPublicIutY,omitempty"` |
There was a problem hiding this comment.
| EphemeralXHex string `json:"ephemeralPublicIutX,omitempty"` | |
| EphemeralYHex string `json:"ephemeralPublicIutY,omitempty"` | |
| EphemeralXHex hexEncodedByteString `json:"ephemeralPublicIutX,omitempty"` | |
| EphemeralYHex hexEncodedByteString `json:"ephemeralPublicIutY,omitempty"` |
Then you don't need to call hex.EncodeString(result[0]) etc.
| iutId, err := hex.DecodeString(group.IutId) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
|
|
||
| serverId, err := hex.DecodeString(group.ServerId) | ||
| if err != nil { | ||
| return nil, err | ||
| } |
There was a problem hiding this comment.
I'm confused these aren't hex values so why are you calling hex.DecodeString?
There was a problem hiding this comment.
As counter-intuitive as it sounds, they are hex values (as noted in the JSON specifications here). I'll change their type from string to hexEncodedByteString
| EphemeralXHex string `json:"ephemeralPublicIutX,omitempty"` | ||
| EphemeralYHex string `json:"ephemeralPublicIutY,omitempty"` | ||
|
|
||
| Dkm string `json:"dkm,omitempty"` |
There was a problem hiding this comment.
| Dkm string `json:"dkm,omitempty"` | |
| Dkm hexEncodedByteString `json:"dkm,omitempty"` |
| {"auxFunctionName": "SHA2-384"}, | ||
| {"auxFunctionName": "SHA2-512"} | ||
| ], | ||
| "fixedInfoPattern": "algorithmId", |
There was a problem hiding this comment.
This doesn't match the fixedInfoPattern you are constructing in Go?
| p += x.size(); | ||
|
|
||
| memcpy(fixed_info.get() + p, y.data(), y.size()); | ||
| p += y.size(); |
There was a problem hiding this comment.
warning: Value stored to 'p' is never read [clang-analyzer-deadcode.DeadStores]
p += y.size();
^Additional context
util/fipstools/acvp/modulewrapper/modulewrapper.cc:2981: Value stored to 'p' is never read
p += y.size();
^
Issues:
Addresses P355857148
Description of changes:
This PR adds ACVP support for
KAS-ECC onePassDh and ephemeralUnifiedCall-outs:
Due to the random nature of ECDH, no expected vector was added. To review, please run the script locally to verify the result.
Testing:
Run
check_expected.goon the new KAS-ECC test vectors.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.