hfal_groestl_large.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* hfal_groestl_large.c */
  2. /*
  3. This file is part of the ARM-Crypto-Lib.
  4. Copyright (C) 2009 Daniel Otte (daniel.otte@rub.de)
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. /**
  17. * \file hfal_groestl_large.c
  18. * \email daniel.otte@rub.de
  19. * \author Daniel Otte
  20. * \date 2009-05-05
  21. * \license GPLv3 or later
  22. *
  23. */
  24. #include <stdlib.h>
  25. #include <crypto/hashfunction_descriptor.h>
  26. #include <crypto/groestl_large.h>
  27. #include <crypto/groestl_small.h>
  28. static const char groestl384_str[] = "Groestl-384";
  29. static const char groestl512_str[] = "Groestl-512";
  30. const hfdesc_t groestl384_desc = {
  31. HFDESC_TYPE_HASHFUNCTION,
  32. 0,
  33. groestl384_str,
  34. sizeof(groestl384_ctx_t),
  35. GROESTL384_BLOCKSIZE,
  36. 384,
  37. (hf_init_fpt)groestl384_init,
  38. (hf_nextBlock_fpt)groestl_large_nextBlock,
  39. (hf_lastBlock_fpt)groestl_large_lastBlock,
  40. (hf_ctx2hash_fpt)groestl384_ctx2hash,
  41. (hf_free_fpt)NULL,
  42. (hf_mem_fpt)groestl384
  43. };
  44. const hfdesc_t groestl512_desc = {
  45. HFDESC_TYPE_HASHFUNCTION,
  46. 0,
  47. groestl512_str,
  48. sizeof(groestl512_ctx_t),
  49. GROESTL512_BLOCKSIZE,
  50. 512,
  51. (hf_init_fpt)groestl512_init,
  52. (hf_nextBlock_fpt)groestl_large_nextBlock,
  53. (hf_lastBlock_fpt)groestl_large_lastBlock,
  54. (hf_ctx2hash_fpt)groestl512_ctx2hash,
  55. (hf_free_fpt)NULL,
  56. (hf_mem_fpt)groestl512
  57. };