bcal_noekeon.c 892 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* bcal_noekeon.c */
  2. #include <stdlib.h>
  3. #include <crypto/blockcipher_descriptor.h>
  4. #include <crypto/noekeon.h>
  5. #include <crypto/keysize_descriptor.h>
  6. const char noekeon_direct_str[] = "Noekeon-Direct";
  7. const char noekeon_indirect_str[] = "Noekeon-Indirect";
  8. const uint8_t noekeon_keysize_desc[] = { KS_TYPE_LIST, 1, KS_INT(128),
  9. KS_TYPE_TERMINATOR };
  10. const bcdesc_t noekeon_direct_desc = {
  11. BCDESC_TYPE_BLOCKCIPHER,
  12. BC_ENC_TYPE_1,
  13. noekeon_direct_str,
  14. 16,
  15. 128,
  16. {(void_fpt)NULL},
  17. {(void_fpt)noekeon_enc},
  18. {(void_fpt)noekeon_dec},
  19. (bc_free_fpt)NULL,
  20. noekeon_keysize_desc
  21. };
  22. const bcdesc_t noekeon_indirect_desc = {
  23. BCDESC_TYPE_BLOCKCIPHER,
  24. BC_INIT_TYPE_1 | BC_ENC_TYPE_1,
  25. noekeon_indirect_str,
  26. 16,
  27. 128,
  28. {(void_fpt)noekeon_init},
  29. {(void_fpt)noekeon_enc},
  30. {(void_fpt)noekeon_dec},
  31. (bc_free_fpt)NULL,
  32. noekeon_keysize_desc
  33. };