padlock-sha.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. /*
  2. * Cryptographic API.
  3. *
  4. * Support for VIA PadLock hardware crypto engine.
  5. *
  6. * Copyright (c) 2006 Michal Ludvig <michal@logix.cz>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. */
  14. #include <crypto/internal/hash.h>
  15. #include <crypto/padlock.h>
  16. #include <crypto/sha.h>
  17. #include <linux/err.h>
  18. #include <linux/module.h>
  19. #include <linux/init.h>
  20. #include <linux/errno.h>
  21. #include <linux/interrupt.h>
  22. #include <linux/kernel.h>
  23. #include <linux/scatterlist.h>
  24. #include <asm/i387.h>
  25. struct padlock_sha_desc {
  26. struct shash_desc fallback;
  27. };
  28. struct padlock_sha_ctx {
  29. struct crypto_shash *fallback;
  30. };
  31. static int padlock_sha_init(struct shash_desc *desc)
  32. {
  33. struct padlock_sha_desc *dctx = shash_desc_ctx(desc);
  34. struct padlock_sha_ctx *ctx = crypto_shash_ctx(desc->tfm);
  35. dctx->fallback.tfm = ctx->fallback;
  36. dctx->fallback.flags = desc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
  37. return crypto_shash_init(&dctx->fallback);
  38. }
  39. static int padlock_sha_update(struct shash_desc *desc,
  40. const u8 *data, unsigned int length)
  41. {
  42. struct padlock_sha_desc *dctx = shash_desc_ctx(desc);
  43. dctx->fallback.flags = desc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
  44. return crypto_shash_update(&dctx->fallback, data, length);
  45. }
  46. static int padlock_sha_export(struct shash_desc *desc, void *out)
  47. {
  48. struct padlock_sha_desc *dctx = shash_desc_ctx(desc);
  49. return crypto_shash_export(&dctx->fallback, out);
  50. }
  51. static int padlock_sha_import(struct shash_desc *desc, const void *in)
  52. {
  53. struct padlock_sha_desc *dctx = shash_desc_ctx(desc);
  54. struct padlock_sha_ctx *ctx = crypto_shash_ctx(desc->tfm);
  55. dctx->fallback.tfm = ctx->fallback;
  56. dctx->fallback.flags = desc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
  57. return crypto_shash_import(&dctx->fallback, in);
  58. }
  59. static inline void padlock_output_block(uint32_t *src,
  60. uint32_t *dst, size_t count)
  61. {
  62. while (count--)
  63. *dst++ = swab32(*src++);
  64. }
  65. static int padlock_sha1_finup(struct shash_desc *desc, const u8 *in,
  66. unsigned int count, u8 *out)
  67. {
  68. /* We can't store directly to *out as it may be unaligned. */
  69. /* BTW Don't reduce the buffer size below 128 Bytes!
  70. * PadLock microcode needs it that big. */
  71. char buf[128 + PADLOCK_ALIGNMENT - STACK_ALIGN] __attribute__
  72. ((aligned(STACK_ALIGN)));
  73. char *result = PTR_ALIGN(&buf[0], PADLOCK_ALIGNMENT);
  74. struct padlock_sha_desc *dctx = shash_desc_ctx(desc);
  75. struct sha1_state state;
  76. unsigned int space;
  77. unsigned int leftover;
  78. int ts_state;
  79. int err;
  80. dctx->fallback.flags = desc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
  81. err = crypto_shash_export(&dctx->fallback, &state);
  82. if (err)
  83. goto out;
  84. if (state.count + count > ULONG_MAX)
  85. return crypto_shash_finup(&dctx->fallback, in, count, out);
  86. leftover = ((state.count - 1) & (SHA1_BLOCK_SIZE - 1)) + 1;
  87. space = SHA1_BLOCK_SIZE - leftover;
  88. if (space) {
  89. if (count > space) {
  90. err = crypto_shash_update(&dctx->fallback, in, space) ?:
  91. crypto_shash_export(&dctx->fallback, &state);
  92. if (err)
  93. goto out;
  94. count -= space;
  95. in += space;
  96. } else {
  97. memcpy(state.buffer + leftover, in, count);
  98. in = state.buffer;
  99. count += leftover;
  100. state.count &= ~(SHA1_BLOCK_SIZE - 1);
  101. }
  102. }
  103. memcpy(result, &state.state, SHA1_DIGEST_SIZE);
  104. /* prevent taking the spurious DNA fault with padlock. */
  105. ts_state = irq_ts_save();
  106. asm volatile (".byte 0xf3,0x0f,0xa6,0xc8" /* rep xsha1 */
  107. : \
  108. : "c"((unsigned long)state.count + count), \
  109. "a"((unsigned long)state.count), \
  110. "S"(in), "D"(result));
  111. irq_ts_restore(ts_state);
  112. padlock_output_block((uint32_t *)result, (uint32_t *)out, 5);
  113. out:
  114. return err;
  115. }
  116. static int padlock_sha1_final(struct shash_desc *desc, u8 *out)
  117. {
  118. u8 buf[4];
  119. return padlock_sha1_finup(desc, buf, 0, out);
  120. }
  121. static int padlock_sha256_finup(struct shash_desc *desc, const u8 *in,
  122. unsigned int count, u8 *out)
  123. {
  124. /* We can't store directly to *out as it may be unaligned. */
  125. /* BTW Don't reduce the buffer size below 128 Bytes!
  126. * PadLock microcode needs it that big. */
  127. char buf[128 + PADLOCK_ALIGNMENT - STACK_ALIGN] __attribute__
  128. ((aligned(STACK_ALIGN)));
  129. char *result = PTR_ALIGN(&buf[0], PADLOCK_ALIGNMENT);
  130. struct padlock_sha_desc *dctx = shash_desc_ctx(desc);
  131. struct sha256_state state;
  132. unsigned int space;
  133. unsigned int leftover;
  134. int ts_state;
  135. int err;
  136. dctx->fallback.flags = desc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
  137. err = crypto_shash_export(&dctx->fallback, &state);
  138. if (err)
  139. goto out;
  140. if (state.count + count > ULONG_MAX)
  141. return crypto_shash_finup(&dctx->fallback, in, count, out);
  142. leftover = ((state.count - 1) & (SHA256_BLOCK_SIZE - 1)) + 1;
  143. space = SHA256_BLOCK_SIZE - leftover;
  144. if (space) {
  145. if (count > space) {
  146. err = crypto_shash_update(&dctx->fallback, in, space) ?:
  147. crypto_shash_export(&dctx->fallback, &state);
  148. if (err)
  149. goto out;
  150. count -= space;
  151. in += space;
  152. } else {
  153. memcpy(state.buf + leftover, in, count);
  154. in = state.buf;
  155. count += leftover;
  156. state.count &= ~(SHA1_BLOCK_SIZE - 1);
  157. }
  158. }
  159. memcpy(result, &state.state, SHA256_DIGEST_SIZE);
  160. /* prevent taking the spurious DNA fault with padlock. */
  161. ts_state = irq_ts_save();
  162. asm volatile (".byte 0xf3,0x0f,0xa6,0xd0" /* rep xsha256 */
  163. : \
  164. : "c"((unsigned long)state.count + count), \
  165. "a"((unsigned long)state.count), \
  166. "S"(in), "D"(result));
  167. irq_ts_restore(ts_state);
  168. padlock_output_block((uint32_t *)result, (uint32_t *)out, 8);
  169. out:
  170. return err;
  171. }
  172. static int padlock_sha256_final(struct shash_desc *desc, u8 *out)
  173. {
  174. u8 buf[4];
  175. return padlock_sha256_finup(desc, buf, 0, out);
  176. }
  177. static int padlock_cra_init(struct crypto_tfm *tfm)
  178. {
  179. struct crypto_shash *hash = __crypto_shash_cast(tfm);
  180. const char *fallback_driver_name = tfm->__crt_alg->cra_name;
  181. struct padlock_sha_ctx *ctx = crypto_tfm_ctx(tfm);
  182. struct crypto_shash *fallback_tfm;
  183. int err = -ENOMEM;
  184. /* Allocate a fallback and abort if it failed. */
  185. fallback_tfm = crypto_alloc_shash(fallback_driver_name, 0,
  186. CRYPTO_ALG_NEED_FALLBACK);
  187. if (IS_ERR(fallback_tfm)) {
  188. printk(KERN_WARNING PFX "Fallback driver '%s' could not be loaded!\n",
  189. fallback_driver_name);
  190. err = PTR_ERR(fallback_tfm);
  191. goto out;
  192. }
  193. ctx->fallback = fallback_tfm;
  194. hash->descsize += crypto_shash_descsize(fallback_tfm);
  195. return 0;
  196. out:
  197. return err;
  198. }
  199. static void padlock_cra_exit(struct crypto_tfm *tfm)
  200. {
  201. struct padlock_sha_ctx *ctx = crypto_tfm_ctx(tfm);
  202. crypto_free_shash(ctx->fallback);
  203. }
  204. static struct shash_alg sha1_alg = {
  205. .digestsize = SHA1_DIGEST_SIZE,
  206. .init = padlock_sha_init,
  207. .update = padlock_sha_update,
  208. .finup = padlock_sha1_finup,
  209. .final = padlock_sha1_final,
  210. .export = padlock_sha_export,
  211. .import = padlock_sha_import,
  212. .descsize = sizeof(struct padlock_sha_desc),
  213. .statesize = sizeof(struct sha1_state),
  214. .base = {
  215. .cra_name = "sha1",
  216. .cra_driver_name = "sha1-padlock",
  217. .cra_priority = PADLOCK_CRA_PRIORITY,
  218. .cra_flags = CRYPTO_ALG_TYPE_SHASH |
  219. CRYPTO_ALG_NEED_FALLBACK,
  220. .cra_blocksize = SHA1_BLOCK_SIZE,
  221. .cra_ctxsize = sizeof(struct padlock_sha_ctx),
  222. .cra_module = THIS_MODULE,
  223. .cra_init = padlock_cra_init,
  224. .cra_exit = padlock_cra_exit,
  225. }
  226. };
  227. static struct shash_alg sha256_alg = {
  228. .digestsize = SHA256_DIGEST_SIZE,
  229. .init = padlock_sha_init,
  230. .update = padlock_sha_update,
  231. .finup = padlock_sha256_finup,
  232. .final = padlock_sha256_final,
  233. .export = padlock_sha_export,
  234. .import = padlock_sha_import,
  235. .descsize = sizeof(struct padlock_sha_desc),
  236. .statesize = sizeof(struct sha256_state),
  237. .base = {
  238. .cra_name = "sha256",
  239. .cra_driver_name = "sha256-padlock",
  240. .cra_priority = PADLOCK_CRA_PRIORITY,
  241. .cra_flags = CRYPTO_ALG_TYPE_SHASH |
  242. CRYPTO_ALG_NEED_FALLBACK,
  243. .cra_blocksize = SHA256_BLOCK_SIZE,
  244. .cra_ctxsize = sizeof(struct padlock_sha_ctx),
  245. .cra_module = THIS_MODULE,
  246. .cra_init = padlock_cra_init,
  247. .cra_exit = padlock_cra_exit,
  248. }
  249. };
  250. /* Add two shash_alg instance for hardware-implemented *
  251. * multiple-parts hash supported by VIA Nano Processor.*/
  252. static int padlock_sha1_init_nano(struct shash_desc *desc)
  253. {
  254. struct sha1_state *sctx = shash_desc_ctx(desc);
  255. *sctx = (struct sha1_state){
  256. .state = { SHA1_H0, SHA1_H1, SHA1_H2, SHA1_H3, SHA1_H4 },
  257. };
  258. return 0;
  259. }
  260. static int padlock_sha1_update_nano(struct shash_desc *desc,
  261. const u8 *data, unsigned int len)
  262. {
  263. struct sha1_state *sctx = shash_desc_ctx(desc);
  264. unsigned int partial, done;
  265. const u8 *src;
  266. /*The PHE require the out buffer must 128 bytes and 16-bytes aligned*/
  267. u8 buf[128 + PADLOCK_ALIGNMENT - STACK_ALIGN] __attribute__
  268. ((aligned(STACK_ALIGN)));
  269. u8 *dst = PTR_ALIGN(&buf[0], PADLOCK_ALIGNMENT);
  270. int ts_state;
  271. partial = sctx->count & 0x3f;
  272. sctx->count += len;
  273. done = 0;
  274. src = data;
  275. memcpy(dst, (u8 *)(sctx->state), SHA1_DIGEST_SIZE);
  276. if ((partial + len) >= SHA1_BLOCK_SIZE) {
  277. /* Append the bytes in state's buffer to a block to handle */
  278. if (partial) {
  279. done = -partial;
  280. memcpy(sctx->buffer + partial, data,
  281. done + SHA1_BLOCK_SIZE);
  282. src = sctx->buffer;
  283. ts_state = irq_ts_save();
  284. asm volatile (".byte 0xf3,0x0f,0xa6,0xc8"
  285. : "+S"(src), "+D"(dst) \
  286. : "a"((long)-1), "c"((unsigned long)1));
  287. irq_ts_restore(ts_state);
  288. done += SHA1_BLOCK_SIZE;
  289. src = data + done;
  290. }
  291. /* Process the left bytes from the input data */
  292. if (len - done >= SHA1_BLOCK_SIZE) {
  293. ts_state = irq_ts_save();
  294. asm volatile (".byte 0xf3,0x0f,0xa6,0xc8"
  295. : "+S"(src), "+D"(dst)
  296. : "a"((long)-1),
  297. "c"((unsigned long)((len - done) / SHA1_BLOCK_SIZE)));
  298. irq_ts_restore(ts_state);
  299. done += ((len - done) - (len - done) % SHA1_BLOCK_SIZE);
  300. src = data + done;
  301. }
  302. partial = 0;
  303. }
  304. memcpy((u8 *)(sctx->state), dst, SHA1_DIGEST_SIZE);
  305. memcpy(sctx->buffer + partial, src, len - done);
  306. return 0;
  307. }
  308. static int padlock_sha1_final_nano(struct shash_desc *desc, u8 *out)
  309. {
  310. struct sha1_state *state = (struct sha1_state *)shash_desc_ctx(desc);
  311. unsigned int partial, padlen;
  312. __be64 bits;
  313. static const u8 padding[64] = { 0x80, };
  314. bits = cpu_to_be64(state->count << 3);
  315. /* Pad out to 56 mod 64 */
  316. partial = state->count & 0x3f;
  317. padlen = (partial < 56) ? (56 - partial) : ((64+56) - partial);
  318. padlock_sha1_update_nano(desc, padding, padlen);
  319. /* Append length field bytes */
  320. padlock_sha1_update_nano(desc, (const u8 *)&bits, sizeof(bits));
  321. /* Swap to output */
  322. padlock_output_block((uint32_t *)(state->state), (uint32_t *)out, 5);
  323. return 0;
  324. }
  325. static int padlock_sha256_init_nano(struct shash_desc *desc)
  326. {
  327. struct sha256_state *sctx = shash_desc_ctx(desc);
  328. *sctx = (struct sha256_state){
  329. .state = { SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3, \
  330. SHA256_H4, SHA256_H5, SHA256_H6, SHA256_H7},
  331. };
  332. return 0;
  333. }
  334. static int padlock_sha256_update_nano(struct shash_desc *desc, const u8 *data,
  335. unsigned int len)
  336. {
  337. struct sha256_state *sctx = shash_desc_ctx(desc);
  338. unsigned int partial, done;
  339. const u8 *src;
  340. /*The PHE require the out buffer must 128 bytes and 16-bytes aligned*/
  341. u8 buf[128 + PADLOCK_ALIGNMENT - STACK_ALIGN] __attribute__
  342. ((aligned(STACK_ALIGN)));
  343. u8 *dst = PTR_ALIGN(&buf[0], PADLOCK_ALIGNMENT);
  344. int ts_state;
  345. partial = sctx->count & 0x3f;
  346. sctx->count += len;
  347. done = 0;
  348. src = data;
  349. memcpy(dst, (u8 *)(sctx->state), SHA256_DIGEST_SIZE);
  350. if ((partial + len) >= SHA256_BLOCK_SIZE) {
  351. /* Append the bytes in state's buffer to a block to handle */
  352. if (partial) {
  353. done = -partial;
  354. memcpy(sctx->buf + partial, data,
  355. done + SHA256_BLOCK_SIZE);
  356. src = sctx->buf;
  357. ts_state = irq_ts_save();
  358. asm volatile (".byte 0xf3,0x0f,0xa6,0xd0"
  359. : "+S"(src), "+D"(dst)
  360. : "a"((long)-1), "c"((unsigned long)1));
  361. irq_ts_restore(ts_state);
  362. done += SHA256_BLOCK_SIZE;
  363. src = data + done;
  364. }
  365. /* Process the left bytes from input data*/
  366. if (len - done >= SHA256_BLOCK_SIZE) {
  367. ts_state = irq_ts_save();
  368. asm volatile (".byte 0xf3,0x0f,0xa6,0xd0"
  369. : "+S"(src), "+D"(dst)
  370. : "a"((long)-1),
  371. "c"((unsigned long)((len - done) / 64)));
  372. irq_ts_restore(ts_state);
  373. done += ((len - done) - (len - done) % 64);
  374. src = data + done;
  375. }
  376. partial = 0;
  377. }
  378. memcpy((u8 *)(sctx->state), dst, SHA256_DIGEST_SIZE);
  379. memcpy(sctx->buf + partial, src, len - done);
  380. return 0;
  381. }
  382. static int padlock_sha256_final_nano(struct shash_desc *desc, u8 *out)
  383. {
  384. struct sha256_state *state =
  385. (struct sha256_state *)shash_desc_ctx(desc);
  386. unsigned int partial, padlen;
  387. __be64 bits;
  388. static const u8 padding[64] = { 0x80, };
  389. bits = cpu_to_be64(state->count << 3);
  390. /* Pad out to 56 mod 64 */
  391. partial = state->count & 0x3f;
  392. padlen = (partial < 56) ? (56 - partial) : ((64+56) - partial);
  393. padlock_sha256_update_nano(desc, padding, padlen);
  394. /* Append length field bytes */
  395. padlock_sha256_update_nano(desc, (const u8 *)&bits, sizeof(bits));
  396. /* Swap to output */
  397. padlock_output_block((uint32_t *)(state->state), (uint32_t *)out, 8);
  398. return 0;
  399. }
  400. static int padlock_sha_export_nano(struct shash_desc *desc,
  401. void *out)
  402. {
  403. int statesize = crypto_shash_statesize(desc->tfm);
  404. void *sctx = shash_desc_ctx(desc);
  405. memcpy(out, sctx, statesize);
  406. return 0;
  407. }
  408. static int padlock_sha_import_nano(struct shash_desc *desc,
  409. const void *in)
  410. {
  411. int statesize = crypto_shash_statesize(desc->tfm);
  412. void *sctx = shash_desc_ctx(desc);
  413. memcpy(sctx, in, statesize);
  414. return 0;
  415. }
  416. static struct shash_alg sha1_alg_nano = {
  417. .digestsize = SHA1_DIGEST_SIZE,
  418. .init = padlock_sha1_init_nano,
  419. .update = padlock_sha1_update_nano,
  420. .final = padlock_sha1_final_nano,
  421. .export = padlock_sha_export_nano,
  422. .import = padlock_sha_import_nano,
  423. .descsize = sizeof(struct sha1_state),
  424. .statesize = sizeof(struct sha1_state),
  425. .base = {
  426. .cra_name = "sha1",
  427. .cra_driver_name = "sha1-padlock-nano",
  428. .cra_priority = PADLOCK_CRA_PRIORITY,
  429. .cra_flags = CRYPTO_ALG_TYPE_SHASH,
  430. .cra_blocksize = SHA1_BLOCK_SIZE,
  431. .cra_module = THIS_MODULE,
  432. }
  433. };
  434. static struct shash_alg sha256_alg_nano = {
  435. .digestsize = SHA256_DIGEST_SIZE,
  436. .init = padlock_sha256_init_nano,
  437. .update = padlock_sha256_update_nano,
  438. .final = padlock_sha256_final_nano,
  439. .export = padlock_sha_export_nano,
  440. .import = padlock_sha_import_nano,
  441. .descsize = sizeof(struct sha256_state),
  442. .statesize = sizeof(struct sha256_state),
  443. .base = {
  444. .cra_name = "sha256",
  445. .cra_driver_name = "sha256-padlock-nano",
  446. .cra_priority = PADLOCK_CRA_PRIORITY,
  447. .cra_flags = CRYPTO_ALG_TYPE_SHASH,
  448. .cra_blocksize = SHA256_BLOCK_SIZE,
  449. .cra_module = THIS_MODULE,
  450. }
  451. };
  452. static int __init padlock_init(void)
  453. {
  454. int rc = -ENODEV;
  455. struct cpuinfo_x86 *c = &cpu_data(0);
  456. struct shash_alg *sha1;
  457. struct shash_alg *sha256;
  458. if (!cpu_has_phe) {
  459. printk(KERN_NOTICE PFX "VIA PadLock Hash Engine not detected.\n");
  460. return -ENODEV;
  461. }
  462. if (!cpu_has_phe_enabled) {
  463. printk(KERN_NOTICE PFX "VIA PadLock detected, but not enabled. Hmm, strange...\n");
  464. return -ENODEV;
  465. }
  466. /* Register the newly added algorithm module if on *
  467. * VIA Nano processor, or else just do as before */
  468. if (c->x86_model < 0x0f) {
  469. sha1 = &sha1_alg;
  470. sha256 = &sha256_alg;
  471. } else {
  472. sha1 = &sha1_alg_nano;
  473. sha256 = &sha256_alg_nano;
  474. }
  475. rc = crypto_register_shash(sha1);
  476. if (rc)
  477. goto out;
  478. rc = crypto_register_shash(sha256);
  479. if (rc)
  480. goto out_unreg1;
  481. printk(KERN_NOTICE PFX "Using VIA PadLock ACE for SHA1/SHA256 algorithms.\n");
  482. return 0;
  483. out_unreg1:
  484. crypto_unregister_shash(sha1);
  485. out:
  486. printk(KERN_ERR PFX "VIA PadLock SHA1/SHA256 initialization failed.\n");
  487. return rc;
  488. }
  489. static void __exit padlock_fini(void)
  490. {
  491. struct cpuinfo_x86 *c = &cpu_data(0);
  492. if (c->x86_model >= 0x0f) {
  493. crypto_unregister_shash(&sha1_alg_nano);
  494. crypto_unregister_shash(&sha256_alg_nano);
  495. } else {
  496. crypto_unregister_shash(&sha1_alg);
  497. crypto_unregister_shash(&sha256_alg);
  498. }
  499. }
  500. module_init(padlock_init);
  501. module_exit(padlock_fini);
  502. MODULE_DESCRIPTION("VIA PadLock SHA1/SHA256 algorithms support.");
  503. MODULE_LICENSE("GPL");
  504. MODULE_AUTHOR("Michal Ludvig");
  505. MODULE_ALIAS("sha1-all");
  506. MODULE_ALIAS("sha256-all");
  507. MODULE_ALIAS("sha1-padlock");
  508. MODULE_ALIAS("sha256-padlock");