smuellerDD / acvpparser

ACVP Parser for invocation of cryptographic implementations using the ACVP JSON test vectors
https://www.chronox.de/acvpparser
Other
36 stars 27 forks source link

Getting error '-14' while running EdDSA sigver vectors on openssl backend #87

Closed rahulcode60 closed 1 month ago

rahulcode60 commented 1 month ago

These are the error logs

ACVPParser (18:44:14) Debug [backends/backend_openssl3.c:openssl_eddsa_create_pkey:2475]: Q = 03bb8a5e4266722ffd6c0264dbfa80d17931098fcc284bf948eafd39580602ce

ACVPParser (18:44:14) Debug [backends/backend_openssl3.c:_openssl_eddsa_curves:2394]: curve : 18014398727585792

ACVPParser (18:44:14) Debug [parser/parser_common.c:exec_test:410]: Failure with return code -14

ACVPParser (18:44:14) Warning [parser/parser_common.c:exec_test:457]: Test execution failed with error -14

ACVPParser (18:44:14) Error [parser/parser_common.c:parse_array:881]: Test execution failed

ACVPParser (18:44:14) Debug [parser/parser_common.c:vector_free_entry:88]: Freeing entry message with data type 0

ACVPParser (18:44:14) Debug [parser/parser_common.c:vector_free_entry:88]: Freeing entry q with data type 0

This is first vector testcase

{

"vsId": 2519363,

"algorithm": "EDDSA",

"mode": "sigVer",

"revision": "1.0",

"isSample": true,

"testGroups": [

  {

    "tgId": 1,

    "testType": "AFT",

    "curve": "ED-25519",

    "preHash": false,

    "tests": [

      {

        "tcId": 1,

        "message": "CE80E07A6E10F0E8DE067154AA9034AB4602145D99D0956F603714B8223CE11170C07DE753A51BC312494E2D0CFBE1FAF7CD8B65EE6D504C68331F8AD403322D347D4F8B8A2C79D16803CBEA1CFDA280C2E8BB5469168EC04B0813CC7783C6DE336A2BAE7BA3E2B322F47C7D2D9C547CFF970D9BE16697602BCB2E6CDF9BC6E4",

        "q": "03BB8A5E4266722FFD6C0264DBFA80D17931098FCC284BF948EAFD39580602CE",

        "signature": "6B4376F0082A2430406F8C9EE41F6560EF0542F162CFB56D2096CF8ECC1B2E180218C28C2444332AC79FF5E09CDC328E8610F1C43C3A119466A3FB105F4D5381"

      }
smuellerDD commented 1 month ago

Am Dienstag, 10. September 2024, 08:16:49 GMT-5 schrieb rahulcode60:

Hi rahulcode60,

ACVPParser (18:44:14) Debug [backends/backend_openssl3.c:_openssl_eddsa_curves:2394]: curve : 18014398727585792

ACVPParser (18:44:14) Debug [parser/parser_common.c:exec_test:410]: Failure with return code -14

There is something missing between this and the previous log, there are logs missing.

The test vector shows that the test code is function openssl_eddsa_sigver. It perhaps looks like the following code path is triggered:

    } else {
            logger(LOGGER_WARN, "Signature verification: general 

error\n"); ret = -EFAULT; }

If so, the parser receives an answer that it did not expect. For that you can extend the logging message by

logger(LOGGER_WARN, "Signature verification: general error: %s\n", ERR_error_string(ERR_get_error(), NULL));

to get more information.

Ciao Stephan