usnistgov / ACVP-Server

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

RSA Decryption primtive (SP800-56Br1): pubExpMode causes error #300

Closed smuellerDD closed 7 months ago

smuellerDD commented 7 months ago

environment Demo

Algorithm registration

[
  {
    "acvVersion":"1.0"
  },
  {
    "isSample":false,
    "operation":"register",
    "certificateRequest":"no",
    "debugRequest":"yes",
    "production":"no",
    "encryptAtRest":"yes",
    "algorithms":[
      {
        "revision":"Sp800-56Br2",
        "algorithm":"RSA",
        "mode":"decryptionPrimitive",
        "modulo":[
          2048,
          3072,
          4096
        ],
        "keyFormat":[
          "crt"
        ],
        "pubExpMode":"fixed",
        "fixedPubExp":"010001",
        "prereqVals":[
          {
            "algorithm":"DRBG",
            "valValue":"same"
          }
        ]
      }
    ]
  }
]

Expected behavior Generation of a test vector

Additional context Actual returned 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: $.pubExpMode | LineNumber: 0 | BytePositionInLine: 181."
  }
]
abkarcher commented 7 months ago

Hi Stephan,

the server currently expects "pubExpMode" to be an array with the string in it. I asked about it here - https://github.com/usnistgov/ACVP/pull/1478

Hope this helps, Andrew

jbrock24 commented 7 months ago

@abkarcher Thank you, sorry about that @smuellerDD.

rnunez83 commented 7 months ago

Hi @jbrock24 , Just to confirm, you expect: "pubExpMode":["fixed"], "fixedPubExp":"010001", or "pubExpMode":"fixed", "fixedPubExp":["010001"] ? the title of the #1478 says that fixedPubExp was made into an array, but in the diff, it shows pubExpMode was turned to an array so I just wanted to confirm which is correct.

jbrock24 commented 7 months ago

It's the pubExpMode, fixed the title. Thank you.

smuellerDD commented 7 months ago

Am Dienstag, 5. Dezember 2023, 15:09:05 CET schrieb abkarcher:

Hi abkarcher,

Hi Stephan,

the server currently expects "pubExpMode" to be an array with the string in it. I asked about it here - https://github.com/usnistgov/ACVP/pull/1478

It is unfortunate that the current protocol seems to handle that specification differently. For RSA keygen, it is a simple string.

But it works now.

Thanks.

Hope this helps, Andrew

Ciao Stephan

jbrock24 commented 7 months ago

Actually, we're transitioning the support for IUT's that can handle this type of setup to reduce the amount of registrations you'll need. It'll be a slow process, and in the future won't affect previous algorithms, it'll be new versions.

jbrock24 commented 7 months ago

@smuellerDD @abkarcher I wanted to let you know I am currently reversing this, we will make it a single string and not a list. Apologies for all the confusion, but this will go out with the next hotfix. I will reply here when that is done.

livebe01 commented 7 months ago

Fyi, we just deployed a hotfix to Demo. pubExpMode now expects a string (vs an array).