edhoc 1.3.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (759) hide show
  1. package/.clang-format +79 -0
  2. package/README.md +6 -5
  3. package/dist/cbor-utils.d.ts +30 -0
  4. package/dist/cbor-utils.d.ts.map +1 -0
  5. package/dist/cbor-utils.js +179 -0
  6. package/dist/cipher-suites.d.ts +13 -0
  7. package/dist/cipher-suites.d.ts.map +1 -0
  8. package/dist/cipher-suites.js +22 -0
  9. package/dist/edhoc.d.ts +85 -277
  10. package/dist/edhoc.d.ts.map +1 -1
  11. package/dist/edhoc.js +562 -34
  12. package/package.json +5 -19
  13. package/.gitmodules +0 -3
  14. package/binding.gyp +0 -66
  15. package/dist/bindings.d.ts +0 -5
  16. package/dist/bindings.d.ts.map +0 -1
  17. package/dist/bindings.js +0 -10
  18. package/external/libedhoc/backends/cbor/include/backend_cbor_bstr_type_decode.h +0 -35
  19. package/external/libedhoc/backends/cbor/include/backend_cbor_bstr_type_encode.h +0 -35
  20. package/external/libedhoc/backends/cbor/include/backend_cbor_bstr_type_types.h +0 -34
  21. package/external/libedhoc/backends/cbor/include/backend_cbor_ead_decode.h +0 -35
  22. package/external/libedhoc/backends/cbor/include/backend_cbor_ead_encode.h +0 -35
  23. package/external/libedhoc/backends/cbor/include/backend_cbor_edhoc_types.h +0 -102
  24. package/external/libedhoc/backends/cbor/include/backend_cbor_enc_structure_decode.h +0 -35
  25. package/external/libedhoc/backends/cbor/include/backend_cbor_enc_structure_encode.h +0 -35
  26. package/external/libedhoc/backends/cbor/include/backend_cbor_enc_structure_types.h +0 -37
  27. package/external/libedhoc/backends/cbor/include/backend_cbor_id_cred_x_decode.h +0 -35
  28. package/external/libedhoc/backends/cbor/include/backend_cbor_id_cred_x_encode.h +0 -35
  29. package/external/libedhoc/backends/cbor/include/backend_cbor_info_decode.h +0 -35
  30. package/external/libedhoc/backends/cbor/include/backend_cbor_info_encode.h +0 -35
  31. package/external/libedhoc/backends/cbor/include/backend_cbor_int_type_decode.h +0 -35
  32. package/external/libedhoc/backends/cbor/include/backend_cbor_int_type_encode.h +0 -35
  33. package/external/libedhoc/backends/cbor/include/backend_cbor_int_type_types.h +0 -34
  34. package/external/libedhoc/backends/cbor/include/backend_cbor_message_1_decode.h +0 -35
  35. package/external/libedhoc/backends/cbor/include/backend_cbor_message_1_encode.h +0 -35
  36. package/external/libedhoc/backends/cbor/include/backend_cbor_message_2_decode.h +0 -35
  37. package/external/libedhoc/backends/cbor/include/backend_cbor_message_2_encode.h +0 -35
  38. package/external/libedhoc/backends/cbor/include/backend_cbor_message_3_decode.h +0 -35
  39. package/external/libedhoc/backends/cbor/include/backend_cbor_message_3_encode.h +0 -35
  40. package/external/libedhoc/backends/cbor/include/backend_cbor_message_4_decode.h +0 -35
  41. package/external/libedhoc/backends/cbor/include/backend_cbor_message_4_encode.h +0 -35
  42. package/external/libedhoc/backends/cbor/include/backend_cbor_message_error_decode.h +0 -35
  43. package/external/libedhoc/backends/cbor/include/backend_cbor_message_error_encode.h +0 -35
  44. package/external/libedhoc/backends/cbor/include/backend_cbor_plaintext_2_decode.h +0 -35
  45. package/external/libedhoc/backends/cbor/include/backend_cbor_plaintext_2_encode.h +0 -35
  46. package/external/libedhoc/backends/cbor/include/backend_cbor_plaintext_3_decode.h +0 -35
  47. package/external/libedhoc/backends/cbor/include/backend_cbor_plaintext_3_encode.h +0 -35
  48. package/external/libedhoc/backends/cbor/include/backend_cbor_plaintext_4_decode.h +0 -35
  49. package/external/libedhoc/backends/cbor/include/backend_cbor_plaintext_4_encode.h +0 -35
  50. package/external/libedhoc/backends/cbor/include/backend_cbor_sig_structure_decode.h +0 -35
  51. package/external/libedhoc/backends/cbor/include/backend_cbor_sig_structure_encode.h +0 -35
  52. package/external/libedhoc/backends/cbor/include/backend_cbor_sig_structure_types.h +0 -38
  53. package/external/libedhoc/backends/cbor/include/backend_cbor_x509_types.h +0 -180
  54. package/external/libedhoc/backends/cbor/src/backend_cbor_bstr_type_decode.c +0 -50
  55. package/external/libedhoc/backends/cbor/src/backend_cbor_bstr_type_encode.c +0 -50
  56. package/external/libedhoc/backends/cbor/src/backend_cbor_ead_decode.c +0 -69
  57. package/external/libedhoc/backends/cbor/src/backend_cbor_ead_encode.c +0 -69
  58. package/external/libedhoc/backends/cbor/src/backend_cbor_enc_structure_decode.c +0 -53
  59. package/external/libedhoc/backends/cbor/src/backend_cbor_enc_structure_encode.c +0 -53
  60. package/external/libedhoc/backends/cbor/src/backend_cbor_id_cred_x_decode.c +0 -152
  61. package/external/libedhoc/backends/cbor/src/backend_cbor_id_cred_x_encode.c +0 -152
  62. package/external/libedhoc/backends/cbor/src/backend_cbor_info_decode.c +0 -52
  63. package/external/libedhoc/backends/cbor/src/backend_cbor_info_encode.c +0 -52
  64. package/external/libedhoc/backends/cbor/src/backend_cbor_int_type_decode.c +0 -50
  65. package/external/libedhoc/backends/cbor/src/backend_cbor_int_type_encode.c +0 -50
  66. package/external/libedhoc/backends/cbor/src/backend_cbor_message_1_decode.c +0 -115
  67. package/external/libedhoc/backends/cbor/src/backend_cbor_message_1_encode.c +0 -115
  68. package/external/libedhoc/backends/cbor/src/backend_cbor_message_2_decode.c +0 -50
  69. package/external/libedhoc/backends/cbor/src/backend_cbor_message_2_encode.c +0 -50
  70. package/external/libedhoc/backends/cbor/src/backend_cbor_message_3_decode.c +0 -50
  71. package/external/libedhoc/backends/cbor/src/backend_cbor_message_3_encode.c +0 -50
  72. package/external/libedhoc/backends/cbor/src/backend_cbor_message_4_decode.c +0 -50
  73. package/external/libedhoc/backends/cbor/src/backend_cbor_message_4_encode.c +0 -50
  74. package/external/libedhoc/backends/cbor/src/backend_cbor_message_error_decode.c +0 -92
  75. package/external/libedhoc/backends/cbor/src/backend_cbor_message_error_encode.c +0 -92
  76. package/external/libedhoc/backends/cbor/src/backend_cbor_plaintext_2_decode.c +0 -216
  77. package/external/libedhoc/backends/cbor/src/backend_cbor_plaintext_2_encode.c +0 -217
  78. package/external/libedhoc/backends/cbor/src/backend_cbor_plaintext_3_decode.c +0 -212
  79. package/external/libedhoc/backends/cbor/src/backend_cbor_plaintext_3_encode.c +0 -212
  80. package/external/libedhoc/backends/cbor/src/backend_cbor_plaintext_4_decode.c +0 -87
  81. package/external/libedhoc/backends/cbor/src/backend_cbor_plaintext_4_encode.c +0 -87
  82. package/external/libedhoc/backends/cbor/src/backend_cbor_sig_structure_decode.c +0 -54
  83. package/external/libedhoc/backends/cbor/src/backend_cbor_sig_structure_encode.c +0 -54
  84. package/external/libedhoc/externals/Unity/examples/example_1/src/ProductionCode.c +0 -31
  85. package/external/libedhoc/externals/Unity/examples/example_1/src/ProductionCode.h +0 -10
  86. package/external/libedhoc/externals/Unity/examples/example_1/src/ProductionCode2.c +0 -18
  87. package/external/libedhoc/externals/Unity/examples/example_1/src/ProductionCode2.h +0 -9
  88. package/external/libedhoc/externals/Unity/examples/example_1/test/TestProductionCode.c +0 -69
  89. package/external/libedhoc/externals/Unity/examples/example_1/test/TestProductionCode2.c +0 -38
  90. package/external/libedhoc/externals/Unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +0 -53
  91. package/external/libedhoc/externals/Unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +0 -57
  92. package/external/libedhoc/externals/Unity/examples/example_2/src/ProductionCode.c +0 -31
  93. package/external/libedhoc/externals/Unity/examples/example_2/src/ProductionCode.h +0 -10
  94. package/external/libedhoc/externals/Unity/examples/example_2/src/ProductionCode2.c +0 -18
  95. package/external/libedhoc/externals/Unity/examples/example_2/src/ProductionCode2.h +0 -9
  96. package/external/libedhoc/externals/Unity/examples/example_2/test/TestProductionCode.c +0 -71
  97. package/external/libedhoc/externals/Unity/examples/example_2/test/TestProductionCode2.c +0 -40
  98. package/external/libedhoc/externals/Unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +0 -16
  99. package/external/libedhoc/externals/Unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +0 -18
  100. package/external/libedhoc/externals/Unity/examples/example_2/test/test_runners/all_tests.c +0 -19
  101. package/external/libedhoc/externals/Unity/examples/example_3/helper/UnityHelper.c +0 -17
  102. package/external/libedhoc/externals/Unity/examples/example_3/helper/UnityHelper.h +0 -19
  103. package/external/libedhoc/externals/Unity/examples/example_3/src/ProductionCode.c +0 -31
  104. package/external/libedhoc/externals/Unity/examples/example_3/src/ProductionCode.h +0 -10
  105. package/external/libedhoc/externals/Unity/examples/example_3/src/ProductionCode2.c +0 -18
  106. package/external/libedhoc/externals/Unity/examples/example_3/src/ProductionCode2.h +0 -9
  107. package/external/libedhoc/externals/Unity/examples/example_3/test/TestProductionCode.c +0 -69
  108. package/external/libedhoc/externals/Unity/examples/example_3/test/TestProductionCode2.c +0 -38
  109. package/external/libedhoc/externals/Unity/examples/example_4/src/ProductionCode.c +0 -31
  110. package/external/libedhoc/externals/Unity/examples/example_4/src/ProductionCode.h +0 -10
  111. package/external/libedhoc/externals/Unity/examples/example_4/src/ProductionCode2.c +0 -18
  112. package/external/libedhoc/externals/Unity/examples/example_4/src/ProductionCode2.h +0 -9
  113. package/external/libedhoc/externals/Unity/examples/example_4/test/TestProductionCode.c +0 -70
  114. package/external/libedhoc/externals/Unity/examples/example_4/test/TestProductionCode2.c +0 -42
  115. package/external/libedhoc/externals/Unity/examples/example_4/test/test_runners/TestProductionCode2_Runner.c +0 -53
  116. package/external/libedhoc/externals/Unity/examples/example_4/test/test_runners/TestProductionCode_Runner.c +0 -57
  117. package/external/libedhoc/externals/Unity/examples/unity_config.h +0 -251
  118. package/external/libedhoc/externals/Unity/extras/bdd/src/unity_bdd.h +0 -44
  119. package/external/libedhoc/externals/Unity/extras/bdd/test/test_bdd.c +0 -129
  120. package/external/libedhoc/externals/Unity/extras/fixture/src/unity_fixture.c +0 -310
  121. package/external/libedhoc/externals/Unity/extras/fixture/src/unity_fixture.h +0 -95
  122. package/external/libedhoc/externals/Unity/extras/fixture/src/unity_fixture_internals.h +0 -51
  123. package/external/libedhoc/externals/Unity/extras/fixture/test/main/AllTests.c +0 -20
  124. package/external/libedhoc/externals/Unity/extras/fixture/test/template_fixture_tests.c +0 -40
  125. package/external/libedhoc/externals/Unity/extras/fixture/test/unity_fixture_Test.c +0 -246
  126. package/external/libedhoc/externals/Unity/extras/fixture/test/unity_fixture_TestRunner.c +0 -33
  127. package/external/libedhoc/externals/Unity/extras/memory/src/unity_memory.c +0 -203
  128. package/external/libedhoc/externals/Unity/extras/memory/src/unity_memory.h +0 -61
  129. package/external/libedhoc/externals/Unity/extras/memory/test/unity_memory_Test.c +0 -326
  130. package/external/libedhoc/externals/Unity/extras/memory/test/unity_memory_TestRunner.c +0 -50
  131. package/external/libedhoc/externals/Unity/extras/memory/test/unity_output_Spy.c +0 -57
  132. package/external/libedhoc/externals/Unity/extras/memory/test/unity_output_Spy.h +0 -17
  133. package/external/libedhoc/externals/Unity/src/unity.c +0 -2501
  134. package/external/libedhoc/externals/Unity/src/unity.h +0 -698
  135. package/external/libedhoc/externals/Unity/src/unity_internals.h +0 -1183
  136. package/external/libedhoc/externals/Unity/test/expectdata/testsample_cmd.c +0 -61
  137. package/external/libedhoc/externals/Unity/test/expectdata/testsample_def.c +0 -57
  138. package/external/libedhoc/externals/Unity/test/expectdata/testsample_head1.c +0 -55
  139. package/external/libedhoc/externals/Unity/test/expectdata/testsample_head1.h +0 -15
  140. package/external/libedhoc/externals/Unity/test/expectdata/testsample_mock_cmd.c +0 -80
  141. package/external/libedhoc/externals/Unity/test/expectdata/testsample_mock_def.c +0 -76
  142. package/external/libedhoc/externals/Unity/test/expectdata/testsample_mock_head1.c +0 -75
  143. package/external/libedhoc/externals/Unity/test/expectdata/testsample_mock_head1.h +0 -13
  144. package/external/libedhoc/externals/Unity/test/expectdata/testsample_mock_new1.c +0 -89
  145. package/external/libedhoc/externals/Unity/test/expectdata/testsample_mock_new2.c +0 -89
  146. package/external/libedhoc/externals/Unity/test/expectdata/testsample_mock_param.c +0 -77
  147. package/external/libedhoc/externals/Unity/test/expectdata/testsample_mock_run1.c +0 -89
  148. package/external/libedhoc/externals/Unity/test/expectdata/testsample_mock_run2.c +0 -89
  149. package/external/libedhoc/externals/Unity/test/expectdata/testsample_mock_yaml.c +0 -90
  150. package/external/libedhoc/externals/Unity/test/expectdata/testsample_new1.c +0 -67
  151. package/external/libedhoc/externals/Unity/test/expectdata/testsample_new2.c +0 -70
  152. package/external/libedhoc/externals/Unity/test/expectdata/testsample_param.c +0 -58
  153. package/external/libedhoc/externals/Unity/test/expectdata/testsample_run1.c +0 -67
  154. package/external/libedhoc/externals/Unity/test/expectdata/testsample_run2.c +0 -70
  155. package/external/libedhoc/externals/Unity/test/expectdata/testsample_yaml.c +0 -71
  156. package/external/libedhoc/externals/Unity/test/testdata/CException.h +0 -18
  157. package/external/libedhoc/externals/Unity/test/testdata/Defs.h +0 -16
  158. package/external/libedhoc/externals/Unity/test/testdata/cmock.h +0 -21
  159. package/external/libedhoc/externals/Unity/test/testdata/mockMock.h +0 -20
  160. package/external/libedhoc/externals/Unity/test/testdata/testRunnerGenerator.c +0 -204
  161. package/external/libedhoc/externals/Unity/test/testdata/testRunnerGeneratorSmall.c +0 -73
  162. package/external/libedhoc/externals/Unity/test/testdata/testRunnerGeneratorWithMocks.c +0 -200
  163. package/external/libedhoc/externals/Unity/test/tests/self_assessment_utils.h +0 -151
  164. package/external/libedhoc/externals/Unity/test/tests/test_unity_arrays.c +0 -2941
  165. package/external/libedhoc/externals/Unity/test/tests/test_unity_core.c +0 -375
  166. package/external/libedhoc/externals/Unity/test/tests/test_unity_doubles.c +0 -1285
  167. package/external/libedhoc/externals/Unity/test/tests/test_unity_floats.c +0 -1395
  168. package/external/libedhoc/externals/Unity/test/tests/test_unity_integers.c +0 -2863
  169. package/external/libedhoc/externals/Unity/test/tests/test_unity_integers_64.c +0 -783
  170. package/external/libedhoc/externals/Unity/test/tests/test_unity_memory.c +0 -82
  171. package/external/libedhoc/externals/Unity/test/tests/test_unity_parameterized.c +0 -309
  172. package/external/libedhoc/externals/Unity/test/tests/test_unity_parameterizedDemo.c +0 -28
  173. package/external/libedhoc/externals/Unity/test/tests/test_unity_strings.c +0 -330
  174. package/external/libedhoc/externals/Unity/test/tests/types_for_test.h +0 -21
  175. package/external/libedhoc/externals/compact25519/src/c25519/c25519.c +0 -126
  176. package/external/libedhoc/externals/compact25519/src/c25519/c25519.h +0 -49
  177. package/external/libedhoc/externals/compact25519/src/c25519/ed25519.c +0 -323
  178. package/external/libedhoc/externals/compact25519/src/c25519/ed25519.h +0 -84
  179. package/external/libedhoc/externals/compact25519/src/c25519/edsign.c +0 -171
  180. package/external/libedhoc/externals/compact25519/src/c25519/edsign.h +0 -53
  181. package/external/libedhoc/externals/compact25519/src/c25519/f25519.c +0 -330
  182. package/external/libedhoc/externals/compact25519/src/c25519/f25519.h +0 -98
  183. package/external/libedhoc/externals/compact25519/src/c25519/fprime.c +0 -226
  184. package/external/libedhoc/externals/compact25519/src/c25519/fprime.h +0 -81
  185. package/external/libedhoc/externals/compact25519/src/c25519/sha512.c +0 -230
  186. package/external/libedhoc/externals/compact25519/src/c25519/sha512.h +0 -54
  187. package/external/libedhoc/externals/compact25519/src/compact_ed25519.c +0 -46
  188. package/external/libedhoc/externals/compact25519/src/compact_ed25519.h +0 -110
  189. package/external/libedhoc/externals/compact25519/src/compact_wipe.c +0 -12
  190. package/external/libedhoc/externals/compact25519/src/compact_wipe.h +0 -14
  191. package/external/libedhoc/externals/compact25519/src/compact_x25519.c +0 -68
  192. package/external/libedhoc/externals/compact25519/src/compact_x25519.h +0 -101
  193. package/external/libedhoc/externals/compact25519/test/pcg_random.h +0 -25
  194. package/external/libedhoc/externals/compact25519/test/run-all.c +0 -178
  195. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/Hacl_Curve25519.h +0 -21
  196. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/everest.h +0 -234
  197. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlib/FStar_UInt128.h +0 -124
  198. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlib/FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.h +0 -280
  199. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlib.h +0 -29
  200. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/c_endianness.h +0 -204
  201. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/internal/builtin.h +0 -16
  202. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/internal/callconv.h +0 -46
  203. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/internal/compat.h +0 -34
  204. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/internal/debug.h +0 -57
  205. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/internal/target.h +0 -102
  206. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/internal/types.h +0 -61
  207. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/kremlin/internal/wasmsupport.h +0 -5
  208. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/vs2013/Hacl_Curve25519.h +0 -21
  209. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/vs2013/inttypes.h +0 -36
  210. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/vs2013/stdbool.h +0 -31
  211. package/external/libedhoc/externals/mbedtls/3rdparty/everest/include/everest/x25519.h +0 -190
  212. package/external/libedhoc/externals/mbedtls/3rdparty/everest/library/Hacl_Curve25519.c +0 -760
  213. package/external/libedhoc/externals/mbedtls/3rdparty/everest/library/Hacl_Curve25519_joined.c +0 -50
  214. package/external/libedhoc/externals/mbedtls/3rdparty/everest/library/everest.c +0 -102
  215. package/external/libedhoc/externals/mbedtls/3rdparty/everest/library/kremlib/FStar_UInt128_extracted.c +0 -413
  216. package/external/libedhoc/externals/mbedtls/3rdparty/everest/library/kremlib/FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.c +0 -100
  217. package/external/libedhoc/externals/mbedtls/3rdparty/everest/library/legacy/Hacl_Curve25519.c +0 -805
  218. package/external/libedhoc/externals/mbedtls/3rdparty/everest/library/x25519.c +0 -186
  219. package/external/libedhoc/externals/mbedtls/3rdparty/p256-m/p256-m/p256-m.c +0 -1514
  220. package/external/libedhoc/externals/mbedtls/3rdparty/p256-m/p256-m/p256-m.h +0 -135
  221. package/external/libedhoc/externals/mbedtls/3rdparty/p256-m/p256-m_driver_entrypoints.c +0 -312
  222. package/external/libedhoc/externals/mbedtls/3rdparty/p256-m/p256-m_driver_entrypoints.h +0 -219
  223. package/external/libedhoc/externals/mbedtls/configs/config-ccm-psk-dtls1_2.h +0 -92
  224. package/external/libedhoc/externals/mbedtls/configs/config-ccm-psk-tls1_2.h +0 -83
  225. package/external/libedhoc/externals/mbedtls/configs/config-no-entropy.h +0 -73
  226. package/external/libedhoc/externals/mbedtls/configs/config-suite-b.h +0 -106
  227. package/external/libedhoc/externals/mbedtls/configs/config-symmetric-only.h +0 -77
  228. package/external/libedhoc/externals/mbedtls/configs/config-thread.h +0 -76
  229. package/external/libedhoc/externals/mbedtls/configs/crypto-config-ccm-aes-sha256.h +0 -25
  230. package/external/libedhoc/externals/mbedtls/configs/crypto_config_profile_medium.h +0 -136
  231. package/external/libedhoc/externals/mbedtls/configs/tfm_mbedcrypto_config_profile_medium.h +0 -609
  232. package/external/libedhoc/externals/mbedtls/doxygen/input/doc_encdec.h +0 -54
  233. package/external/libedhoc/externals/mbedtls/doxygen/input/doc_hashing.h +0 -30
  234. package/external/libedhoc/externals/mbedtls/doxygen/input/doc_mainpage.h +0 -19
  235. package/external/libedhoc/externals/mbedtls/doxygen/input/doc_rng.h +0 -27
  236. package/external/libedhoc/externals/mbedtls/doxygen/input/doc_ssltls.h +0 -37
  237. package/external/libedhoc/externals/mbedtls/doxygen/input/doc_tcpip.h +0 -32
  238. package/external/libedhoc/externals/mbedtls/doxygen/input/doc_x509.h +0 -31
  239. package/external/libedhoc/externals/mbedtls/include/mbedtls/aes.h +0 -627
  240. package/external/libedhoc/externals/mbedtls/include/mbedtls/aria.h +0 -341
  241. package/external/libedhoc/externals/mbedtls/include/mbedtls/asn1.h +0 -641
  242. package/external/libedhoc/externals/mbedtls/include/mbedtls/asn1write.h +0 -389
  243. package/external/libedhoc/externals/mbedtls/include/mbedtls/base64.h +0 -82
  244. package/external/libedhoc/externals/mbedtls/include/mbedtls/bignum.h +0 -1084
  245. package/external/libedhoc/externals/mbedtls/include/mbedtls/build_info.h +0 -146
  246. package/external/libedhoc/externals/mbedtls/include/mbedtls/camellia.h +0 -303
  247. package/external/libedhoc/externals/mbedtls/include/mbedtls/ccm.h +0 -518
  248. package/external/libedhoc/externals/mbedtls/include/mbedtls/chacha20.h +0 -202
  249. package/external/libedhoc/externals/mbedtls/include/mbedtls/chachapoly.h +0 -342
  250. package/external/libedhoc/externals/mbedtls/include/mbedtls/check_config.h +0 -1206
  251. package/external/libedhoc/externals/mbedtls/include/mbedtls/cipher.h +0 -1183
  252. package/external/libedhoc/externals/mbedtls/include/mbedtls/cmac.h +0 -246
  253. package/external/libedhoc/externals/mbedtls/include/mbedtls/compat-2.x.h +0 -46
  254. package/external/libedhoc/externals/mbedtls/include/mbedtls/config_adjust_legacy_crypto.h +0 -183
  255. package/external/libedhoc/externals/mbedtls/include/mbedtls/config_adjust_legacy_from_psa.h +0 -877
  256. package/external/libedhoc/externals/mbedtls/include/mbedtls/config_adjust_psa_from_legacy.h +0 -334
  257. package/external/libedhoc/externals/mbedtls/include/mbedtls/config_adjust_psa_superset_legacy.h +0 -142
  258. package/external/libedhoc/externals/mbedtls/include/mbedtls/config_adjust_ssl.h +0 -76
  259. package/external/libedhoc/externals/mbedtls/include/mbedtls/config_adjust_x509.h +0 -25
  260. package/external/libedhoc/externals/mbedtls/include/mbedtls/config_psa.h +0 -55
  261. package/external/libedhoc/externals/mbedtls/include/mbedtls/constant_time.h +0 -36
  262. package/external/libedhoc/externals/mbedtls/include/mbedtls/ctr_drbg.h +0 -564
  263. package/external/libedhoc/externals/mbedtls/include/mbedtls/debug.h +0 -308
  264. package/external/libedhoc/externals/mbedtls/include/mbedtls/des.h +0 -385
  265. package/external/libedhoc/externals/mbedtls/include/mbedtls/dhm.h +0 -972
  266. package/external/libedhoc/externals/mbedtls/include/mbedtls/ecdh.h +0 -441
  267. package/external/libedhoc/externals/mbedtls/include/mbedtls/ecdsa.h +0 -671
  268. package/external/libedhoc/externals/mbedtls/include/mbedtls/ecjpake.h +0 -298
  269. package/external/libedhoc/externals/mbedtls/include/mbedtls/ecp.h +0 -1362
  270. package/external/libedhoc/externals/mbedtls/include/mbedtls/entropy.h +0 -273
  271. package/external/libedhoc/externals/mbedtls/include/mbedtls/error.h +0 -201
  272. package/external/libedhoc/externals/mbedtls/include/mbedtls/gcm.h +0 -370
  273. package/external/libedhoc/externals/mbedtls/include/mbedtls/hkdf.h +0 -124
  274. package/external/libedhoc/externals/mbedtls/include/mbedtls/hmac_drbg.h +0 -434
  275. package/external/libedhoc/externals/mbedtls/include/mbedtls/lms.h +0 -440
  276. package/external/libedhoc/externals/mbedtls/include/mbedtls/mbedtls_config.h +0 -4116
  277. package/external/libedhoc/externals/mbedtls/include/mbedtls/md.h +0 -640
  278. package/external/libedhoc/externals/mbedtls/include/mbedtls/md5.h +0 -190
  279. package/external/libedhoc/externals/mbedtls/include/mbedtls/memory_buffer_alloc.h +0 -142
  280. package/external/libedhoc/externals/mbedtls/include/mbedtls/net_sockets.h +0 -299
  281. package/external/libedhoc/externals/mbedtls/include/mbedtls/nist_kw.h +0 -166
  282. package/external/libedhoc/externals/mbedtls/include/mbedtls/oid.h +0 -722
  283. package/external/libedhoc/externals/mbedtls/include/mbedtls/pem.h +0 -160
  284. package/external/libedhoc/externals/mbedtls/include/mbedtls/pk.h +0 -1091
  285. package/external/libedhoc/externals/mbedtls/include/mbedtls/pkcs12.h +0 -186
  286. package/external/libedhoc/externals/mbedtls/include/mbedtls/pkcs5.h +0 -197
  287. package/external/libedhoc/externals/mbedtls/include/mbedtls/pkcs7.h +0 -241
  288. package/external/libedhoc/externals/mbedtls/include/mbedtls/platform.h +0 -485
  289. package/external/libedhoc/externals/mbedtls/include/mbedtls/platform_time.h +0 -79
  290. package/external/libedhoc/externals/mbedtls/include/mbedtls/platform_util.h +0 -201
  291. package/external/libedhoc/externals/mbedtls/include/mbedtls/poly1305.h +0 -168
  292. package/external/libedhoc/externals/mbedtls/include/mbedtls/private_access.h +0 -20
  293. package/external/libedhoc/externals/mbedtls/include/mbedtls/psa_util.h +0 -104
  294. package/external/libedhoc/externals/mbedtls/include/mbedtls/ripemd160.h +0 -136
  295. package/external/libedhoc/externals/mbedtls/include/mbedtls/rsa.h +0 -1143
  296. package/external/libedhoc/externals/mbedtls/include/mbedtls/sha1.h +0 -219
  297. package/external/libedhoc/externals/mbedtls/include/mbedtls/sha256.h +0 -198
  298. package/external/libedhoc/externals/mbedtls/include/mbedtls/sha3.h +0 -172
  299. package/external/libedhoc/externals/mbedtls/include/mbedtls/sha512.h +0 -208
  300. package/external/libedhoc/externals/mbedtls/include/mbedtls/ssl.h +0 -5369
  301. package/external/libedhoc/externals/mbedtls/include/mbedtls/ssl_cache.h +0 -187
  302. package/external/libedhoc/externals/mbedtls/include/mbedtls/ssl_ciphersuites.h +0 -616
  303. package/external/libedhoc/externals/mbedtls/include/mbedtls/ssl_cookie.h +0 -106
  304. package/external/libedhoc/externals/mbedtls/include/mbedtls/ssl_ticket.h +0 -181
  305. package/external/libedhoc/externals/mbedtls/include/mbedtls/threading.h +0 -105
  306. package/external/libedhoc/externals/mbedtls/include/mbedtls/timing.h +0 -94
  307. package/external/libedhoc/externals/mbedtls/include/mbedtls/version.h +0 -78
  308. package/external/libedhoc/externals/mbedtls/include/mbedtls/x509.h +0 -550
  309. package/external/libedhoc/externals/mbedtls/include/mbedtls/x509_crl.h +0 -184
  310. package/external/libedhoc/externals/mbedtls/include/mbedtls/x509_crt.h +0 -1196
  311. package/external/libedhoc/externals/mbedtls/include/mbedtls/x509_csr.h +0 -319
  312. package/external/libedhoc/externals/mbedtls/include/psa/build_info.h +0 -20
  313. package/external/libedhoc/externals/mbedtls/include/psa/crypto.h +0 -4685
  314. package/external/libedhoc/externals/mbedtls/include/psa/crypto_adjust_auto_enabled.h +0 -21
  315. package/external/libedhoc/externals/mbedtls/include/psa/crypto_adjust_config_key_pair_types.h +0 -91
  316. package/external/libedhoc/externals/mbedtls/include/psa/crypto_adjust_config_synonyms.h +0 -45
  317. package/external/libedhoc/externals/mbedtls/include/psa/crypto_builtin_composites.h +0 -210
  318. package/external/libedhoc/externals/mbedtls/include/psa/crypto_builtin_key_derivation.h +0 -118
  319. package/external/libedhoc/externals/mbedtls/include/psa/crypto_builtin_primitives.h +0 -114
  320. package/external/libedhoc/externals/mbedtls/include/psa/crypto_compat.h +0 -153
  321. package/external/libedhoc/externals/mbedtls/include/psa/crypto_config.h +0 -153
  322. package/external/libedhoc/externals/mbedtls/include/psa/crypto_driver_common.h +0 -44
  323. package/external/libedhoc/externals/mbedtls/include/psa/crypto_driver_contexts_composites.h +0 -151
  324. package/external/libedhoc/externals/mbedtls/include/psa/crypto_driver_contexts_key_derivation.h +0 -52
  325. package/external/libedhoc/externals/mbedtls/include/psa/crypto_driver_contexts_primitives.h +0 -105
  326. package/external/libedhoc/externals/mbedtls/include/psa/crypto_extra.h +0 -2064
  327. package/external/libedhoc/externals/mbedtls/include/psa/crypto_legacy.h +0 -88
  328. package/external/libedhoc/externals/mbedtls/include/psa/crypto_platform.h +0 -92
  329. package/external/libedhoc/externals/mbedtls/include/psa/crypto_se_driver.h +0 -1383
  330. package/external/libedhoc/externals/mbedtls/include/psa/crypto_sizes.h +0 -1282
  331. package/external/libedhoc/externals/mbedtls/include/psa/crypto_struct.h +0 -460
  332. package/external/libedhoc/externals/mbedtls/include/psa/crypto_types.h +0 -453
  333. package/external/libedhoc/externals/mbedtls/include/psa/crypto_values.h +0 -2756
  334. package/external/libedhoc/externals/mbedtls/library/aes.c +0 -2315
  335. package/external/libedhoc/externals/mbedtls/library/aesce.c +0 -503
  336. package/external/libedhoc/externals/mbedtls/library/aesce.h +0 -121
  337. package/external/libedhoc/externals/mbedtls/library/aesni.c +0 -802
  338. package/external/libedhoc/externals/mbedtls/library/aesni.h +0 -158
  339. package/external/libedhoc/externals/mbedtls/library/alignment.h +0 -509
  340. package/external/libedhoc/externals/mbedtls/library/aria.c +0 -991
  341. package/external/libedhoc/externals/mbedtls/library/asn1parse.c +0 -467
  342. package/external/libedhoc/externals/mbedtls/library/asn1write.c +0 -436
  343. package/external/libedhoc/externals/mbedtls/library/base64.c +0 -299
  344. package/external/libedhoc/externals/mbedtls/library/base64_internal.h +0 -45
  345. package/external/libedhoc/externals/mbedtls/library/bignum.c +0 -2806
  346. package/external/libedhoc/externals/mbedtls/library/bignum_core.c +0 -894
  347. package/external/libedhoc/externals/mbedtls/library/bignum_core.h +0 -763
  348. package/external/libedhoc/externals/mbedtls/library/bignum_mod.c +0 -394
  349. package/external/libedhoc/externals/mbedtls/library/bignum_mod.h +0 -452
  350. package/external/libedhoc/externals/mbedtls/library/bignum_mod_raw.c +0 -276
  351. package/external/libedhoc/externals/mbedtls/library/bignum_mod_raw.h +0 -416
  352. package/external/libedhoc/externals/mbedtls/library/bignum_mod_raw_invasive.h +0 -34
  353. package/external/libedhoc/externals/mbedtls/library/bn_mul.h +0 -1094
  354. package/external/libedhoc/externals/mbedtls/library/camellia.c +0 -1044
  355. package/external/libedhoc/externals/mbedtls/library/ccm.c +0 -712
  356. package/external/libedhoc/externals/mbedtls/library/chacha20.c +0 -497
  357. package/external/libedhoc/externals/mbedtls/library/chachapoly.c +0 -478
  358. package/external/libedhoc/externals/mbedtls/library/check_crypto_config.h +0 -141
  359. package/external/libedhoc/externals/mbedtls/library/cipher.c +0 -1664
  360. package/external/libedhoc/externals/mbedtls/library/cipher_wrap.c +0 -2422
  361. package/external/libedhoc/externals/mbedtls/library/cipher_wrap.h +0 -132
  362. package/external/libedhoc/externals/mbedtls/library/cmac.c +0 -1067
  363. package/external/libedhoc/externals/mbedtls/library/common.h +0 -325
  364. package/external/libedhoc/externals/mbedtls/library/constant_time.c +0 -261
  365. package/external/libedhoc/externals/mbedtls/library/constant_time_impl.h +0 -554
  366. package/external/libedhoc/externals/mbedtls/library/constant_time_internal.h +0 -579
  367. package/external/libedhoc/externals/mbedtls/library/ctr_drbg.c +0 -881
  368. package/external/libedhoc/externals/mbedtls/library/debug.c +0 -465
  369. package/external/libedhoc/externals/mbedtls/library/des.c +0 -1042
  370. package/external/libedhoc/externals/mbedtls/library/dhm.c +0 -712
  371. package/external/libedhoc/externals/mbedtls/library/ecdh.c +0 -685
  372. package/external/libedhoc/externals/mbedtls/library/ecdsa.c +0 -867
  373. package/external/libedhoc/externals/mbedtls/library/ecjpake.c +0 -1216
  374. package/external/libedhoc/externals/mbedtls/library/ecp.c +0 -3631
  375. package/external/libedhoc/externals/mbedtls/library/ecp_curves.c +0 -5467
  376. package/external/libedhoc/externals/mbedtls/library/ecp_curves_new.c +0 -6043
  377. package/external/libedhoc/externals/mbedtls/library/ecp_internal_alt.h +0 -287
  378. package/external/libedhoc/externals/mbedtls/library/ecp_invasive.h +0 -325
  379. package/external/libedhoc/externals/mbedtls/library/entropy.c +0 -676
  380. package/external/libedhoc/externals/mbedtls/library/entropy_poll.c +0 -229
  381. package/external/libedhoc/externals/mbedtls/library/entropy_poll.h +0 -64
  382. package/external/libedhoc/externals/mbedtls/library/error.c +0 -878
  383. package/external/libedhoc/externals/mbedtls/library/gcm.c +0 -1168
  384. package/external/libedhoc/externals/mbedtls/library/hkdf.c +0 -161
  385. package/external/libedhoc/externals/mbedtls/library/hmac_drbg.c +0 -633
  386. package/external/libedhoc/externals/mbedtls/library/lmots.c +0 -821
  387. package/external/libedhoc/externals/mbedtls/library/lmots.h +0 -311
  388. package/external/libedhoc/externals/mbedtls/library/lms.c +0 -779
  389. package/external/libedhoc/externals/mbedtls/library/md.c +0 -1108
  390. package/external/libedhoc/externals/mbedtls/library/md5.c +0 -426
  391. package/external/libedhoc/externals/mbedtls/library/md_psa.h +0 -63
  392. package/external/libedhoc/externals/mbedtls/library/md_wrap.h +0 -46
  393. package/external/libedhoc/externals/mbedtls/library/memory_buffer_alloc.c +0 -745
  394. package/external/libedhoc/externals/mbedtls/library/mps_common.h +0 -181
  395. package/external/libedhoc/externals/mbedtls/library/mps_error.h +0 -89
  396. package/external/libedhoc/externals/mbedtls/library/mps_reader.c +0 -538
  397. package/external/libedhoc/externals/mbedtls/library/mps_reader.h +0 -366
  398. package/external/libedhoc/externals/mbedtls/library/mps_trace.c +0 -112
  399. package/external/libedhoc/externals/mbedtls/library/mps_trace.h +0 -154
  400. package/external/libedhoc/externals/mbedtls/library/net_sockets.c +0 -696
  401. package/external/libedhoc/externals/mbedtls/library/nist_kw.c +0 -725
  402. package/external/libedhoc/externals/mbedtls/library/oid.c +0 -1154
  403. package/external/libedhoc/externals/mbedtls/library/padlock.c +0 -155
  404. package/external/libedhoc/externals/mbedtls/library/padlock.h +0 -111
  405. package/external/libedhoc/externals/mbedtls/library/pem.c +0 -520
  406. package/external/libedhoc/externals/mbedtls/library/pk.c +0 -970
  407. package/external/libedhoc/externals/mbedtls/library/pk_internal.h +0 -118
  408. package/external/libedhoc/externals/mbedtls/library/pk_wrap.c +0 -1834
  409. package/external/libedhoc/externals/mbedtls/library/pk_wrap.h +0 -156
  410. package/external/libedhoc/externals/mbedtls/library/pkcs12.c +0 -447
  411. package/external/libedhoc/externals/mbedtls/library/pkcs5.c +0 -496
  412. package/external/libedhoc/externals/mbedtls/library/pkcs7.c +0 -773
  413. package/external/libedhoc/externals/mbedtls/library/pkparse.c +0 -1845
  414. package/external/libedhoc/externals/mbedtls/library/pkwrite.c +0 -836
  415. package/external/libedhoc/externals/mbedtls/library/pkwrite.h +0 -112
  416. package/external/libedhoc/externals/mbedtls/library/platform.c +0 -402
  417. package/external/libedhoc/externals/mbedtls/library/platform_util.c +0 -285
  418. package/external/libedhoc/externals/mbedtls/library/poly1305.c +0 -492
  419. package/external/libedhoc/externals/mbedtls/library/psa_crypto.c +0 -8432
  420. package/external/libedhoc/externals/mbedtls/library/psa_crypto_aead.c +0 -653
  421. package/external/libedhoc/externals/mbedtls/library/psa_crypto_aead.h +0 -499
  422. package/external/libedhoc/externals/mbedtls/library/psa_crypto_cipher.c +0 -590
  423. package/external/libedhoc/externals/mbedtls/library/psa_crypto_cipher.h +0 -293
  424. package/external/libedhoc/externals/mbedtls/library/psa_crypto_client.c +0 -67
  425. package/external/libedhoc/externals/mbedtls/library/psa_crypto_core.h +0 -838
  426. package/external/libedhoc/externals/mbedtls/library/psa_crypto_core_common.h +0 -52
  427. package/external/libedhoc/externals/mbedtls/library/psa_crypto_driver_wrappers.h +0 -2871
  428. package/external/libedhoc/externals/mbedtls/library/psa_crypto_driver_wrappers_no_static.c +0 -256
  429. package/external/libedhoc/externals/mbedtls/library/psa_crypto_driver_wrappers_no_static.h +0 -31
  430. package/external/libedhoc/externals/mbedtls/library/psa_crypto_ecp.c +0 -561
  431. package/external/libedhoc/externals/mbedtls/library/psa_crypto_ecp.h +0 -267
  432. package/external/libedhoc/externals/mbedtls/library/psa_crypto_ffdh.c +0 -295
  433. package/external/libedhoc/externals/mbedtls/library/psa_crypto_ffdh.h +0 -132
  434. package/external/libedhoc/externals/mbedtls/library/psa_crypto_hash.c +0 -470
  435. package/external/libedhoc/externals/mbedtls/library/psa_crypto_hash.h +0 -211
  436. package/external/libedhoc/externals/mbedtls/library/psa_crypto_invasive.h +0 -70
  437. package/external/libedhoc/externals/mbedtls/library/psa_crypto_its.h +0 -131
  438. package/external/libedhoc/externals/mbedtls/library/psa_crypto_mac.c +0 -496
  439. package/external/libedhoc/externals/mbedtls/library/psa_crypto_mac.h +0 -264
  440. package/external/libedhoc/externals/mbedtls/library/psa_crypto_pake.c +0 -571
  441. package/external/libedhoc/externals/mbedtls/library/psa_crypto_pake.h +0 -159
  442. package/external/libedhoc/externals/mbedtls/library/psa_crypto_random_impl.h +0 -192
  443. package/external/libedhoc/externals/mbedtls/library/psa_crypto_rsa.c +0 -727
  444. package/external/libedhoc/externals/mbedtls/library/psa_crypto_rsa.h +0 -317
  445. package/external/libedhoc/externals/mbedtls/library/psa_crypto_se.c +0 -373
  446. package/external/libedhoc/externals/mbedtls/library/psa_crypto_se.h +0 -185
  447. package/external/libedhoc/externals/mbedtls/library/psa_crypto_slot_management.c +0 -559
  448. package/external/libedhoc/externals/mbedtls/library/psa_crypto_slot_management.h +0 -213
  449. package/external/libedhoc/externals/mbedtls/library/psa_crypto_storage.c +0 -481
  450. package/external/libedhoc/externals/mbedtls/library/psa_crypto_storage.h +0 -384
  451. package/external/libedhoc/externals/mbedtls/library/psa_its_file.c +0 -259
  452. package/external/libedhoc/externals/mbedtls/library/psa_util.c +0 -160
  453. package/external/libedhoc/externals/mbedtls/library/psa_util_internal.h +0 -96
  454. package/external/libedhoc/externals/mbedtls/library/ripemd160.c +0 -490
  455. package/external/libedhoc/externals/mbedtls/library/rsa.c +0 -2640
  456. package/external/libedhoc/externals/mbedtls/library/rsa_alt_helpers.c +0 -447
  457. package/external/libedhoc/externals/mbedtls/library/rsa_alt_helpers.h +0 -208
  458. package/external/libedhoc/externals/mbedtls/library/sha1.c +0 -480
  459. package/external/libedhoc/externals/mbedtls/library/sha256.c +0 -946
  460. package/external/libedhoc/externals/mbedtls/library/sha3.c +0 -626
  461. package/external/libedhoc/externals/mbedtls/library/sha512.c +0 -1111
  462. package/external/libedhoc/externals/mbedtls/library/ssl_cache.c +0 -410
  463. package/external/libedhoc/externals/mbedtls/library/ssl_ciphersuites.c +0 -2050
  464. package/external/libedhoc/externals/mbedtls/library/ssl_client.c +0 -1017
  465. package/external/libedhoc/externals/mbedtls/library/ssl_client.h +0 -22
  466. package/external/libedhoc/externals/mbedtls/library/ssl_cookie.c +0 -380
  467. package/external/libedhoc/externals/mbedtls/library/ssl_debug_helpers.h +0 -78
  468. package/external/libedhoc/externals/mbedtls/library/ssl_debug_helpers_generated.c +0 -234
  469. package/external/libedhoc/externals/mbedtls/library/ssl_misc.h +0 -2847
  470. package/external/libedhoc/externals/mbedtls/library/ssl_msg.c +0 -6155
  471. package/external/libedhoc/externals/mbedtls/library/ssl_ticket.c +0 -540
  472. package/external/libedhoc/externals/mbedtls/library/ssl_tls.c +0 -9577
  473. package/external/libedhoc/externals/mbedtls/library/ssl_tls12_client.c +0 -3607
  474. package/external/libedhoc/externals/mbedtls/library/ssl_tls12_server.c +0 -4403
  475. package/external/libedhoc/externals/mbedtls/library/ssl_tls13_client.c +0 -3046
  476. package/external/libedhoc/externals/mbedtls/library/ssl_tls13_generic.c +0 -1740
  477. package/external/libedhoc/externals/mbedtls/library/ssl_tls13_invasive.h +0 -23
  478. package/external/libedhoc/externals/mbedtls/library/ssl_tls13_keys.c +0 -1897
  479. package/external/libedhoc/externals/mbedtls/library/ssl_tls13_keys.h +0 -651
  480. package/external/libedhoc/externals/mbedtls/library/ssl_tls13_server.c +0 -3146
  481. package/external/libedhoc/externals/mbedtls/library/threading.c +0 -181
  482. package/external/libedhoc/externals/mbedtls/library/timing.c +0 -154
  483. package/external/libedhoc/externals/mbedtls/library/version.c +0 -32
  484. package/external/libedhoc/externals/mbedtls/library/version_features.c +0 -826
  485. package/external/libedhoc/externals/mbedtls/library/x509.c +0 -1776
  486. package/external/libedhoc/externals/mbedtls/library/x509_create.c +0 -557
  487. package/external/libedhoc/externals/mbedtls/library/x509_crl.c +0 -712
  488. package/external/libedhoc/externals/mbedtls/library/x509_crt.c +0 -3292
  489. package/external/libedhoc/externals/mbedtls/library/x509_csr.c +0 -574
  490. package/external/libedhoc/externals/mbedtls/library/x509write.c +0 -174
  491. package/external/libedhoc/externals/mbedtls/library/x509write_crt.c +0 -681
  492. package/external/libedhoc/externals/mbedtls/library/x509write_csr.c +0 -331
  493. package/external/libedhoc/externals/mbedtls/programs/aes/crypt_and_hash.c +0 -573
  494. package/external/libedhoc/externals/mbedtls/programs/cipher/cipher_aead_demo.c +0 -259
  495. package/external/libedhoc/externals/mbedtls/programs/fuzz/common.c +0 -105
  496. package/external/libedhoc/externals/mbedtls/programs/fuzz/common.h +0 -25
  497. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_client.c +0 -195
  498. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_dtlsclient.c +0 -138
  499. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_dtlsserver.c +0 -183
  500. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_pkcs7.c +0 -20
  501. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_privkey.c +0 -106
  502. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_pubkey.c +0 -86
  503. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_server.c +0 -218
  504. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_x509crl.c +0 -41
  505. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_x509crt.c +0 -41
  506. package/external/libedhoc/externals/mbedtls/programs/fuzz/fuzz_x509csr.c +0 -41
  507. package/external/libedhoc/externals/mbedtls/programs/fuzz/onefile.c +0 -69
  508. package/external/libedhoc/externals/mbedtls/programs/hash/generic_sum.c +0 -209
  509. package/external/libedhoc/externals/mbedtls/programs/hash/hello.c +0 -45
  510. package/external/libedhoc/externals/mbedtls/programs/hash/md_hmac_demo.c +0 -136
  511. package/external/libedhoc/externals/mbedtls/programs/pkey/dh_client.c +0 -274
  512. package/external/libedhoc/externals/mbedtls/programs/pkey/dh_genprime.c +0 -161
  513. package/external/libedhoc/externals/mbedtls/programs/pkey/dh_server.c +0 -296
  514. package/external/libedhoc/externals/mbedtls/programs/pkey/ecdh_curve25519.c +0 -189
  515. package/external/libedhoc/externals/mbedtls/programs/pkey/ecdsa.c +0 -217
  516. package/external/libedhoc/externals/mbedtls/programs/pkey/gen_key.c +0 -419
  517. package/external/libedhoc/externals/mbedtls/programs/pkey/key_app.c +0 -316
  518. package/external/libedhoc/externals/mbedtls/programs/pkey/key_app_writer.c +0 -435
  519. package/external/libedhoc/externals/mbedtls/programs/pkey/mpi_demo.c +0 -84
  520. package/external/libedhoc/externals/mbedtls/programs/pkey/pk_decrypt.c +0 -153
  521. package/external/libedhoc/externals/mbedtls/programs/pkey/pk_encrypt.c +0 -154
  522. package/external/libedhoc/externals/mbedtls/programs/pkey/pk_sign.c +0 -155
  523. package/external/libedhoc/externals/mbedtls/programs/pkey/pk_verify.c +0 -128
  524. package/external/libedhoc/externals/mbedtls/programs/pkey/rsa_decrypt.c +0 -172
  525. package/external/libedhoc/externals/mbedtls/programs/pkey/rsa_encrypt.c +0 -149
  526. package/external/libedhoc/externals/mbedtls/programs/pkey/rsa_genkey.c +0 -141
  527. package/external/libedhoc/externals/mbedtls/programs/pkey/rsa_sign.c +0 -155
  528. package/external/libedhoc/externals/mbedtls/programs/pkey/rsa_sign_pss.c +0 -161
  529. package/external/libedhoc/externals/mbedtls/programs/pkey/rsa_verify.c +0 -131
  530. package/external/libedhoc/externals/mbedtls/programs/pkey/rsa_verify_pss.c +0 -136
  531. package/external/libedhoc/externals/mbedtls/programs/psa/aead_demo.c +0 -281
  532. package/external/libedhoc/externals/mbedtls/programs/psa/crypto_examples.c +0 -321
  533. package/external/libedhoc/externals/mbedtls/programs/psa/hmac_demo.c +0 -159
  534. package/external/libedhoc/externals/mbedtls/programs/psa/key_ladder_demo.c +0 -691
  535. package/external/libedhoc/externals/mbedtls/programs/psa/psa_constant_names.c +0 -310
  536. package/external/libedhoc/externals/mbedtls/programs/psa/psa_constant_names_generated.c +0 -474
  537. package/external/libedhoc/externals/mbedtls/programs/random/gen_entropy.c +0 -75
  538. package/external/libedhoc/externals/mbedtls/programs/random/gen_random_ctr_drbg.c +0 -107
  539. package/external/libedhoc/externals/mbedtls/programs/ssl/dtls_client.c +0 -342
  540. package/external/libedhoc/externals/mbedtls/programs/ssl/dtls_server.c +0 -408
  541. package/external/libedhoc/externals/mbedtls/programs/ssl/mini_client.c +0 -274
  542. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_client1.c +0 -288
  543. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_client2.c +0 -3118
  544. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_context_info.c +0 -1009
  545. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_fork_server.c +0 -381
  546. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_mail_client.c +0 -804
  547. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_pthread_server.c +0 -489
  548. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_server.c +0 -362
  549. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_server2.c +0 -4268
  550. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_test_common_source.c +0 -375
  551. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_test_lib.c +0 -601
  552. package/external/libedhoc/externals/mbedtls/programs/ssl/ssl_test_lib.h +0 -306
  553. package/external/libedhoc/externals/mbedtls/programs/test/benchmark.c +0 -1284
  554. package/external/libedhoc/externals/mbedtls/programs/test/cmake_package/cmake_package.c +0 -27
  555. package/external/libedhoc/externals/mbedtls/programs/test/cmake_package_install/cmake_package_install.c +0 -28
  556. package/external/libedhoc/externals/mbedtls/programs/test/cmake_subproject/cmake_subproject.c +0 -28
  557. package/external/libedhoc/externals/mbedtls/programs/test/dlopen.c +0 -92
  558. package/external/libedhoc/externals/mbedtls/programs/test/query_compile_time_config.c +0 -66
  559. package/external/libedhoc/externals/mbedtls/programs/test/query_config.c +0 -5137
  560. package/external/libedhoc/externals/mbedtls/programs/test/query_config.h +0 -34
  561. package/external/libedhoc/externals/mbedtls/programs/test/query_included_headers.c +0 -29
  562. package/external/libedhoc/externals/mbedtls/programs/test/selftest.c +0 -583
  563. package/external/libedhoc/externals/mbedtls/programs/test/udp_proxy.c +0 -967
  564. package/external/libedhoc/externals/mbedtls/programs/test/zeroize.c +0 -72
  565. package/external/libedhoc/externals/mbedtls/programs/util/pem2der.c +0 -265
  566. package/external/libedhoc/externals/mbedtls/programs/util/strerror.c +0 -61
  567. package/external/libedhoc/externals/mbedtls/programs/wince_main.c +0 -31
  568. package/external/libedhoc/externals/mbedtls/programs/x509/cert_app.c +0 -456
  569. package/external/libedhoc/externals/mbedtls/programs/x509/cert_req.c +0 -509
  570. package/external/libedhoc/externals/mbedtls/programs/x509/cert_write.c +0 -1012
  571. package/external/libedhoc/externals/mbedtls/programs/x509/crl_app.c +0 -132
  572. package/external/libedhoc/externals/mbedtls/programs/x509/load_roots.c +0 -165
  573. package/external/libedhoc/externals/mbedtls/programs/x509/req_app.c +0 -132
  574. package/external/libedhoc/externals/mbedtls/tests/configs/tls13-only.h +0 -31
  575. package/external/libedhoc/externals/mbedtls/tests/configs/user-config-for-test.h +0 -89
  576. package/external/libedhoc/externals/mbedtls/tests/configs/user-config-malloc-0-null.h +0 -22
  577. package/external/libedhoc/externals/mbedtls/tests/configs/user-config-zeroize-memset.h +0 -17
  578. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/aes_alt.h +0 -23
  579. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/aria_alt.h +0 -16
  580. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/camellia_alt.h +0 -16
  581. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/ccm_alt.h +0 -16
  582. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/chacha20_alt.h +0 -16
  583. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/chachapoly_alt.h +0 -18
  584. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/cmac_alt.h +0 -15
  585. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/des_alt.h +0 -22
  586. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/dhm_alt.h +0 -16
  587. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/ecjpake_alt.h +0 -15
  588. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/ecp_alt.h +0 -22
  589. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/gcm_alt.h +0 -16
  590. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/md5_alt.h +0 -16
  591. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/nist_kw_alt.h +0 -15
  592. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/platform_alt.h +0 -16
  593. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/poly1305_alt.h +0 -16
  594. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/ripemd160_alt.h +0 -16
  595. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/rsa_alt.h +0 -16
  596. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/sha1_alt.h +0 -16
  597. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/sha256_alt.h +0 -16
  598. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/sha512_alt.h +0 -16
  599. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/threading_alt.h +0 -14
  600. package/external/libedhoc/externals/mbedtls/tests/include/alt-dummy/timing_alt.h +0 -19
  601. package/external/libedhoc/externals/mbedtls/tests/include/alt-extra/psa/crypto.h +0 -7
  602. package/external/libedhoc/externals/mbedtls/tests/include/baremetal-override/time.h +0 -6
  603. package/external/libedhoc/externals/mbedtls/tests/include/spe/crypto_spe.h +0 -131
  604. package/external/libedhoc/externals/mbedtls/tests/include/test/arguments.h +0 -26
  605. package/external/libedhoc/externals/mbedtls/tests/include/test/asn1_helpers.h +0 -38
  606. package/external/libedhoc/externals/mbedtls/tests/include/test/bignum_helpers.h +0 -106
  607. package/external/libedhoc/externals/mbedtls/tests/include/test/certs.h +0 -234
  608. package/external/libedhoc/externals/mbedtls/tests/include/test/constant_flow.h +0 -71
  609. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/aead.h +0 -121
  610. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/asymmetric_encryption.h +0 -67
  611. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/cipher.h +0 -130
  612. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/config_test_driver.h +0 -44
  613. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/crypto_config_test_driver_extension.h +0 -430
  614. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/hash.h +0 -64
  615. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/key_agreement.h +0 -62
  616. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/key_management.h +0 -123
  617. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/mac.h +0 -125
  618. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/pake.h +0 -75
  619. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/signature.h +0 -112
  620. package/external/libedhoc/externals/mbedtls/tests/include/test/drivers/test_driver.h +0 -32
  621. package/external/libedhoc/externals/mbedtls/tests/include/test/fake_external_rng_for_test.h +0 -40
  622. package/external/libedhoc/externals/mbedtls/tests/include/test/helpers.h +0 -268
  623. package/external/libedhoc/externals/mbedtls/tests/include/test/macros.h +0 -250
  624. package/external/libedhoc/externals/mbedtls/tests/include/test/psa_crypto_helpers.h +0 -398
  625. package/external/libedhoc/externals/mbedtls/tests/include/test/psa_exercise_key.h +0 -223
  626. package/external/libedhoc/externals/mbedtls/tests/include/test/psa_helpers.h +0 -24
  627. package/external/libedhoc/externals/mbedtls/tests/include/test/random.h +0 -91
  628. package/external/libedhoc/externals/mbedtls/tests/include/test/ssl_helpers.h +0 -628
  629. package/external/libedhoc/externals/mbedtls/tests/src/asn1_helpers.c +0 -62
  630. package/external/libedhoc/externals/mbedtls/tests/src/bignum_helpers.c +0 -145
  631. package/external/libedhoc/externals/mbedtls/tests/src/certs.c +0 -480
  632. package/external/libedhoc/externals/mbedtls/tests/src/drivers/hash.c +0 -199
  633. package/external/libedhoc/externals/mbedtls/tests/src/drivers/platform_builtin_keys.c +0 -78
  634. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_aead.c +0 -462
  635. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_asymmetric_encryption.c +0 -151
  636. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_cipher.c +0 -424
  637. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_key_agreement.c +0 -147
  638. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_key_management.c +0 -783
  639. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_mac.c +0 -422
  640. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_pake.c +0 -202
  641. package/external/libedhoc/externals/mbedtls/tests/src/drivers/test_driver_signature.c +0 -405
  642. package/external/libedhoc/externals/mbedtls/tests/src/fake_external_rng_for_test.c +0 -45
  643. package/external/libedhoc/externals/mbedtls/tests/src/helpers.c +0 -353
  644. package/external/libedhoc/externals/mbedtls/tests/src/psa_crypto_helpers.c +0 -196
  645. package/external/libedhoc/externals/mbedtls/tests/src/psa_exercise_key.c +0 -989
  646. package/external/libedhoc/externals/mbedtls/tests/src/random.c +0 -136
  647. package/external/libedhoc/externals/mbedtls/tests/src/test_certs.h +0 -1226
  648. package/external/libedhoc/externals/mbedtls/tests/src/test_helpers/ssl_helpers.c +0 -2292
  649. package/external/libedhoc/externals/mbedtls/tests/src/threading_helpers.c +0 -210
  650. package/external/libedhoc/externals/zcbor/include/zcbor_common.h +0 -509
  651. package/external/libedhoc/externals/zcbor/include/zcbor_decode.h +0 -447
  652. package/external/libedhoc/externals/zcbor/include/zcbor_encode.h +0 -240
  653. package/external/libedhoc/externals/zcbor/include/zcbor_print.h +0 -165
  654. package/external/libedhoc/externals/zcbor/include/zcbor_tags.h +0 -94
  655. package/external/libedhoc/externals/zcbor/samples/hello_world/src/main.c +0 -41
  656. package/external/libedhoc/externals/zcbor/samples/pet/include/pet_decode.h +0 -39
  657. package/external/libedhoc/externals/zcbor/samples/pet/include/pet_encode.h +0 -39
  658. package/external/libedhoc/externals/zcbor/samples/pet/include/pet_types.h +0 -47
  659. package/external/libedhoc/externals/zcbor/samples/pet/src/main.c +0 -128
  660. package/external/libedhoc/externals/zcbor/samples/pet/src/pet_decode.c +0 -60
  661. package/external/libedhoc/externals/zcbor/samples/pet/src/pet_encode.c +0 -61
  662. package/external/libedhoc/externals/zcbor/src/zcbor_common.c +0 -430
  663. package/external/libedhoc/externals/zcbor/src/zcbor_decode.c +0 -1567
  664. package/external/libedhoc/externals/zcbor/src/zcbor_encode.c +0 -609
  665. package/external/libedhoc/externals/zcbor/tests/decode/test1_suit_old_formats/src/main.c +0 -367
  666. package/external/libedhoc/externals/zcbor/tests/decode/test2_suit/src/main.c +0 -189
  667. package/external/libedhoc/externals/zcbor/tests/decode/test3_simple/src/main.c +0 -528
  668. package/external/libedhoc/externals/zcbor/tests/decode/test5_corner_cases/src/main.c +0 -2154
  669. package/external/libedhoc/externals/zcbor/tests/decode/test7_suit9_simple/src/main.c +0 -134
  670. package/external/libedhoc/externals/zcbor/tests/decode/test8_suit12/src/main.c +0 -862
  671. package/external/libedhoc/externals/zcbor/tests/decode/test9_manifest14/src/main.c +0 -363
  672. package/external/libedhoc/externals/zcbor/tests/encode/test1_suit/src/main.c +0 -453
  673. package/external/libedhoc/externals/zcbor/tests/encode/test2_simple/src/main.c +0 -122
  674. package/external/libedhoc/externals/zcbor/tests/encode/test3_corner_cases/src/main.c +0 -1554
  675. package/external/libedhoc/externals/zcbor/tests/encode/test4_senml/src/main.c +0 -65
  676. package/external/libedhoc/externals/zcbor/tests/fuzz/fuzz_everything.c +0 -12
  677. package/external/libedhoc/externals/zcbor/tests/fuzz/fuzz_manifest12.c +0 -136
  678. package/external/libedhoc/externals/zcbor/tests/fuzz/fuzz_pet.c +0 -12
  679. package/external/libedhoc/externals/zcbor/tests/fuzz/main_entry.c +0 -60
  680. package/external/libedhoc/externals/zcbor/tests/fuzz/main_entry.h +0 -5
  681. package/external/libedhoc/externals/zcbor/tests/unit/test1_unit_tests/src/main.c +0 -1437
  682. package/external/libedhoc/externals/zcbor/tests/unit/test3_float16/src/main.c +0 -203
  683. package/external/libedhoc/include/edhoc.h +0 -687
  684. package/external/libedhoc/include/edhoc_common.h +0 -289
  685. package/external/libedhoc/include/edhoc_context.h +0 -343
  686. package/external/libedhoc/include/edhoc_credentials.h +0 -265
  687. package/external/libedhoc/include/edhoc_crypto.h +0 -331
  688. package/external/libedhoc/include/edhoc_ead.h +0 -102
  689. package/external/libedhoc/include/edhoc_macros.h +0 -60
  690. package/external/libedhoc/include/edhoc_values.h +0 -181
  691. package/external/libedhoc/library/edhoc.c +0 -253
  692. package/external/libedhoc/library/edhoc_common.c +0 -1314
  693. package/external/libedhoc/library/edhoc_exporter.c +0 -542
  694. package/external/libedhoc/library/edhoc_message_1.c +0 -474
  695. package/external/libedhoc/library/edhoc_message_2.c +0 -1697
  696. package/external/libedhoc/library/edhoc_message_3.c +0 -1467
  697. package/external/libedhoc/library/edhoc_message_4.c +0 -828
  698. package/external/libedhoc/library/edhoc_message_error.c +0 -238
  699. package/external/libedhoc/tests/include/cipher_suite_0.h +0 -131
  700. package/external/libedhoc/tests/include/cipher_suite_2.h +0 -139
  701. package/external/libedhoc/tests/include/test_vector_rfc9529_chapter_2.h +0 -786
  702. package/external/libedhoc/tests/include/test_vector_rfc9529_chapter_3.h +0 -529
  703. package/external/libedhoc/tests/include/test_vector_x5chain_sign_keys_suite_0.h +0 -137
  704. package/external/libedhoc/tests/include/test_vector_x5chain_sign_keys_suite_2.h +0 -168
  705. package/external/libedhoc/tests/include/test_vector_x5chain_static_dh_keys_suite_2.h +0 -162
  706. package/external/libedhoc/tests/include/test_vector_x5t_sign_keys_suite_2.h +0 -180
  707. package/external/libedhoc/tests/src/cipher_suite_0.c +0 -445
  708. package/external/libedhoc/tests/src/cipher_suite_2.c +0 -600
  709. package/external/libedhoc/tests/src/module_test_api.c +0 -430
  710. package/external/libedhoc/tests/src/module_test_cipher_suite_0.c +0 -395
  711. package/external/libedhoc/tests/src/module_test_cipher_suite_2.c +0 -392
  712. package/external/libedhoc/tests/src/module_test_error_message.c +0 -251
  713. package/external/libedhoc/tests/src/module_test_main.c +0 -49
  714. package/external/libedhoc/tests/src/module_test_rfc9528_suites_negotiation.c +0 -541
  715. package/external/libedhoc/tests/src/module_test_rfc9529_chapter_2.c +0 -2681
  716. package/external/libedhoc/tests/src/module_test_rfc9529_chapter_3.c +0 -1635
  717. package/external/libedhoc/tests/src/module_test_x5chain_sign_keys_suite_0.c +0 -1135
  718. package/external/libedhoc/tests/src/module_test_x5chain_sign_keys_suite_2.c +0 -1249
  719. package/external/libedhoc/tests/src/module_test_x5chain_static_dh_keys_suite_2.c +0 -798
  720. package/external/libedhoc/tests/src/module_test_x5t_sign_keys_suite_2.c +0 -956
  721. package/include/Binding.h +0 -348
  722. package/include/EdhocComposeAsyncWorker.h +0 -49
  723. package/include/EdhocCredentialManager.h +0 -89
  724. package/include/EdhocCryptoManager.h +0 -495
  725. package/include/EdhocEadManager.h +0 -147
  726. package/include/EdhocExportOscoreAsyncWorker.h +0 -57
  727. package/include/EdhocKeyExporterAsyncWorker.h +0 -56
  728. package/include/EdhocKeyUpdateAsyncWorker.h +0 -55
  729. package/include/EdhocProcessAsyncWorker.h +0 -55
  730. package/include/RunningContext.h +0 -102
  731. package/include/Suites.h +0 -27
  732. package/include/Utils.h +0 -71
  733. package/patches/prebuildify-cross+5.1.0.dev.patch +0 -26
  734. package/patches/prebuildify-cross+5.1.1.dev.patch +0 -26
  735. package/prebuilds/android-arm/edhoc.armv7.node +0 -0
  736. package/prebuilds/android-arm64/edhoc.armv8.node +0 -0
  737. package/prebuilds/darwin-arm64/edhoc.node +0 -0
  738. package/prebuilds/darwin-x64/edhoc.node +0 -0
  739. package/prebuilds/linux-arm/edhoc.armv6.node +0 -0
  740. package/prebuilds/linux-arm/edhoc.armv7.node +0 -0
  741. package/prebuilds/linux-arm64/edhoc.armv8.node +0 -0
  742. package/prebuilds/linux-x64/edhoc.glibc.node +0 -0
  743. package/prebuilds/linux-x64/edhoc.musl.node +0 -0
  744. package/prebuilds/win32-ia32/edhoc.node +0 -0
  745. package/prebuilds/win32-x64/edhoc.node +0 -0
  746. package/src/Binding.cpp +0 -434
  747. package/src/EdhocComposeAsyncWorker.cpp +0 -60
  748. package/src/EdhocCredentialManager.cpp +0 -314
  749. package/src/EdhocCryptoManager.cpp +0 -593
  750. package/src/EdhocEadManager.cpp +0 -148
  751. package/src/EdhocExportOscoreAsyncWorker.cpp +0 -67
  752. package/src/EdhocKeyExporterAsyncWorker.cpp +0 -39
  753. package/src/EdhocKeyUpdateAsyncWorker.cpp +0 -31
  754. package/src/EdhocProcessAsyncWorker.cpp +0 -120
  755. package/src/RunningContext.cpp +0 -95
  756. package/src/Suites.cpp +0 -120
  757. package/src/Utils.cpp +0 -54
  758. package/test/basic.test.ts +0 -118
  759. package/test/vectors.test.ts +0 -111
@@ -1,1362 +0,0 @@
1
- /**
2
- * \file ecp.h
3
- *
4
- * \brief This file provides an API for Elliptic Curves over GF(P) (ECP).
5
- *
6
- * The use of ECP in cryptography and TLS is defined in
7
- * <em>Standards for Efficient Cryptography Group (SECG): SEC1
8
- * Elliptic Curve Cryptography</em> and
9
- * <em>RFC-4492: Elliptic Curve Cryptography (ECC) Cipher Suites
10
- * for Transport Layer Security (TLS)</em>.
11
- *
12
- * <em>RFC-2409: The Internet Key Exchange (IKE)</em> defines ECP
13
- * group types.
14
- *
15
- */
16
-
17
- /*
18
- * Copyright The Mbed TLS Contributors
19
- * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
20
- */
21
-
22
- #ifndef MBEDTLS_ECP_H
23
- #define MBEDTLS_ECP_H
24
- #include "mbedtls/private_access.h"
25
-
26
- #include "mbedtls/build_info.h"
27
-
28
- #include "mbedtls/bignum.h"
29
-
30
- /*
31
- * ECP error codes
32
- */
33
- /** Bad input parameters to function. */
34
- #define MBEDTLS_ERR_ECP_BAD_INPUT_DATA -0x4F80
35
- /** The buffer is too small to write to. */
36
- #define MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL -0x4F00
37
- /** The requested feature is not available, for example, the requested curve is not supported. */
38
- #define MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE -0x4E80
39
- /** The signature is not valid. */
40
- #define MBEDTLS_ERR_ECP_VERIFY_FAILED -0x4E00
41
- /** Memory allocation failed. */
42
- #define MBEDTLS_ERR_ECP_ALLOC_FAILED -0x4D80
43
- /** Generation of random value, such as ephemeral key, failed. */
44
- #define MBEDTLS_ERR_ECP_RANDOM_FAILED -0x4D00
45
- /** Invalid private or public key. */
46
- #define MBEDTLS_ERR_ECP_INVALID_KEY -0x4C80
47
- /** The buffer contains a valid signature followed by more data. */
48
- #define MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH -0x4C00
49
- /** Operation in progress, call again with the same parameters to continue. */
50
- #define MBEDTLS_ERR_ECP_IN_PROGRESS -0x4B00
51
-
52
- /* Flags indicating whether to include code that is specific to certain
53
- * types of curves. These flags are for internal library use only. */
54
- #if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) || \
55
- defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) || \
56
- defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) || \
57
- defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) || \
58
- defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) || \
59
- defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) || \
60
- defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) || \
61
- defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) || \
62
- defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) || \
63
- defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) || \
64
- defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED)
65
- #define MBEDTLS_ECP_SHORT_WEIERSTRASS_ENABLED
66
- #endif
67
- #if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) || \
68
- defined(MBEDTLS_ECP_DP_CURVE448_ENABLED)
69
- #define MBEDTLS_ECP_MONTGOMERY_ENABLED
70
- #endif
71
-
72
- #ifdef __cplusplus
73
- extern "C" {
74
- #endif
75
-
76
- /**
77
- * Domain-parameter identifiers: curve, subgroup, and generator.
78
- *
79
- * \note Only curves over prime fields are supported.
80
- *
81
- * \warning This library does not support validation of arbitrary domain
82
- * parameters. Therefore, only standardized domain parameters from trusted
83
- * sources should be used. See mbedtls_ecp_group_load().
84
- */
85
- /* Note: when adding a new curve:
86
- * - Add it at the end of this enum, otherwise you'll break the ABI by
87
- * changing the numerical value for existing curves.
88
- * - Increment MBEDTLS_ECP_DP_MAX below if needed.
89
- * - Update the calculation of MBEDTLS_ECP_MAX_BITS below.
90
- * - Add the corresponding MBEDTLS_ECP_DP_xxx_ENABLED macro definition to
91
- * mbedtls_config.h.
92
- * - List the curve as a dependency of MBEDTLS_ECP_C and
93
- * MBEDTLS_ECDSA_C if supported in check_config.h.
94
- * - Add the curve to the appropriate curve type macro
95
- * MBEDTLS_ECP_yyy_ENABLED above.
96
- * - Add the necessary definitions to ecp_curves.c.
97
- * - Add the curve to the ecp_supported_curves array in ecp.c.
98
- * - Add the curve to applicable profiles in x509_crt.c.
99
- * - Add the curve to applicable presets in ssl_tls.c.
100
- */
101
- typedef enum {
102
- MBEDTLS_ECP_DP_NONE = 0, /*!< Curve not defined. */
103
- MBEDTLS_ECP_DP_SECP192R1, /*!< Domain parameters for the 192-bit curve defined by FIPS 186-4 and SEC1. */
104
- MBEDTLS_ECP_DP_SECP224R1, /*!< Domain parameters for the 224-bit curve defined by FIPS 186-4 and SEC1. */
105
- MBEDTLS_ECP_DP_SECP256R1, /*!< Domain parameters for the 256-bit curve defined by FIPS 186-4 and SEC1. */
106
- MBEDTLS_ECP_DP_SECP384R1, /*!< Domain parameters for the 384-bit curve defined by FIPS 186-4 and SEC1. */
107
- MBEDTLS_ECP_DP_SECP521R1, /*!< Domain parameters for the 521-bit curve defined by FIPS 186-4 and SEC1. */
108
- MBEDTLS_ECP_DP_BP256R1, /*!< Domain parameters for 256-bit Brainpool curve. */
109
- MBEDTLS_ECP_DP_BP384R1, /*!< Domain parameters for 384-bit Brainpool curve. */
110
- MBEDTLS_ECP_DP_BP512R1, /*!< Domain parameters for 512-bit Brainpool curve. */
111
- MBEDTLS_ECP_DP_CURVE25519, /*!< Domain parameters for Curve25519. */
112
- MBEDTLS_ECP_DP_SECP192K1, /*!< Domain parameters for 192-bit "Koblitz" curve. */
113
- MBEDTLS_ECP_DP_SECP224K1, /*!< Domain parameters for 224-bit "Koblitz" curve. */
114
- MBEDTLS_ECP_DP_SECP256K1, /*!< Domain parameters for 256-bit "Koblitz" curve. */
115
- MBEDTLS_ECP_DP_CURVE448, /*!< Domain parameters for Curve448. */
116
- } mbedtls_ecp_group_id;
117
-
118
- /**
119
- * The number of supported curves, plus one for #MBEDTLS_ECP_DP_NONE.
120
- */
121
- #define MBEDTLS_ECP_DP_MAX 14
122
-
123
- /*
124
- * Curve types
125
- */
126
- typedef enum {
127
- MBEDTLS_ECP_TYPE_NONE = 0,
128
- MBEDTLS_ECP_TYPE_SHORT_WEIERSTRASS, /* y^2 = x^3 + a x + b */
129
- MBEDTLS_ECP_TYPE_MONTGOMERY, /* y^2 = x^3 + a x^2 + x */
130
- } mbedtls_ecp_curve_type;
131
-
132
- /**
133
- * Curve information, for use by other modules.
134
- *
135
- * The fields of this structure are part of the public API and can be
136
- * accessed directly by applications. Future versions of the library may
137
- * add extra fields or reorder existing fields.
138
- */
139
- typedef struct mbedtls_ecp_curve_info {
140
- mbedtls_ecp_group_id grp_id; /*!< An internal identifier. */
141
- uint16_t tls_id; /*!< The TLS NamedCurve identifier. */
142
- uint16_t bit_size; /*!< The curve size in bits. */
143
- const char *name; /*!< A human-friendly name. */
144
- } mbedtls_ecp_curve_info;
145
-
146
- /**
147
- * \brief The ECP point structure, in Jacobian coordinates.
148
- *
149
- * \note All functions expect and return points satisfying
150
- * the following condition: <code>Z == 0</code> or
151
- * <code>Z == 1</code>. Other values of \p Z are
152
- * used only by internal functions.
153
- * The point is zero, or "at infinity", if <code>Z == 0</code>.
154
- * Otherwise, \p X and \p Y are its standard (affine)
155
- * coordinates.
156
- */
157
- typedef struct mbedtls_ecp_point {
158
- mbedtls_mpi MBEDTLS_PRIVATE(X); /*!< The X coordinate of the ECP point. */
159
- mbedtls_mpi MBEDTLS_PRIVATE(Y); /*!< The Y coordinate of the ECP point. */
160
- mbedtls_mpi MBEDTLS_PRIVATE(Z); /*!< The Z coordinate of the ECP point. */
161
- }
162
- mbedtls_ecp_point;
163
-
164
- #if !defined(MBEDTLS_ECP_ALT)
165
- /*
166
- * default Mbed TLS elliptic curve arithmetic implementation
167
- *
168
- * (in case MBEDTLS_ECP_ALT is defined then the developer has to provide an
169
- * alternative implementation for the whole module and it will replace this
170
- * one.)
171
- */
172
-
173
- /**
174
- * \brief The ECP group structure.
175
- *
176
- * We consider two types of curve equations:
177
- * <ul><li>Short Weierstrass: <code>y^2 = x^3 + A x + B mod P</code>
178
- * (SEC1 + RFC-4492)</li>
179
- * <li>Montgomery: <code>y^2 = x^3 + A x^2 + x mod P</code> (Curve25519,
180
- * Curve448)</li></ul>
181
- * In both cases, the generator (\p G) for a prime-order subgroup is fixed.
182
- *
183
- * For Short Weierstrass, this subgroup is the whole curve, and its
184
- * cardinality is denoted by \p N. Our code requires that \p N is an
185
- * odd prime as mbedtls_ecp_mul() requires an odd number, and
186
- * mbedtls_ecdsa_sign() requires that it is prime for blinding purposes.
187
- *
188
- * The default implementation only initializes \p A without setting it to the
189
- * authentic value for curves with <code>A = -3</code>(SECP256R1, etc), in which
190
- * case you need to load \p A by yourself when using domain parameters directly,
191
- * for example:
192
- * \code
193
- * mbedtls_mpi_init(&A);
194
- * mbedtls_ecp_group_init(&grp);
195
- * CHECK_RETURN(mbedtls_ecp_group_load(&grp, grp_id));
196
- * if (mbedtls_ecp_group_a_is_minus_3(&grp)) {
197
- * CHECK_RETURN(mbedtls_mpi_sub_int(&A, &grp.P, 3));
198
- * } else {
199
- * CHECK_RETURN(mbedtls_mpi_copy(&A, &grp.A));
200
- * }
201
- *
202
- * do_something_with_a(&A);
203
- *
204
- * cleanup:
205
- * mbedtls_mpi_free(&A);
206
- * mbedtls_ecp_group_free(&grp);
207
- * \endcode
208
- *
209
- * For Montgomery curves, we do not store \p A, but <code>(A + 2) / 4</code>,
210
- * which is the quantity used in the formulas. Additionally, \p nbits is
211
- * not the size of \p N but the required size for private keys.
212
- *
213
- * If \p modp is NULL, reduction modulo \p P is done using a generic algorithm.
214
- * Otherwise, \p modp must point to a function that takes an \p mbedtls_mpi in the
215
- * range of <code>0..2^(2*pbits)-1</code>, and transforms it in-place to an integer
216
- * which is congruent mod \p P to the given MPI, and is close enough to \p pbits
217
- * in size, so that it may be efficiently brought in the 0..P-1 range by a few
218
- * additions or subtractions. Therefore, it is only an approximative modular
219
- * reduction. It must return 0 on success and non-zero on failure.
220
- *
221
- * \note Alternative implementations of the ECP module must obey the
222
- * following constraints.
223
- * * Group IDs must be distinct: if two group structures have
224
- * the same ID, then they must be identical.
225
- * * The fields \c id, \c P, \c A, \c B, \c G, \c N,
226
- * \c pbits and \c nbits must have the same type and semantics
227
- * as in the built-in implementation.
228
- * They must be available for reading, but direct modification
229
- * of these fields does not need to be supported.
230
- * They do not need to be at the same offset in the structure.
231
- */
232
- typedef struct mbedtls_ecp_group {
233
- mbedtls_ecp_group_id id; /*!< An internal group identifier. */
234
- mbedtls_mpi P; /*!< The prime modulus of the base field. */
235
- mbedtls_mpi A; /*!< For Short Weierstrass: \p A in the equation. Note that
236
- \p A is not set to the authentic value in some cases.
237
- Refer to detailed description of ::mbedtls_ecp_group if
238
- using domain parameters in the structure.
239
- For Montgomery curves: <code>(A + 2) / 4</code>. */
240
- mbedtls_mpi B; /*!< For Short Weierstrass: \p B in the equation.
241
- For Montgomery curves: unused. */
242
- mbedtls_ecp_point G; /*!< The generator of the subgroup used. */
243
- mbedtls_mpi N; /*!< The order of \p G. */
244
- size_t pbits; /*!< The number of bits in \p P.*/
245
- size_t nbits; /*!< For Short Weierstrass: The number of bits in \p P.
246
- For Montgomery curves: the number of bits in the
247
- private keys. */
248
- /* End of public fields */
249
-
250
- unsigned int MBEDTLS_PRIVATE(h); /*!< \internal 1 if the constants are static. */
251
- int(*MBEDTLS_PRIVATE(modp))(mbedtls_mpi *); /*!< The function for fast pseudo-reduction
252
- mod \p P (see above).*/
253
- int(*MBEDTLS_PRIVATE(t_pre))(mbedtls_ecp_point *, void *); /*!< Unused. */
254
- int(*MBEDTLS_PRIVATE(t_post))(mbedtls_ecp_point *, void *); /*!< Unused. */
255
- void *MBEDTLS_PRIVATE(t_data); /*!< Unused. */
256
- mbedtls_ecp_point *MBEDTLS_PRIVATE(T); /*!< Pre-computed points for ecp_mul_comb(). */
257
- size_t MBEDTLS_PRIVATE(T_size); /*!< The number of dynamic allocated pre-computed points. */
258
- }
259
- mbedtls_ecp_group;
260
-
261
- /**
262
- * \name SECTION: Module settings
263
- *
264
- * The configuration options you can set for this module are in this section.
265
- * Either change them in mbedtls_config.h, or define them using the compiler command line.
266
- * \{
267
- */
268
-
269
- #if !defined(MBEDTLS_ECP_WINDOW_SIZE)
270
- /*
271
- * Maximum "window" size used for point multiplication.
272
- * Default: a point where higher memory usage yields diminishing performance
273
- * returns.
274
- * Minimum value: 2. Maximum value: 7.
275
- *
276
- * Result is an array of at most ( 1 << ( MBEDTLS_ECP_WINDOW_SIZE - 1 ) )
277
- * points used for point multiplication. This value is directly tied to EC
278
- * peak memory usage, so decreasing it by one should roughly cut memory usage
279
- * by two (if large curves are in use).
280
- *
281
- * Reduction in size may reduce speed, but larger curves are impacted first.
282
- * Sample performances (in ECDHE handshakes/s, with FIXED_POINT_OPTIM = 1):
283
- * w-size: 6 5 4 3 2
284
- * 521 145 141 135 120 97
285
- * 384 214 209 198 177 146
286
- * 256 320 320 303 262 226
287
- * 224 475 475 453 398 342
288
- * 192 640 640 633 587 476
289
- */
290
- #define MBEDTLS_ECP_WINDOW_SIZE 4 /**< The maximum window size used. */
291
- #endif /* MBEDTLS_ECP_WINDOW_SIZE */
292
-
293
- #if !defined(MBEDTLS_ECP_FIXED_POINT_OPTIM)
294
- /*
295
- * Trade code size for speed on fixed-point multiplication.
296
- *
297
- * This speeds up repeated multiplication of the generator (that is, the
298
- * multiplication in ECDSA signatures, and half of the multiplications in
299
- * ECDSA verification and ECDHE) by a factor roughly 3 to 4.
300
- *
301
- * For each n-bit Short Weierstrass curve that is enabled, this adds 4n bytes
302
- * of code size if n < 384 and 8n otherwise.
303
- *
304
- * Change this value to 0 to reduce code size.
305
- */
306
- #define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up. */
307
- #endif /* MBEDTLS_ECP_FIXED_POINT_OPTIM */
308
-
309
- /** \} name SECTION: Module settings */
310
-
311
- #else /* MBEDTLS_ECP_ALT */
312
- #include "ecp_alt.h"
313
- #endif /* MBEDTLS_ECP_ALT */
314
-
315
- /**
316
- * The maximum size of the groups, that is, of \c N and \c P.
317
- */
318
- #if !defined(MBEDTLS_ECP_LIGHT)
319
- /* Dummy definition to help code that has optional ECP support and
320
- * defines an MBEDTLS_ECP_MAX_BYTES-sized array unconditionally. */
321
- #define MBEDTLS_ECP_MAX_BITS 1
322
- /* Note: the curves must be listed in DECREASING size! */
323
- #elif defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED)
324
- #define MBEDTLS_ECP_MAX_BITS 521
325
- #elif defined(MBEDTLS_ECP_DP_BP512R1_ENABLED)
326
- #define MBEDTLS_ECP_MAX_BITS 512
327
- #elif defined(MBEDTLS_ECP_DP_CURVE448_ENABLED)
328
- #define MBEDTLS_ECP_MAX_BITS 448
329
- #elif defined(MBEDTLS_ECP_DP_BP384R1_ENABLED)
330
- #define MBEDTLS_ECP_MAX_BITS 384
331
- #elif defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED)
332
- #define MBEDTLS_ECP_MAX_BITS 384
333
- #elif defined(MBEDTLS_ECP_DP_BP256R1_ENABLED)
334
- #define MBEDTLS_ECP_MAX_BITS 256
335
- #elif defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED)
336
- #define MBEDTLS_ECP_MAX_BITS 256
337
- #elif defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED)
338
- #define MBEDTLS_ECP_MAX_BITS 256
339
- #elif defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED)
340
- #define MBEDTLS_ECP_MAX_BITS 255
341
- #elif defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED)
342
- #define MBEDTLS_ECP_MAX_BITS 225 // n is slightly above 2^224
343
- #elif defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED)
344
- #define MBEDTLS_ECP_MAX_BITS 224
345
- #elif defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED)
346
- #define MBEDTLS_ECP_MAX_BITS 192
347
- #elif defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED)
348
- #define MBEDTLS_ECP_MAX_BITS 192
349
- #else /* !MBEDTLS_ECP_LIGHT */
350
- #error "Missing definition of MBEDTLS_ECP_MAX_BITS"
351
- #endif /* !MBEDTLS_ECP_LIGHT */
352
-
353
- #define MBEDTLS_ECP_MAX_BYTES ((MBEDTLS_ECP_MAX_BITS + 7) / 8)
354
- #define MBEDTLS_ECP_MAX_PT_LEN (2 * MBEDTLS_ECP_MAX_BYTES + 1)
355
-
356
- #if defined(MBEDTLS_ECP_RESTARTABLE)
357
-
358
- /**
359
- * \brief Internal restart context for multiplication
360
- *
361
- * \note Opaque struct
362
- */
363
- typedef struct mbedtls_ecp_restart_mul mbedtls_ecp_restart_mul_ctx;
364
-
365
- /**
366
- * \brief Internal restart context for ecp_muladd()
367
- *
368
- * \note Opaque struct
369
- */
370
- typedef struct mbedtls_ecp_restart_muladd mbedtls_ecp_restart_muladd_ctx;
371
-
372
- /**
373
- * \brief General context for resuming ECC operations
374
- */
375
- typedef struct {
376
- unsigned MBEDTLS_PRIVATE(ops_done); /*!< current ops count */
377
- unsigned MBEDTLS_PRIVATE(depth); /*!< call depth (0 = top-level) */
378
- mbedtls_ecp_restart_mul_ctx *MBEDTLS_PRIVATE(rsm); /*!< ecp_mul_comb() sub-context */
379
- mbedtls_ecp_restart_muladd_ctx *MBEDTLS_PRIVATE(ma); /*!< ecp_muladd() sub-context */
380
- } mbedtls_ecp_restart_ctx;
381
-
382
- /*
383
- * Operation counts for restartable functions
384
- */
385
- #define MBEDTLS_ECP_OPS_CHK 3 /*!< basic ops count for ecp_check_pubkey() */
386
- #define MBEDTLS_ECP_OPS_DBL 8 /*!< basic ops count for ecp_double_jac() */
387
- #define MBEDTLS_ECP_OPS_ADD 11 /*!< basic ops count for see ecp_add_mixed() */
388
- #define MBEDTLS_ECP_OPS_INV 120 /*!< empirical equivalent for mpi_mod_inv() */
389
-
390
- /**
391
- * \brief Internal; for restartable functions in other modules.
392
- * Check and update basic ops budget.
393
- *
394
- * \param grp Group structure
395
- * \param rs_ctx Restart context
396
- * \param ops Number of basic ops to do
397
- *
398
- * \return \c 0 if doing \p ops basic ops is still allowed,
399
- * \return #MBEDTLS_ERR_ECP_IN_PROGRESS otherwise.
400
- */
401
- int mbedtls_ecp_check_budget(const mbedtls_ecp_group *grp,
402
- mbedtls_ecp_restart_ctx *rs_ctx,
403
- unsigned ops);
404
-
405
- /* Utility macro for checking and updating ops budget */
406
- #define MBEDTLS_ECP_BUDGET(ops) \
407
- MBEDTLS_MPI_CHK(mbedtls_ecp_check_budget(grp, rs_ctx, \
408
- (unsigned) (ops)));
409
-
410
- #else /* MBEDTLS_ECP_RESTARTABLE */
411
-
412
- #define MBEDTLS_ECP_BUDGET(ops) /* no-op; for compatibility */
413
-
414
- /* We want to declare restartable versions of existing functions anyway */
415
- typedef void mbedtls_ecp_restart_ctx;
416
-
417
- #endif /* MBEDTLS_ECP_RESTARTABLE */
418
-
419
- /**
420
- * \brief The ECP key-pair structure.
421
- *
422
- * A generic key-pair that may be used for ECDSA and fixed ECDH, for example.
423
- *
424
- * \note Members are deliberately in the same order as in the
425
- * ::mbedtls_ecdsa_context structure.
426
- */
427
- typedef struct mbedtls_ecp_keypair {
428
- mbedtls_ecp_group MBEDTLS_PRIVATE(grp); /*!< Elliptic curve and base point */
429
- mbedtls_mpi MBEDTLS_PRIVATE(d); /*!< our secret value */
430
- mbedtls_ecp_point MBEDTLS_PRIVATE(Q); /*!< our public value */
431
- }
432
- mbedtls_ecp_keypair;
433
-
434
- /**
435
- * The uncompressed point format for Short Weierstrass curves
436
- * (MBEDTLS_ECP_DP_SECP_XXX and MBEDTLS_ECP_DP_BP_XXX).
437
- */
438
- #define MBEDTLS_ECP_PF_UNCOMPRESSED 0
439
- /**
440
- * The compressed point format for Short Weierstrass curves
441
- * (MBEDTLS_ECP_DP_SECP_XXX and MBEDTLS_ECP_DP_BP_XXX).
442
- *
443
- * \warning While this format is supported for all concerned curves for
444
- * writing, when it comes to parsing, it is not supported for all
445
- * curves. Specifically, parsing compressed points on
446
- * MBEDTLS_ECP_DP_SECP224R1 and MBEDTLS_ECP_DP_SECP224K1 is not
447
- * supported.
448
- */
449
- #define MBEDTLS_ECP_PF_COMPRESSED 1
450
-
451
- /*
452
- * Some other constants from RFC 4492
453
- */
454
- #define MBEDTLS_ECP_TLS_NAMED_CURVE 3 /**< The named_curve of ECCurveType. */
455
-
456
- #if defined(MBEDTLS_ECP_RESTARTABLE)
457
- /**
458
- * \brief Set the maximum number of basic operations done in a row.
459
- *
460
- * If more operations are needed to complete a computation,
461
- * #MBEDTLS_ERR_ECP_IN_PROGRESS will be returned by the
462
- * function performing the computation. It is then the
463
- * caller's responsibility to either call again with the same
464
- * parameters until it returns 0 or an error code; or to free
465
- * the restart context if the operation is to be aborted.
466
- *
467
- * It is strictly required that all input parameters and the
468
- * restart context be the same on successive calls for the
469
- * same operation, but output parameters need not be the
470
- * same; they must not be used until the function finally
471
- * returns 0.
472
- *
473
- * This only applies to functions whose documentation
474
- * mentions they may return #MBEDTLS_ERR_ECP_IN_PROGRESS (or
475
- * #MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS for functions in the
476
- * SSL module). For functions that accept a "restart context"
477
- * argument, passing NULL disables restart and makes the
478
- * function equivalent to the function with the same name
479
- * with \c _restartable removed. For functions in the ECDH
480
- * module, restart is disabled unless the function accepts
481
- * an "ECDH context" argument and
482
- * mbedtls_ecdh_enable_restart() was previously called on
483
- * that context. For function in the SSL module, restart is
484
- * only enabled for specific sides and key exchanges
485
- * (currently only for clients and ECDHE-ECDSA).
486
- *
487
- * \warning Using the PSA interruptible interfaces with keys in local
488
- * storage and no accelerator driver will also call this
489
- * function to set the values specified via those interfaces,
490
- * overwriting values previously set. Care should be taken if
491
- * mixing these two interfaces.
492
- *
493
- * \param max_ops Maximum number of basic operations done in a row.
494
- * Default: 0 (unlimited).
495
- * Lower (non-zero) values mean ECC functions will block for
496
- * a lesser maximum amount of time.
497
- *
498
- * \note A "basic operation" is defined as a rough equivalent of a
499
- * multiplication in GF(p) for the NIST P-256 curve.
500
- * As an indication, with default settings, a scalar
501
- * multiplication (full run of \c mbedtls_ecp_mul()) is:
502
- * - about 3300 basic operations for P-256
503
- * - about 9400 basic operations for P-384
504
- *
505
- * \note Very low values are not always respected: sometimes
506
- * functions need to block for a minimum number of
507
- * operations, and will do so even if max_ops is set to a
508
- * lower value. That minimum depends on the curve size, and
509
- * can be made lower by decreasing the value of
510
- * \c MBEDTLS_ECP_WINDOW_SIZE. As an indication, here is the
511
- * lowest effective value for various curves and values of
512
- * that parameter (w for short):
513
- * w=6 w=5 w=4 w=3 w=2
514
- * P-256 208 208 160 136 124
515
- * P-384 682 416 320 272 248
516
- * P-521 1364 832 640 544 496
517
- *
518
- * \note This setting is currently ignored by Curve25519.
519
- */
520
- void mbedtls_ecp_set_max_ops(unsigned max_ops);
521
-
522
- /**
523
- * \brief Check if restart is enabled (max_ops != 0)
524
- *
525
- * \return \c 0 if \c max_ops == 0 (restart disabled)
526
- * \return \c 1 otherwise (restart enabled)
527
- */
528
- int mbedtls_ecp_restart_is_enabled(void);
529
- #endif /* MBEDTLS_ECP_RESTARTABLE */
530
-
531
- /*
532
- * Get the type of a curve
533
- */
534
- mbedtls_ecp_curve_type mbedtls_ecp_get_type(const mbedtls_ecp_group *grp);
535
-
536
- /**
537
- * \brief This function retrieves the information defined in
538
- * mbedtls_ecp_curve_info() for all supported curves.
539
- *
540
- * \note This function returns information about all curves
541
- * supported by the library. Some curves may not be
542
- * supported for all algorithms. Call mbedtls_ecdh_can_do()
543
- * or mbedtls_ecdsa_can_do() to check if a curve is
544
- * supported for ECDH or ECDSA.
545
- *
546
- * \return A statically allocated array. The last entry is 0.
547
- */
548
- const mbedtls_ecp_curve_info *mbedtls_ecp_curve_list(void);
549
-
550
- /**
551
- * \brief This function retrieves the list of internal group
552
- * identifiers of all supported curves in the order of
553
- * preference.
554
- *
555
- * \note This function returns information about all curves
556
- * supported by the library. Some curves may not be
557
- * supported for all algorithms. Call mbedtls_ecdh_can_do()
558
- * or mbedtls_ecdsa_can_do() to check if a curve is
559
- * supported for ECDH or ECDSA.
560
- *
561
- * \return A statically allocated array,
562
- * terminated with MBEDTLS_ECP_DP_NONE.
563
- */
564
- const mbedtls_ecp_group_id *mbedtls_ecp_grp_id_list(void);
565
-
566
- /**
567
- * \brief This function retrieves curve information from an internal
568
- * group identifier.
569
- *
570
- * \param grp_id An \c MBEDTLS_ECP_DP_XXX value.
571
- *
572
- * \return The associated curve information on success.
573
- * \return NULL on failure.
574
- */
575
- const mbedtls_ecp_curve_info *mbedtls_ecp_curve_info_from_grp_id(mbedtls_ecp_group_id grp_id);
576
-
577
- /**
578
- * \brief This function retrieves curve information from a TLS
579
- * NamedCurve value.
580
- *
581
- * \param tls_id An \c MBEDTLS_ECP_DP_XXX value.
582
- *
583
- * \return The associated curve information on success.
584
- * \return NULL on failure.
585
- */
586
- const mbedtls_ecp_curve_info *mbedtls_ecp_curve_info_from_tls_id(uint16_t tls_id);
587
-
588
- /**
589
- * \brief This function retrieves curve information from a
590
- * human-readable name.
591
- *
592
- * \param name The human-readable name.
593
- *
594
- * \return The associated curve information on success.
595
- * \return NULL on failure.
596
- */
597
- const mbedtls_ecp_curve_info *mbedtls_ecp_curve_info_from_name(const char *name);
598
-
599
- /**
600
- * \brief This function initializes a point as zero.
601
- *
602
- * \param pt The point to initialize.
603
- */
604
- void mbedtls_ecp_point_init(mbedtls_ecp_point *pt);
605
-
606
- /**
607
- * \brief This function initializes an ECP group context
608
- * without loading any domain parameters.
609
- *
610
- * \note After this function is called, domain parameters
611
- * for various ECP groups can be loaded through the
612
- * mbedtls_ecp_group_load() or mbedtls_ecp_tls_read_group()
613
- * functions.
614
- */
615
- void mbedtls_ecp_group_init(mbedtls_ecp_group *grp);
616
-
617
- /**
618
- * \brief This function initializes a key pair as an invalid one.
619
- *
620
- * \param key The key pair to initialize.
621
- */
622
- void mbedtls_ecp_keypair_init(mbedtls_ecp_keypair *key);
623
-
624
- /**
625
- * \brief This function frees the components of a point.
626
- *
627
- * \param pt The point to free.
628
- */
629
- void mbedtls_ecp_point_free(mbedtls_ecp_point *pt);
630
-
631
- /**
632
- * \brief This function frees the components of an ECP group.
633
- *
634
- * \param grp The group to free. This may be \c NULL, in which
635
- * case this function returns immediately. If it is not
636
- * \c NULL, it must point to an initialized ECP group.
637
- */
638
- void mbedtls_ecp_group_free(mbedtls_ecp_group *grp);
639
-
640
- /**
641
- * \brief This function frees the components of a key pair.
642
- *
643
- * \param key The key pair to free. This may be \c NULL, in which
644
- * case this function returns immediately. If it is not
645
- * \c NULL, it must point to an initialized ECP key pair.
646
- */
647
- void mbedtls_ecp_keypair_free(mbedtls_ecp_keypair *key);
648
-
649
- #if defined(MBEDTLS_ECP_RESTARTABLE)
650
- /**
651
- * \brief Initialize a restart context.
652
- *
653
- * \param ctx The restart context to initialize. This must
654
- * not be \c NULL.
655
- */
656
- void mbedtls_ecp_restart_init(mbedtls_ecp_restart_ctx *ctx);
657
-
658
- /**
659
- * \brief Free the components of a restart context.
660
- *
661
- * \param ctx The restart context to free. This may be \c NULL, in which
662
- * case this function returns immediately. If it is not
663
- * \c NULL, it must point to an initialized restart context.
664
- */
665
- void mbedtls_ecp_restart_free(mbedtls_ecp_restart_ctx *ctx);
666
- #endif /* MBEDTLS_ECP_RESTARTABLE */
667
-
668
- /**
669
- * \brief This function copies the contents of point \p Q into
670
- * point \p P.
671
- *
672
- * \param P The destination point. This must be initialized.
673
- * \param Q The source point. This must be initialized.
674
- *
675
- * \return \c 0 on success.
676
- * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
677
- * \return Another negative error code for other kinds of failure.
678
- */
679
- int mbedtls_ecp_copy(mbedtls_ecp_point *P, const mbedtls_ecp_point *Q);
680
-
681
- /**
682
- * \brief This function copies the contents of group \p src into
683
- * group \p dst.
684
- *
685
- * \param dst The destination group. This must be initialized.
686
- * \param src The source group. This must be initialized.
687
- *
688
- * \return \c 0 on success.
689
- * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
690
- * \return Another negative error code on other kinds of failure.
691
- */
692
- int mbedtls_ecp_group_copy(mbedtls_ecp_group *dst,
693
- const mbedtls_ecp_group *src);
694
-
695
- /**
696
- * \brief This function sets a point to the point at infinity.
697
- *
698
- * \param pt The point to set. This must be initialized.
699
- *
700
- * \return \c 0 on success.
701
- * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
702
- * \return Another negative error code on other kinds of failure.
703
- */
704
- int mbedtls_ecp_set_zero(mbedtls_ecp_point *pt);
705
-
706
- /**
707
- * \brief This function checks if a point is the point at infinity.
708
- *
709
- * \param pt The point to test. This must be initialized.
710
- *
711
- * \return \c 1 if the point is zero.
712
- * \return \c 0 if the point is non-zero.
713
- * \return A negative error code on failure.
714
- */
715
- int mbedtls_ecp_is_zero(mbedtls_ecp_point *pt);
716
-
717
- /**
718
- * \brief This function compares two points.
719
- *
720
- * \note This assumes that the points are normalized. Otherwise,
721
- * they may compare as "not equal" even if they are.
722
- *
723
- * \param P The first point to compare. This must be initialized.
724
- * \param Q The second point to compare. This must be initialized.
725
- *
726
- * \return \c 0 if the points are equal.
727
- * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the points are not equal.
728
- */
729
- int mbedtls_ecp_point_cmp(const mbedtls_ecp_point *P,
730
- const mbedtls_ecp_point *Q);
731
-
732
- /**
733
- * \brief This function imports a non-zero point from two ASCII
734
- * strings.
735
- *
736
- * \param P The destination point. This must be initialized.
737
- * \param radix The numeric base of the input.
738
- * \param x The first affine coordinate, as a null-terminated string.
739
- * \param y The second affine coordinate, as a null-terminated string.
740
- *
741
- * \return \c 0 on success.
742
- * \return An \c MBEDTLS_ERR_MPI_XXX error code on failure.
743
- */
744
- int mbedtls_ecp_point_read_string(mbedtls_ecp_point *P, int radix,
745
- const char *x, const char *y);
746
-
747
- /**
748
- * \brief This function exports a point into unsigned binary data.
749
- *
750
- * \param grp The group to which the point should belong.
751
- * This must be initialized and have group parameters
752
- * set, for example through mbedtls_ecp_group_load().
753
- * \param P The point to export. This must be initialized.
754
- * \param format The point format. This must be either
755
- * #MBEDTLS_ECP_PF_COMPRESSED or #MBEDTLS_ECP_PF_UNCOMPRESSED.
756
- * (For groups without these formats, this parameter is
757
- * ignored. But it still has to be either of the above
758
- * values.)
759
- * \param olen The address at which to store the length of
760
- * the output in Bytes. This must not be \c NULL.
761
- * \param buf The output buffer. This must be a writable buffer
762
- * of length \p buflen Bytes.
763
- * \param buflen The length of the output buffer \p buf in Bytes.
764
- *
765
- * \return \c 0 on success.
766
- * \return #MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL if the output buffer
767
- * is too small to hold the point.
768
- * \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if the point format
769
- * or the export for the given group is not implemented.
770
- * \return Another negative error code on other kinds of failure.
771
- */
772
- int mbedtls_ecp_point_write_binary(const mbedtls_ecp_group *grp,
773
- const mbedtls_ecp_point *P,
774
- int format, size_t *olen,
775
- unsigned char *buf, size_t buflen);
776
-
777
- /**
778
- * \brief This function imports a point from unsigned binary data.
779
- *
780
- * \note This function does not check that the point actually
781
- * belongs to the given group, see mbedtls_ecp_check_pubkey()
782
- * for that.
783
- *
784
- * \note For compressed points, see #MBEDTLS_ECP_PF_COMPRESSED for
785
- * limitations.
786
- *
787
- * \param grp The group to which the point should belong.
788
- * This must be initialized and have group parameters
789
- * set, for example through mbedtls_ecp_group_load().
790
- * \param P The destination context to import the point to.
791
- * This must be initialized.
792
- * \param buf The input buffer. This must be a readable buffer
793
- * of length \p ilen Bytes.
794
- * \param ilen The length of the input buffer \p buf in Bytes.
795
- *
796
- * \return \c 0 on success.
797
- * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the input is invalid.
798
- * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
799
- * \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if the import for the
800
- * given group is not implemented.
801
- */
802
- int mbedtls_ecp_point_read_binary(const mbedtls_ecp_group *grp,
803
- mbedtls_ecp_point *P,
804
- const unsigned char *buf, size_t ilen);
805
-
806
- /**
807
- * \brief This function imports a point from a TLS ECPoint record.
808
- *
809
- * \note On function return, \p *buf is updated to point immediately
810
- * after the ECPoint record.
811
- *
812
- * \param grp The ECP group to use.
813
- * This must be initialized and have group parameters
814
- * set, for example through mbedtls_ecp_group_load().
815
- * \param pt The destination point.
816
- * \param buf The address of the pointer to the start of the input buffer.
817
- * \param len The length of the buffer.
818
- *
819
- * \return \c 0 on success.
820
- * \return An \c MBEDTLS_ERR_MPI_XXX error code on initialization
821
- * failure.
822
- * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if input is invalid.
823
- */
824
- int mbedtls_ecp_tls_read_point(const mbedtls_ecp_group *grp,
825
- mbedtls_ecp_point *pt,
826
- const unsigned char **buf, size_t len);
827
-
828
- /**
829
- * \brief This function exports a point as a TLS ECPoint record
830
- * defined in RFC 4492, Section 5.4.
831
- *
832
- * \param grp The ECP group to use.
833
- * This must be initialized and have group parameters
834
- * set, for example through mbedtls_ecp_group_load().
835
- * \param pt The point to be exported. This must be initialized.
836
- * \param format The point format to use. This must be either
837
- * #MBEDTLS_ECP_PF_COMPRESSED or #MBEDTLS_ECP_PF_UNCOMPRESSED.
838
- * \param olen The address at which to store the length in Bytes
839
- * of the data written.
840
- * \param buf The target buffer. This must be a writable buffer of
841
- * length \p blen Bytes.
842
- * \param blen The length of the target buffer \p buf in Bytes.
843
- *
844
- * \return \c 0 on success.
845
- * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the input is invalid.
846
- * \return #MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL if the target buffer
847
- * is too small to hold the exported point.
848
- * \return Another negative error code on other kinds of failure.
849
- */
850
- int mbedtls_ecp_tls_write_point(const mbedtls_ecp_group *grp,
851
- const mbedtls_ecp_point *pt,
852
- int format, size_t *olen,
853
- unsigned char *buf, size_t blen);
854
-
855
- /**
856
- * \brief This function sets up an ECP group context
857
- * from a standardized set of domain parameters.
858
- *
859
- * \note The index should be a value of the NamedCurve enum,
860
- * as defined in <em>RFC-4492: Elliptic Curve Cryptography
861
- * (ECC) Cipher Suites for Transport Layer Security (TLS)</em>,
862
- * usually in the form of an \c MBEDTLS_ECP_DP_XXX macro.
863
- *
864
- * \param grp The group context to setup. This must be initialized.
865
- * \param id The identifier of the domain parameter set to load.
866
- *
867
- * \return \c 0 on success.
868
- * \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if \p id doesn't
869
- * correspond to a known group.
870
- * \return Another negative error code on other kinds of failure.
871
- */
872
- int mbedtls_ecp_group_load(mbedtls_ecp_group *grp, mbedtls_ecp_group_id id);
873
-
874
- /**
875
- * \brief This function sets up an ECP group context from a TLS
876
- * ECParameters record as defined in RFC 4492, Section 5.4.
877
- *
878
- * \note The read pointer \p buf is updated to point right after
879
- * the ECParameters record on exit.
880
- *
881
- * \param grp The group context to setup. This must be initialized.
882
- * \param buf The address of the pointer to the start of the input buffer.
883
- * \param len The length of the input buffer \c *buf in Bytes.
884
- *
885
- * \return \c 0 on success.
886
- * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if input is invalid.
887
- * \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if the group is not
888
- * recognized.
889
- * \return Another negative error code on other kinds of failure.
890
- */
891
- int mbedtls_ecp_tls_read_group(mbedtls_ecp_group *grp,
892
- const unsigned char **buf, size_t len);
893
-
894
- /**
895
- * \brief This function extracts an elliptic curve group ID from a
896
- * TLS ECParameters record as defined in RFC 4492, Section 5.4.
897
- *
898
- * \note The read pointer \p buf is updated to point right after
899
- * the ECParameters record on exit.
900
- *
901
- * \param grp The address at which to store the group id.
902
- * This must not be \c NULL.
903
- * \param buf The address of the pointer to the start of the input buffer.
904
- * \param len The length of the input buffer \c *buf in Bytes.
905
- *
906
- * \return \c 0 on success.
907
- * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if input is invalid.
908
- * \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if the group is not
909
- * recognized.
910
- * \return Another negative error code on other kinds of failure.
911
- */
912
- int mbedtls_ecp_tls_read_group_id(mbedtls_ecp_group_id *grp,
913
- const unsigned char **buf,
914
- size_t len);
915
- /**
916
- * \brief This function exports an elliptic curve as a TLS
917
- * ECParameters record as defined in RFC 4492, Section 5.4.
918
- *
919
- * \param grp The ECP group to be exported.
920
- * This must be initialized and have group parameters
921
- * set, for example through mbedtls_ecp_group_load().
922
- * \param olen The address at which to store the number of Bytes written.
923
- * This must not be \c NULL.
924
- * \param buf The buffer to write to. This must be a writable buffer
925
- * of length \p blen Bytes.
926
- * \param blen The length of the output buffer \p buf in Bytes.
927
- *
928
- * \return \c 0 on success.
929
- * \return #MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL if the output
930
- * buffer is too small to hold the exported group.
931
- * \return Another negative error code on other kinds of failure.
932
- */
933
- int mbedtls_ecp_tls_write_group(const mbedtls_ecp_group *grp,
934
- size_t *olen,
935
- unsigned char *buf, size_t blen);
936
-
937
- /**
938
- * \brief This function performs a scalar multiplication of a point
939
- * by an integer: \p R = \p m * \p P.
940
- *
941
- * It is not thread-safe to use same group in multiple threads.
942
- *
943
- * \note To prevent timing attacks, this function
944
- * executes the exact same sequence of base-field
945
- * operations for any valid \p m. It avoids any if-branch or
946
- * array index depending on the value of \p m. It also uses
947
- * \p f_rng to randomize some intermediate results.
948
- *
949
- * \param grp The ECP group to use.
950
- * This must be initialized and have group parameters
951
- * set, for example through mbedtls_ecp_group_load().
952
- * \param R The point in which to store the result of the calculation.
953
- * This must be initialized.
954
- * \param m The integer by which to multiply. This must be initialized.
955
- * \param P The point to multiply. This must be initialized.
956
- * \param f_rng The RNG function. This must not be \c NULL.
957
- * \param p_rng The RNG context to be passed to \p f_rng. This may be \c
958
- * NULL if \p f_rng doesn't need a context.
959
- *
960
- * \return \c 0 on success.
961
- * \return #MBEDTLS_ERR_ECP_INVALID_KEY if \p m is not a valid private
962
- * key, or \p P is not a valid public key.
963
- * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
964
- * \return Another negative error code on other kinds of failure.
965
- */
966
- int mbedtls_ecp_mul(mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
967
- const mbedtls_mpi *m, const mbedtls_ecp_point *P,
968
- int (*f_rng)(void *, unsigned char *, size_t), void *p_rng);
969
-
970
- /**
971
- * \brief This function performs multiplication of a point by
972
- * an integer: \p R = \p m * \p P in a restartable way.
973
- *
974
- * \see mbedtls_ecp_mul()
975
- *
976
- * \note This function does the same as \c mbedtls_ecp_mul(), but
977
- * it can return early and restart according to the limit set
978
- * with \c mbedtls_ecp_set_max_ops() to reduce blocking.
979
- *
980
- * \param grp The ECP group to use.
981
- * This must be initialized and have group parameters
982
- * set, for example through mbedtls_ecp_group_load().
983
- * \param R The point in which to store the result of the calculation.
984
- * This must be initialized.
985
- * \param m The integer by which to multiply. This must be initialized.
986
- * \param P The point to multiply. This must be initialized.
987
- * \param f_rng The RNG function. This must not be \c NULL.
988
- * \param p_rng The RNG context to be passed to \p f_rng. This may be \c
989
- * NULL if \p f_rng doesn't need a context.
990
- * \param rs_ctx The restart context (NULL disables restart).
991
- *
992
- * \return \c 0 on success.
993
- * \return #MBEDTLS_ERR_ECP_INVALID_KEY if \p m is not a valid private
994
- * key, or \p P is not a valid public key.
995
- * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
996
- * \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
997
- * operations was reached: see \c mbedtls_ecp_set_max_ops().
998
- * \return Another negative error code on other kinds of failure.
999
- */
1000
- int mbedtls_ecp_mul_restartable(mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
1001
- const mbedtls_mpi *m, const mbedtls_ecp_point *P,
1002
- int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
1003
- mbedtls_ecp_restart_ctx *rs_ctx);
1004
-
1005
- #if defined(MBEDTLS_ECP_SHORT_WEIERSTRASS_ENABLED)
1006
- /**
1007
- * \brief This function checks if domain parameter A of the curve is
1008
- * \c -3.
1009
- *
1010
- * \note This function is only defined for short Weierstrass curves.
1011
- * It may not be included in builds without any short
1012
- * Weierstrass curve.
1013
- *
1014
- * \param grp The ECP group to use.
1015
- * This must be initialized and have group parameters
1016
- * set, for example through mbedtls_ecp_group_load().
1017
- *
1018
- * \return \c 1 if <code>A = -3</code>.
1019
- * \return \c 0 Otherwise.
1020
- */
1021
- static inline int mbedtls_ecp_group_a_is_minus_3(const mbedtls_ecp_group *grp)
1022
- {
1023
- return grp->A.MBEDTLS_PRIVATE(p) == NULL;
1024
- }
1025
-
1026
- /**
1027
- * \brief This function performs multiplication and addition of two
1028
- * points by integers: \p R = \p m * \p P + \p n * \p Q
1029
- *
1030
- * It is not thread-safe to use same group in multiple threads.
1031
- *
1032
- * \note In contrast to mbedtls_ecp_mul(), this function does not
1033
- * guarantee a constant execution flow and timing.
1034
- *
1035
- * \note This function is only defined for short Weierstrass curves.
1036
- * It may not be included in builds without any short
1037
- * Weierstrass curve.
1038
- *
1039
- * \param grp The ECP group to use.
1040
- * This must be initialized and have group parameters
1041
- * set, for example through mbedtls_ecp_group_load().
1042
- * \param R The point in which to store the result of the calculation.
1043
- * This must be initialized.
1044
- * \param m The integer by which to multiply \p P.
1045
- * This must be initialized.
1046
- * \param P The point to multiply by \p m. This must be initialized.
1047
- * \param n The integer by which to multiply \p Q.
1048
- * This must be initialized.
1049
- * \param Q The point to be multiplied by \p n.
1050
- * This must be initialized.
1051
- *
1052
- * \return \c 0 on success.
1053
- * \return #MBEDTLS_ERR_ECP_INVALID_KEY if \p m or \p n are not
1054
- * valid private keys, or \p P or \p Q are not valid public
1055
- * keys.
1056
- * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
1057
- * \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if \p grp does not
1058
- * designate a short Weierstrass curve.
1059
- * \return Another negative error code on other kinds of failure.
1060
- */
1061
- int mbedtls_ecp_muladd(mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
1062
- const mbedtls_mpi *m, const mbedtls_ecp_point *P,
1063
- const mbedtls_mpi *n, const mbedtls_ecp_point *Q);
1064
-
1065
- /**
1066
- * \brief This function performs multiplication and addition of two
1067
- * points by integers: \p R = \p m * \p P + \p n * \p Q in a
1068
- * restartable way.
1069
- *
1070
- * \see \c mbedtls_ecp_muladd()
1071
- *
1072
- * \note This function works the same as \c mbedtls_ecp_muladd(),
1073
- * but it can return early and restart according to the limit
1074
- * set with \c mbedtls_ecp_set_max_ops() to reduce blocking.
1075
- *
1076
- * \note This function is only defined for short Weierstrass curves.
1077
- * It may not be included in builds without any short
1078
- * Weierstrass curve.
1079
- *
1080
- * \param grp The ECP group to use.
1081
- * This must be initialized and have group parameters
1082
- * set, for example through mbedtls_ecp_group_load().
1083
- * \param R The point in which to store the result of the calculation.
1084
- * This must be initialized.
1085
- * \param m The integer by which to multiply \p P.
1086
- * This must be initialized.
1087
- * \param P The point to multiply by \p m. This must be initialized.
1088
- * \param n The integer by which to multiply \p Q.
1089
- * This must be initialized.
1090
- * \param Q The point to be multiplied by \p n.
1091
- * This must be initialized.
1092
- * \param rs_ctx The restart context (NULL disables restart).
1093
- *
1094
- * \return \c 0 on success.
1095
- * \return #MBEDTLS_ERR_ECP_INVALID_KEY if \p m or \p n are not
1096
- * valid private keys, or \p P or \p Q are not valid public
1097
- * keys.
1098
- * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
1099
- * \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if \p grp does not
1100
- * designate a short Weierstrass curve.
1101
- * \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
1102
- * operations was reached: see \c mbedtls_ecp_set_max_ops().
1103
- * \return Another negative error code on other kinds of failure.
1104
- */
1105
- int mbedtls_ecp_muladd_restartable(
1106
- mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
1107
- const mbedtls_mpi *m, const mbedtls_ecp_point *P,
1108
- const mbedtls_mpi *n, const mbedtls_ecp_point *Q,
1109
- mbedtls_ecp_restart_ctx *rs_ctx);
1110
- #endif /* MBEDTLS_ECP_SHORT_WEIERSTRASS_ENABLED */
1111
-
1112
- /**
1113
- * \brief This function checks that a point is a valid public key
1114
- * on this curve.
1115
- *
1116
- * It only checks that the point is non-zero, has
1117
- * valid coordinates and lies on the curve. It does not verify
1118
- * that it is indeed a multiple of \c G. This additional
1119
- * check is computationally more expensive, is not required
1120
- * by standards, and should not be necessary if the group
1121
- * used has a small cofactor. In particular, it is useless for
1122
- * the NIST groups which all have a cofactor of 1.
1123
- *
1124
- * \note This function uses bare components rather than an
1125
- * ::mbedtls_ecp_keypair structure, to ease use with other
1126
- * structures, such as ::mbedtls_ecdh_context or
1127
- * ::mbedtls_ecdsa_context.
1128
- *
1129
- * \param grp The ECP group the point should belong to.
1130
- * This must be initialized and have group parameters
1131
- * set, for example through mbedtls_ecp_group_load().
1132
- * \param pt The point to check. This must be initialized.
1133
- *
1134
- * \return \c 0 if the point is a valid public key.
1135
- * \return #MBEDTLS_ERR_ECP_INVALID_KEY if the point is not
1136
- * a valid public key for the given curve.
1137
- * \return Another negative error code on other kinds of failure.
1138
- */
1139
- int mbedtls_ecp_check_pubkey(const mbedtls_ecp_group *grp,
1140
- const mbedtls_ecp_point *pt);
1141
-
1142
- /**
1143
- * \brief This function checks that an \c mbedtls_mpi is a
1144
- * valid private key for this curve.
1145
- *
1146
- * \note This function uses bare components rather than an
1147
- * ::mbedtls_ecp_keypair structure to ease use with other
1148
- * structures, such as ::mbedtls_ecdh_context or
1149
- * ::mbedtls_ecdsa_context.
1150
- *
1151
- * \param grp The ECP group the private key should belong to.
1152
- * This must be initialized and have group parameters
1153
- * set, for example through mbedtls_ecp_group_load().
1154
- * \param d The integer to check. This must be initialized.
1155
- *
1156
- * \return \c 0 if the point is a valid private key.
1157
- * \return #MBEDTLS_ERR_ECP_INVALID_KEY if the point is not a valid
1158
- * private key for the given curve.
1159
- * \return Another negative error code on other kinds of failure.
1160
- */
1161
- int mbedtls_ecp_check_privkey(const mbedtls_ecp_group *grp,
1162
- const mbedtls_mpi *d);
1163
-
1164
- /**
1165
- * \brief This function generates a private key.
1166
- *
1167
- * \param grp The ECP group to generate a private key for.
1168
- * This must be initialized and have group parameters
1169
- * set, for example through mbedtls_ecp_group_load().
1170
- * \param d The destination MPI (secret part). This must be initialized.
1171
- * \param f_rng The RNG function. This must not be \c NULL.
1172
- * \param p_rng The RNG parameter to be passed to \p f_rng. This may be
1173
- * \c NULL if \p f_rng doesn't need a context argument.
1174
- *
1175
- * \return \c 0 on success.
1176
- * \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX error code
1177
- * on failure.
1178
- */
1179
- int mbedtls_ecp_gen_privkey(const mbedtls_ecp_group *grp,
1180
- mbedtls_mpi *d,
1181
- int (*f_rng)(void *, unsigned char *, size_t),
1182
- void *p_rng);
1183
-
1184
- /**
1185
- * \brief This function generates a keypair with a configurable base
1186
- * point.
1187
- *
1188
- * \note This function uses bare components rather than an
1189
- * ::mbedtls_ecp_keypair structure to ease use with other
1190
- * structures, such as ::mbedtls_ecdh_context or
1191
- * ::mbedtls_ecdsa_context.
1192
- *
1193
- * \param grp The ECP group to generate a key pair for.
1194
- * This must be initialized and have group parameters
1195
- * set, for example through mbedtls_ecp_group_load().
1196
- * \param G The base point to use. This must be initialized
1197
- * and belong to \p grp. It replaces the default base
1198
- * point \c grp->G used by mbedtls_ecp_gen_keypair().
1199
- * \param d The destination MPI (secret part).
1200
- * This must be initialized.
1201
- * \param Q The destination point (public part).
1202
- * This must be initialized.
1203
- * \param f_rng The RNG function. This must not be \c NULL.
1204
- * \param p_rng The RNG context to be passed to \p f_rng. This may
1205
- * be \c NULL if \p f_rng doesn't need a context argument.
1206
- *
1207
- * \return \c 0 on success.
1208
- * \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX error code
1209
- * on failure.
1210
- */
1211
- int mbedtls_ecp_gen_keypair_base(mbedtls_ecp_group *grp,
1212
- const mbedtls_ecp_point *G,
1213
- mbedtls_mpi *d, mbedtls_ecp_point *Q,
1214
- int (*f_rng)(void *, unsigned char *, size_t),
1215
- void *p_rng);
1216
-
1217
- /**
1218
- * \brief This function generates an ECP keypair.
1219
- *
1220
- * \note This function uses bare components rather than an
1221
- * ::mbedtls_ecp_keypair structure to ease use with other
1222
- * structures, such as ::mbedtls_ecdh_context or
1223
- * ::mbedtls_ecdsa_context.
1224
- *
1225
- * \param grp The ECP group to generate a key pair for.
1226
- * This must be initialized and have group parameters
1227
- * set, for example through mbedtls_ecp_group_load().
1228
- * \param d The destination MPI (secret part).
1229
- * This must be initialized.
1230
- * \param Q The destination point (public part).
1231
- * This must be initialized.
1232
- * \param f_rng The RNG function. This must not be \c NULL.
1233
- * \param p_rng The RNG context to be passed to \p f_rng. This may
1234
- * be \c NULL if \p f_rng doesn't need a context argument.
1235
- *
1236
- * \return \c 0 on success.
1237
- * \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX error code
1238
- * on failure.
1239
- */
1240
- int mbedtls_ecp_gen_keypair(mbedtls_ecp_group *grp, mbedtls_mpi *d,
1241
- mbedtls_ecp_point *Q,
1242
- int (*f_rng)(void *, unsigned char *, size_t),
1243
- void *p_rng);
1244
-
1245
- /**
1246
- * \brief This function generates an ECP key.
1247
- *
1248
- * \param grp_id The ECP group identifier.
1249
- * \param key The destination key. This must be initialized.
1250
- * \param f_rng The RNG function to use. This must not be \c NULL.
1251
- * \param p_rng The RNG context to be passed to \p f_rng. This may
1252
- * be \c NULL if \p f_rng doesn't need a context argument.
1253
- *
1254
- * \return \c 0 on success.
1255
- * \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX error code
1256
- * on failure.
1257
- */
1258
- int mbedtls_ecp_gen_key(mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key,
1259
- int (*f_rng)(void *, unsigned char *, size_t),
1260
- void *p_rng);
1261
-
1262
- /**
1263
- * \brief This function reads an elliptic curve private key.
1264
- *
1265
- * \param grp_id The ECP group identifier.
1266
- * \param key The destination key.
1267
- * \param buf The buffer containing the binary representation of the
1268
- * key. (Big endian integer for Weierstrass curves, byte
1269
- * string for Montgomery curves.)
1270
- * \param buflen The length of the buffer in bytes.
1271
- *
1272
- * \return \c 0 on success.
1273
- * \return #MBEDTLS_ERR_ECP_INVALID_KEY error if the key is
1274
- * invalid.
1275
- * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
1276
- * \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if the operation for
1277
- * the group is not implemented.
1278
- * \return Another negative error code on different kinds of failure.
1279
- */
1280
- int mbedtls_ecp_read_key(mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key,
1281
- const unsigned char *buf, size_t buflen);
1282
-
1283
- /**
1284
- * \brief This function exports an elliptic curve private key.
1285
- *
1286
- * \param key The private key.
1287
- * \param buf The output buffer for containing the binary representation
1288
- * of the key. (Big endian integer for Weierstrass curves, byte
1289
- * string for Montgomery curves.)
1290
- * \param buflen The total length of the buffer in bytes.
1291
- *
1292
- * \return \c 0 on success.
1293
- * \return #MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL if the \p key
1294
- representation is larger than the available space in \p buf.
1295
- * \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if the operation for
1296
- * the group is not implemented.
1297
- * \return Another negative error code on different kinds of failure.
1298
- */
1299
- int mbedtls_ecp_write_key(mbedtls_ecp_keypair *key,
1300
- unsigned char *buf, size_t buflen);
1301
-
1302
- /**
1303
- * \brief This function checks that the keypair objects
1304
- * \p pub and \p prv have the same group and the
1305
- * same public point, and that the private key in
1306
- * \p prv is consistent with the public key.
1307
- *
1308
- * \param pub The keypair structure holding the public key. This
1309
- * must be initialized. If it contains a private key, that
1310
- * part is ignored.
1311
- * \param prv The keypair structure holding the full keypair.
1312
- * This must be initialized.
1313
- * \param f_rng The RNG function. This must not be \c NULL.
1314
- * \param p_rng The RNG context to be passed to \p f_rng. This may be \c
1315
- * NULL if \p f_rng doesn't need a context.
1316
- *
1317
- * \return \c 0 on success, meaning that the keys are valid and match.
1318
- * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the keys are invalid or do not match.
1319
- * \return An \c MBEDTLS_ERR_ECP_XXX or an \c MBEDTLS_ERR_MPI_XXX
1320
- * error code on calculation failure.
1321
- */
1322
- int mbedtls_ecp_check_pub_priv(
1323
- const mbedtls_ecp_keypair *pub, const mbedtls_ecp_keypair *prv,
1324
- int (*f_rng)(void *, unsigned char *, size_t), void *p_rng);
1325
-
1326
- /**
1327
- * \brief This function exports generic key-pair parameters.
1328
- *
1329
- * \param key The key pair to export from.
1330
- * \param grp Slot for exported ECP group.
1331
- * It must point to an initialized ECP group.
1332
- * \param d Slot for the exported secret value.
1333
- * It must point to an initialized mpi.
1334
- * \param Q Slot for the exported public value.
1335
- * It must point to an initialized ECP point.
1336
- *
1337
- * \return \c 0 on success,
1338
- * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
1339
- * \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if key id doesn't
1340
- * correspond to a known group.
1341
- * \return Another negative error code on other kinds of failure.
1342
- */
1343
- int mbedtls_ecp_export(const mbedtls_ecp_keypair *key, mbedtls_ecp_group *grp,
1344
- mbedtls_mpi *d, mbedtls_ecp_point *Q);
1345
-
1346
- #if defined(MBEDTLS_SELF_TEST)
1347
-
1348
- /**
1349
- * \brief The ECP checkup routine.
1350
- *
1351
- * \return \c 0 on success.
1352
- * \return \c 1 on failure.
1353
- */
1354
- int mbedtls_ecp_self_test(int verbose);
1355
-
1356
- #endif /* MBEDTLS_SELF_TEST */
1357
-
1358
- #ifdef __cplusplus
1359
- }
1360
- #endif
1361
-
1362
- #endif /* ecp.h */