rpi-fw-crypto: can the dependency on GnuTLS be optional instead?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- c
- Domain
- embedded-iot
Research direction
Read the rpi-fw-crypto implementation, especially the sign command's hash_file() and the hmac command used by the initramfs; the issue names no source files or tests. Check how the binary links to GnuTLS and whether that dependency can be made optional for hmac. Done means hmac works without GnuTLS while sign retains its required hashing behavior.
Written by the indexing model from the issue text.
Description
Hi,
The initramfs that rpi-image-gen builds with the rpi-idp-luks2 layer runs rpi-fw-crypto hmac to unlock LUKS2. Because rpi-fw-crypto links against GnuTLS, the initramfs also has to carry GnuTLS and its dependencies: 2.28 MB at zstd -19, close to 25% of my small initramfs test. GnuTLS is only used by sign (in hash_file()), but the binary won’t load without it, even for hmac.
I saw that #203 was closed because GnuTLS is used elsewhere in RPi OS. In my initramfs, though, rpi-fw-crypto appears to be its only user, in this particular configuration I am testing.
The use case I’m considering is reducing churn in the generated boot.img, which affects OTA transfer size where those matters. I suppose the counterargument is that I could simply pin the package versions instead of always pulling the latest via apt.
- Dominant language
- C
- Stars
- 351
- Forks
- 105
- Avg merge
- 22h 19m
- Merged PRs (30d)
- 9
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/utils
-
Compiler error (gcc-16.1.1) about vcgencmd with strncatPossibly taken @popcornmix claimed this 47 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/utils#197 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
raspberrypi/utils#159 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
raspberrypi/utils#133 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
raspberrypi/utils#131 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
raspberrypi/utils#124 · 1 comment · 1 reaction ·
All issues in raspberrypi/utils
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
LedgerHQ/app-bitcoin-legacy#306 ·
-
[issue]: Ventoy2Disk.sh can leave the end of VTOYEFI unwritten (xzcat | dd without iflag=fullblock)Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
prusa3d/Prusa-Firmware-Buddy#5629 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 3 days
-
Issue PRL on WindowsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day