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

Function test_dh_key_generation

dpdk/app/test/test_cryptodev_asym.c:1223–1258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1221}
1222
1223static int
1224test_dh_key_generation(void)
1225{
1226 int status;
1227
1228 debug_hexdump(stdout, "p:", dh_xform.dh.p.data, dh_xform.dh.p.length);
1229 debug_hexdump(stdout, "g:", dh_xform.dh.g.data, dh_xform.dh.g.length);
1230 debug_hexdump(stdout, "priv_key:", dh_test_params.priv_key.data,
1231 dh_test_params.priv_key.length);
1232
1233 RTE_LOG(INFO, USER1,
1234 "Test Public and Private key pair generation\n");
1235
1236 status = test_dh_gen_kp(&dh_xform);
1237 TEST_ASSERT_EQUAL(status, 0, "Test failed");
1238
1239 RTE_LOG(INFO, USER1,
1240 "Test Public Key Generation using pre-defined priv key\n");
1241
1242 status = test_dh_gen_pub_key(&dh_xform);
1243 TEST_ASSERT_EQUAL(status, 0, "Test failed");
1244
1245 RTE_LOG(INFO, USER1,
1246 "Test Private Key Generation only\n");
1247
1248 status = test_dh_gen_priv_key(&dh_xform);
1249 TEST_ASSERT_EQUAL(status, 0, "Test failed");
1250
1251 RTE_LOG(INFO, USER1,
1252 "Test shared secret compute\n");
1253
1254 status = test_dh_gen_shared_sec(&dh_xform);
1255 TEST_ASSERT_EQUAL(status, 0, "Test failed");
1256
1257 return status;
1258}
1259
1260static int
1261test_dsa_sign(struct rte_crypto_dsa_op_param *dsa_op)

Callers

nothing calls this directly

Calls 5

debug_hexdumpFunction · 0.85
test_dh_gen_kpFunction · 0.85
test_dh_gen_pub_keyFunction · 0.85
test_dh_gen_priv_keyFunction · 0.85
test_dh_gen_shared_secFunction · 0.85

Tested by

no test coverage detected