ahash.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. /*
  2. * Asynchronous Cryptographic Hash operations.
  3. *
  4. * This is the asynchronous version of hash.c with notification of
  5. * completion via a callback.
  6. *
  7. * Copyright (c) 2008 Loc Ho <lho@amcc.com>
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License as published by the Free
  11. * Software Foundation; either version 2 of the License, or (at your option)
  12. * any later version.
  13. *
  14. */
  15. #include <crypto/internal/hash.h>
  16. #include <crypto/scatterwalk.h>
  17. #include <linux/bug.h>
  18. #include <linux/err.h>
  19. #include <linux/kernel.h>
  20. #include <linux/module.h>
  21. #include <linux/sched.h>
  22. #include <linux/slab.h>
  23. #include <linux/seq_file.h>
  24. #include <linux/cryptouser.h>
  25. #include <linux/compiler.h>
  26. #include <net/netlink.h>
  27. #include "internal.h"
  28. struct ahash_request_priv {
  29. crypto_completion_t complete;
  30. void *data;
  31. u8 *result;
  32. u32 flags;
  33. void *ubuf[] CRYPTO_MINALIGN_ATTR;
  34. };
  35. static inline struct ahash_alg *crypto_ahash_alg(struct crypto_ahash *hash)
  36. {
  37. return container_of(crypto_hash_alg_common(hash), struct ahash_alg,
  38. halg);
  39. }
  40. static int hash_walk_next(struct crypto_hash_walk *walk)
  41. {
  42. unsigned int alignmask = walk->alignmask;
  43. unsigned int offset = walk->offset;
  44. unsigned int nbytes = min(walk->entrylen,
  45. ((unsigned int)(PAGE_SIZE)) - offset);
  46. if (walk->flags & CRYPTO_ALG_ASYNC)
  47. walk->data = kmap(walk->pg);
  48. else
  49. walk->data = kmap_atomic(walk->pg);
  50. walk->data += offset;
  51. if (offset & alignmask) {
  52. unsigned int unaligned = alignmask + 1 - (offset & alignmask);
  53. if (nbytes > unaligned)
  54. nbytes = unaligned;
  55. }
  56. walk->entrylen -= nbytes;
  57. return nbytes;
  58. }
  59. static int hash_walk_new_entry(struct crypto_hash_walk *walk)
  60. {
  61. struct scatterlist *sg;
  62. sg = walk->sg;
  63. walk->offset = sg->offset;
  64. walk->pg = sg_page(walk->sg) + (walk->offset >> PAGE_SHIFT);
  65. walk->offset = offset_in_page(walk->offset);
  66. walk->entrylen = sg->length;
  67. if (walk->entrylen > walk->total)
  68. walk->entrylen = walk->total;
  69. walk->total -= walk->entrylen;
  70. return hash_walk_next(walk);
  71. }
  72. int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err)
  73. {
  74. unsigned int alignmask = walk->alignmask;
  75. unsigned int nbytes = walk->entrylen;
  76. walk->data -= walk->offset;
  77. if (nbytes && walk->offset & alignmask && !err) {
  78. walk->offset = ALIGN(walk->offset, alignmask + 1);
  79. nbytes = min(nbytes,
  80. ((unsigned int)(PAGE_SIZE)) - walk->offset);
  81. walk->entrylen -= nbytes;
  82. if (nbytes) {
  83. walk->data += walk->offset;
  84. return nbytes;
  85. }
  86. }
  87. if (walk->flags & CRYPTO_ALG_ASYNC)
  88. kunmap(walk->pg);
  89. else {
  90. kunmap_atomic(walk->data);
  91. /*
  92. * The may sleep test only makes sense for sync users.
  93. * Async users don't need to sleep here anyway.
  94. */
  95. crypto_yield(walk->flags);
  96. }
  97. if (err)
  98. return err;
  99. if (nbytes) {
  100. walk->offset = 0;
  101. walk->pg++;
  102. return hash_walk_next(walk);
  103. }
  104. if (!walk->total)
  105. return 0;
  106. walk->sg = sg_next(walk->sg);
  107. return hash_walk_new_entry(walk);
  108. }
  109. EXPORT_SYMBOL_GPL(crypto_hash_walk_done);
  110. int crypto_hash_walk_first(struct ahash_request *req,
  111. struct crypto_hash_walk *walk)
  112. {
  113. walk->total = req->nbytes;
  114. if (!walk->total) {
  115. walk->entrylen = 0;
  116. return 0;
  117. }
  118. walk->alignmask = crypto_ahash_alignmask(crypto_ahash_reqtfm(req));
  119. walk->sg = req->src;
  120. walk->flags = req->base.flags & CRYPTO_TFM_REQ_MASK;
  121. return hash_walk_new_entry(walk);
  122. }
  123. EXPORT_SYMBOL_GPL(crypto_hash_walk_first);
  124. int crypto_ahash_walk_first(struct ahash_request *req,
  125. struct crypto_hash_walk *walk)
  126. {
  127. walk->total = req->nbytes;
  128. if (!walk->total) {
  129. walk->entrylen = 0;
  130. return 0;
  131. }
  132. walk->alignmask = crypto_ahash_alignmask(crypto_ahash_reqtfm(req));
  133. walk->sg = req->src;
  134. walk->flags = req->base.flags & CRYPTO_TFM_REQ_MASK;
  135. walk->flags |= CRYPTO_ALG_ASYNC;
  136. BUILD_BUG_ON(CRYPTO_TFM_REQ_MASK & CRYPTO_ALG_ASYNC);
  137. return hash_walk_new_entry(walk);
  138. }
  139. EXPORT_SYMBOL_GPL(crypto_ahash_walk_first);
  140. static int ahash_setkey_unaligned(struct crypto_ahash *tfm, const u8 *key,
  141. unsigned int keylen)
  142. {
  143. unsigned long alignmask = crypto_ahash_alignmask(tfm);
  144. int ret;
  145. u8 *buffer, *alignbuffer;
  146. unsigned long absize;
  147. absize = keylen + alignmask;
  148. buffer = kmalloc(absize, GFP_KERNEL);
  149. if (!buffer)
  150. return -ENOMEM;
  151. alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
  152. memcpy(alignbuffer, key, keylen);
  153. ret = tfm->setkey(tfm, alignbuffer, keylen);
  154. kzfree(buffer);
  155. return ret;
  156. }
  157. int crypto_ahash_setkey(struct crypto_ahash *tfm, const u8 *key,
  158. unsigned int keylen)
  159. {
  160. unsigned long alignmask = crypto_ahash_alignmask(tfm);
  161. int err;
  162. if ((unsigned long)key & alignmask)
  163. err = ahash_setkey_unaligned(tfm, key, keylen);
  164. else
  165. err = tfm->setkey(tfm, key, keylen);
  166. if (err)
  167. return err;
  168. crypto_ahash_clear_flags(tfm, CRYPTO_TFM_NEED_KEY);
  169. return 0;
  170. }
  171. EXPORT_SYMBOL_GPL(crypto_ahash_setkey);
  172. static int ahash_nosetkey(struct crypto_ahash *tfm, const u8 *key,
  173. unsigned int keylen)
  174. {
  175. return -ENOSYS;
  176. }
  177. static inline unsigned int ahash_align_buffer_size(unsigned len,
  178. unsigned long mask)
  179. {
  180. return len + (mask & ~(crypto_tfm_ctx_alignment() - 1));
  181. }
  182. static int ahash_save_req(struct ahash_request *req, crypto_completion_t cplt)
  183. {
  184. struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
  185. unsigned long alignmask = crypto_ahash_alignmask(tfm);
  186. unsigned int ds = crypto_ahash_digestsize(tfm);
  187. struct ahash_request_priv *priv;
  188. priv = kmalloc(sizeof(*priv) + ahash_align_buffer_size(ds, alignmask),
  189. (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ?
  190. GFP_KERNEL : GFP_ATOMIC);
  191. if (!priv)
  192. return -ENOMEM;
  193. /*
  194. * WARNING: Voodoo programming below!
  195. *
  196. * The code below is obscure and hard to understand, thus explanation
  197. * is necessary. See include/crypto/hash.h and include/linux/crypto.h
  198. * to understand the layout of structures used here!
  199. *
  200. * The code here will replace portions of the ORIGINAL request with
  201. * pointers to new code and buffers so the hashing operation can store
  202. * the result in aligned buffer. We will call the modified request
  203. * an ADJUSTED request.
  204. *
  205. * The newly mangled request will look as such:
  206. *
  207. * req {
  208. * .result = ADJUSTED[new aligned buffer]
  209. * .base.complete = ADJUSTED[pointer to completion function]
  210. * .base.data = ADJUSTED[*req (pointer to self)]
  211. * .priv = ADJUSTED[new priv] {
  212. * .result = ORIGINAL(result)
  213. * .complete = ORIGINAL(base.complete)
  214. * .data = ORIGINAL(base.data)
  215. * }
  216. */
  217. priv->result = req->result;
  218. priv->complete = req->base.complete;
  219. priv->data = req->base.data;
  220. priv->flags = req->base.flags;
  221. /*
  222. * WARNING: We do not backup req->priv here! The req->priv
  223. * is for internal use of the Crypto API and the
  224. * user must _NOT_ _EVER_ depend on it's content!
  225. */
  226. req->result = PTR_ALIGN((u8 *)priv->ubuf, alignmask + 1);
  227. req->base.complete = cplt;
  228. req->base.data = req;
  229. req->priv = priv;
  230. return 0;
  231. }
  232. static void ahash_restore_req(struct ahash_request *req, int err)
  233. {
  234. struct ahash_request_priv *priv = req->priv;
  235. if (!err)
  236. memcpy(priv->result, req->result,
  237. crypto_ahash_digestsize(crypto_ahash_reqtfm(req)));
  238. /* Restore the original crypto request. */
  239. req->result = priv->result;
  240. ahash_request_set_callback(req, priv->flags,
  241. priv->complete, priv->data);
  242. req->priv = NULL;
  243. /* Free the req->priv.priv from the ADJUSTED request. */
  244. kzfree(priv);
  245. }
  246. static void ahash_notify_einprogress(struct ahash_request *req)
  247. {
  248. struct ahash_request_priv *priv = req->priv;
  249. struct crypto_async_request oreq;
  250. oreq.data = priv->data;
  251. priv->complete(&oreq, -EINPROGRESS);
  252. }
  253. static void ahash_op_unaligned_done(struct crypto_async_request *req, int err)
  254. {
  255. struct ahash_request *areq = req->data;
  256. if (err == -EINPROGRESS) {
  257. ahash_notify_einprogress(areq);
  258. return;
  259. }
  260. /*
  261. * Restore the original request, see ahash_op_unaligned() for what
  262. * goes where.
  263. *
  264. * The "struct ahash_request *req" here is in fact the "req.base"
  265. * from the ADJUSTED request from ahash_op_unaligned(), thus as it
  266. * is a pointer to self, it is also the ADJUSTED "req" .
  267. */
  268. /* First copy req->result into req->priv.result */
  269. ahash_restore_req(areq, err);
  270. /* Complete the ORIGINAL request. */
  271. areq->base.complete(&areq->base, err);
  272. }
  273. static int ahash_op_unaligned(struct ahash_request *req,
  274. int (*op)(struct ahash_request *))
  275. {
  276. int err;
  277. err = ahash_save_req(req, ahash_op_unaligned_done);
  278. if (err)
  279. return err;
  280. err = op(req);
  281. if (err == -EINPROGRESS || err == -EBUSY)
  282. return err;
  283. ahash_restore_req(req, err);
  284. return err;
  285. }
  286. static int crypto_ahash_op(struct ahash_request *req,
  287. int (*op)(struct ahash_request *))
  288. {
  289. struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
  290. unsigned long alignmask = crypto_ahash_alignmask(tfm);
  291. if ((unsigned long)req->result & alignmask)
  292. return ahash_op_unaligned(req, op);
  293. return op(req);
  294. }
  295. int crypto_ahash_final(struct ahash_request *req)
  296. {
  297. int ret;
  298. ret = crypto_ahash_op(req, crypto_ahash_reqtfm(req)->final);
  299. crypto_stat_ahash_final(req, ret);
  300. return ret;
  301. }
  302. EXPORT_SYMBOL_GPL(crypto_ahash_final);
  303. int crypto_ahash_finup(struct ahash_request *req)
  304. {
  305. int ret;
  306. ret = crypto_ahash_op(req, crypto_ahash_reqtfm(req)->finup);
  307. crypto_stat_ahash_final(req, ret);
  308. return ret;
  309. }
  310. EXPORT_SYMBOL_GPL(crypto_ahash_finup);
  311. int crypto_ahash_digest(struct ahash_request *req)
  312. {
  313. struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
  314. int ret;
  315. if (crypto_ahash_get_flags(tfm) & CRYPTO_TFM_NEED_KEY)
  316. ret = -ENOKEY;
  317. else
  318. ret = crypto_ahash_op(req, tfm->digest);
  319. crypto_stat_ahash_final(req, ret);
  320. return ret;
  321. }
  322. EXPORT_SYMBOL_GPL(crypto_ahash_digest);
  323. static void ahash_def_finup_done2(struct crypto_async_request *req, int err)
  324. {
  325. struct ahash_request *areq = req->data;
  326. if (err == -EINPROGRESS)
  327. return;
  328. ahash_restore_req(areq, err);
  329. areq->base.complete(&areq->base, err);
  330. }
  331. static int ahash_def_finup_finish1(struct ahash_request *req, int err)
  332. {
  333. if (err)
  334. goto out;
  335. req->base.complete = ahash_def_finup_done2;
  336. err = crypto_ahash_reqtfm(req)->final(req);
  337. if (err == -EINPROGRESS || err == -EBUSY)
  338. return err;
  339. out:
  340. ahash_restore_req(req, err);
  341. return err;
  342. }
  343. static void ahash_def_finup_done1(struct crypto_async_request *req, int err)
  344. {
  345. struct ahash_request *areq = req->data;
  346. if (err == -EINPROGRESS) {
  347. ahash_notify_einprogress(areq);
  348. return;
  349. }
  350. areq->base.flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
  351. err = ahash_def_finup_finish1(areq, err);
  352. if (areq->priv)
  353. return;
  354. areq->base.complete(&areq->base, err);
  355. }
  356. static int ahash_def_finup(struct ahash_request *req)
  357. {
  358. struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
  359. int err;
  360. err = ahash_save_req(req, ahash_def_finup_done1);
  361. if (err)
  362. return err;
  363. err = tfm->update(req);
  364. if (err == -EINPROGRESS || err == -EBUSY)
  365. return err;
  366. return ahash_def_finup_finish1(req, err);
  367. }
  368. static int crypto_ahash_init_tfm(struct crypto_tfm *tfm)
  369. {
  370. struct crypto_ahash *hash = __crypto_ahash_cast(tfm);
  371. struct ahash_alg *alg = crypto_ahash_alg(hash);
  372. hash->setkey = ahash_nosetkey;
  373. if (tfm->__crt_alg->cra_type != &crypto_ahash_type)
  374. return crypto_init_shash_ops_async(tfm);
  375. hash->init = alg->init;
  376. hash->update = alg->update;
  377. hash->final = alg->final;
  378. hash->finup = alg->finup ?: ahash_def_finup;
  379. hash->digest = alg->digest;
  380. hash->export = alg->export;
  381. hash->import = alg->import;
  382. if (alg->setkey) {
  383. hash->setkey = alg->setkey;
  384. if (!(alg->halg.base.cra_flags & CRYPTO_ALG_OPTIONAL_KEY))
  385. crypto_ahash_set_flags(hash, CRYPTO_TFM_NEED_KEY);
  386. }
  387. return 0;
  388. }
  389. static unsigned int crypto_ahash_extsize(struct crypto_alg *alg)
  390. {
  391. if (alg->cra_type != &crypto_ahash_type)
  392. return sizeof(struct crypto_shash *);
  393. return crypto_alg_extsize(alg);
  394. }
  395. #ifdef CONFIG_NET
  396. static int crypto_ahash_report(struct sk_buff *skb, struct crypto_alg *alg)
  397. {
  398. struct crypto_report_hash rhash;
  399. strncpy(rhash.type, "ahash", sizeof(rhash.type));
  400. rhash.blocksize = alg->cra_blocksize;
  401. rhash.digestsize = __crypto_hash_alg_common(alg)->digestsize;
  402. if (nla_put(skb, CRYPTOCFGA_REPORT_HASH,
  403. sizeof(struct crypto_report_hash), &rhash))
  404. goto nla_put_failure;
  405. return 0;
  406. nla_put_failure:
  407. return -EMSGSIZE;
  408. }
  409. #else
  410. static int crypto_ahash_report(struct sk_buff *skb, struct crypto_alg *alg)
  411. {
  412. return -ENOSYS;
  413. }
  414. #endif
  415. static void crypto_ahash_show(struct seq_file *m, struct crypto_alg *alg)
  416. __maybe_unused;
  417. static void crypto_ahash_show(struct seq_file *m, struct crypto_alg *alg)
  418. {
  419. seq_printf(m, "type : ahash\n");
  420. seq_printf(m, "async : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ?
  421. "yes" : "no");
  422. seq_printf(m, "blocksize : %u\n", alg->cra_blocksize);
  423. seq_printf(m, "digestsize : %u\n",
  424. __crypto_hash_alg_common(alg)->digestsize);
  425. }
  426. const struct crypto_type crypto_ahash_type = {
  427. .extsize = crypto_ahash_extsize,
  428. .init_tfm = crypto_ahash_init_tfm,
  429. #ifdef CONFIG_PROC_FS
  430. .show = crypto_ahash_show,
  431. #endif
  432. .report = crypto_ahash_report,
  433. .maskclear = ~CRYPTO_ALG_TYPE_MASK,
  434. .maskset = CRYPTO_ALG_TYPE_AHASH_MASK,
  435. .type = CRYPTO_ALG_TYPE_AHASH,
  436. .tfmsize = offsetof(struct crypto_ahash, base),
  437. };
  438. EXPORT_SYMBOL_GPL(crypto_ahash_type);
  439. struct crypto_ahash *crypto_alloc_ahash(const char *alg_name, u32 type,
  440. u32 mask)
  441. {
  442. return crypto_alloc_tfm(alg_name, &crypto_ahash_type, type, mask);
  443. }
  444. EXPORT_SYMBOL_GPL(crypto_alloc_ahash);
  445. int crypto_has_ahash(const char *alg_name, u32 type, u32 mask)
  446. {
  447. return crypto_type_has_alg(alg_name, &crypto_ahash_type, type, mask);
  448. }
  449. EXPORT_SYMBOL_GPL(crypto_has_ahash);
  450. static int ahash_prepare_alg(struct ahash_alg *alg)
  451. {
  452. struct crypto_alg *base = &alg->halg.base;
  453. if (alg->halg.digestsize > HASH_MAX_DIGESTSIZE ||
  454. alg->halg.statesize > HASH_MAX_STATESIZE ||
  455. alg->halg.statesize == 0)
  456. return -EINVAL;
  457. base->cra_type = &crypto_ahash_type;
  458. base->cra_flags &= ~CRYPTO_ALG_TYPE_MASK;
  459. base->cra_flags |= CRYPTO_ALG_TYPE_AHASH;
  460. return 0;
  461. }
  462. int crypto_register_ahash(struct ahash_alg *alg)
  463. {
  464. struct crypto_alg *base = &alg->halg.base;
  465. int err;
  466. err = ahash_prepare_alg(alg);
  467. if (err)
  468. return err;
  469. return crypto_register_alg(base);
  470. }
  471. EXPORT_SYMBOL_GPL(crypto_register_ahash);
  472. int crypto_unregister_ahash(struct ahash_alg *alg)
  473. {
  474. return crypto_unregister_alg(&alg->halg.base);
  475. }
  476. EXPORT_SYMBOL_GPL(crypto_unregister_ahash);
  477. int crypto_register_ahashes(struct ahash_alg *algs, int count)
  478. {
  479. int i, ret;
  480. for (i = 0; i < count; i++) {
  481. ret = crypto_register_ahash(&algs[i]);
  482. if (ret)
  483. goto err;
  484. }
  485. return 0;
  486. err:
  487. for (--i; i >= 0; --i)
  488. crypto_unregister_ahash(&algs[i]);
  489. return ret;
  490. }
  491. EXPORT_SYMBOL_GPL(crypto_register_ahashes);
  492. void crypto_unregister_ahashes(struct ahash_alg *algs, int count)
  493. {
  494. int i;
  495. for (i = count - 1; i >= 0; --i)
  496. crypto_unregister_ahash(&algs[i]);
  497. }
  498. EXPORT_SYMBOL_GPL(crypto_unregister_ahashes);
  499. int ahash_register_instance(struct crypto_template *tmpl,
  500. struct ahash_instance *inst)
  501. {
  502. int err;
  503. err = ahash_prepare_alg(&inst->alg);
  504. if (err)
  505. return err;
  506. return crypto_register_instance(tmpl, ahash_crypto_instance(inst));
  507. }
  508. EXPORT_SYMBOL_GPL(ahash_register_instance);
  509. void ahash_free_instance(struct crypto_instance *inst)
  510. {
  511. crypto_drop_spawn(crypto_instance_ctx(inst));
  512. kfree(ahash_instance(inst));
  513. }
  514. EXPORT_SYMBOL_GPL(ahash_free_instance);
  515. int crypto_init_ahash_spawn(struct crypto_ahash_spawn *spawn,
  516. struct hash_alg_common *alg,
  517. struct crypto_instance *inst)
  518. {
  519. return crypto_init_spawn2(&spawn->base, &alg->base, inst,
  520. &crypto_ahash_type);
  521. }
  522. EXPORT_SYMBOL_GPL(crypto_init_ahash_spawn);
  523. struct hash_alg_common *ahash_attr_alg(struct rtattr *rta, u32 type, u32 mask)
  524. {
  525. struct crypto_alg *alg;
  526. alg = crypto_attr_alg2(rta, &crypto_ahash_type, type, mask);
  527. return IS_ERR(alg) ? ERR_CAST(alg) : __crypto_hash_alg_common(alg);
  528. }
  529. EXPORT_SYMBOL_GPL(ahash_attr_alg);
  530. bool crypto_hash_alg_has_setkey(struct hash_alg_common *halg)
  531. {
  532. struct crypto_alg *alg = &halg->base;
  533. if (alg->cra_type != &crypto_ahash_type)
  534. return crypto_shash_alg_has_setkey(__crypto_shash_alg(alg));
  535. return __crypto_ahash_alg(alg)->setkey != NULL;
  536. }
  537. EXPORT_SYMBOL_GPL(crypto_hash_alg_has_setkey);
  538. MODULE_LICENSE("GPL");
  539. MODULE_DESCRIPTION("Asynchronous cryptographic hash type");