-
Notifications
You must be signed in to change notification settings - Fork 950
[otbn] Add masking accelerator interface to OTBN simulator #29109
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
base: master
Are you sure you want to change the base?
Changes from all commits
6667371
95005ae
f34a664
eac4fd0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -109,3 +109,49 @@ | |
| 255-64: | | ||
| Write: Words 1-3 of the message share. | ||
| Read: Returns `0`. Digest shares are read out via the least significant word only. | ||
|
|
||
| - name: mai_res_s0 | ||
| address: 10 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No big deal, but was there a problem with addresses 8 and 9?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 8 and 9 are already reserved for the new KMAC interface. See #29025 . This KMAC interface also has many overlapping stuff, so maybe worth looking at it as well.. |
||
| read-only: true | ||
| doc: | | ||
| This WSR holds share 0 of the masked results produced by the MAI. | ||
| The results are organized as eight 32-bit values. | ||
| Results are valid when MAI is not busy anymore. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you might need something about when they get invalidated too? (the when the next operation starts?) |
||
| These values are overwritten when the first results of the next execution are available (this depends on the selected accelerator's latency). | ||
|
|
||
| - name: mai_res_s1 | ||
| address: 11 | ||
| read-only: true | ||
| doc: | | ||
| This WSR holds share 1 of the masked results produced by the MAI. | ||
| The results are organized as eight 32-bit values. | ||
| Results are valid when MAI is not busy anymore. | ||
| These values are overwritten when the first results of the next execution are available (this depends on the selected accelerator's latency). | ||
|
|
||
| - name: mai_in0_s0 | ||
| address: 12 | ||
| doc: | | ||
| This WSR transfers share 0 of the first input secrets towards the MAI. | ||
| The inputs are considered as eight 32-bit values. | ||
| Writing to this WSR while MAI is not ready will cause a MAI_ERROR software error. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will there be any effect other than the SW error? (Does the MAI see the write?)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The MAI is tightly integrated into the OTBN. So if there is a SW error, also the MAI will stop working and be cleared/wiped. This needs to be described in the MAI description (todo). |
||
|
|
||
| - name: mai_in0_s1 | ||
| address: 13 | ||
| doc: | | ||
| This WSR transfers share 1 of the first input secrets towards the MAI. | ||
| The inputs are considered as eight 32-bit values. | ||
| Writing to this WSR while MAI is not ready will cause a MAI_ERROR software error. | ||
|
|
||
| - name: mai_in1_s0 | ||
| address: 14 | ||
| doc: | | ||
| This WSR transfers share 0 of the second input secrets towards the MAI. | ||
| The inputs are considered as eight 32-bit values. | ||
| Writing to this WSR while MAI is not ready will cause a MAI_ERROR software error. | ||
|
|
||
| - name: mai_in1_s1 | ||
| address: 15 | ||
| doc: | | ||
| This WSR transfers share 1 of the second input secrets towards the MAI. | ||
| The inputs are considered as eight 32-bit values. | ||
| Writing to this WSR while MAI is not ready will cause a MAI_ERROR software error. | ||
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.
Is this register supposed to have
swaccess: "wo"?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.
No, we should also be able to read the currently set operation back.