Dmitry Eremin-Solenikov(lumag) replied on github web page: platform/linux-generic/odp_crypto.c line 57 @@ -308,6 +319,142 @@ void packet_hmac(odp_packet_t pkt, HMAC_Final(ctx, hash, NULL); } +static void do_pad_xor(uint8_t *out, const uint8_t *in, int len) { + int pos=0; + for (pos=1; pos <= 16; pos++, in++, out++) { + if (pos <= len) + *out ^= *in; + if (pos > len) { + *out ^= 0x80; + break; + } + } +} +static void xor_block(aes_block res, const aes_block op) { + res[0] ^= op[0]; + res[1] ^= op[1]; + res[2] ^= op[2]; + res[3] ^= op[3]; +} + +static +odp_crypto_alg_err_t aesxcbc_gen(odp_packet_t pkt, + const odp_crypto_packet_op_param_t *param, + odp_crypto_generic_session_t *session) +{ + aes_block e = {0, 0, 0, 0}; + uint8_t *data = odp_packet_data(pkt);
Comment: This will not work with segmented packets. > Dmitry Eremin-Solenikov(lumag) wrote: > Please use `uint32_t*` instead of adding new type. https://github.com/Linaro/odp/pull/470#discussion_r167563693 updated_at 2018-02-12 14:34:03