1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Cavium Networks
5 #ifndef TEST_CRYPTODEV_ASYM_TEST_UTIL_H__
6 #define TEST_CRYPTODEV_ASYM_TEST_UTIL_H__
8 /* Below Apis compare resulted buffer to original test vector */
10 static inline int rsa_verify(struct rsa_test_data *rsa_param,
11 struct rte_crypto_op *result_op)
13 if (memcmp(rsa_param->data,
14 result_op->asym->rsa.message.data,
15 result_op->asym->rsa.message.length))
20 static inline int verify_modinv(uint8_t *mod_inv,
21 struct rte_crypto_op *result_op)
23 if (memcmp(mod_inv, result_op->asym->modinv.base.data,
24 result_op->asym->modinv.base.length))
29 static inline int verify_modexp(uint8_t *mod_exp,
30 struct rte_crypto_op *result_op)
32 if (memcmp(mod_exp, result_op->asym->modex.base.data,
33 result_op->asym->modex.base.length))
38 #endif /* TEST_CRYPTODEV_ASYM_TEST_UTIL_H__ */