MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_dsa

Function test_dsa

dpdk/app/test/test_cryptodev_asym.c:1433–1454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1431}
1432
1433static int
1434test_dsa(void)
1435{
1436 int status;
1437 uint8_t r[TEST_DH_MOD_LEN];
1438 uint8_t s[TEST_DH_MOD_LEN];
1439 struct rte_crypto_dsa_op_param dsa_op;
1440 uint8_t dgst[] = "35d81554afaad2cf18f3a1770d5fedc4ea5be344";
1441
1442 dsa_op.message.data = dgst;
1443 dsa_op.message.length = sizeof(dgst);
1444 dsa_op.r.data = r;
1445 dsa_op.s.data = s;
1446 dsa_op.r.length = sizeof(r);
1447 dsa_op.s.length = sizeof(s);
1448
1449 status = test_dsa_sign(&dsa_op);
1450 TEST_ASSERT_EQUAL(status, 0, "DSA sign test failed");
1451 status = test_dsa_verify(&dsa_op);
1452 TEST_ASSERT_EQUAL(status, 0, "DSA verify test failed");
1453 return status;
1454}
1455
1456static int
1457test_ecdsa_sign_verify(enum curve curve_id)

Callers

nothing calls this directly

Calls 2

test_dsa_signFunction · 0.85
test_dsa_verifyFunction · 0.85

Tested by

no test coverage detected