summaryrefslogtreecommitdiff
path: root/extra/usb_power
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-07-10 15:39:12 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-07-31 12:07:37 -0700
commitd6f54b711f64b42f9c4e53f5071a65bef9750f89 (patch)
treee910934a04d92f13a7c994e624f8b8ea9256de9d /extra/usb_power
parent143f2808ec04f3fb66b7d5821ec554f41993a7a8 (diff)
downloadchrome-ec-d6f54b711f64b42f9c4e53f5071a65bef9750f89.tar.gz
rollback: Add host command to add entropy
To generate a new secret, we add entropy (generated from local HW TRNG) to the existing secret (sha256(old secret || entropy)). This essentially re-keys the EC. On STM32H7, erasing rollback flash block can take up to 4 seconds, which exceeds the timeout of a normal host command. Therefore, ADD_ENTROPY command is asynchronous (adding the entropy itself is performed in a deferred hook), and its status must be checked repeatedly by the host. In some cases, it is critical that the old key is not left in the backup rollback block(s). For this purpose, we add a special action ADD_ENTROPY_RESET_ASYNC that adds entropy multiple times, until all the rollback blocks have been overwritten. BRANCH=none BUG=b:111190988 TEST=EC> rollbackinfo DUT> ./ectool --name=cros_fp reboot_ec RO && \ sleep 0.3 && ./ectool --name=cros_fp addentropy EC> rollbackinfo => See that that a single rollback block has been overridden TEST=Repeat with ./ectool --name=cros_fp addentropy reset => See that both rollback blocks have been overridden Change-Id: I3058b0a91591fab543ba6890f7356e671016edfa Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1132826 Reviewed-by: Nicolas Norvez <norvez@chromium.org>
Diffstat (limited to 'extra/usb_power')
0 files changed, 0 insertions, 0 deletions