-
Notifications
You must be signed in to change notification settings - Fork 772
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
[sival/aes] Add AES Interrupt Encryption tests #24572
Conversation
a19f20c
to
ac6bdc1
Compare
79f90e7
to
4b6f2e1
Compare
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.
Can you add review / commit comments explaining what overall scenario this test tests? I don't suppose there's a testplan testpoint to reference?
|
||
OTTF_DEFINE_TEST_CONFIG(); | ||
|
||
status_t execute_test(void) { |
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.
As this function returns status_t
, you can replace all instances of CHECK_DIF_OK
by TRY
, which would make the code cleaner in my opinion.
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.
Ideally, I want the test code to report FAILURE & abort if the value doesn't get readout correctly , hence using CHECK_DIF_OK
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.
The final result would be the same, TRY
would return immediately and then the callee would abort by using CHECK_STATUS_OK
.
9612844
to
58843a0
Compare
|
58843a0
to
eb2cabc
Compare
@luismarques @engdoreis, Gentle ping on reviewing this PR. I already incorporated the changes from your feedback and waiting for functional checks on the test code (from AES folks) |
Hi @nasahlpa, can you take a look at the test implementation to ensure it matches the intended test point description? Thanks! |
Could you please add the description to the git commit itself? Currently, no description is available in the git commit message. Furthermore, the contributing guideline also mentions that a subject tag should be added to the git commit message. |
The git commit has restrictions on word limit, if I include the entire link, i will run out of the world limit and won't be able to commit successfully. |
Understood. But you could add something like this:
For the header of the git commit message you could use:
|
Thanks Pascal. I will incorporate these changes in the commit message now!
…On Tue, Oct 8, 2024 at 11:24 PM Pascal Nasahl ***@***.***> wrote:
Understood. But you could add something like this:
This commit implements the chip_sw_aes_interrupt_encryption test that is defined in the chip testplan. The purpose of this test is to check, whether an AES encryption can be interrupted and restored.
For the header of the git commit message you could use:
[sival/aes] Add AES interrupt encryption test
—
Reply to this email directly, view it on GitHub
<#24572 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BJEK24Y6LO2262A62JNS7SLZ2TD3VAVCNFSM6AAAAABOFTOFTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBRGQYTOMJSGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
eb2cabc
to
88ea80a
Compare
Just updated the PR with the commit messages as suggested! |
Thanks! Would you mind looking into the review comments I've added? Especially the question regarding the decryption should be addressed. |
Hi @nasahlpa, I wasn't able to find your comments. Can you double check if they were sent? Thanks |
Oh sorry, now the comments should be public. |
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.
I suggest the following message for the commit 2:
[test, aes] Clean-up log message.
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.
I would also squash the commit number 3 with the previous.
d319b9a
to
054662f
Compare
This commit implements the chip_sw_aes_interrupt_encryption test that is defined in the chip testplan. The purpose of this test is to check, whether an AES encryption can be interrupted and restored. Tue Oct 22 Incorporated the changes suggested by reviewers and added AES modes (CFB-128, OFB, CTR) called out in the test plan Tue Oct 23 Fixed lint errors Signed-off-by: Ramesh Prakash <[email protected]>
054662f
to
26591f0
Compare
memcpy(iv.iv, &iv_encrypt1, sizeof(iv.iv)); | ||
transaction.manual_operation = kDifAesManualOperationAuto; | ||
|
||
// "Convert" key share byte arrays to `dif_aes_key_share_t`. |
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.
I think this is not necessary as key
should still contain the key used for the first two blocks?
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.
Thanks @rprakas-gsc for changing the code based on the feedback. Apart from a small nit this PR looks good to me.
Maybe @engdoreis could have another look.
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.
Thanks for the changes.
Successfully created backport PR for |
@moidx Checking in aes_interrupt_encryption_test.c code and modified the BUILD to include this test.