-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
EC keys support #1194
EC keys support #1194
Conversation
@Unb0rn added kernel config changes to other linux configs in tree master...tlaurion:heads:Unb0rn_ecc_fix_other_kernels Building under CI: https://app.circleci.com/pipelines/github/tlaurion/heads/1104/workflows/8658584e-7d35-41d7-afc3-bc070c0e3e6e/jobs/8150
|
@tlaurion yeah, the only question-is it a good idea to add ssse3 versions of sha2 or just regular? Is the speed improvement worth the size (and does it make a big difference?) |
@Unb0rn no clue unless tested. :) The size increase is a desired comparison point in PR from people watching PR for references. It would be nice to add here. Kernel and initrd are being xzipped. But we can do a quick compare between free space available in the output of coreboot build. Space consideration is important for legacy boards, which is what I tend to check for. We are really tight on space there, and I have no clue yet on the cost of the addition, CI build will tell. As for performance, on Heads use case, gpg is normally not used for things requiring big check-summing operations. Would be nice to do some quick benchmarks here, but as you point out, adding kernel sha512 support is the need thing here for ECC, where removing the binding to only sha256 in kexec-signing was the required thing (unless it causes regression). |
From last master's commit Board build output for x230-hotp-maximized board:
From my PR including linux-x230-maximized.config changes for comaprison CI board build's log:
We lost 4361880 - 4353176 = 8704 bytes, not really a concern, I think (that is bzImage related changes, compressed with xz). The changes encompasses both sha256sum and sha512sum being sse3 and while not removing non sse3 versions. This explains the size increase. |
@Unb0rn Do you witness any improvement in your tests with sse3 support ? |
Yeah I got this when I tried to include btrfs support in kernel =) Size is everything now. BTW, doesn't I haven't tried benchmarking ssse3 vs standard sha2, just selected HW-accelerated ones =) |
As stated under linuxboot/heads-wiki#89 the proper way to get real config changes is to see what a change in config results when loading that config (make menuconfig) and saving that config. Then doing a make savedefconfig and moving that config over origin will tell what are the changes related to defconfig (which is what is currently saved under Heads tree (will change in the future, this is too complicated. To sum it up, for both 4.14 and 5.10, the real .config (as what will be compiled when compiling kernel)
But when doing make savedefconfig
|
And yet again we include in kernel stuff that are unrelated to the actual architecture (x86)....
But all of this is for another issue and is unrelated here. Also, the wrapper involved in XZ compression can be found under scripts/xz_wrap.sh, which is default (-6) Might be interesting for #590, still. |
EC signatures requires that the digest has the corresponding length. Removing the hardcoded sha2-256 hash function and adding support of sha2-384 and sha2-512 should allow using EC crypto.
@JonathonHall-Purism I guess you should approve prior of me merging |
@JonathonHall-Purism anything against this? |
Looks good to me 💯 I tested this on the Librem 14 - double checked that OEM reset still uses the same default algorithms, manually generated an ECC key and verified functionality, switched between the current PureBoot release and this PR build to verify compatibility (with RSA keys of course). No problems, merge away 🚢 |
Might break builds for x220 non maximized (using linux-x230-legacy.conf) which is not built by CI. Will build and report back. |
EC signatures require the corresponding digest length. Enabling gpg to auto select the algo and supporting those algos in kernel should fix #1066