edhoc 1.4.0 → 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 +84 -283
  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 -359
  722. package/include/EdhocComposeAsyncWorker.h +0 -49
  723. package/include/EdhocCredentialManager.h +0 -106
  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 -446
  747. package/src/EdhocComposeAsyncWorker.cpp +0 -60
  748. package/src/EdhocCredentialManager.cpp +0 -425
  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 -127
  759. package/test/vectors.test.ts +0 -111
@@ -1,1383 +0,0 @@
1
- /**
2
- * \file psa/crypto_se_driver.h
3
- * \brief PSA external cryptoprocessor driver module
4
- *
5
- * This header declares types and function signatures for cryptography
6
- * drivers that access key material via opaque references.
7
- * This is meant for cryptoprocessors that have a separate key storage from the
8
- * space in which the PSA Crypto implementation runs, typically secure
9
- * elements (SEs).
10
- *
11
- * This file is part of the PSA Crypto Driver HAL (hardware abstraction layer),
12
- * containing functions for driver developers to implement to enable hardware
13
- * to be called in a standardized way by a PSA Cryptography API
14
- * implementation. The functions comprising the driver HAL, which driver
15
- * authors implement, are not intended to be called by application developers.
16
- */
17
-
18
- /*
19
- * Copyright The Mbed TLS Contributors
20
- * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
21
- */
22
- #ifndef PSA_CRYPTO_SE_DRIVER_H
23
- #define PSA_CRYPTO_SE_DRIVER_H
24
- #include "mbedtls/private_access.h"
25
-
26
- #include "crypto_driver_common.h"
27
-
28
- #ifdef __cplusplus
29
- extern "C" {
30
- #endif
31
-
32
- /** \defgroup se_init Secure element driver initialization
33
- */
34
- /**@{*/
35
-
36
- /** \brief Driver context structure
37
- *
38
- * Driver functions receive a pointer to this structure.
39
- * Each registered driver has one instance of this structure.
40
- *
41
- * Implementations must include the fields specified here and
42
- * may include other fields.
43
- */
44
- typedef struct {
45
- /** A read-only pointer to the driver's persistent data.
46
- *
47
- * Drivers typically use this persistent data to keep track of
48
- * which slot numbers are available. This is only a guideline:
49
- * drivers may use the persistent data for any purpose, keeping
50
- * in mind the restrictions on when the persistent data is saved
51
- * to storage: the persistent data is only saved after calling
52
- * certain functions that receive a writable pointer to the
53
- * persistent data.
54
- *
55
- * The core allocates a memory buffer for the persistent data.
56
- * The pointer is guaranteed to be suitably aligned for any data type,
57
- * like a pointer returned by `malloc` (but the core can use any
58
- * method to allocate the buffer, not necessarily `malloc`).
59
- *
60
- * The size of this buffer is in the \c persistent_data_size field of
61
- * this structure.
62
- *
63
- * Before the driver is initialized for the first time, the content of
64
- * the persistent data is all-bits-zero. After a driver upgrade, if the
65
- * size of the persistent data has increased, the original data is padded
66
- * on the right with zeros; if the size has decreased, the original data
67
- * is truncated to the new size.
68
- *
69
- * This pointer is to read-only data. Only a few driver functions are
70
- * allowed to modify the persistent data. These functions receive a
71
- * writable pointer. These functions are:
72
- * - psa_drv_se_t::p_init
73
- * - psa_drv_se_key_management_t::p_allocate
74
- * - psa_drv_se_key_management_t::p_destroy
75
- *
76
- * The PSA Cryptography core saves the persistent data from one
77
- * session to the next. It does this before returning from API functions
78
- * that call a driver method that is allowed to modify the persistent
79
- * data, specifically:
80
- * - psa_crypto_init() causes a call to psa_drv_se_t::p_init, and may call
81
- * psa_drv_se_key_management_t::p_destroy to complete an action
82
- * that was interrupted by a power failure.
83
- * - Key creation functions cause a call to
84
- * psa_drv_se_key_management_t::p_allocate, and may cause a call to
85
- * psa_drv_se_key_management_t::p_destroy in case an error occurs.
86
- * - psa_destroy_key() causes a call to
87
- * psa_drv_se_key_management_t::p_destroy.
88
- */
89
- const void *const MBEDTLS_PRIVATE(persistent_data);
90
-
91
- /** The size of \c persistent_data in bytes.
92
- *
93
- * This is always equal to the value of the `persistent_data_size` field
94
- * of the ::psa_drv_se_t structure when the driver is registered.
95
- */
96
- const size_t MBEDTLS_PRIVATE(persistent_data_size);
97
-
98
- /** Driver transient data.
99
- *
100
- * The core initializes this value to 0 and does not read or modify it
101
- * afterwards. The driver may store whatever it wants in this field.
102
- */
103
- uintptr_t MBEDTLS_PRIVATE(transient_data);
104
- } psa_drv_se_context_t;
105
-
106
- /** \brief A driver initialization function.
107
- *
108
- * \param[in,out] drv_context The driver context structure.
109
- * \param[in,out] persistent_data A pointer to the persistent data
110
- * that allows writing.
111
- * \param location The location value for which this driver
112
- * is registered. The driver will be invoked
113
- * for all keys whose lifetime is in this
114
- * location.
115
- *
116
- * \retval #PSA_SUCCESS
117
- * The driver is operational.
118
- * The core will update the persistent data in storage.
119
- * \return
120
- * Any other return value prevents the driver from being used in
121
- * this session.
122
- * The core will NOT update the persistent data in storage.
123
- */
124
- typedef psa_status_t (*psa_drv_se_init_t)(psa_drv_se_context_t *drv_context,
125
- void *persistent_data,
126
- psa_key_location_t location);
127
-
128
- #if defined(__DOXYGEN_ONLY__) || !defined(MBEDTLS_PSA_CRYPTO_SE_C)
129
- /* Mbed TLS with secure element support enabled defines this type in
130
- * crypto_types.h because it is also visible to applications through an
131
- * implementation-specific extension.
132
- * For the PSA Cryptography specification, this type is only visible
133
- * via crypto_se_driver.h. */
134
- /** An internal designation of a key slot between the core part of the
135
- * PSA Crypto implementation and the driver. The meaning of this value
136
- * is driver-dependent. */
137
- typedef uint64_t psa_key_slot_number_t;
138
- #endif /* __DOXYGEN_ONLY__ || !MBEDTLS_PSA_CRYPTO_SE_C */
139
-
140
- /**@}*/
141
-
142
- /** \defgroup se_mac Secure Element Message Authentication Codes
143
- * Generation and authentication of Message Authentication Codes (MACs) using
144
- * a secure element can be done either as a single function call (via the
145
- * `psa_drv_se_mac_generate_t` or `psa_drv_se_mac_verify_t` functions), or in
146
- * parts using the following sequence:
147
- * - `psa_drv_se_mac_setup_t`
148
- * - `psa_drv_se_mac_update_t`
149
- * - `psa_drv_se_mac_update_t`
150
- * - ...
151
- * - `psa_drv_se_mac_finish_t` or `psa_drv_se_mac_finish_verify_t`
152
- *
153
- * If a previously started secure element MAC operation needs to be terminated,
154
- * it should be done so by the `psa_drv_se_mac_abort_t`. Failure to do so may
155
- * result in allocated resources not being freed or in other undefined
156
- * behavior.
157
- */
158
- /**@{*/
159
- /** \brief A function that starts a secure element MAC operation for a PSA
160
- * Crypto Driver implementation
161
- *
162
- * \param[in,out] drv_context The driver context structure.
163
- * \param[in,out] op_context A structure that will contain the
164
- * hardware-specific MAC context
165
- * \param[in] key_slot The slot of the key to be used for the
166
- * operation
167
- * \param[in] algorithm The algorithm to be used to underly the MAC
168
- * operation
169
- *
170
- * \retval #PSA_SUCCESS
171
- * Success.
172
- */
173
- typedef psa_status_t (*psa_drv_se_mac_setup_t)(psa_drv_se_context_t *drv_context,
174
- void *op_context,
175
- psa_key_slot_number_t key_slot,
176
- psa_algorithm_t algorithm);
177
-
178
- /** \brief A function that continues a previously started secure element MAC
179
- * operation
180
- *
181
- * \param[in,out] op_context A hardware-specific structure for the
182
- * previously-established MAC operation to be
183
- * updated
184
- * \param[in] p_input A buffer containing the message to be appended
185
- * to the MAC operation
186
- * \param[in] input_length The size in bytes of the input message buffer
187
- */
188
- typedef psa_status_t (*psa_drv_se_mac_update_t)(void *op_context,
189
- const uint8_t *p_input,
190
- size_t input_length);
191
-
192
- /** \brief a function that completes a previously started secure element MAC
193
- * operation by returning the resulting MAC.
194
- *
195
- * \param[in,out] op_context A hardware-specific structure for the
196
- * previously started MAC operation to be
197
- * finished
198
- * \param[out] p_mac A buffer where the generated MAC will be
199
- * placed
200
- * \param[in] mac_size The size in bytes of the buffer that has been
201
- * allocated for the `output` buffer
202
- * \param[out] p_mac_length After completion, will contain the number of
203
- * bytes placed in the `p_mac` buffer
204
- *
205
- * \retval #PSA_SUCCESS
206
- * Success.
207
- */
208
- typedef psa_status_t (*psa_drv_se_mac_finish_t)(void *op_context,
209
- uint8_t *p_mac,
210
- size_t mac_size,
211
- size_t *p_mac_length);
212
-
213
- /** \brief A function that completes a previously started secure element MAC
214
- * operation by comparing the resulting MAC against a provided value
215
- *
216
- * \param[in,out] op_context A hardware-specific structure for the previously
217
- * started MAC operation to be finished
218
- * \param[in] p_mac The MAC value against which the resulting MAC
219
- * will be compared against
220
- * \param[in] mac_length The size in bytes of the value stored in `p_mac`
221
- *
222
- * \retval #PSA_SUCCESS
223
- * The operation completed successfully and the MACs matched each
224
- * other
225
- * \retval #PSA_ERROR_INVALID_SIGNATURE
226
- * The operation completed successfully, but the calculated MAC did
227
- * not match the provided MAC
228
- */
229
- typedef psa_status_t (*psa_drv_se_mac_finish_verify_t)(void *op_context,
230
- const uint8_t *p_mac,
231
- size_t mac_length);
232
-
233
- /** \brief A function that aborts a previous started secure element MAC
234
- * operation
235
- *
236
- * \param[in,out] op_context A hardware-specific structure for the previously
237
- * started MAC operation to be aborted
238
- */
239
- typedef psa_status_t (*psa_drv_se_mac_abort_t)(void *op_context);
240
-
241
- /** \brief A function that performs a secure element MAC operation in one
242
- * command and returns the calculated MAC
243
- *
244
- * \param[in,out] drv_context The driver context structure.
245
- * \param[in] p_input A buffer containing the message to be MACed
246
- * \param[in] input_length The size in bytes of `p_input`
247
- * \param[in] key_slot The slot of the key to be used
248
- * \param[in] alg The algorithm to be used to underlie the MAC
249
- * operation
250
- * \param[out] p_mac A buffer where the generated MAC will be
251
- * placed
252
- * \param[in] mac_size The size in bytes of the `p_mac` buffer
253
- * \param[out] p_mac_length After completion, will contain the number of
254
- * bytes placed in the `output` buffer
255
- *
256
- * \retval #PSA_SUCCESS
257
- * Success.
258
- */
259
- typedef psa_status_t (*psa_drv_se_mac_generate_t)(psa_drv_se_context_t *drv_context,
260
- const uint8_t *p_input,
261
- size_t input_length,
262
- psa_key_slot_number_t key_slot,
263
- psa_algorithm_t alg,
264
- uint8_t *p_mac,
265
- size_t mac_size,
266
- size_t *p_mac_length);
267
-
268
- /** \brief A function that performs a secure element MAC operation in one
269
- * command and compares the resulting MAC against a provided value
270
- *
271
- * \param[in,out] drv_context The driver context structure.
272
- * \param[in] p_input A buffer containing the message to be MACed
273
- * \param[in] input_length The size in bytes of `input`
274
- * \param[in] key_slot The slot of the key to be used
275
- * \param[in] alg The algorithm to be used to underlie the MAC
276
- * operation
277
- * \param[in] p_mac The MAC value against which the resulting MAC will
278
- * be compared against
279
- * \param[in] mac_length The size in bytes of `mac`
280
- *
281
- * \retval #PSA_SUCCESS
282
- * The operation completed successfully and the MACs matched each
283
- * other
284
- * \retval #PSA_ERROR_INVALID_SIGNATURE
285
- * The operation completed successfully, but the calculated MAC did
286
- * not match the provided MAC
287
- */
288
- typedef psa_status_t (*psa_drv_se_mac_verify_t)(psa_drv_se_context_t *drv_context,
289
- const uint8_t *p_input,
290
- size_t input_length,
291
- psa_key_slot_number_t key_slot,
292
- psa_algorithm_t alg,
293
- const uint8_t *p_mac,
294
- size_t mac_length);
295
-
296
- /** \brief A struct containing all of the function pointers needed to
297
- * perform secure element MAC operations
298
- *
299
- * PSA Crypto API implementations should populate the table as appropriate
300
- * upon startup.
301
- *
302
- * If one of the functions is not implemented (such as
303
- * `psa_drv_se_mac_generate_t`), it should be set to NULL.
304
- *
305
- * Driver implementers should ensure that they implement all of the functions
306
- * that make sense for their hardware, and that they provide a full solution
307
- * (for example, if they support `p_setup`, they should also support
308
- * `p_update` and at least one of `p_finish` or `p_finish_verify`).
309
- *
310
- */
311
- typedef struct {
312
- /**The size in bytes of the hardware-specific secure element MAC context
313
- * structure
314
- */
315
- size_t MBEDTLS_PRIVATE(context_size);
316
- /** Function that performs a MAC setup operation
317
- */
318
- psa_drv_se_mac_setup_t MBEDTLS_PRIVATE(p_setup);
319
- /** Function that performs a MAC update operation
320
- */
321
- psa_drv_se_mac_update_t MBEDTLS_PRIVATE(p_update);
322
- /** Function that completes a MAC operation
323
- */
324
- psa_drv_se_mac_finish_t MBEDTLS_PRIVATE(p_finish);
325
- /** Function that completes a MAC operation with a verify check
326
- */
327
- psa_drv_se_mac_finish_verify_t MBEDTLS_PRIVATE(p_finish_verify);
328
- /** Function that aborts a previously started MAC operation
329
- */
330
- psa_drv_se_mac_abort_t MBEDTLS_PRIVATE(p_abort);
331
- /** Function that performs a MAC operation in one call
332
- */
333
- psa_drv_se_mac_generate_t MBEDTLS_PRIVATE(p_mac);
334
- /** Function that performs a MAC and verify operation in one call
335
- */
336
- psa_drv_se_mac_verify_t MBEDTLS_PRIVATE(p_mac_verify);
337
- } psa_drv_se_mac_t;
338
- /**@}*/
339
-
340
- /** \defgroup se_cipher Secure Element Symmetric Ciphers
341
- *
342
- * Encryption and Decryption using secure element keys in block modes other
343
- * than ECB must be done in multiple parts, using the following flow:
344
- * - `psa_drv_se_cipher_setup_t`
345
- * - `psa_drv_se_cipher_set_iv_t` (optional depending upon block mode)
346
- * - `psa_drv_se_cipher_update_t`
347
- * - `psa_drv_se_cipher_update_t`
348
- * - ...
349
- * - `psa_drv_se_cipher_finish_t`
350
- *
351
- * If a previously started secure element Cipher operation needs to be
352
- * terminated, it should be done so by the `psa_drv_se_cipher_abort_t`. Failure
353
- * to do so may result in allocated resources not being freed or in other
354
- * undefined behavior.
355
- *
356
- * In situations where a PSA Cryptographic API implementation is using a block
357
- * mode not-supported by the underlying hardware or driver, it can construct
358
- * the block mode itself, while calling the `psa_drv_se_cipher_ecb_t` function
359
- * for the cipher operations.
360
- */
361
- /**@{*/
362
-
363
- /** \brief A function that provides the cipher setup function for a
364
- * secure element driver
365
- *
366
- * \param[in,out] drv_context The driver context structure.
367
- * \param[in,out] op_context A structure that will contain the
368
- * hardware-specific cipher context.
369
- * \param[in] key_slot The slot of the key to be used for the
370
- * operation
371
- * \param[in] algorithm The algorithm to be used in the cipher
372
- * operation
373
- * \param[in] direction Indicates whether the operation is an encrypt
374
- * or decrypt
375
- *
376
- * \retval #PSA_SUCCESS \emptydescription
377
- * \retval #PSA_ERROR_NOT_SUPPORTED \emptydescription
378
- */
379
- typedef psa_status_t (*psa_drv_se_cipher_setup_t)(psa_drv_se_context_t *drv_context,
380
- void *op_context,
381
- psa_key_slot_number_t key_slot,
382
- psa_algorithm_t algorithm,
383
- psa_encrypt_or_decrypt_t direction);
384
-
385
- /** \brief A function that sets the initialization vector (if
386
- * necessary) for a secure element cipher operation
387
- *
388
- * Rationale: The `psa_se_cipher_*` operation in the PSA Cryptographic API has
389
- * two IV functions: one to set the IV, and one to generate it internally. The
390
- * generate function is not necessary for the drivers to implement as the PSA
391
- * Crypto implementation can do the generation using its RNG features.
392
- *
393
- * \param[in,out] op_context A structure that contains the previously set up
394
- * hardware-specific cipher context
395
- * \param[in] p_iv A buffer containing the initialization vector
396
- * \param[in] iv_length The size (in bytes) of the `p_iv` buffer
397
- *
398
- * \retval #PSA_SUCCESS \emptydescription
399
- */
400
- typedef psa_status_t (*psa_drv_se_cipher_set_iv_t)(void *op_context,
401
- const uint8_t *p_iv,
402
- size_t iv_length);
403
-
404
- /** \brief A function that continues a previously started secure element cipher
405
- * operation
406
- *
407
- * \param[in,out] op_context A hardware-specific structure for the
408
- * previously started cipher operation
409
- * \param[in] p_input A buffer containing the data to be
410
- * encrypted/decrypted
411
- * \param[in] input_size The size in bytes of the buffer pointed to
412
- * by `p_input`
413
- * \param[out] p_output The caller-allocated buffer where the
414
- * output will be placed
415
- * \param[in] output_size The allocated size in bytes of the
416
- * `p_output` buffer
417
- * \param[out] p_output_length After completion, will contain the number
418
- * of bytes placed in the `p_output` buffer
419
- *
420
- * \retval #PSA_SUCCESS \emptydescription
421
- */
422
- typedef psa_status_t (*psa_drv_se_cipher_update_t)(void *op_context,
423
- const uint8_t *p_input,
424
- size_t input_size,
425
- uint8_t *p_output,
426
- size_t output_size,
427
- size_t *p_output_length);
428
-
429
- /** \brief A function that completes a previously started secure element cipher
430
- * operation
431
- *
432
- * \param[in,out] op_context A hardware-specific structure for the
433
- * previously started cipher operation
434
- * \param[out] p_output The caller-allocated buffer where the output
435
- * will be placed
436
- * \param[in] output_size The allocated size in bytes of the `p_output`
437
- * buffer
438
- * \param[out] p_output_length After completion, will contain the number of
439
- * bytes placed in the `p_output` buffer
440
- *
441
- * \retval #PSA_SUCCESS \emptydescription
442
- */
443
- typedef psa_status_t (*psa_drv_se_cipher_finish_t)(void *op_context,
444
- uint8_t *p_output,
445
- size_t output_size,
446
- size_t *p_output_length);
447
-
448
- /** \brief A function that aborts a previously started secure element cipher
449
- * operation
450
- *
451
- * \param[in,out] op_context A hardware-specific structure for the
452
- * previously started cipher operation
453
- */
454
- typedef psa_status_t (*psa_drv_se_cipher_abort_t)(void *op_context);
455
-
456
- /** \brief A function that performs the ECB block mode for secure element
457
- * cipher operations
458
- *
459
- * Note: this function should only be used with implementations that do not
460
- * provide a needed higher-level operation.
461
- *
462
- * \param[in,out] drv_context The driver context structure.
463
- * \param[in] key_slot The slot of the key to be used for the operation
464
- * \param[in] algorithm The algorithm to be used in the cipher operation
465
- * \param[in] direction Indicates whether the operation is an encrypt or
466
- * decrypt
467
- * \param[in] p_input A buffer containing the data to be
468
- * encrypted/decrypted
469
- * \param[in] input_size The size in bytes of the buffer pointed to by
470
- * `p_input`
471
- * \param[out] p_output The caller-allocated buffer where the output
472
- * will be placed
473
- * \param[in] output_size The allocated size in bytes of the `p_output`
474
- * buffer
475
- *
476
- * \retval #PSA_SUCCESS \emptydescription
477
- * \retval #PSA_ERROR_NOT_SUPPORTED \emptydescription
478
- */
479
- typedef psa_status_t (*psa_drv_se_cipher_ecb_t)(psa_drv_se_context_t *drv_context,
480
- psa_key_slot_number_t key_slot,
481
- psa_algorithm_t algorithm,
482
- psa_encrypt_or_decrypt_t direction,
483
- const uint8_t *p_input,
484
- size_t input_size,
485
- uint8_t *p_output,
486
- size_t output_size);
487
-
488
- /**
489
- * \brief A struct containing all of the function pointers needed to implement
490
- * cipher operations using secure elements.
491
- *
492
- * PSA Crypto API implementations should populate instances of the table as
493
- * appropriate upon startup or at build time.
494
- *
495
- * If one of the functions is not implemented (such as
496
- * `psa_drv_se_cipher_ecb_t`), it should be set to NULL.
497
- */
498
- typedef struct {
499
- /** The size in bytes of the hardware-specific secure element cipher
500
- * context structure
501
- */
502
- size_t MBEDTLS_PRIVATE(context_size);
503
- /** Function that performs a cipher setup operation */
504
- psa_drv_se_cipher_setup_t MBEDTLS_PRIVATE(p_setup);
505
- /** Function that sets a cipher IV (if necessary) */
506
- psa_drv_se_cipher_set_iv_t MBEDTLS_PRIVATE(p_set_iv);
507
- /** Function that performs a cipher update operation */
508
- psa_drv_se_cipher_update_t MBEDTLS_PRIVATE(p_update);
509
- /** Function that completes a cipher operation */
510
- psa_drv_se_cipher_finish_t MBEDTLS_PRIVATE(p_finish);
511
- /** Function that aborts a cipher operation */
512
- psa_drv_se_cipher_abort_t MBEDTLS_PRIVATE(p_abort);
513
- /** Function that performs ECB mode for a cipher operation
514
- * (Danger: ECB mode should not be used directly by clients of the PSA
515
- * Crypto Client API)
516
- */
517
- psa_drv_se_cipher_ecb_t MBEDTLS_PRIVATE(p_ecb);
518
- } psa_drv_se_cipher_t;
519
-
520
- /**@}*/
521
-
522
- /** \defgroup se_asymmetric Secure Element Asymmetric Cryptography
523
- *
524
- * Since the amount of data that can (or should) be encrypted or signed using
525
- * asymmetric keys is limited by the key size, asymmetric key operations using
526
- * keys in a secure element must be done in single function calls.
527
- */
528
- /**@{*/
529
-
530
- /**
531
- * \brief A function that signs a hash or short message with a private key in
532
- * a secure element
533
- *
534
- * \param[in,out] drv_context The driver context structure.
535
- * \param[in] key_slot Key slot of an asymmetric key pair
536
- * \param[in] alg A signature algorithm that is compatible
537
- * with the type of `key`
538
- * \param[in] p_hash The hash to sign
539
- * \param[in] hash_length Size of the `p_hash` buffer in bytes
540
- * \param[out] p_signature Buffer where the signature is to be written
541
- * \param[in] signature_size Size of the `p_signature` buffer in bytes
542
- * \param[out] p_signature_length On success, the number of bytes
543
- * that make up the returned signature value
544
- *
545
- * \retval #PSA_SUCCESS \emptydescription
546
- */
547
- typedef psa_status_t (*psa_drv_se_asymmetric_sign_t)(psa_drv_se_context_t *drv_context,
548
- psa_key_slot_number_t key_slot,
549
- psa_algorithm_t alg,
550
- const uint8_t *p_hash,
551
- size_t hash_length,
552
- uint8_t *p_signature,
553
- size_t signature_size,
554
- size_t *p_signature_length);
555
-
556
- /**
557
- * \brief A function that verifies the signature a hash or short message using
558
- * an asymmetric public key in a secure element
559
- *
560
- * \param[in,out] drv_context The driver context structure.
561
- * \param[in] key_slot Key slot of a public key or an asymmetric key
562
- * pair
563
- * \param[in] alg A signature algorithm that is compatible with
564
- * the type of `key`
565
- * \param[in] p_hash The hash whose signature is to be verified
566
- * \param[in] hash_length Size of the `p_hash` buffer in bytes
567
- * \param[in] p_signature Buffer containing the signature to verify
568
- * \param[in] signature_length Size of the `p_signature` buffer in bytes
569
- *
570
- * \retval #PSA_SUCCESS
571
- * The signature is valid.
572
- */
573
- typedef psa_status_t (*psa_drv_se_asymmetric_verify_t)(psa_drv_se_context_t *drv_context,
574
- psa_key_slot_number_t key_slot,
575
- psa_algorithm_t alg,
576
- const uint8_t *p_hash,
577
- size_t hash_length,
578
- const uint8_t *p_signature,
579
- size_t signature_length);
580
-
581
- /**
582
- * \brief A function that encrypts a short message with an asymmetric public
583
- * key in a secure element
584
- *
585
- * \param[in,out] drv_context The driver context structure.
586
- * \param[in] key_slot Key slot of a public key or an asymmetric key
587
- * pair
588
- * \param[in] alg An asymmetric encryption algorithm that is
589
- * compatible with the type of `key`
590
- * \param[in] p_input The message to encrypt
591
- * \param[in] input_length Size of the `p_input` buffer in bytes
592
- * \param[in] p_salt A salt or label, if supported by the
593
- * encryption algorithm
594
- * If the algorithm does not support a
595
- * salt, pass `NULL`.
596
- * If the algorithm supports an optional
597
- * salt and you do not want to pass a salt,
598
- * pass `NULL`.
599
- * For #PSA_ALG_RSA_PKCS1V15_CRYPT, no salt is
600
- * supported.
601
- * \param[in] salt_length Size of the `p_salt` buffer in bytes
602
- * If `p_salt` is `NULL`, pass 0.
603
- * \param[out] p_output Buffer where the encrypted message is to
604
- * be written
605
- * \param[in] output_size Size of the `p_output` buffer in bytes
606
- * \param[out] p_output_length On success, the number of bytes that make up
607
- * the returned output
608
- *
609
- * \retval #PSA_SUCCESS \emptydescription
610
- */
611
- typedef psa_status_t (*psa_drv_se_asymmetric_encrypt_t)(psa_drv_se_context_t *drv_context,
612
- psa_key_slot_number_t key_slot,
613
- psa_algorithm_t alg,
614
- const uint8_t *p_input,
615
- size_t input_length,
616
- const uint8_t *p_salt,
617
- size_t salt_length,
618
- uint8_t *p_output,
619
- size_t output_size,
620
- size_t *p_output_length);
621
-
622
- /**
623
- * \brief A function that decrypts a short message with an asymmetric private
624
- * key in a secure element.
625
- *
626
- * \param[in,out] drv_context The driver context structure.
627
- * \param[in] key_slot Key slot of an asymmetric key pair
628
- * \param[in] alg An asymmetric encryption algorithm that is
629
- * compatible with the type of `key`
630
- * \param[in] p_input The message to decrypt
631
- * \param[in] input_length Size of the `p_input` buffer in bytes
632
- * \param[in] p_salt A salt or label, if supported by the
633
- * encryption algorithm
634
- * If the algorithm does not support a
635
- * salt, pass `NULL`.
636
- * If the algorithm supports an optional
637
- * salt and you do not want to pass a salt,
638
- * pass `NULL`.
639
- * For #PSA_ALG_RSA_PKCS1V15_CRYPT, no salt is
640
- * supported.
641
- * \param[in] salt_length Size of the `p_salt` buffer in bytes
642
- * If `p_salt` is `NULL`, pass 0.
643
- * \param[out] p_output Buffer where the decrypted message is to
644
- * be written
645
- * \param[in] output_size Size of the `p_output` buffer in bytes
646
- * \param[out] p_output_length On success, the number of bytes
647
- * that make up the returned output
648
- *
649
- * \retval #PSA_SUCCESS \emptydescription
650
- */
651
- typedef psa_status_t (*psa_drv_se_asymmetric_decrypt_t)(psa_drv_se_context_t *drv_context,
652
- psa_key_slot_number_t key_slot,
653
- psa_algorithm_t alg,
654
- const uint8_t *p_input,
655
- size_t input_length,
656
- const uint8_t *p_salt,
657
- size_t salt_length,
658
- uint8_t *p_output,
659
- size_t output_size,
660
- size_t *p_output_length);
661
-
662
- /**
663
- * \brief A struct containing all of the function pointers needed to implement
664
- * asymmetric cryptographic operations using secure elements.
665
- *
666
- * PSA Crypto API implementations should populate instances of the table as
667
- * appropriate upon startup or at build time.
668
- *
669
- * If one of the functions is not implemented, it should be set to NULL.
670
- */
671
- typedef struct {
672
- /** Function that performs an asymmetric sign operation */
673
- psa_drv_se_asymmetric_sign_t MBEDTLS_PRIVATE(p_sign);
674
- /** Function that performs an asymmetric verify operation */
675
- psa_drv_se_asymmetric_verify_t MBEDTLS_PRIVATE(p_verify);
676
- /** Function that performs an asymmetric encrypt operation */
677
- psa_drv_se_asymmetric_encrypt_t MBEDTLS_PRIVATE(p_encrypt);
678
- /** Function that performs an asymmetric decrypt operation */
679
- psa_drv_se_asymmetric_decrypt_t MBEDTLS_PRIVATE(p_decrypt);
680
- } psa_drv_se_asymmetric_t;
681
-
682
- /**@}*/
683
-
684
- /** \defgroup se_aead Secure Element Authenticated Encryption with Additional Data
685
- * Authenticated Encryption with Additional Data (AEAD) operations with secure
686
- * elements must be done in one function call. While this creates a burden for
687
- * implementers as there must be sufficient space in memory for the entire
688
- * message, it prevents decrypted data from being made available before the
689
- * authentication operation is complete and the data is known to be authentic.
690
- */
691
- /**@{*/
692
-
693
- /** \brief A function that performs a secure element authenticated encryption
694
- * operation
695
- *
696
- * \param[in,out] drv_context The driver context structure.
697
- * \param[in] key_slot Slot containing the key to use.
698
- * \param[in] algorithm The AEAD algorithm to compute
699
- * (\c PSA_ALG_XXX value such that
700
- * #PSA_ALG_IS_AEAD(`alg`) is true)
701
- * \param[in] p_nonce Nonce or IV to use
702
- * \param[in] nonce_length Size of the `p_nonce` buffer in bytes
703
- * \param[in] p_additional_data Additional data that will be
704
- * authenticated but not encrypted
705
- * \param[in] additional_data_length Size of `p_additional_data` in bytes
706
- * \param[in] p_plaintext Data that will be authenticated and
707
- * encrypted
708
- * \param[in] plaintext_length Size of `p_plaintext` in bytes
709
- * \param[out] p_ciphertext Output buffer for the authenticated and
710
- * encrypted data. The additional data is
711
- * not part of this output. For algorithms
712
- * where the encrypted data and the
713
- * authentication tag are defined as
714
- * separate outputs, the authentication
715
- * tag is appended to the encrypted data.
716
- * \param[in] ciphertext_size Size of the `p_ciphertext` buffer in
717
- * bytes
718
- * \param[out] p_ciphertext_length On success, the size of the output in
719
- * the `p_ciphertext` buffer
720
- *
721
- * \retval #PSA_SUCCESS
722
- * Success.
723
- */
724
- typedef psa_status_t (*psa_drv_se_aead_encrypt_t)(psa_drv_se_context_t *drv_context,
725
- psa_key_slot_number_t key_slot,
726
- psa_algorithm_t algorithm,
727
- const uint8_t *p_nonce,
728
- size_t nonce_length,
729
- const uint8_t *p_additional_data,
730
- size_t additional_data_length,
731
- const uint8_t *p_plaintext,
732
- size_t plaintext_length,
733
- uint8_t *p_ciphertext,
734
- size_t ciphertext_size,
735
- size_t *p_ciphertext_length);
736
-
737
- /** A function that performs a secure element authenticated decryption operation
738
- *
739
- * \param[in,out] drv_context The driver context structure.
740
- * \param[in] key_slot Slot containing the key to use
741
- * \param[in] algorithm The AEAD algorithm to compute
742
- * (\c PSA_ALG_XXX value such that
743
- * #PSA_ALG_IS_AEAD(`alg`) is true)
744
- * \param[in] p_nonce Nonce or IV to use
745
- * \param[in] nonce_length Size of the `p_nonce` buffer in bytes
746
- * \param[in] p_additional_data Additional data that has been
747
- * authenticated but not encrypted
748
- * \param[in] additional_data_length Size of `p_additional_data` in bytes
749
- * \param[in] p_ciphertext Data that has been authenticated and
750
- * encrypted.
751
- * For algorithms where the encrypted data
752
- * and the authentication tag are defined
753
- * as separate inputs, the buffer must
754
- * contain the encrypted data followed by
755
- * the authentication tag.
756
- * \param[in] ciphertext_length Size of `p_ciphertext` in bytes
757
- * \param[out] p_plaintext Output buffer for the decrypted data
758
- * \param[in] plaintext_size Size of the `p_plaintext` buffer in
759
- * bytes
760
- * \param[out] p_plaintext_length On success, the size of the output in
761
- * the `p_plaintext` buffer
762
- *
763
- * \retval #PSA_SUCCESS
764
- * Success.
765
- */
766
- typedef psa_status_t (*psa_drv_se_aead_decrypt_t)(psa_drv_se_context_t *drv_context,
767
- psa_key_slot_number_t key_slot,
768
- psa_algorithm_t algorithm,
769
- const uint8_t *p_nonce,
770
- size_t nonce_length,
771
- const uint8_t *p_additional_data,
772
- size_t additional_data_length,
773
- const uint8_t *p_ciphertext,
774
- size_t ciphertext_length,
775
- uint8_t *p_plaintext,
776
- size_t plaintext_size,
777
- size_t *p_plaintext_length);
778
-
779
- /**
780
- * \brief A struct containing all of the function pointers needed to implement
781
- * secure element Authenticated Encryption with Additional Data operations
782
- *
783
- * PSA Crypto API implementations should populate instances of the table as
784
- * appropriate upon startup.
785
- *
786
- * If one of the functions is not implemented, it should be set to NULL.
787
- */
788
- typedef struct {
789
- /** Function that performs the AEAD encrypt operation */
790
- psa_drv_se_aead_encrypt_t MBEDTLS_PRIVATE(p_encrypt);
791
- /** Function that performs the AEAD decrypt operation */
792
- psa_drv_se_aead_decrypt_t MBEDTLS_PRIVATE(p_decrypt);
793
- } psa_drv_se_aead_t;
794
- /**@}*/
795
-
796
- /** \defgroup se_key_management Secure Element Key Management
797
- * Currently, key management is limited to importing keys in the clear,
798
- * destroying keys, and exporting keys in the clear.
799
- * Whether a key may be exported is determined by the key policies in place
800
- * on the key slot.
801
- */
802
- /**@{*/
803
-
804
- /** An enumeration indicating how a key is created.
805
- */
806
- typedef enum {
807
- PSA_KEY_CREATION_IMPORT, /**< During psa_import_key() */
808
- PSA_KEY_CREATION_GENERATE, /**< During psa_generate_key() */
809
- PSA_KEY_CREATION_DERIVE, /**< During psa_key_derivation_output_key() */
810
- PSA_KEY_CREATION_COPY, /**< During psa_copy_key() */
811
-
812
- #ifndef __DOXYGEN_ONLY__
813
- /** A key is being registered with mbedtls_psa_register_se_key().
814
- *
815
- * The core only passes this value to
816
- * psa_drv_se_key_management_t::p_validate_slot_number, not to
817
- * psa_drv_se_key_management_t::p_allocate. The call to
818
- * `p_validate_slot_number` is not followed by any other call to the
819
- * driver: the key is considered successfully registered if the call to
820
- * `p_validate_slot_number` succeeds, or if `p_validate_slot_number` is
821
- * null.
822
- *
823
- * With this creation method, the driver must return #PSA_SUCCESS if
824
- * the given attributes are compatible with the existing key in the slot,
825
- * and #PSA_ERROR_DOES_NOT_EXIST if the driver can determine that there
826
- * is no key with the specified slot number.
827
- *
828
- * This is an Mbed TLS extension.
829
- */
830
- PSA_KEY_CREATION_REGISTER,
831
- #endif
832
- } psa_key_creation_method_t;
833
-
834
- /** \brief A function that allocates a slot for a key.
835
- *
836
- * To create a key in a specific slot in a secure element, the core
837
- * first calls this function to determine a valid slot number,
838
- * then calls a function to create the key material in that slot.
839
- * In nominal conditions (that is, if no error occurs),
840
- * the effect of a call to a key creation function in the PSA Cryptography
841
- * API with a lifetime that places the key in a secure element is the
842
- * following:
843
- * -# The core calls psa_drv_se_key_management_t::p_allocate
844
- * (or in some implementations
845
- * psa_drv_se_key_management_t::p_validate_slot_number). The driver
846
- * selects (or validates) a suitable slot number given the key attributes
847
- * and the state of the secure element.
848
- * -# The core calls a key creation function in the driver.
849
- *
850
- * The key creation functions in the PSA Cryptography API are:
851
- * - psa_import_key(), which causes
852
- * a call to `p_allocate` with \p method = #PSA_KEY_CREATION_IMPORT
853
- * then a call to psa_drv_se_key_management_t::p_import.
854
- * - psa_generate_key(), which causes
855
- * a call to `p_allocate` with \p method = #PSA_KEY_CREATION_GENERATE
856
- * then a call to psa_drv_se_key_management_t::p_import.
857
- * - psa_key_derivation_output_key(), which causes
858
- * a call to `p_allocate` with \p method = #PSA_KEY_CREATION_DERIVE
859
- * then a call to psa_drv_se_key_derivation_t::p_derive.
860
- * - psa_copy_key(), which causes
861
- * a call to `p_allocate` with \p method = #PSA_KEY_CREATION_COPY
862
- * then a call to psa_drv_se_key_management_t::p_export.
863
- *
864
- * In case of errors, other behaviors are possible.
865
- * - If the PSA Cryptography subsystem dies after the first step,
866
- * for example because the device has lost power abruptly,
867
- * the second step may never happen, or may happen after a reset
868
- * and re-initialization. Alternatively, after a reset and
869
- * re-initialization, the core may call
870
- * psa_drv_se_key_management_t::p_destroy on the slot number that
871
- * was allocated (or validated) instead of calling a key creation function.
872
- * - If an error occurs, the core may call
873
- * psa_drv_se_key_management_t::p_destroy on the slot number that
874
- * was allocated (or validated) instead of calling a key creation function.
875
- *
876
- * Errors and system resets also have an impact on the driver's persistent
877
- * data. If a reset happens before the overall key creation process is
878
- * completed (before or after the second step above), it is unspecified
879
- * whether the persistent data after the reset is identical to what it
880
- * was before or after the call to `p_allocate` (or `p_validate_slot_number`).
881
- *
882
- * \param[in,out] drv_context The driver context structure.
883
- * \param[in,out] persistent_data A pointer to the persistent data
884
- * that allows writing.
885
- * \param[in] attributes Attributes of the key.
886
- * \param method The way in which the key is being created.
887
- * \param[out] key_slot Slot where the key will be stored.
888
- * This must be a valid slot for a key of the
889
- * chosen type. It must be unoccupied.
890
- *
891
- * \retval #PSA_SUCCESS
892
- * Success.
893
- * The core will record \c *key_slot as the key slot where the key
894
- * is stored and will update the persistent data in storage.
895
- * \retval #PSA_ERROR_NOT_SUPPORTED \emptydescription
896
- * \retval #PSA_ERROR_INSUFFICIENT_STORAGE \emptydescription
897
- */
898
- typedef psa_status_t (*psa_drv_se_allocate_key_t)(
899
- psa_drv_se_context_t *drv_context,
900
- void *persistent_data,
901
- const psa_key_attributes_t *attributes,
902
- psa_key_creation_method_t method,
903
- psa_key_slot_number_t *key_slot);
904
-
905
- /** \brief A function that determines whether a slot number is valid
906
- * for a key.
907
- *
908
- * To create a key in a specific slot in a secure element, the core
909
- * first calls this function to validate the choice of slot number,
910
- * then calls a function to create the key material in that slot.
911
- * See the documentation of #psa_drv_se_allocate_key_t for more details.
912
- *
913
- * As of the PSA Cryptography API specification version 1.0, there is no way
914
- * for applications to trigger a call to this function. However some
915
- * implementations offer the capability to create or declare a key in
916
- * a specific slot via implementation-specific means, generally for the
917
- * sake of initial device provisioning or onboarding. Such a mechanism may
918
- * be added to a future version of the PSA Cryptography API specification.
919
- *
920
- * This function may update the driver's persistent data through
921
- * \p persistent_data. The core will save the updated persistent data at the
922
- * end of the key creation process. See the description of
923
- * ::psa_drv_se_allocate_key_t for more information.
924
- *
925
- * \param[in,out] drv_context The driver context structure.
926
- * \param[in,out] persistent_data A pointer to the persistent data
927
- * that allows writing.
928
- * \param[in] attributes Attributes of the key.
929
- * \param method The way in which the key is being created.
930
- * \param[in] key_slot Slot where the key is to be stored.
931
- *
932
- * \retval #PSA_SUCCESS
933
- * The given slot number is valid for a key with the given
934
- * attributes.
935
- * \retval #PSA_ERROR_INVALID_ARGUMENT
936
- * The given slot number is not valid for a key with the
937
- * given attributes. This includes the case where the slot
938
- * number is not valid at all.
939
- * \retval #PSA_ERROR_ALREADY_EXISTS
940
- * There is already a key with the specified slot number.
941
- * Drivers may choose to return this error from the key
942
- * creation function instead.
943
- */
944
- typedef psa_status_t (*psa_drv_se_validate_slot_number_t)(
945
- psa_drv_se_context_t *drv_context,
946
- void *persistent_data,
947
- const psa_key_attributes_t *attributes,
948
- psa_key_creation_method_t method,
949
- psa_key_slot_number_t key_slot);
950
-
951
- /** \brief A function that imports a key into a secure element in binary format
952
- *
953
- * This function can support any output from psa_export_key(). Refer to the
954
- * documentation of psa_export_key() for the format for each key type.
955
- *
956
- * \param[in,out] drv_context The driver context structure.
957
- * \param key_slot Slot where the key will be stored.
958
- * This must be a valid slot for a key of the
959
- * chosen type. It must be unoccupied.
960
- * \param[in] attributes The key attributes, including the lifetime,
961
- * the key type and the usage policy.
962
- * Drivers should not access the key size stored
963
- * in the attributes: it may not match the
964
- * data passed in \p data.
965
- * Drivers can call psa_get_key_lifetime(),
966
- * psa_get_key_type(),
967
- * psa_get_key_usage_flags() and
968
- * psa_get_key_algorithm() to access this
969
- * information.
970
- * \param[in] data Buffer containing the key data.
971
- * \param[in] data_length Size of the \p data buffer in bytes.
972
- * \param[out] bits On success, the key size in bits. The driver
973
- * must determine this value after parsing the
974
- * key according to the key type.
975
- * This value is not used if the function fails.
976
- *
977
- * \retval #PSA_SUCCESS
978
- * Success.
979
- */
980
- typedef psa_status_t (*psa_drv_se_import_key_t)(
981
- psa_drv_se_context_t *drv_context,
982
- psa_key_slot_number_t key_slot,
983
- const psa_key_attributes_t *attributes,
984
- const uint8_t *data,
985
- size_t data_length,
986
- size_t *bits);
987
-
988
- /**
989
- * \brief A function that destroys a secure element key and restore the slot to
990
- * its default state
991
- *
992
- * This function destroys the content of the key from a secure element.
993
- * Implementations shall make a best effort to ensure that any previous content
994
- * of the slot is unrecoverable.
995
- *
996
- * This function returns the specified slot to its default state.
997
- *
998
- * \param[in,out] drv_context The driver context structure.
999
- * \param[in,out] persistent_data A pointer to the persistent data
1000
- * that allows writing.
1001
- * \param key_slot The key slot to erase.
1002
- *
1003
- * \retval #PSA_SUCCESS
1004
- * The slot's content, if any, has been erased.
1005
- */
1006
- typedef psa_status_t (*psa_drv_se_destroy_key_t)(
1007
- psa_drv_se_context_t *drv_context,
1008
- void *persistent_data,
1009
- psa_key_slot_number_t key_slot);
1010
-
1011
- /**
1012
- * \brief A function that exports a secure element key in binary format
1013
- *
1014
- * The output of this function can be passed to psa_import_key() to
1015
- * create an equivalent object.
1016
- *
1017
- * If a key is created with `psa_import_key()` and then exported with
1018
- * this function, it is not guaranteed that the resulting data is
1019
- * identical: the implementation may choose a different representation
1020
- * of the same key if the format permits it.
1021
- *
1022
- * This function should generate output in the same format that
1023
- * `psa_export_key()` does. Refer to the
1024
- * documentation of `psa_export_key()` for the format for each key type.
1025
- *
1026
- * \param[in,out] drv_context The driver context structure.
1027
- * \param[in] key Slot whose content is to be exported. This must
1028
- * be an occupied key slot.
1029
- * \param[out] p_data Buffer where the key data is to be written.
1030
- * \param[in] data_size Size of the `p_data` buffer in bytes.
1031
- * \param[out] p_data_length On success, the number of bytes
1032
- * that make up the key data.
1033
- *
1034
- * \retval #PSA_SUCCESS \emptydescription
1035
- * \retval #PSA_ERROR_DOES_NOT_EXIST \emptydescription
1036
- * \retval #PSA_ERROR_NOT_PERMITTED \emptydescription
1037
- * \retval #PSA_ERROR_NOT_SUPPORTED \emptydescription
1038
- * \retval #PSA_ERROR_COMMUNICATION_FAILURE \emptydescription
1039
- * \retval #PSA_ERROR_HARDWARE_FAILURE \emptydescription
1040
- * \retval #PSA_ERROR_CORRUPTION_DETECTED \emptydescription
1041
- */
1042
- typedef psa_status_t (*psa_drv_se_export_key_t)(psa_drv_se_context_t *drv_context,
1043
- psa_key_slot_number_t key,
1044
- uint8_t *p_data,
1045
- size_t data_size,
1046
- size_t *p_data_length);
1047
-
1048
- /**
1049
- * \brief A function that generates a symmetric or asymmetric key on a secure
1050
- * element
1051
- *
1052
- * If the key type \c type recorded in \p attributes
1053
- * is asymmetric (#PSA_KEY_TYPE_IS_ASYMMETRIC(\c type) = 1),
1054
- * the driver may export the public key at the time of generation,
1055
- * in the format documented for psa_export_public_key() by writing it
1056
- * to the \p pubkey buffer.
1057
- * This is optional, intended for secure elements that output the
1058
- * public key at generation time and that cannot export the public key
1059
- * later. Drivers that do not need this feature should leave
1060
- * \p *pubkey_length set to 0 and should
1061
- * implement the psa_drv_key_management_t::p_export_public function.
1062
- * Some implementations do not support this feature, in which case
1063
- * \p pubkey is \c NULL and \p pubkey_size is 0.
1064
- *
1065
- * \param[in,out] drv_context The driver context structure.
1066
- * \param key_slot Slot where the key will be stored.
1067
- * This must be a valid slot for a key of the
1068
- * chosen type. It must be unoccupied.
1069
- * \param[in] attributes The key attributes, including the lifetime,
1070
- * the key type and size, and the usage policy.
1071
- * Drivers can call psa_get_key_lifetime(),
1072
- * psa_get_key_type(), psa_get_key_bits(),
1073
- * psa_get_key_usage_flags() and
1074
- * psa_get_key_algorithm() to access this
1075
- * information.
1076
- * \param[out] pubkey A buffer where the driver can write the
1077
- * public key, when generating an asymmetric
1078
- * key pair.
1079
- * This is \c NULL when generating a symmetric
1080
- * key or if the core does not support
1081
- * exporting the public key at generation time.
1082
- * \param pubkey_size The size of the `pubkey` buffer in bytes.
1083
- * This is 0 when generating a symmetric
1084
- * key or if the core does not support
1085
- * exporting the public key at generation time.
1086
- * \param[out] pubkey_length On entry, this is always 0.
1087
- * On success, the number of bytes written to
1088
- * \p pubkey. If this is 0 or unchanged on return,
1089
- * the core will not read the \p pubkey buffer,
1090
- * and will instead call the driver's
1091
- * psa_drv_key_management_t::p_export_public
1092
- * function to export the public key when needed.
1093
- */
1094
- typedef psa_status_t (*psa_drv_se_generate_key_t)(
1095
- psa_drv_se_context_t *drv_context,
1096
- psa_key_slot_number_t key_slot,
1097
- const psa_key_attributes_t *attributes,
1098
- uint8_t *pubkey, size_t pubkey_size, size_t *pubkey_length);
1099
-
1100
- /**
1101
- * \brief A struct containing all of the function pointers needed to for secure
1102
- * element key management
1103
- *
1104
- * PSA Crypto API implementations should populate instances of the table as
1105
- * appropriate upon startup or at build time.
1106
- *
1107
- * If one of the functions is not implemented, it should be set to NULL.
1108
- */
1109
- typedef struct {
1110
- /** Function that allocates a slot for a key. */
1111
- psa_drv_se_allocate_key_t MBEDTLS_PRIVATE(p_allocate);
1112
- /** Function that checks the validity of a slot for a key. */
1113
- psa_drv_se_validate_slot_number_t MBEDTLS_PRIVATE(p_validate_slot_number);
1114
- /** Function that performs a key import operation */
1115
- psa_drv_se_import_key_t MBEDTLS_PRIVATE(p_import);
1116
- /** Function that performs a generation */
1117
- psa_drv_se_generate_key_t MBEDTLS_PRIVATE(p_generate);
1118
- /** Function that performs a key destroy operation */
1119
- psa_drv_se_destroy_key_t MBEDTLS_PRIVATE(p_destroy);
1120
- /** Function that performs a key export operation */
1121
- psa_drv_se_export_key_t MBEDTLS_PRIVATE(p_export);
1122
- /** Function that performs a public key export operation */
1123
- psa_drv_se_export_key_t MBEDTLS_PRIVATE(p_export_public);
1124
- } psa_drv_se_key_management_t;
1125
-
1126
- /**@}*/
1127
-
1128
- /** \defgroup driver_derivation Secure Element Key Derivation and Agreement
1129
- * Key derivation is the process of generating new key material using an
1130
- * existing key and additional parameters, iterating through a basic
1131
- * cryptographic function, such as a hash.
1132
- * Key agreement is a part of cryptographic protocols that allows two parties
1133
- * to agree on the same key value, but starting from different original key
1134
- * material.
1135
- * The flows are similar, and the PSA Crypto Driver Model uses the same functions
1136
- * for both of the flows.
1137
- *
1138
- * There are two different final functions for the flows,
1139
- * `psa_drv_se_key_derivation_derive` and `psa_drv_se_key_derivation_export`.
1140
- * `psa_drv_se_key_derivation_derive` is used when the key material should be
1141
- * placed in a slot on the hardware and not exposed to the caller.
1142
- * `psa_drv_se_key_derivation_export` is used when the key material should be
1143
- * returned to the PSA Cryptographic API implementation.
1144
- *
1145
- * Different key derivation algorithms require a different number of inputs.
1146
- * Instead of having an API that takes as input variable length arrays, which
1147
- * can be problematic to manage on embedded platforms, the inputs are passed
1148
- * to the driver via a function, `psa_drv_se_key_derivation_collateral`, that
1149
- * is called multiple times with different `collateral_id`s. Thus, for a key
1150
- * derivation algorithm that required 3 parameter inputs, the flow would look
1151
- * something like:
1152
- * ~~~~~~~~~~~~~{.c}
1153
- * psa_drv_se_key_derivation_setup(kdf_algorithm, source_key, dest_key_size_bytes);
1154
- * psa_drv_se_key_derivation_collateral(kdf_algorithm_collateral_id_0,
1155
- * p_collateral_0,
1156
- * collateral_0_size);
1157
- * psa_drv_se_key_derivation_collateral(kdf_algorithm_collateral_id_1,
1158
- * p_collateral_1,
1159
- * collateral_1_size);
1160
- * psa_drv_se_key_derivation_collateral(kdf_algorithm_collateral_id_2,
1161
- * p_collateral_2,
1162
- * collateral_2_size);
1163
- * psa_drv_se_key_derivation_derive();
1164
- * ~~~~~~~~~~~~~
1165
- *
1166
- * key agreement example:
1167
- * ~~~~~~~~~~~~~{.c}
1168
- * psa_drv_se_key_derivation_setup(alg, source_key. dest_key_size_bytes);
1169
- * psa_drv_se_key_derivation_collateral(DHE_PUBKEY, p_pubkey, pubkey_size);
1170
- * psa_drv_se_key_derivation_export(p_session_key,
1171
- * session_key_size,
1172
- * &session_key_length);
1173
- * ~~~~~~~~~~~~~
1174
- */
1175
- /**@{*/
1176
-
1177
- /** \brief A function that Sets up a secure element key derivation operation by
1178
- * specifying the algorithm and the source key sot
1179
- *
1180
- * \param[in,out] drv_context The driver context structure.
1181
- * \param[in,out] op_context A hardware-specific structure containing any
1182
- * context information for the implementation
1183
- * \param[in] kdf_alg The algorithm to be used for the key derivation
1184
- * \param[in] source_key The key to be used as the source material for
1185
- * the key derivation
1186
- *
1187
- * \retval #PSA_SUCCESS \emptydescription
1188
- */
1189
- typedef psa_status_t (*psa_drv_se_key_derivation_setup_t)(psa_drv_se_context_t *drv_context,
1190
- void *op_context,
1191
- psa_algorithm_t kdf_alg,
1192
- psa_key_slot_number_t source_key);
1193
-
1194
- /** \brief A function that provides collateral (parameters) needed for a secure
1195
- * element key derivation or key agreement operation
1196
- *
1197
- * Since many key derivation algorithms require multiple parameters, it is
1198
- * expected that this function may be called multiple times for the same
1199
- * operation, each with a different algorithm-specific `collateral_id`
1200
- *
1201
- * \param[in,out] op_context A hardware-specific structure containing any
1202
- * context information for the implementation
1203
- * \param[in] collateral_id An ID for the collateral being provided
1204
- * \param[in] p_collateral A buffer containing the collateral data
1205
- * \param[in] collateral_size The size in bytes of the collateral
1206
- *
1207
- * \retval #PSA_SUCCESS \emptydescription
1208
- */
1209
- typedef psa_status_t (*psa_drv_se_key_derivation_collateral_t)(void *op_context,
1210
- uint32_t collateral_id,
1211
- const uint8_t *p_collateral,
1212
- size_t collateral_size);
1213
-
1214
- /** \brief A function that performs the final secure element key derivation
1215
- * step and place the generated key material in a slot
1216
- *
1217
- * \param[in,out] op_context A hardware-specific structure containing any
1218
- * context information for the implementation
1219
- * \param[in] dest_key The slot where the generated key material
1220
- * should be placed
1221
- *
1222
- * \retval #PSA_SUCCESS \emptydescription
1223
- */
1224
- typedef psa_status_t (*psa_drv_se_key_derivation_derive_t)(void *op_context,
1225
- psa_key_slot_number_t dest_key);
1226
-
1227
- /** \brief A function that performs the final step of a secure element key
1228
- * agreement and place the generated key material in a buffer
1229
- *
1230
- * \param[out] p_output Buffer in which to place the generated key
1231
- * material
1232
- * \param[in] output_size The size in bytes of `p_output`
1233
- * \param[out] p_output_length Upon success, contains the number of bytes of
1234
- * key material placed in `p_output`
1235
- *
1236
- * \retval #PSA_SUCCESS \emptydescription
1237
- */
1238
- typedef psa_status_t (*psa_drv_se_key_derivation_export_t)(void *op_context,
1239
- uint8_t *p_output,
1240
- size_t output_size,
1241
- size_t *p_output_length);
1242
-
1243
- /**
1244
- * \brief A struct containing all of the function pointers needed to for secure
1245
- * element key derivation and agreement
1246
- *
1247
- * PSA Crypto API implementations should populate instances of the table as
1248
- * appropriate upon startup.
1249
- *
1250
- * If one of the functions is not implemented, it should be set to NULL.
1251
- */
1252
- typedef struct {
1253
- /** The driver-specific size of the key derivation context */
1254
- size_t MBEDTLS_PRIVATE(context_size);
1255
- /** Function that performs a key derivation setup */
1256
- psa_drv_se_key_derivation_setup_t MBEDTLS_PRIVATE(p_setup);
1257
- /** Function that sets key derivation collateral */
1258
- psa_drv_se_key_derivation_collateral_t MBEDTLS_PRIVATE(p_collateral);
1259
- /** Function that performs a final key derivation step */
1260
- psa_drv_se_key_derivation_derive_t MBEDTLS_PRIVATE(p_derive);
1261
- /** Function that performs a final key derivation or agreement and
1262
- * exports the key */
1263
- psa_drv_se_key_derivation_export_t MBEDTLS_PRIVATE(p_export);
1264
- } psa_drv_se_key_derivation_t;
1265
-
1266
- /**@}*/
1267
-
1268
- /** \defgroup se_registration Secure element driver registration
1269
- */
1270
- /**@{*/
1271
-
1272
- /** A structure containing pointers to all the entry points of a
1273
- * secure element driver.
1274
- *
1275
- * Future versions of this specification may add extra substructures at
1276
- * the end of this structure.
1277
- */
1278
- typedef struct {
1279
- /** The version of the driver HAL that this driver implements.
1280
- * This is a protection against loading driver binaries built against
1281
- * a different version of this specification.
1282
- * Use #PSA_DRV_SE_HAL_VERSION.
1283
- */
1284
- uint32_t MBEDTLS_PRIVATE(hal_version);
1285
-
1286
- /** The size of the driver's persistent data in bytes.
1287
- *
1288
- * This can be 0 if the driver does not need persistent data.
1289
- *
1290
- * See the documentation of psa_drv_se_context_t::persistent_data
1291
- * for more information about why and how a driver can use
1292
- * persistent data.
1293
- */
1294
- size_t MBEDTLS_PRIVATE(persistent_data_size);
1295
-
1296
- /** The driver initialization function.
1297
- *
1298
- * This function is called once during the initialization of the
1299
- * PSA Cryptography subsystem, before any other function of the
1300
- * driver is called. If this function returns a failure status,
1301
- * the driver will be unusable, at least until the next system reset.
1302
- *
1303
- * If this field is \c NULL, it is equivalent to a function that does
1304
- * nothing and returns #PSA_SUCCESS.
1305
- */
1306
- psa_drv_se_init_t MBEDTLS_PRIVATE(p_init);
1307
-
1308
- const psa_drv_se_key_management_t *MBEDTLS_PRIVATE(key_management);
1309
- const psa_drv_se_mac_t *MBEDTLS_PRIVATE(mac);
1310
- const psa_drv_se_cipher_t *MBEDTLS_PRIVATE(cipher);
1311
- const psa_drv_se_aead_t *MBEDTLS_PRIVATE(aead);
1312
- const psa_drv_se_asymmetric_t *MBEDTLS_PRIVATE(asymmetric);
1313
- const psa_drv_se_key_derivation_t *MBEDTLS_PRIVATE(derivation);
1314
- } psa_drv_se_t;
1315
-
1316
- /** The current version of the secure element driver HAL.
1317
- */
1318
- /* 0.0.0 patchlevel 5 */
1319
- #define PSA_DRV_SE_HAL_VERSION 0x00000005
1320
-
1321
- /** Register an external cryptoprocessor (secure element) driver.
1322
- *
1323
- * This function is only intended to be used by driver code, not by
1324
- * application code. In implementations with separation between the
1325
- * PSA cryptography module and applications, this function should
1326
- * only be available to callers that run in the same memory space as
1327
- * the cryptography module, and should not be exposed to applications
1328
- * running in a different memory space.
1329
- *
1330
- * This function may be called before psa_crypto_init(). It is
1331
- * implementation-defined whether this function may be called
1332
- * after psa_crypto_init().
1333
- *
1334
- * \note Implementations store metadata about keys including the lifetime
1335
- * value, which contains the driver's location indicator. Therefore,
1336
- * from one instantiation of the PSA Cryptography
1337
- * library to the next one, if there is a key in storage with a certain
1338
- * lifetime value, you must always register the same driver (or an
1339
- * updated version that communicates with the same secure element)
1340
- * with the same location value.
1341
- *
1342
- * \param location The location value through which this driver will
1343
- * be exposed to applications.
1344
- * This driver will be used for all keys such that
1345
- * `location == #PSA_KEY_LIFETIME_GET_LOCATION( lifetime )`.
1346
- * The value #PSA_KEY_LOCATION_LOCAL_STORAGE is reserved
1347
- * and may not be used for drivers. Implementations
1348
- * may reserve other values.
1349
- * \param[in] methods The method table of the driver. This structure must
1350
- * remain valid for as long as the cryptography
1351
- * module keeps running. It is typically a global
1352
- * constant.
1353
- *
1354
- * \return #PSA_SUCCESS
1355
- * The driver was successfully registered. Applications can now
1356
- * use \p location to access keys through the methods passed to
1357
- * this function.
1358
- * \return #PSA_ERROR_BAD_STATE
1359
- * This function was called after the initialization of the
1360
- * cryptography module, and this implementation does not support
1361
- * driver registration at this stage.
1362
- * \return #PSA_ERROR_ALREADY_EXISTS
1363
- * There is already a registered driver for this value of \p location.
1364
- * \return #PSA_ERROR_INVALID_ARGUMENT
1365
- * \p location is a reserved value.
1366
- * \return #PSA_ERROR_NOT_SUPPORTED
1367
- * `methods->hal_version` is not supported by this implementation.
1368
- * \return #PSA_ERROR_INSUFFICIENT_MEMORY
1369
- * \return #PSA_ERROR_NOT_PERMITTED
1370
- * \return #PSA_ERROR_STORAGE_FAILURE
1371
- * \return #PSA_ERROR_DATA_CORRUPT
1372
- */
1373
- psa_status_t psa_register_se_driver(
1374
- psa_key_location_t location,
1375
- const psa_drv_se_t *methods);
1376
-
1377
- /**@}*/
1378
-
1379
- #ifdef __cplusplus
1380
- }
1381
- #endif
1382
-
1383
- #endif /* PSA_CRYPTO_SE_DRIVER_H */