forked from lowRISC/opentitan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[hsmtool] Support sign/verify over input slices
To facilitate signing of ownership-related requests (e.g. signing the owner config and the unlock/activate commands), give hsmtool the ability to act on slices of the input. 1. Add the capability to sign and verify over a slice of the input file. 2. Add the capability to update the input file in place. Example: Sign an owner config. - The `format` is a plain-text slice from bytes 0..0x7a0 of the input file. - The signature should be updated in place at bytes 0x7a0..0x7e0 of the input file. ``` hsmtool -t token -u user -p 123456 \ ecdsa sign --label owner_key \ --format slice:0..0x7a0 \ --update-in-place 0x7a0..0x7e0 \ owner_config.bin ``` Example: Verify the previously signed owner config. ``` hsmtool -t token -u user -p 123456 \ ecdsa verify --label owner_key \ --format slice:0..0x7a0 \ --signature-at 0x7a0..0x7e0 \ owner_config.bin ``` Signed-off-by: Chris Frantz <[email protected]> (cherry picked from commit 60a2517)
- Loading branch information
Showing
6 changed files
with
151 additions
and
15 deletions.
There are no files selected for viewing
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
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
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
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
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
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