mcuboot
mcuboot copied to clipboard
bootutil: Refactor encrypted.c to have the same logic as image_validate
Currently encrypted.c contains all the implementation of the functions inside enc_key.h for each configuration (RSA, EC256 and X25519).
The purpose of this pr is to adopt a logic similar to the file organization of image_validate to make it easier to add other configurations.
Note: I'm not satisfied with the current state of fake_rng because it loses its static attribute. I think putting it in encrypted_priv.h could solve this issue but I'm not sure if it is a good way to solve it.
@nvlsianpu , @de-nordic, espressif and zephyr related files are directly affected (new files introoduced) in this change, could you approve this change if you think it won't cause any build issues?
@nvlsianpu , @de-nordic,
espressifandzephyrrelated files are directly affected (new files introoduced) in this change, could you approve this change if you think it won't cause any build issues?
Let me test that with our code for Zephyr.
We lack espressif expert voice, but this is not unique to this PR, and I do not really know how to address this issue.
@nvlsianpu , @de-nordic,
espressifandzephyrrelated files are directly affected (new files introoduced) in this change, could you approve this change if you think it won't cause any build issues?Let me test that with our code for Zephyr. We lack
espressifexpert voice, but this is not unique to this PR, and I do not really know how to address this issue.
I guess we'll definitely have at least some kind of espressif voice if it breaks. 😅
@RaphaelDupont may I ask you to rebase the PR?
New patches have been merged recently and there are conflicting modifications in boot/bootutil/src/encrypted.c.
@RaphaelDupont may I ask you to rebase the PR? New patches have been merged recently and there are conflicting modifications in
boot/bootutil/src/encrypted.c.
The branch is now up-to-date. Do you have other suggestions to make ? Regarding the way some files are included for example.
There is some squashing needed. I do not think that we need "bootutil : Reformat code according to suggestions" commits that look like review fixes on main.
Done
Did you find other issues with this PR ?
I have run encryption and signature tests for ECDSA, RSA and 25519 against latest Zephyr and they seem to boot fine. I am still trying to run test against sdk-nrf.
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.