Skip to content

Commit

Permalink
get back to using crypto=psa and inject KMU implementation from platform
Browse files Browse the repository at this point in the history
  • Loading branch information
ArekBalysNordic committed Jan 29, 2025
1 parent 6424970 commit 80dccfe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 22 deletions.
11 changes: 3 additions & 8 deletions config/nrfconnect/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,9 @@ else()
endif()

if (CONFIG_CHIP_CRYPTO_PSA)
if (CONFIG_CHIP_KMU_SUPPORT)
matter_add_gn_arg_string ("chip_crypto" "platform")
matter_add_gn_arg_bool ("chip_external_mbedtls" FALSE)
matter_add_gn_arg_bool ("chip_use_cracen_kmu" TRUE)
else()
matter_add_gn_arg_string("chip_crypto" "psa")
endif()
matter_add_gn_arg_bool ("chip_crypto_psa_spake2p" CONFIG_PSA_WANT_ALG_SPAKE2P_MATTER)
matter_add_gn_arg_bool ("chip_use_cracen_kmu" CONFIG_CHIP_KMU_SUPPORT)
matter_add_gn_arg_string ("chip_crypto" "psa")
matter_add_gn_arg_bool ("chip_crypto_psa_spake2p" CONFIG_PSA_WANT_ALG_SPAKE2P_MATTER)
endif()

if (BOARD STREQUAL "native_posix")
Expand Down
4 changes: 2 additions & 2 deletions src/crypto/DefaultSessionKeystore.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#endif

#if CHIP_CRYPTO_PSA
#include <crypto/PSASessionKeystore.h> // nogncheck
#include <crypto/PSASessionKeystore.h>
#else
#include <crypto/RawKeySessionKeystore.h> // nogncheck
#include <crypto/RawKeySessionKeystore.h>
#endif

namespace chip {
Expand Down
4 changes: 2 additions & 2 deletions src/crypto/crypto.gni
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert(
!chip_external_mbedtls || chip_crypto == "mbedtls" || chip_crypto == "psa",
"Use of external mbedtls requires the mbedtls or psa crypto impl")

assert(!chip_crypto_psa_spake2p || chip_crypto == "psa" || chip_crypto == "platform",
"Use of psa spake2+ requires the psa crypto or platform implementation")
assert(!chip_crypto_psa_spake2p || chip_crypto == "psa",
"Use of psa spake2+ requires the psa crypto impl")
10 changes: 0 additions & 10 deletions src/platform/nrfconnect/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,6 @@ static_library("nrfconnect") {
"crypto/KMUOperationalKeystore.h",
"crypto/KMUSessionKeystore.cpp",
"crypto/KMUSessionKeystore.h",

# Sources from common crypto core
"${chip_root}/src/crypto/CHIPCryptoPALPSA.cpp",
"${chip_root}/src/crypto/CHIPCryptoPALPSA.h",
"${chip_root}/src/crypto/PSAOperationalKeystore.cpp",
"${chip_root}/src/crypto/PSAOperationalKeystore.h",
"${chip_root}/src/crypto/PSASessionKeystore.cpp",
"${chip_root}/src/crypto/PSASessionKeystore.h",
"${chip_root}/src/crypto/PSASpake2p.cpp",
"${chip_root}/src/crypto/PSASpake2p.h",
]
}

Expand Down

0 comments on commit 80dccfe

Please sign in to comment.