crypt.nut 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. --
  2. -- Copyright (C) 2010 by Ulrich Prinz
  3. --
  4. -- All rights reserved.
  5. --
  6. -- Redistribution and use in source and binary forms, with or without
  7. -- modification, are permitted provided that the following conditions
  8. -- are met:
  9. --
  10. -- 1. Redistributions of source code must retain the above copyright
  11. -- notice, this list of conditions and the following disclaimer.
  12. -- 2. Redistributions in binary form must reproduce the above copyright
  13. -- notice, this list of conditions and the following disclaimer in the
  14. -- documentation and/or other materials provided with the distribution.
  15. -- 3. Neither the name of the copyright holders nor the names of
  16. -- contributors may be used to endorse or promote products derived
  17. -- from this software without specific prior written permission.
  18. --
  19. -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. -- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  23. -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. -- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. -- AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. -- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. -- THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. -- SUCH DAMAGE.
  31. --
  32. -- For additional information see http://www.ethernut.de/
  33. --
  34. -- Gorp linked list modules.
  35. --
  36. -- $Id$
  37. --
  38. nutgorp_crypt =
  39. {
  40. {
  41. name = "nutgorp_list_xtea",
  42. brief = "XTEA Crypto",
  43. description = "Functions to encrypt and decrypt with publich domain XTEA algorythm.",
  44. sources = { "crypt/xtea.c" }
  45. },
  46. {
  47. name = "nutgorp_list_aes",
  48. brief = "AES 128 / 192 / 256",
  49. description = "Byte oriented AES128 / AES192 / AES256 implementation.",
  50. requires = { "TOOL_GCC" },
  51. sources = { "crypt/aes.c" },
  52. options =
  53. {
  54. {
  55. macro = "AES_USE_TABLES",
  56. brief = "Use precalculated tables",
  57. description = "When selected, the ARS algorithm will use pre-calculated\n"..
  58. "tables instead of online-calculations. Select this if\n"..
  59. "code size is less important than speed.",
  60. flavor = "boolean",
  61. provides = { "AES_USE_TABLES" },
  62. file = "include/cfg/aes.h"
  63. },
  64. {
  65. macro = "AES_USE_VERSION_1",
  66. brief = "Use version 1 of the algorithm",
  67. description = "Version 1 of the AES implementation might be faster on some\n"..
  68. "CPUs. Make you own speed tests.",
  69. flavor = "boolean",
  70. file = "include/cfg/aes.h"
  71. },
  72. {
  73. macro = "AES_ENC_PREKEYED",
  74. brief = "Pre-Keyed encryption",
  75. description = "Enable AES encryption with a precomputed key schedule",
  76. flavor = "boolean",
  77. file = "include/cfg/aes.h"
  78. },
  79. {
  80. macro = "AES_DEC_PREKEYED",
  81. brief = "Pre-Keyed decryption",
  82. description = "Enable AES decryption with a precomputed key schedule (standard encryption)",
  83. flavor = "boolean",
  84. file = "include/cfg/aes.h"
  85. },
  86. {
  87. macro = "AES_ENC_128_OTFK",
  88. brief = "128 Bit 'on the fly keying' encryption",
  89. description = "Enable AES encryption with 'on the fly' 128 bit keying",
  90. flavor = "boolean",
  91. file = "include/cfg/aes.h"
  92. },
  93. {
  94. macro = "AES_DEC_128_OTFK",
  95. brief = "128 Bit 'on the fly keying' decryption",
  96. description = "AES decryption with 'on the fly' 128 bit keying",
  97. flavor = "boolean",
  98. file = "include/cfg/aes.h"
  99. },
  100. {
  101. macro = "AES_ENC_256_OTFK",
  102. brief = "256 Bit 'on the fly keying' encryption",
  103. description = "Enable AES encryption with 'on the fly' 256 bit keying",
  104. flavor = "boolean",
  105. file = "include/cfg/aes.h"
  106. },
  107. {
  108. macro = "AES_DEC_256_OTFK",
  109. brief = "256 Bit 'on the fly keying' decryption",
  110. description = "AES decryption with 'on the fly' 256 bit keying",
  111. flavor = "boolean",
  112. file = "include/cfg/aes.h"
  113. }
  114. }
  115. }
  116. }