usnistgov / ACVP-Server

A repository tracking releases of NIST's ACVP server. See www.github.com/usnistgov/ACVP for the protocol.
46 stars 17 forks source link

SHA3-384-2.0: min -max increment must be 0 #186

Closed akpanj closed 2 years ago

akpanj commented 2 years ago

environment The environment the issue was experienced (Demo or Prod) Demo

testSessionId Could not complete registration

vsId "algorithm": "SHA3-384",

Algorithm registration "algorithms": [ { "algorithm": "SHA3-384", "revision": "2.0", "messageLength": [ { "max": 65356, "min": 0, "increment": 8 } ]

Endpoint in which the error is experienced https://[acvpUrl]/acvp/[endpoint] GET

Expected behavior I should be able to register the capabilities for SHA3 - 384 similar to SHA3-512, SHA3-224

Additional context SHA3-512 with same configuration as SHA3-384 works fine. But SHA3-384 gives error SHA3-384error

  {
    "algorithm": "SHA3-384",
    "revision": "2.0",
    "messageLength": [
      {
        "max": 65356,
        "min": 0,
        "increment": 8
      }
    ]
  },
  {
    "algorithm": "SHA3-512",
    "revision": "2.0",
    "messageLength": [
      {
        "max": 65536,
        "min": 0,
        "increment": 8
      }
    ]
  }
livebe01 commented 2 years ago

Hi @akpanj, is your max "65356" or is it "65536"? If it's "65356", then the issue is that (65356 - 0) mod 8 does not equal 0. That is, your max must be reachable by incrementing by 8's from a starting value of 0.

akpanj commented 2 years ago

Thanks! My bad !