-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[crypto] Replace AesCcm128Key with sensitive data buffer #24357
Merged
bzbarsky-apple
merged 1 commit into
project-chip:master
from
Damian-Nordic:crypto-cleanup
Jan 15, 2023
Merged
[crypto] Replace AesCcm128Key with sensitive data buffer #24357
bzbarsky-apple
merged 1 commit into
project-chip:master
from
Damian-Nordic:crypto-cleanup
Jan 15, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
controller
crypto
darwin
examples
platform
tools
transport
labels
Jan 10, 2023
pullapprove
bot
requested review from
andy31415,
anush-apple,
arkq,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple,
chrisdecenzo,
chshu,
chulspro,
dhrishi,
electrocucaracha,
franck-apple,
gjc13,
harimau-qirex,
harsha-rajendran,
hawk248,
jelderton,
jepenven-silabs,
jmartinez-silabs,
jtung-apple,
ksperling-apple,
lazarkov and
lpbeliveau-silabs
January 10, 2023 23:31
pullapprove
bot
added
controller
crypto
darwin
examples
platform
tools
transport
and removed
examples
transport
platform
darwin
crypto
controller
labels
Jan 10, 2023
PR #24357: Size comparison from ed66cbe to 327545e Increases (25 builds for bl702, cc13x2_26x2, k32w, linux, mbed, psoc6, telink)
Decreases (17 builds for bl602, bl702, cc13x2_26x2, cyw30739, psoc6, qpg, telink)
Full report (47 builds for bl602, bl702, cc13x2_26x2, cyw30739, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
Damian-Nordic
force-pushed
the
crypto-cleanup
branch
from
January 11, 2023 00:54
327545e
to
68eb1aa
Compare
PR #24357: Size comparison from 18d3671 to 68eb1aa Increases (5 builds for bl702, linux, mbed)
Decreases (4 builds for bl602, bl702)
Full report (15 builds for bl602, bl702, k32w, linux, mbed, nrfconnect, qpg)
|
Damian-Nordic
force-pushed
the
crypto-cleanup
branch
from
January 11, 2023 01:36
68eb1aa
to
e158134
Compare
PR #24357: Size comparison from 18d3671 to e158134 Increases (30 builds for bl702, cc13x2_26x2, efr32, esp32, linux, mbed, psoc6, telink)
Decreases (14 builds for bl602, bl702, cc13x2_26x2, cyw30739, psoc6, telink)
Full report (54 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
turon
approved these changes
Jan 11, 2023
bzbarsky-apple
approved these changes
Jan 14, 2023
AesCcm128Key, despite its name, is currently only used for Identity Protection Key. Additionally, it has very similar interface to CapacityBoundBuffer. Rename CapacityBoundBuffer to SensitiveDataBuffer to better describe its purpose and add SensitiveDataFixedBuffer for fixed-size contents. Align interfaces of these two and implicit cast operators for better type safety. Finally, replace AesCcm128Key with new IdentityProtectionKey type alias defined as SensitiveDataFixedBuffer< CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES>. Signed-off-by: Damian Krolik <[email protected]>
Damian-Nordic
force-pushed
the
crypto-cleanup
branch
from
January 14, 2023 10:45
e158134
to
a831103
Compare
PR #24357: Size comparison from 41d5711 to a831103 Increases (15 builds for bl702, cc13x2_26x2, efr32, esp32, linux, mbed, psoc6, telink)
Decreases (17 builds for bl602, bl702, cc13x2_26x2, cyw30739, psoc6, telink)
Full report (43 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
}; | ||
|
||
typedef CapacityBoundBuffer<kMax_ECDSA_Signature_Length> P256ECDSASignature; | ||
template <size_t kCapacity> | ||
class SensitiveDataFixedBuffer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please document this class and its assumptions?
lecndav
pushed a commit
to lecndav/connectedhomeip
that referenced
this pull request
Mar 22, 2023
…p#24357) AesCcm128Key, despite its name, is currently only used for Identity Protection Key. Additionally, it has very similar interface to CapacityBoundBuffer. Rename CapacityBoundBuffer to SensitiveDataBuffer to better describe its purpose and add SensitiveDataFixedBuffer for fixed-size contents. Align interfaces of these two and implicit cast operators for better type safety. Finally, replace AesCcm128Key with new IdentityProtectionKey type alias defined as SensitiveDataFixedBuffer< CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES>. Signed-off-by: Damian Krolik <[email protected]> Signed-off-by: Damian Krolik <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
AesCcm128Key
, despite its name, is currently only used for Identity Protection Key. Additionally, it has very similar interface toCapacityBoundBuffer
.Rename
CapacityBoundBuffer
toSensitiveDataBuffer
to better describe its purpose and addSensitiveDataFixedBuffer
for fixed-size contents. Align interfaces of these two and implicit cast operators for better type safety.Finally, replace
AesCcm128Key
with newIdentityProtectionKey
type alias defined asSensitiveDataFixedBuffer< CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES>
. RemovingAesCcm128Key
was requested when reviewing #23792 which adds another AES key handle type.