Skip to content

Changes to the crypto unit state machine: added register ensuring constant-time execution#33

Merged
jovanbulck merged 4 commits intosancus-tee:masterfrom
rubenvdijck:unwrap-timing-fix
May 19, 2025
Merged

Changes to the crypto unit state machine: added register ensuring constant-time execution#33
jovanbulck merged 4 commits intosancus-tee:masterfrom
rubenvdijck:unwrap-timing-fix

Conversation

@rubenvdijck
Copy link
Copy Markdown
Contributor

See write up for full explanation.
The cryptographic unit uses comparison in hardware to check the tag of sancus_unwrap. The state machine used for this verification process leaks information through a timing side-channel.
To addres this issue, I have made the comparison constant time by adding a register to keep track of the result of the comparison!
Other solution considered: adding dummy states.
pullrequest.pdf

@rubenvdijck
Copy link
Copy Markdown
Contributor Author

Updated the pull request to also mitigate the enable timing leak.

@martonbognar martonbognar changed the title Changes to the crypto unit state machine: added register ensuring cst time. Changes to the crypto unit state machine: added register ensuring constant-time execution May 13, 2025
@jovanbulck jovanbulck merged commit b6b53bb into sancus-tee:master May 19, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants