Add detached signed digest support for ISO boot verification #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements support for detached signed digests in the ISO boot verification system, enabling Heads to work with standard Linux distribution digest formats while maintaining full backward compatibility.
Problem
Currently, Heads only supports direct ISO signature verification (signing the entire ISO file). However, major Linux distributions commonly use detached signed digests where:
Solution
Enhanced
initrd/bin/kexec-iso-initto support multiple detached digest formats:Supported Formats
1. Standard per-file formats:
file.iso.sha256+file.iso.sha256.sigfile.iso.sha1+file.iso.sha1.sigfile.iso.md5+file.iso.md5.sig2. Ubuntu/Debian style:
SHA256SUMS+SHA256SUMS.gpgSHA1SUMS+SHA1SUMS.gpgMD5SUMS+MD5SUMS.gpg3. Arch Linux style:
sha256sums.txt+sha256sums.txt.sig4. Signature extensions:
.sig(standard).asc(ASCII armored).gpg(binary GPG signatures)Implementation Details
The verification process now:
Example Usage
For Ubuntu ISOs:
For Arch Linux ISOs:
Benefits
✅ Smaller signature files - digest files are much smaller than full ISOs
✅ Faster verification - no need to read entire ISO during signature verification
✅ Standard compliance - follows common Linux distribution practices
✅ Backward compatibility - existing signed ISOs continue to work unchanged
✅ Multiple algorithms - supports SHA256, SHA1, and MD5 for flexibility
✅ Secure - maintains same GPG verification using existing distro keys
Security
/etc/distro/The implementation adds 111 lines of verification logic while maintaining full backward compatibility with existing functionality.
Fixes #28.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.