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

SHAKE capability digest size property? #363

Open
cpu opened this issue Oct 20, 2024 · 3 comments
Open

SHAKE capability digest size property? #363

cpu opened this issue Oct 20, 2024 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@cpu
Copy link

cpu commented Oct 20, 2024

Hi folks,

I was using a SHAKE-128 capability based on the example in this repo. It has a digestSize array property that isn't described in draft-celi-acvp-sha3.html as far as I can tell.

Additionally, when it's provided as written in the demo environment I get the following error:

[
  {
    "acvVersion": "1.0"
  },
  {
    "error": "Invalid JSON provided.",
    "context": "The JSON value could not be converted to System.Collections.Generic.List\u00601[System.String]. Path: $.digestSize[0] | LineNumber: 0 | BytePositionInLine: 99."
  }
]

As hinted at by the System.Collections.Generic.List\u00601[System.String] portion of the error I'm able to resolve the issue by changing my capability to use a digestSize property that's an array of strings. I also seem to be able to delete that property without adverse affect.

Should this property be provided at all? If it should be, is the intent that it's an array of integers or an array of strings? The registration.json in this repo might need an update, or perhaps it's a server-side bug.

environment
Demo

testSessionId
N/A

vsId
N/A

Algorithm registration

I used the following registration based on the example in-repo:

{
  "algorithm": "SHAKE-128",
  "digestSize": [
    128
  ],
  "inBit": false,
  "outBit": false,
  "inEmpty": false,
  "outputLen": [
    {
      "min": 128,
      "max": 4096,
      "increment": 8
    }
  ],
  "revision": "1.0"
}

Endpoint in which the error is experienced

POSTing /acvp/v1/testSessions

Expected behavior

I expect the capability to be recognized and appropriate test vectors created.

Additional context

N/A

@jbrock24 jbrock24 self-assigned this Oct 23, 2024
@livebe01
Copy link
Collaborator

Thanks for mentioning this @cpu. digestSize is not meant to be a valid registration property, although it appears that the server is accepting values for it. We'll look into fixing that. Its appearing in the example registration is likely an artifact of how the example JSON files are getting produced. You'll probably find a few other algorithms whose example registration files contain similar quirks. If you do, let us know. Just take them with a grain of salt and be sure to consult the individual algorithm specifications here: https://pages.nist.gov/ACVP/#supported.

@cpu
Copy link
Author

cpu commented Oct 24, 2024

Thanks for confirming this is a quirk of the example registration.

You'll probably find a few other algorithms whose example registration files contain similar quirks. If you do, let us know

Understood, thanks!

@jbrock24
Copy link
Collaborator

Hi @cpu thanks again for letting us know about this and any more you find! I have removed digestSize as a parameter and have updated the sample files as well. This will probably go out with the next update and we'll reply here once it's done. Thanks again.

@jbrock24 jbrock24 added the bug Something isn't working label Jan 31, 2025
@jbrock24 jbrock24 added this to the v1.1.0.39 milestone Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants