22 #include <crypto/aes.h>
25 #include <linux/module.h>
26 #include <linux/types.h>
34 static int ctr_aes_nx_set_key(
struct crypto_tfm *tfm,
61 memcpy(csbcpb->
cpb.aes_ctr.key, in_key, key_len);
66 static int ctr3686_aes_nx_set_key(
struct crypto_tfm *tfm,
81 return ctr_aes_nx_set_key(tfm, in_key, key_len);
93 if (nbytes > nx_ctx->
ap->databytelen)
97 csbcpb->
cpb.aes_ctr.iv);
101 if (!nx_ctx->
op.inlen || !nx_ctx->
op.outlen) {
113 &(nx_ctx->
stats->aes_bytes));
132 return ctr_aes_nx_crypt(desc, dst, src, nbytes);
136 .cra_name =
"ctr(aes)",
137 .cra_driver_name =
"ctr-aes-nx",
150 .setkey = ctr_aes_nx_set_key,
151 .encrypt = ctr_aes_nx_crypt,
152 .decrypt = ctr_aes_nx_crypt,
157 .cra_name =
"rfc3686(ctr(aes))",
158 .cra_driver_name =
"rfc3686-ctr-aes-nx",
172 .setkey = ctr3686_aes_nx_set_key,
173 .encrypt = ctr3686_aes_nx_crypt,
174 .decrypt = ctr3686_aes_nx_crypt,