nitrox_skcipher.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  1. // SPDX-License-Identifier: GPL-2.0
  2. #include <linux/crypto.h>
  3. #include <linux/kernel.h>
  4. #include <linux/module.h>
  5. #include <linux/printk.h>
  6. #include <crypto/aes.h>
  7. #include <crypto/skcipher.h>
  8. #include <crypto/scatterwalk.h>
  9. #include <crypto/ctr.h>
  10. #include <crypto/internal/des.h>
  11. #include <crypto/xts.h>
  12. #include "nitrox_dev.h"
  13. #include "nitrox_common.h"
  14. #include "nitrox_req.h"
  15. struct nitrox_cipher {
  16. const char *name;
  17. enum flexi_cipher value;
  18. };
  19. /*
  20. * supported cipher list
  21. */
  22. static const struct nitrox_cipher flexi_cipher_table[] = {
  23. { "null", CIPHER_NULL },
  24. { "cbc(des3_ede)", CIPHER_3DES_CBC },
  25. { "ecb(des3_ede)", CIPHER_3DES_ECB },
  26. { "cbc(aes)", CIPHER_AES_CBC },
  27. { "ecb(aes)", CIPHER_AES_ECB },
  28. { "cfb(aes)", CIPHER_AES_CFB },
  29. { "rfc3686(ctr(aes))", CIPHER_AES_CTR },
  30. { "xts(aes)", CIPHER_AES_XTS },
  31. { "cts(cbc(aes))", CIPHER_AES_CBC_CTS },
  32. { NULL, CIPHER_INVALID }
  33. };
  34. static enum flexi_cipher flexi_cipher_type(const char *name)
  35. {
  36. const struct nitrox_cipher *cipher = flexi_cipher_table;
  37. while (cipher->name) {
  38. if (!strcmp(cipher->name, name))
  39. break;
  40. cipher++;
  41. }
  42. return cipher->value;
  43. }
  44. static void free_src_sglist(struct skcipher_request *skreq)
  45. {
  46. struct nitrox_kcrypt_request *nkreq = skcipher_request_ctx(skreq);
  47. kfree(nkreq->src);
  48. }
  49. static void free_dst_sglist(struct skcipher_request *skreq)
  50. {
  51. struct nitrox_kcrypt_request *nkreq = skcipher_request_ctx(skreq);
  52. kfree(nkreq->dst);
  53. }
  54. static void nitrox_skcipher_callback(void *arg, int err)
  55. {
  56. struct skcipher_request *skreq = arg;
  57. free_src_sglist(skreq);
  58. free_dst_sglist(skreq);
  59. if (err) {
  60. pr_err_ratelimited("request failed status 0x%0x\n", err);
  61. err = -EINVAL;
  62. }
  63. skcipher_request_complete(skreq, err);
  64. }
  65. static void nitrox_cbc_cipher_callback(void *arg, int err)
  66. {
  67. struct skcipher_request *skreq = arg;
  68. struct nitrox_kcrypt_request *nkreq = skcipher_request_ctx(skreq);
  69. struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(skreq);
  70. int ivsize = crypto_skcipher_ivsize(cipher);
  71. unsigned int start = skreq->cryptlen - ivsize;
  72. if (err) {
  73. nitrox_skcipher_callback(arg, err);
  74. return;
  75. }
  76. if (nkreq->creq.ctrl.s.arg == ENCRYPT) {
  77. scatterwalk_map_and_copy(skreq->iv, skreq->dst, start, ivsize,
  78. 0);
  79. } else {
  80. if (skreq->src != skreq->dst) {
  81. scatterwalk_map_and_copy(skreq->iv, skreq->src, start,
  82. ivsize, 0);
  83. } else {
  84. memcpy(skreq->iv, nkreq->iv_out, ivsize);
  85. kfree(nkreq->iv_out);
  86. }
  87. }
  88. nitrox_skcipher_callback(arg, err);
  89. }
  90. static int nitrox_skcipher_init(struct crypto_skcipher *tfm)
  91. {
  92. struct nitrox_crypto_ctx *nctx = crypto_skcipher_ctx(tfm);
  93. struct crypto_ctx_hdr *chdr;
  94. /* get the first device */
  95. nctx->ndev = nitrox_get_first_device();
  96. if (!nctx->ndev)
  97. return -ENODEV;
  98. /* allocate nitrox crypto context */
  99. chdr = crypto_alloc_context(nctx->ndev);
  100. if (!chdr) {
  101. nitrox_put_device(nctx->ndev);
  102. return -ENOMEM;
  103. }
  104. nctx->callback = nitrox_skcipher_callback;
  105. nctx->chdr = chdr;
  106. nctx->u.ctx_handle = (uintptr_t)((u8 *)chdr->vaddr +
  107. sizeof(struct ctx_hdr));
  108. crypto_skcipher_set_reqsize(tfm, crypto_skcipher_reqsize(tfm) +
  109. sizeof(struct nitrox_kcrypt_request));
  110. return 0;
  111. }
  112. static int nitrox_cbc_init(struct crypto_skcipher *tfm)
  113. {
  114. int err;
  115. struct nitrox_crypto_ctx *nctx = crypto_skcipher_ctx(tfm);
  116. err = nitrox_skcipher_init(tfm);
  117. if (err)
  118. return err;
  119. nctx->callback = nitrox_cbc_cipher_callback;
  120. return 0;
  121. }
  122. static void nitrox_skcipher_exit(struct crypto_skcipher *tfm)
  123. {
  124. struct nitrox_crypto_ctx *nctx = crypto_skcipher_ctx(tfm);
  125. /* free the nitrox crypto context */
  126. if (nctx->u.ctx_handle) {
  127. struct flexi_crypto_context *fctx = nctx->u.fctx;
  128. memzero_explicit(&fctx->crypto, sizeof(struct crypto_keys));
  129. memzero_explicit(&fctx->auth, sizeof(struct auth_keys));
  130. crypto_free_context((void *)nctx->chdr);
  131. }
  132. nitrox_put_device(nctx->ndev);
  133. nctx->u.ctx_handle = 0;
  134. nctx->ndev = NULL;
  135. }
  136. static inline int nitrox_skcipher_setkey(struct crypto_skcipher *cipher,
  137. int aes_keylen, const u8 *key,
  138. unsigned int keylen)
  139. {
  140. struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher);
  141. struct nitrox_crypto_ctx *nctx = crypto_tfm_ctx(tfm);
  142. struct flexi_crypto_context *fctx;
  143. union fc_ctx_flags *flags;
  144. enum flexi_cipher cipher_type;
  145. const char *name;
  146. name = crypto_tfm_alg_name(tfm);
  147. cipher_type = flexi_cipher_type(name);
  148. if (unlikely(cipher_type == CIPHER_INVALID)) {
  149. pr_err("unsupported cipher: %s\n", name);
  150. return -EINVAL;
  151. }
  152. /* fill crypto context */
  153. fctx = nctx->u.fctx;
  154. flags = &fctx->flags;
  155. flags->f = 0;
  156. flags->w0.cipher_type = cipher_type;
  157. flags->w0.aes_keylen = aes_keylen;
  158. flags->w0.iv_source = IV_FROM_DPTR;
  159. flags->f = cpu_to_be64(*(u64 *)&flags->w0);
  160. /* copy the key to context */
  161. memcpy(fctx->crypto.u.key, key, keylen);
  162. return 0;
  163. }
  164. static int nitrox_aes_setkey(struct crypto_skcipher *cipher, const u8 *key,
  165. unsigned int keylen)
  166. {
  167. int aes_keylen;
  168. aes_keylen = flexi_aes_keylen(keylen);
  169. if (aes_keylen < 0)
  170. return -EINVAL;
  171. return nitrox_skcipher_setkey(cipher, aes_keylen, key, keylen);
  172. }
  173. static int alloc_src_sglist(struct skcipher_request *skreq, int ivsize)
  174. {
  175. struct nitrox_kcrypt_request *nkreq = skcipher_request_ctx(skreq);
  176. int nents = sg_nents(skreq->src) + 1;
  177. int ret;
  178. /* Allocate buffer to hold IV and input scatterlist array */
  179. ret = alloc_src_req_buf(nkreq, nents, ivsize);
  180. if (ret)
  181. return ret;
  182. nitrox_creq_copy_iv(nkreq->src, skreq->iv, ivsize);
  183. nitrox_creq_set_src_sg(nkreq, nents, ivsize, skreq->src,
  184. skreq->cryptlen);
  185. return 0;
  186. }
  187. static int alloc_dst_sglist(struct skcipher_request *skreq, int ivsize)
  188. {
  189. struct nitrox_kcrypt_request *nkreq = skcipher_request_ctx(skreq);
  190. int nents = sg_nents(skreq->dst) + 3;
  191. int ret;
  192. /* Allocate buffer to hold ORH, COMPLETION and output scatterlist
  193. * array
  194. */
  195. ret = alloc_dst_req_buf(nkreq, nents);
  196. if (ret)
  197. return ret;
  198. nitrox_creq_set_orh(nkreq);
  199. nitrox_creq_set_comp(nkreq);
  200. nitrox_creq_set_dst_sg(nkreq, nents, ivsize, skreq->dst,
  201. skreq->cryptlen);
  202. return 0;
  203. }
  204. static int nitrox_skcipher_crypt(struct skcipher_request *skreq, bool enc)
  205. {
  206. struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(skreq);
  207. struct nitrox_crypto_ctx *nctx = crypto_skcipher_ctx(cipher);
  208. struct nitrox_kcrypt_request *nkreq = skcipher_request_ctx(skreq);
  209. int ivsize = crypto_skcipher_ivsize(cipher);
  210. struct se_crypto_request *creq;
  211. int ret;
  212. creq = &nkreq->creq;
  213. creq->flags = skreq->base.flags;
  214. creq->gfp = (skreq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ?
  215. GFP_KERNEL : GFP_ATOMIC;
  216. /* fill the request */
  217. creq->ctrl.value = 0;
  218. creq->opcode = FLEXI_CRYPTO_ENCRYPT_HMAC;
  219. creq->ctrl.s.arg = (enc ? ENCRYPT : DECRYPT);
  220. /* param0: length of the data to be encrypted */
  221. creq->gph.param0 = cpu_to_be16(skreq->cryptlen);
  222. creq->gph.param1 = 0;
  223. /* param2: encryption data offset */
  224. creq->gph.param2 = cpu_to_be16(ivsize);
  225. creq->gph.param3 = 0;
  226. creq->ctx_handle = nctx->u.ctx_handle;
  227. creq->ctrl.s.ctxl = sizeof(struct flexi_crypto_context);
  228. ret = alloc_src_sglist(skreq, ivsize);
  229. if (ret)
  230. return ret;
  231. ret = alloc_dst_sglist(skreq, ivsize);
  232. if (ret) {
  233. free_src_sglist(skreq);
  234. return ret;
  235. }
  236. /* send the crypto request */
  237. return nitrox_process_se_request(nctx->ndev, creq, nctx->callback,
  238. skreq);
  239. }
  240. static int nitrox_cbc_decrypt(struct skcipher_request *skreq)
  241. {
  242. struct nitrox_kcrypt_request *nkreq = skcipher_request_ctx(skreq);
  243. struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(skreq);
  244. int ivsize = crypto_skcipher_ivsize(cipher);
  245. gfp_t flags = (skreq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ?
  246. GFP_KERNEL : GFP_ATOMIC;
  247. unsigned int start = skreq->cryptlen - ivsize;
  248. if (skreq->src != skreq->dst)
  249. return nitrox_skcipher_crypt(skreq, false);
  250. nkreq->iv_out = kmalloc(ivsize, flags);
  251. if (!nkreq->iv_out)
  252. return -ENOMEM;
  253. scatterwalk_map_and_copy(nkreq->iv_out, skreq->src, start, ivsize, 0);
  254. return nitrox_skcipher_crypt(skreq, false);
  255. }
  256. static int nitrox_aes_encrypt(struct skcipher_request *skreq)
  257. {
  258. return nitrox_skcipher_crypt(skreq, true);
  259. }
  260. static int nitrox_aes_decrypt(struct skcipher_request *skreq)
  261. {
  262. return nitrox_skcipher_crypt(skreq, false);
  263. }
  264. static int nitrox_3des_setkey(struct crypto_skcipher *cipher,
  265. const u8 *key, unsigned int keylen)
  266. {
  267. return verify_skcipher_des3_key(cipher, key) ?:
  268. nitrox_skcipher_setkey(cipher, 0, key, keylen);
  269. }
  270. static int nitrox_3des_encrypt(struct skcipher_request *skreq)
  271. {
  272. return nitrox_skcipher_crypt(skreq, true);
  273. }
  274. static int nitrox_3des_decrypt(struct skcipher_request *skreq)
  275. {
  276. return nitrox_skcipher_crypt(skreq, false);
  277. }
  278. static int nitrox_aes_xts_setkey(struct crypto_skcipher *cipher,
  279. const u8 *key, unsigned int keylen)
  280. {
  281. struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher);
  282. struct nitrox_crypto_ctx *nctx = crypto_tfm_ctx(tfm);
  283. struct flexi_crypto_context *fctx;
  284. int aes_keylen, ret;
  285. ret = xts_check_key(tfm, key, keylen);
  286. if (ret)
  287. return ret;
  288. keylen /= 2;
  289. aes_keylen = flexi_aes_keylen(keylen);
  290. if (aes_keylen < 0)
  291. return -EINVAL;
  292. fctx = nctx->u.fctx;
  293. /* copy KEY2 */
  294. memcpy(fctx->auth.u.key2, (key + keylen), keylen);
  295. return nitrox_skcipher_setkey(cipher, aes_keylen, key, keylen);
  296. }
  297. static int nitrox_aes_ctr_rfc3686_setkey(struct crypto_skcipher *cipher,
  298. const u8 *key, unsigned int keylen)
  299. {
  300. struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher);
  301. struct nitrox_crypto_ctx *nctx = crypto_tfm_ctx(tfm);
  302. struct flexi_crypto_context *fctx;
  303. int aes_keylen;
  304. if (keylen < CTR_RFC3686_NONCE_SIZE)
  305. return -EINVAL;
  306. fctx = nctx->u.fctx;
  307. memcpy(fctx->crypto.iv, key + (keylen - CTR_RFC3686_NONCE_SIZE),
  308. CTR_RFC3686_NONCE_SIZE);
  309. keylen -= CTR_RFC3686_NONCE_SIZE;
  310. aes_keylen = flexi_aes_keylen(keylen);
  311. if (aes_keylen < 0)
  312. return -EINVAL;
  313. return nitrox_skcipher_setkey(cipher, aes_keylen, key, keylen);
  314. }
  315. static struct skcipher_alg nitrox_skciphers[] = { {
  316. .base = {
  317. .cra_name = "cbc(aes)",
  318. .cra_driver_name = "n5_cbc(aes)",
  319. .cra_priority = PRIO,
  320. .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_ALLOCATES_MEMORY,
  321. .cra_blocksize = AES_BLOCK_SIZE,
  322. .cra_ctxsize = sizeof(struct nitrox_crypto_ctx),
  323. .cra_alignmask = 0,
  324. .cra_module = THIS_MODULE,
  325. },
  326. .min_keysize = AES_MIN_KEY_SIZE,
  327. .max_keysize = AES_MAX_KEY_SIZE,
  328. .ivsize = AES_BLOCK_SIZE,
  329. .setkey = nitrox_aes_setkey,
  330. .encrypt = nitrox_aes_encrypt,
  331. .decrypt = nitrox_cbc_decrypt,
  332. .init = nitrox_cbc_init,
  333. .exit = nitrox_skcipher_exit,
  334. }, {
  335. .base = {
  336. .cra_name = "ecb(aes)",
  337. .cra_driver_name = "n5_ecb(aes)",
  338. .cra_priority = PRIO,
  339. .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_ALLOCATES_MEMORY,
  340. .cra_blocksize = AES_BLOCK_SIZE,
  341. .cra_ctxsize = sizeof(struct nitrox_crypto_ctx),
  342. .cra_alignmask = 0,
  343. .cra_module = THIS_MODULE,
  344. },
  345. .min_keysize = AES_MIN_KEY_SIZE,
  346. .max_keysize = AES_MAX_KEY_SIZE,
  347. .ivsize = AES_BLOCK_SIZE,
  348. .setkey = nitrox_aes_setkey,
  349. .encrypt = nitrox_aes_encrypt,
  350. .decrypt = nitrox_aes_decrypt,
  351. .init = nitrox_skcipher_init,
  352. .exit = nitrox_skcipher_exit,
  353. }, {
  354. .base = {
  355. .cra_name = "cfb(aes)",
  356. .cra_driver_name = "n5_cfb(aes)",
  357. .cra_priority = PRIO,
  358. .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_ALLOCATES_MEMORY,
  359. .cra_blocksize = AES_BLOCK_SIZE,
  360. .cra_ctxsize = sizeof(struct nitrox_crypto_ctx),
  361. .cra_alignmask = 0,
  362. .cra_module = THIS_MODULE,
  363. },
  364. .min_keysize = AES_MIN_KEY_SIZE,
  365. .max_keysize = AES_MAX_KEY_SIZE,
  366. .ivsize = AES_BLOCK_SIZE,
  367. .setkey = nitrox_aes_setkey,
  368. .encrypt = nitrox_aes_encrypt,
  369. .decrypt = nitrox_aes_decrypt,
  370. .init = nitrox_skcipher_init,
  371. .exit = nitrox_skcipher_exit,
  372. }, {
  373. .base = {
  374. .cra_name = "xts(aes)",
  375. .cra_driver_name = "n5_xts(aes)",
  376. .cra_priority = PRIO,
  377. .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_ALLOCATES_MEMORY,
  378. .cra_blocksize = AES_BLOCK_SIZE,
  379. .cra_ctxsize = sizeof(struct nitrox_crypto_ctx),
  380. .cra_alignmask = 0,
  381. .cra_module = THIS_MODULE,
  382. },
  383. .min_keysize = 2 * AES_MIN_KEY_SIZE,
  384. .max_keysize = 2 * AES_MAX_KEY_SIZE,
  385. .ivsize = AES_BLOCK_SIZE,
  386. .setkey = nitrox_aes_xts_setkey,
  387. .encrypt = nitrox_aes_encrypt,
  388. .decrypt = nitrox_aes_decrypt,
  389. .init = nitrox_skcipher_init,
  390. .exit = nitrox_skcipher_exit,
  391. }, {
  392. .base = {
  393. .cra_name = "rfc3686(ctr(aes))",
  394. .cra_driver_name = "n5_rfc3686(ctr(aes))",
  395. .cra_priority = PRIO,
  396. .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_ALLOCATES_MEMORY,
  397. .cra_blocksize = 1,
  398. .cra_ctxsize = sizeof(struct nitrox_crypto_ctx),
  399. .cra_alignmask = 0,
  400. .cra_module = THIS_MODULE,
  401. },
  402. .min_keysize = AES_MIN_KEY_SIZE + CTR_RFC3686_NONCE_SIZE,
  403. .max_keysize = AES_MAX_KEY_SIZE + CTR_RFC3686_NONCE_SIZE,
  404. .ivsize = CTR_RFC3686_IV_SIZE,
  405. .init = nitrox_skcipher_init,
  406. .exit = nitrox_skcipher_exit,
  407. .setkey = nitrox_aes_ctr_rfc3686_setkey,
  408. .encrypt = nitrox_aes_encrypt,
  409. .decrypt = nitrox_aes_decrypt,
  410. }, {
  411. .base = {
  412. .cra_name = "cts(cbc(aes))",
  413. .cra_driver_name = "n5_cts(cbc(aes))",
  414. .cra_priority = PRIO,
  415. .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_ALLOCATES_MEMORY,
  416. .cra_blocksize = AES_BLOCK_SIZE,
  417. .cra_ctxsize = sizeof(struct nitrox_crypto_ctx),
  418. .cra_alignmask = 0,
  419. .cra_module = THIS_MODULE,
  420. },
  421. .min_keysize = AES_MIN_KEY_SIZE,
  422. .max_keysize = AES_MAX_KEY_SIZE,
  423. .ivsize = AES_BLOCK_SIZE,
  424. .setkey = nitrox_aes_setkey,
  425. .encrypt = nitrox_aes_encrypt,
  426. .decrypt = nitrox_aes_decrypt,
  427. .init = nitrox_skcipher_init,
  428. .exit = nitrox_skcipher_exit,
  429. }, {
  430. .base = {
  431. .cra_name = "cbc(des3_ede)",
  432. .cra_driver_name = "n5_cbc(des3_ede)",
  433. .cra_priority = PRIO,
  434. .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_ALLOCATES_MEMORY,
  435. .cra_blocksize = DES3_EDE_BLOCK_SIZE,
  436. .cra_ctxsize = sizeof(struct nitrox_crypto_ctx),
  437. .cra_alignmask = 0,
  438. .cra_module = THIS_MODULE,
  439. },
  440. .min_keysize = DES3_EDE_KEY_SIZE,
  441. .max_keysize = DES3_EDE_KEY_SIZE,
  442. .ivsize = DES3_EDE_BLOCK_SIZE,
  443. .setkey = nitrox_3des_setkey,
  444. .encrypt = nitrox_3des_encrypt,
  445. .decrypt = nitrox_cbc_decrypt,
  446. .init = nitrox_cbc_init,
  447. .exit = nitrox_skcipher_exit,
  448. }, {
  449. .base = {
  450. .cra_name = "ecb(des3_ede)",
  451. .cra_driver_name = "n5_ecb(des3_ede)",
  452. .cra_priority = PRIO,
  453. .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_ALLOCATES_MEMORY,
  454. .cra_blocksize = DES3_EDE_BLOCK_SIZE,
  455. .cra_ctxsize = sizeof(struct nitrox_crypto_ctx),
  456. .cra_alignmask = 0,
  457. .cra_module = THIS_MODULE,
  458. },
  459. .min_keysize = DES3_EDE_KEY_SIZE,
  460. .max_keysize = DES3_EDE_KEY_SIZE,
  461. .ivsize = DES3_EDE_BLOCK_SIZE,
  462. .setkey = nitrox_3des_setkey,
  463. .encrypt = nitrox_3des_encrypt,
  464. .decrypt = nitrox_3des_decrypt,
  465. .init = nitrox_skcipher_init,
  466. .exit = nitrox_skcipher_exit,
  467. }
  468. };
  469. int nitrox_register_skciphers(void)
  470. {
  471. return crypto_register_skciphers(nitrox_skciphers,
  472. ARRAY_SIZE(nitrox_skciphers));
  473. }
  474. void nitrox_unregister_skciphers(void)
  475. {
  476. crypto_unregister_skciphers(nitrox_skciphers,
  477. ARRAY_SIZE(nitrox_skciphers));
  478. }