const struct rte_cryptodev_asymmetric_xform_capability *capability;
uint8_t input[TEST_DATA_SIZE] = {0};
int ret = 0;
+ uint8_t result[sizeof(mod_p)] = { 0 };
if (rte_cryptodev_asym_get_xform_enum(
&modinv_xform.xform_type, "modinv") < 0) {
memcpy(input, base, sizeof(base));
asym_op->modinv.base.data = input;
asym_op->modinv.base.length = sizeof(base);
+ asym_op->modinv.result.data = result;
+ asym_op->modinv.result.length = sizeof(result);
/* attach asymmetric crypto session to crypto operations */
rte_crypto_op_attach_asym_session(op, sess);
const struct rte_cryptodev_asymmetric_xform_capability *capability;
uint8_t input[TEST_DATA_SIZE] = {0};
int ret = 0;
+ uint8_t result[sizeof(mod_p)] = { 0 };
if (rte_cryptodev_asym_get_xform_enum(&modex_xform.xform_type,
"modexp")
memcpy(input, base, sizeof(base));
asym_op->modex.base.data = input;
asym_op->modex.base.length = sizeof(base);
+ asym_op->modex.result.data = result;
+ asym_op->modex.result.length = sizeof(result);
/* attach asymmetric crypto session to crypto operations */
rte_crypto_op_attach_asym_session(op, sess);
static inline int verify_modinv(uint8_t *mod_inv,
struct rte_crypto_op *result_op)
{
- if (memcmp(mod_inv, result_op->asym->modinv.base.data,
- result_op->asym->modinv.base.length))
+ if (memcmp(mod_inv, result_op->asym->modinv.result.data,
+ result_op->asym->modinv.result.length))
return -1;
return 0;
}
static inline int verify_modexp(uint8_t *mod_exp,
struct rte_crypto_op *result_op)
{
- if (memcmp(mod_exp, result_op->asym->modex.base.data,
- result_op->asym->modex.base.length))
+ if (memcmp(mod_exp, result_op->asym->modex.result.data,
+ result_op->asym->modex.result.length))
return -1;
return 0;
}