Commit Graph

5 Commits

Author SHA1 Message Date
Mahavir Jain
14bc1b4b07 fix(provisioning): fix incorrect AES-GCM IV usage in security2 scheme
Using same IV in AES-GCM across multiple invocation of
encryption/decryption operations can pose a security risk. It can help
to reveal co-relation between different plaintexts.

This commit introduces a change to use part of IV as a monotonic
counter, which must be incremented after every AES-GCM invocation
on both the client and the device side.

Concept of patch version for a security scheme has been introduced here
which can help to differentiate a protocol behavior for the provisioning
entity. The security patch version will be available in the JSON
response for `proto-ver` endpoint request with the field
`sec_patch_ver`.

Please refer to documentation for more details on the changes required
on the provisioning entity side (e.g., PhoneApps).
2025-03-11 10:11:02 +05:30
Mahavir Jain
d887709d45 fix(protocomm): memory leak issue for session command0 failure case 2025-03-11 10:09:52 +05:30
Aditya Patwardhan
c740192123 protocomm/esp_srp: Allocate memory for username only when the
verification is successful
2022-10-08 10:49:44 +05:30
Aditya Patwardhan
b7ec10d461 protocommm/esp_srp: Fix small issues reported by coverity. 2022-10-08 10:49:26 +05:30
Aditya Patwardhan
eb7ff34c89 protocomm: Added SRP6a implementation as the security version 2.
1) Rename srp component to esp_srp
2) Remove dependency on hkdf sha
3) Restructure protocomm component APIs to make them more flexible for allowing multiple security versions
4) esp_srp: convert API return type from int to esp_err_t
5) esp_srp: Formatting changes
6) Added mbedtls_gcm instead of aes_ctr

Co-authored-by: Laukik hase <laukik.hase@espressif.com>
2022-06-17 13:16:20 +00:00