Skip to content
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

Make Darwin CHIPKeypair usable in a few more cases. #18458

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

@bzbarsky-apple bzbarsky-apple commented May 14, 2022

  1. Instead of having CHIPKeypair sign a digest, just have it sign a
    message. This tends to be more widely supported by cryptographic
    libraries.

  2. Support the CHIPKeypair providing us either a raw SEC1 signature or
    an ASN.1 DER-encoded signature, since different cryptographic
    libraries may have different output signature formats.

  3. Fix an incorrect comment in CHIPCryptoPAL.h.

Problem

See above.

Change overview

See above.

Testing

Verified that both chip-tool-darwin (which uses the "raw" signature bit) and XCTest tests (which use the "DER" signature bit) work.

@github-actions
Copy link

github-actions bot commented May 14, 2022

PR #18458: Size comparison from b4509f3 to 2f0b2dc

Full report (35 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section b4509f3 2f0b2dc change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 692347 692347 0 0.0
(read/write) 159932 159932 0 0.0
.bss 75260 75260 0 0.0
.data 3412 3412 0 0.0
.rodata 103267 103267 0 0.0
.text 588600 588600 0 0.0
lock-ftd LP_CC2652R7 (read only) 679731 679731 0 0.0
(read/write) 163636 163636 0 0.0
.bss 73404 73404 0 0.0
.data 3236 3236 0 0.0
.rodata 94979 94979 0 0.0
.text 584268 584268 0 0.0
lock-mtd LP_CC2652R7 (read only) 628539 628539 0 0.0
(read/write) 146236 146236 0 0.0
.bss 69140 69140 0 0.0
.data 3236 3236 0 0.0
.rodata 94859 94859 0 0.0
.text 533188 533188 0 0.0
pump-app LP_CC2652R7 (read only) 663279 663279 0 0.0
(read/write) 181376 181376 0 0.0
.bss 73668 73668 0 0.0
.data 3268 3268 0 0.0
.rodata 80519 80519 0 0.0
.text 582280 582280 0 0.0
pump-controller-app LP_CC2652R7 (read only) 656471 656471 0 0.0
(read/write) 187984 187984 0 0.0
.bss 73724 73724 0 0.0
.data 3232 3232 0 0.0
.rodata 83607 83607 0 0.0
.text 572384 572384 0 0.0
shell LP_CC2652R7 (read only) 686734 686734 0 0.0
(read/write) 161368 161368 0 0.0
.bss 77884 77884 0 0.0
.data 3416 3416 0 0.0
.rodata 100814 100814 0 0.0
.text 585436 585436 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 628342 628342 0 0.0
.app_xip_area 530996 530996 0 0.0
.bss 79988 79988 0 0.0
.data 708 708 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 628286 628286 0 0.0
.app_xip_area 532396 532396 0 0.0
.bss 78564 78564 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 576074 576074 0 0.0
.app_xip_area 470468 470468 0 0.0
.bss 87984 87984 0 0.0
.data 584 584 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 918680 918680 0 0.0
(read/write) 134440 134440 0 0.0
.bss 132376 132376 0 0.0
.data 2060 2060 0 0.0
.text 918672 918672 0 0.0
BRD4161A+rpc (read only) 952868 952868 0 0.0
(read/write) 151120 151120 0 0.0
.bss 148856 148856 0 0.0
.data 2264 2264 0 0.0
.text 952860 952860 0 0.0
BRD4161A+rs911x (read only) 787676 787676 0 0.0
(read/write) 129656 129656 0 0.0
.bss 127588 127588 0 0.0
.data 2068 2068 0 0.0
.text 787668 787668 0 0.0
lock-app BRD4161A+wf200 (read only) 947672 947672 0 0.0
(read/write) 124140 124140 0 0.0
.bss 122116 122116 0 0.0
.data 2024 2024 0 0.0
.text 947664 947664 0 0.0
window-app BRD4161A (read only) 898968 898968 0 0.0
(read/write) 134384 134384 0 0.0
.bss 132336 132336 0 0.0
.data 2048 2048 0 0.0
.text 898960 898960 0 0.0
esp32 all-clusters-app c3devkit (read only) 1000174 1000174 0 0.0
(read/write) 1477650 1477650 0 0.0
.dram0.bss 68352 68352 0 0.0
.dram0.data 14568 14568 0 0.0
.flash.rodata 209256 209256 0 0.0
.flash.text 1000174 1000174 0 0.0
.iram0.text 62954 62954 0 0.0
m5stack (read only) 1054103 1054103 0 0.0
(read/write) 479552 479552 0 0.0
.dram0.bss 73872 73872 0 0.0
.dram0.data 34184 34184 0 0.0
.flash.rodata 239500 239500 0 0.0
.flash.text 1048719 1048719 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 686264 686264 0 0.0
.bss 81176 81176 0 0.0
.data 2016 2016 0 0.0
.text 601368 601368 0 0.0
lock k32w061+release (read/write) 732632 732632 0 0.0
.bss 81608 81608 0 0.0
.data 1976 1976 0 0.0
.text 647344 647344 0 0.0
linux all-clusters-app debug (read only) 2750953 2750953 0 0.0
(read/write) 174552 174552 0 0.0
.bss 83904 83904 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 82456 82456 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1008 1008 0 0.0
.rodata 237541 237541 0 0.0
.text 2337538 2337538 0 0.0
bridge-app debug+rpc (read only) 1897337 1897337 0 0.0
(read/write) 121080 121080 0 0.0
.bss 71520 71520 0 0.0
.data 3488 3488 0 0.0
.data.rel.ro 40712 40712 0 0.0
.dynamic 592 592 0 0.0
.got 4056 4056 0 0.0
.init 27 27 0 0.0
.init_array 688 688 0 0.0
.rodata 161753 161753 0 0.0
.text 1612226 1612226 0 0.0
chip-tool debug (read only) 9266261 9266261 0 0.0
(read/write) 577008 577008 0 0.0
.bss 22816 22816 0 0.0
.data 1136 1136 0 0.0
.data.rel.ro 546752 546752 0 0.0
.dynamic 624 624 0 0.0
.got 5000 5000 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 476789 476789 0 0.0
.text 7465013 7465013 0 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9060004 9060004 0 0.0
(read/write) 643121 643121 0 0.0
.bss 41105 41105 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 582008 582008 0 0.0
.dynamic 560 560 0 0.0
.got 14976 14976 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 443348 443348 0 0.0
.text 7157124 7157124 0 0.0
lighting-app debug+rpc (read only) 2330953 2330953 0 0.0
(read/write) 152032 152032 0 0.0
.bss 73568 73568 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 70664 70664 0 0.0
.dynamic 608 608 0 0.0
.got 4344 4344 0 0.0
.init 27 27 0 0.0
.init_array 792 792 0 0.0
.rodata 185913 185913 0 0.0
.text 1977826 1977826 0 0.0
lock-app debug (read only) 2246681 2246681 0 0.0
(read/write) 146648 146648 0 0.0
.bss 72192 72192 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 67192 67192 0 0.0
.dynamic 592 592 0 0.0
.got 4336 4336 0 0.0
.init 27 27 0 0.0
.init_array 752 752 0 0.0
.rodata 196617 196617 0 0.0
.text 1889170 1889170 0 0.0
ota-provider-app debug (read only) 2067569 2067569 0 0.0
(read/write) 139728 139728 0 0.0
.bss 71680 71680 0 0.0
.data 1768 1768 0 0.0
.data.rel.ro 60488 60488 0 0.0
.dynamic 608 608 0 0.0
.got 4504 4504 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 176819 176819 0 0.0
.text 1732354 1732354 0 0.0
ota-requestor-app debug (read only) 2097473 2097473 0 0.0
(read/write) 142536 142536 0 0.0
.bss 72320 72320 0 0.0
.data 1992 1992 0 0.0
.data.rel.ro 62584 62584 0 0.0
.dynamic 592 592 0 0.0
.got 4344 4344 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 172956 172956 0 0.0
.text 1764658 1764658 0 0.0
shell debug (read only) 2569809 2569809 0 0.0
(read/write) 198288 198288 0 0.0
.bss 114408 114408 0 0.0
.data 1376 1376 0 0.0
.data.rel.ro 76744 76744 0 0.0
.dynamic 592 592 0 0.0
.got 4208 4208 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 218706 218706 0 0.0
.text 2188322 2188322 0 0.0
thermostat-no-ble arm64 (read only) 2370180 2370180 0 0.0
(read/write) 175153 175153 0 0.0
.bss 86417 86417 0 0.0
.data 1520 1520 0 0.0
.data.rel.ro 79408 79408 0 0.0
.dynamic 560 560 0 0.0
.got 4768 4768 0 0.0
.init 24 24 0 0.0
.init_array 376 376 0 0.0
.rodata 146980 146980 0 0.0
.text 1993312 1993312 0 0.0
tv-app debug (read only) 2855657 2855657 0 0.0
(read/write) 277472 277472 0 0.0
.bss 189624 189624 0 0.0
.data 4672 4672 0 0.0
.data.rel.ro 76928 76928 0 0.0
.dynamic 592 592 0 0.0
.got 4720 4720 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 218891 218891 0 0.0
.text 2453538 2453538 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2421684 2421684 0 0.0
.bss 205436 205436 0 0.0
.data 5872 5872 0 0.0
.text 1384284 1384284 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1181131 1181131 0 0.0
bss 139560 139560 0 0.0
rodata 152428 152428 0 0.0
text 810316 810316 0 0.0
p6 all-clusters-app default (read/write) 2533016 2533016 0 0.0
.bss 138944 138944 0 0.0
.data 2808 2808 0 0.0
.text 1491280 1491280 0 0.0
light-app default (read/write) 2421968 2421968 0 0.0
.bss 132272 132272 0 0.0
.data 2608 2608 0 0.0
.text 1380232 1380232 0 0.0
lock-app default (read/write) 2432616 2432616 0 0.0
.bss 132088 132088 0 0.0
.data 2568 2568 0 0.0
.text 1390880 1390880 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 806400 806400 0 0.0
bss 72056 72056 0 0.0
noinit 40416 40416 0 0.0
text 572768 572768 0 0.0

@github-actions
Copy link

github-actions bot commented May 14, 2022

PR #18458: Size comparison from f829356 to ad60989

Full report (26 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section f829356 ad60989 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 692347 692347 0 0.0
(read/write) 159932 159932 0 0.0
.bss 75260 75260 0 0.0
.data 3412 3412 0 0.0
.rodata 103267 103267 0 0.0
.text 588600 588600 0 0.0
lock-ftd LP_CC2652R7 (read only) 679731 679731 0 0.0
(read/write) 163636 163636 0 0.0
.bss 73404 73404 0 0.0
.data 3236 3236 0 0.0
.rodata 94979 94979 0 0.0
.text 584268 584268 0 0.0
lock-mtd LP_CC2652R7 (read only) 628539 628539 0 0.0
(read/write) 146236 146236 0 0.0
.bss 69140 69140 0 0.0
.data 3236 3236 0 0.0
.rodata 94859 94859 0 0.0
.text 533188 533188 0 0.0
pump-app LP_CC2652R7 (read only) 663279 663279 0 0.0
(read/write) 181376 181376 0 0.0
.bss 73668 73668 0 0.0
.data 3268 3268 0 0.0
.rodata 80519 80519 0 0.0
.text 582280 582280 0 0.0
pump-controller-app LP_CC2652R7 (read only) 656471 656471 0 0.0
(read/write) 187984 187984 0 0.0
.bss 73724 73724 0 0.0
.data 3232 3232 0 0.0
.rodata 83607 83607 0 0.0
.text 572384 572384 0 0.0
shell LP_CC2652R7 (read only) 686734 686734 0 0.0
(read/write) 161368 161368 0 0.0
.bss 77884 77884 0 0.0
.data 3416 3416 0 0.0
.rodata 100814 100814 0 0.0
.text 585436 585436 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 628342 628342 0 0.0
.app_xip_area 530996 530996 0 0.0
.bss 79988 79988 0 0.0
.data 708 708 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 628286 628286 0 0.0
.app_xip_area 532396 532396 0 0.0
.bss 78564 78564 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 576074 576074 0 0.0
.app_xip_area 470468 470468 0 0.0
.bss 87984 87984 0 0.0
.data 584 584 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 918680 918680 0 0.0
(read/write) 134440 134440 0 0.0
.bss 132376 132376 0 0.0
.data 2060 2060 0 0.0
.text 918672 918672 0 0.0
BRD4161A+rpc (read only) 952868 952868 0 0.0
(read/write) 151120 151120 0 0.0
.bss 148856 148856 0 0.0
.data 2264 2264 0 0.0
.text 952860 952860 0 0.0
BRD4161A+rs911x (read only) 787676 787676 0 0.0
(read/write) 129656 129656 0 0.0
.bss 127588 127588 0 0.0
.data 2068 2068 0 0.0
.text 787668 787668 0 0.0
lock-app BRD4161A+wf200 (read only) 947672 947672 0 0.0
(read/write) 124140 124140 0 0.0
.bss 122116 122116 0 0.0
.data 2024 2024 0 0.0
.text 947664 947664 0 0.0
window-app BRD4161A (read only) 898968 898968 0 0.0
(read/write) 134384 134384 0 0.0
.bss 132336 132336 0 0.0
.data 2048 2048 0 0.0
.text 898960 898960 0 0.0
esp32 all-clusters-app c3devkit (read only) 1000174 1000174 0 0.0
(read/write) 1477650 1477650 0 0.0
.dram0.bss 68352 68352 0 0.0
.dram0.data 14568 14568 0 0.0
.flash.rodata 209256 209256 0 0.0
.flash.text 1000174 1000174 0 0.0
.iram0.text 62954 62954 0 0.0
m5stack (read only) 1054103 1054103 0 0.0
(read/write) 479552 479552 0 0.0
.dram0.bss 73872 73872 0 0.0
.dram0.data 34184 34184 0 0.0
.flash.rodata 239500 239500 0 0.0
.flash.text 1048719 1048719 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 686264 686264 0 0.0
.bss 81176 81176 0 0.0
.data 2016 2016 0 0.0
.text 601368 601368 0 0.0
lock k32w061+release (read/write) 732632 732632 0 0.0
.bss 81608 81608 0 0.0
.data 1976 1976 0 0.0
.text 647344 647344 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 9060004 9060004 0 0.0
(read/write) 643121 643121 0 0.0
.bss 41105 41105 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 582008 582008 0 0.0
.dynamic 560 560 0 0.0
.got 14976 14976 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 443348 443348 0 0.0
.text 7157124 7157124 0 0.0
thermostat-no-ble arm64 (read only) 2370180 2370180 0 0.0
(read/write) 175153 175153 0 0.0
.bss 86417 86417 0 0.0
.data 1520 1520 0 0.0
.data.rel.ro 79408 79408 0 0.0
.dynamic 560 560 0 0.0
.got 4768 4768 0 0.0
.init 24 24 0 0.0
.init_array 376 376 0 0.0
.rodata 146980 146980 0 0.0
.text 1993312 1993312 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2421684 2421684 0 0.0
.bss 205436 205436 0 0.0
.data 5872 5872 0 0.0
.text 1384284 1384284 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1181131 1181131 0 0.0
bss 139560 139560 0 0.0
rodata 152428 152428 0 0.0
text 810316 810316 0 0.0
p6 all-clusters-app default (read/write) 2533016 2533016 0 0.0
.bss 138944 138944 0 0.0
.data 2808 2808 0 0.0
.text 1491280 1491280 0 0.0
light-app default (read/write) 2421968 2421968 0 0.0
.bss 132272 132272 0 0.0
.data 2608 2608 0 0.0
.text 1380232 1380232 0 0.0
lock-app default (read/write) 2432616 2432616 0 0.0
.bss 132088 132088 0 0.0
.data 2568 2568 0 0.0
.text 1390880 1390880 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 806400 806400 0 0.0
bss 72056 72056 0 0.0
noinit 40416 40416 0 0.0
text 572768 572768 0 0.0

@github-actions
Copy link

github-actions bot commented May 15, 2022

PR #18458: Size comparison from f829356 to 1b8bee8

Increases (2 builds for nrfconnect, telink)
platform target config section f829356 1b8bee8 change % change
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1181131 1181283 152 0.0
bss 139560 139568 8 0.0
text 810316 810452 136 0.0
telink lighting-app tlsr9518adk80d (read/write) 806400 806568 168 0.0
bss 72056 72064 8 0.0
text 572768 572918 150 0.0
Full report (26 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section f829356 1b8bee8 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 692347 692347 0 0.0
(read/write) 159932 159932 0 0.0
.bss 75260 75260 0 0.0
.data 3412 3412 0 0.0
.rodata 103267 103267 0 0.0
.text 588600 588600 0 0.0
lock-ftd LP_CC2652R7 (read only) 679731 679731 0 0.0
(read/write) 163636 163636 0 0.0
.bss 73404 73404 0 0.0
.data 3236 3236 0 0.0
.rodata 94979 94979 0 0.0
.text 584268 584268 0 0.0
lock-mtd LP_CC2652R7 (read only) 628539 628539 0 0.0
(read/write) 146236 146236 0 0.0
.bss 69140 69140 0 0.0
.data 3236 3236 0 0.0
.rodata 94859 94859 0 0.0
.text 533188 533188 0 0.0
pump-app LP_CC2652R7 (read only) 663279 663279 0 0.0
(read/write) 181376 181376 0 0.0
.bss 73668 73668 0 0.0
.data 3268 3268 0 0.0
.rodata 80519 80519 0 0.0
.text 582280 582280 0 0.0
pump-controller-app LP_CC2652R7 (read only) 656471 656471 0 0.0
(read/write) 187984 187984 0 0.0
.bss 73724 73724 0 0.0
.data 3232 3232 0 0.0
.rodata 83607 83607 0 0.0
.text 572384 572384 0 0.0
shell LP_CC2652R7 (read only) 686734 686734 0 0.0
(read/write) 161368 161368 0 0.0
.bss 77884 77884 0 0.0
.data 3416 3416 0 0.0
.rodata 100814 100814 0 0.0
.text 585436 585436 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 628342 628342 0 0.0
.app_xip_area 530996 530996 0 0.0
.bss 79988 79988 0 0.0
.data 708 708 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 628286 628286 0 0.0
.app_xip_area 532396 532396 0 0.0
.bss 78564 78564 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 576074 576074 0 0.0
.app_xip_area 470468 470468 0 0.0
.bss 87984 87984 0 0.0
.data 584 584 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 918680 918680 0 0.0
(read/write) 134440 134440 0 0.0
.bss 132376 132376 0 0.0
.data 2060 2060 0 0.0
.text 918672 918672 0 0.0
BRD4161A+rpc (read only) 952868 952868 0 0.0
(read/write) 151120 151120 0 0.0
.bss 148856 148856 0 0.0
.data 2264 2264 0 0.0
.text 952860 952860 0 0.0
BRD4161A+rs911x (read only) 787676 787676 0 0.0
(read/write) 129656 129656 0 0.0
.bss 127588 127588 0 0.0
.data 2068 2068 0 0.0
.text 787668 787668 0 0.0
lock-app BRD4161A+wf200 (read only) 947672 947672 0 0.0
(read/write) 124140 124140 0 0.0
.bss 122116 122116 0 0.0
.data 2024 2024 0 0.0
.text 947664 947664 0 0.0
window-app BRD4161A (read only) 898968 898968 0 0.0
(read/write) 134384 134384 0 0.0
.bss 132336 132336 0 0.0
.data 2048 2048 0 0.0
.text 898960 898960 0 0.0
esp32 all-clusters-app c3devkit (read only) 1000174 1000174 0 0.0
(read/write) 1477650 1477650 0 0.0
.dram0.bss 68352 68352 0 0.0
.dram0.data 14568 14568 0 0.0
.flash.rodata 209256 209256 0 0.0
.flash.text 1000174 1000174 0 0.0
.iram0.text 62954 62954 0 0.0
m5stack (read only) 1054103 1054103 0 0.0
(read/write) 479552 479552 0 0.0
.dram0.bss 73872 73872 0 0.0
.dram0.data 34184 34184 0 0.0
.flash.rodata 239500 239500 0 0.0
.flash.text 1048719 1048719 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 686264 686264 0 0.0
.bss 81176 81176 0 0.0
.data 2016 2016 0 0.0
.text 601368 601368 0 0.0
lock k32w061+release (read/write) 732632 732632 0 0.0
.bss 81608 81608 0 0.0
.data 1976 1976 0 0.0
.text 647344 647344 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 9060004 9060004 0 0.0
(read/write) 643121 643121 0 0.0
.bss 41105 41105 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 582008 582008 0 0.0
.dynamic 560 560 0 0.0
.got 14976 14976 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 443348 443348 0 0.0
.text 7157124 7157124 0 0.0
thermostat-no-ble arm64 (read only) 2370180 2370180 0 0.0
(read/write) 175153 175153 0 0.0
.bss 86417 86417 0 0.0
.data 1520 1520 0 0.0
.data.rel.ro 79408 79408 0 0.0
.dynamic 560 560 0 0.0
.got 4768 4768 0 0.0
.init 24 24 0 0.0
.init_array 376 376 0 0.0
.rodata 146980 146980 0 0.0
.text 1993312 1993312 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2421684 2421684 0 0.0
.bss 205436 205436 0 0.0
.data 5872 5872 0 0.0
.text 1384284 1384284 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1181131 1181283 152 0.0
bss 139560 139568 8 0.0
rodata 152428 152428 0 0.0
text 810316 810452 136 0.0
p6 all-clusters-app default (read/write) 2533016 2533016 0 0.0
.bss 138944 138944 0 0.0
.data 2808 2808 0 0.0
.text 1491280 1491280 0 0.0
light-app default (read/write) 2421968 2421968 0 0.0
.bss 132272 132272 0 0.0
.data 2608 2608 0 0.0
.text 1380232 1380232 0 0.0
lock-app default (read/write) 2432616 2432616 0 0.0
.bss 132088 132088 0 0.0
.data 2568 2568 0 0.0
.text 1390880 1390880 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 806400 806568 168 0.0
bss 72056 72064 8 0.0
noinit 40416 40416 0 0.0
text 572768 572918 150 0.0

1) Instead of having CHIPKeypair sign a digest, just have it sign a
   message.  This tends to be more widely supported by cryptographic
   libraries.

2) Support the CHIPKeypair providing us either a raw SEC1 signature or
   an ASN.1 DER-encoded signature, since different cryptographic
   libraries may have different output signature formats.

3) Fix an incorrect comment in CHIPCryptoPAL.h.
@github-actions
Copy link

github-actions bot commented May 16, 2022

PR #18458: Size comparison from bf909a5 to 5de8f18

Full report (37 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section bf909a5 5de8f18 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 689259 689259 0 0.0
(read/write) 162300 162300 0 0.0
.bss 74540 74540 0 0.0
.data 3412 3412 0 0.0
.rodata 103091 103091 0 0.0
.text 585688 585688 0 0.0
lock-ftd LP_CC2652R7 (read only) 676603 676603 0 0.0
(read/write) 166044 166044 0 0.0
.bss 72684 72684 0 0.0
.data 3236 3236 0 0.0
.rodata 94811 94811 0 0.0
.text 581308 581308 0 0.0
lock-mtd LP_CC2652R7 (read only) 625419 625419 0 0.0
(read/write) 145516 145516 0 0.0
.bss 68420 68420 0 0.0
.data 3236 3236 0 0.0
.rodata 94691 94691 0 0.0
.text 530236 530236 0 0.0
pump-app LP_CC2652R7 (read only) 660175 660175 0 0.0
(read/write) 183760 183760 0 0.0
.bss 72948 72948 0 0.0
.data 3268 3268 0 0.0
.rodata 80351 80351 0 0.0
.text 579344 579344 0 0.0
pump-controller-app LP_CC2652R7 (read only) 653347 653347 0 0.0
(read/write) 190388 190388 0 0.0
.bss 73004 73004 0 0.0
.data 3232 3232 0 0.0
.rodata 83451 83451 0 0.0
.text 569416 569416 0 0.0
shell LP_CC2652R7 (read only) 683614 683614 0 0.0
(read/write) 163768 163768 0 0.0
.bss 77164 77164 0 0.0
.data 3416 3416 0 0.0
.rodata 100638 100638 0 0.0
.text 582492 582492 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 624498 624498 0 0.0
.app_xip_area 528112 528112 0 0.0
.bss 79028 79028 0 0.0
.data 708 708 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 627558 627558 0 0.0
.app_xip_area 532628 532628 0 0.0
.bss 77604 77604 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 572202 572202 0 0.0
.app_xip_area 467556 467556 0 0.0
.bss 87024 87024 0 0.0
.data 584 584 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 914812 914812 0 0.0
(read/write) 133236 133236 0 0.0
.bss 131176 131176 0 0.0
.data 2060 2060 0 0.0
.text 914804 914804 0 0.0
BRD4161A+rpc (read only) 948984 948984 0 0.0
(read/write) 149920 149920 0 0.0
.bss 147656 147656 0 0.0
.data 2264 2264 0 0.0
.text 948976 948976 0 0.0
BRD4161A+rs911x (read only) 784144 784144 0 0.0
(read/write) 128460 128460 0 0.0
.bss 126388 126388 0 0.0
.data 2068 2068 0 0.0
.text 784136 784136 0 0.0
lock-app BRD4161A+wf200 (read only) 944940 944940 0 0.0
(read/write) 122940 122940 0 0.0
.bss 120916 120916 0 0.0
.data 2024 2024 0 0.0
.text 944932 944932 0 0.0
window-app BRD4161A (read only) 894932 894932 0 0.0
(read/write) 133296 133296 0 0.0
.bss 131248 131248 0 0.0
.data 2048 2048 0 0.0
.text 894924 894924 0 0.0
esp32 all-clusters-app c3devkit (read only) 996624 996624 0 0.0
(read/write) 1476314 1476314 0 0.0
.dram0.bss 67152 67152 0 0.0
.dram0.data 14568 14568 0 0.0
.flash.rodata 209160 209160 0 0.0
.flash.text 996624 996624 0 0.0
.iram0.text 62954 62954 0 0.0
m5stack (read only) 1052103 1052103 0 0.0
(read/write) 478344 478344 0 0.0
.dram0.bss 72672 72672 0 0.0
.dram0.data 34184 34184 0 0.0
.flash.rodata 239492 239492 0 0.0
.flash.text 1046719 1046719 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 682388 682388 0 0.0
.bss 80216 80216 0 0.0
.data 2016 2016 0 0.0
.text 598452 598452 0 0.0
lock k32w061+release (read/write) 728760 728760 0 0.0
.bss 80648 80648 0 0.0
.data 1976 1976 0 0.0
.text 644432 644432 0 0.0
linux all-clusters-app debug (read only) 2732673 2732673 0 0.0
(read/write) 174456 174456 0 0.0
.bss 83808 83808 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 82456 82456 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1008 1008 0 0.0
.rodata 237949 237949 0 0.0
.text 2318850 2318850 0 0.0
bridge-app debug+rpc (read only) 2020873 2020873 0 0.0
(read/write) 146424 146424 0 0.0
.bss 71616 71616 0 0.0
.data 3936 3936 0 0.0
.data.rel.ro 65288 65288 0 0.0
.dynamic 592 592 0 0.0
.got 4272 4272 0 0.0
.init 27 27 0 0.0
.init_array 688 688 0 0.0
.rodata 167337 167337 0 0.0
.text 1695554 1695554 0 0.0
chip-tool debug (read only) 9267573 9267573 0 0.0
(read/write) 577936 577936 0 0.0
.bss 22816 22816 0 0.0
.data 1136 1136 0 0.0
.data.rel.ro 547680 547680 0 0.0
.dynamic 624 624 0 0.0
.got 5000 5000 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 478485 478485 0 0.0
.text 7462469 7462469 0 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9044388 9044388 0 0.0
(read/write) 644065 644065 0 0.0
.bss 41105 41105 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 582936 582936 0 0.0
.dynamic 560 560 0 0.0
.got 14984 14984 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 444564 444564 0 0.0
.text 7138116 7138116 0 0.0
lighting-app debug+rpc (read only) 2314697 2314697 0 0.0
(read/write) 151904 151904 0 0.0
.bss 73440 73440 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 70664 70664 0 0.0
.dynamic 608 608 0 0.0
.got 4344 4344 0 0.0
.init 27 27 0 0.0
.init_array 792 792 0 0.0
.rodata 186409 186409 0 0.0
.text 1961074 1961074 0 0.0
lock-app debug (read only) 2228441 2228441 0 0.0
(read/write) 146552 146552 0 0.0
.bss 72096 72096 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 67192 67192 0 0.0
.dynamic 592 592 0 0.0
.got 4336 4336 0 0.0
.init 27 27 0 0.0
.init_array 752 752 0 0.0
.rodata 196985 196985 0 0.0
.text 1870562 1870562 0 0.0
ota-provider-app debug (read only) 2049393 2049393 0 0.0
(read/write) 139632 139632 0 0.0
.bss 71584 71584 0 0.0
.data 1768 1768 0 0.0
.data.rel.ro 60488 60488 0 0.0
.dynamic 608 608 0 0.0
.got 4504 4504 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 177235 177235 0 0.0
.text 1713762 1713762 0 0.0
ota-requestor-app debug (read only) 2078689 2078689 0 0.0
(read/write) 142440 142440 0 0.0
.bss 72224 72224 0 0.0
.data 1992 1992 0 0.0
.data.rel.ro 62584 62584 0 0.0
.dynamic 592 592 0 0.0
.got 4344 4344 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 173404 173404 0 0.0
.text 1745426 1745426 0 0.0
shell debug (read only) 2549049 2549049 0 0.0
(read/write) 198256 198256 0 0.0
.bss 114408 114408 0 0.0
.data 1376 1376 0 0.0
.data.rel.ro 76744 76744 0 0.0
.dynamic 592 592 0 0.0
.got 4184 4184 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 219122 219122 0 0.0
.text 2167442 2167442 0 0.0
thermostat-no-ble arm64 (read only) 2343156 2343156 0 0.0
(read/write) 175009 175009 0 0.0
.bss 86353 86353 0 0.0
.data 1520 1520 0 0.0
.data.rel.ro 79336 79336 0 0.0
.dynamic 560 560 0 0.0
.got 4768 4768 0 0.0
.init 24 24 0 0.0
.init_array 376 376 0 0.0
.rodata 146980 146980 0 0.0
.text 1966352 1966352 0 0.0
tv-app debug (read only) 2840193 2840193 0 0.0
(read/write) 277408 277408 0 0.0
.bss 189528 189528 0 0.0
.data 4672 4672 0 0.0
.data.rel.ro 76960 76960 0 0.0
.dynamic 592 592 0 0.0
.got 4720 4720 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 219281 219281 0 0.0
.text 2437634 2437634 0 0.0
tv-casting-app debug (read only) 5402937 5402937 0 0.0
(read/write) 223680 223680 0 0.0
.bss 77144 77144 0 0.0
.data 2368 2368 0 0.0
.data.rel.ro 137952 137952 0 0.0
.dynamic 608 608 0 0.0
.got 4728 4728 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 337857 337857 0 0.0
.text 4704770 4704770 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2418600 2418600 0 0.0
.bss 201596 201596 0 0.0
.data 5872 5872 0 0.0
.text 1381244 1381244 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1176903 1176903 0 0.0
bss 138368 138368 0 0.0
rodata 152256 152256 0 0.0
text 807524 807524 0 0.0
p6 all-clusters-app default (read/write) 2529568 2529568 0 0.0
.bss 135104 135104 0 0.0
.data 2808 2808 0 0.0
.text 1487832 1487832 0 0.0
light-app default (read/write) 2418504 2418504 0 0.0
.bss 128432 128432 0 0.0
.data 2608 2608 0 0.0
.text 1376768 1376768 0 0.0
lock-app default (read/write) 2429152 2429152 0 0.0
.bss 128248 128248 0 0.0
.data 2568 2568 0 0.0
.text 1387416 1387416 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 781904 781904 0 0.0
bss 70608 70608 0 0.0
noinit 40416 40416 0 0.0
text 552922 552922 0 0.0
lighting-app tlsr9518adk80d (read/write) 801988 801988 0 0.0
bss 70864 70864 0 0.0
noinit 40416 40416 0 0.0
text 569688 569688 0 0.0

@bzbarsky-apple bzbarsky-apple merged commit 413a579 into project-chip:master May 16, 2022
@bzbarsky-apple bzbarsky-apple deleted the CHIPKeypair-better branch May 16, 2022 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants