https://github.com/ctron/elfsign
Signing elf files, not to be confused with singing elves
https://github.com/ctron/elfsign
Last synced: 8 months ago
JSON representation
Signing elf files, not to be confused with singing elves
- Host: GitHub
- URL: https://github.com/ctron/elfsign
- Owner: ctron
- License: apache-2.0
- Created: 2023-01-12T09:26:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-26T08:25:37.000Z (over 3 years ago)
- Last Synced: 2025-10-06T14:59:26.159Z (8 months ago)
- Language: Rust
- Size: 349 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elfsign
Trying to sign elf files.
## Motivation
You download a binary from the internet, but what is in there? `cargo auditable` can put a dependency list into the
final binary. But anyone could modify this.
Unless, you would sign the binary.
The idea of this PoC is to sign ELF binaries, ensuring that the information inside it was indeed created by the person
who created the binary.
There is a bit of documentation in the [docs/](docs/) folder.
## State
This is a PoC. This is full of bugs and not finished. Also is the content format not stable.
## Usage (the idea)
Sign with Sigstore:
```shell
elfsign sign my-bin my-bin-signed
```
Validate with:
```shell
elfsign verify my-bin-signed
```
## ToDo
* [x] Find a way to add a signature record to the file
* [x] Capture all content subject to signing
* [ ] Check it is really everything
* [ ] Re-iterate over digesting the "program sections" (aka "memory segments")
* [ ] Add more fields from the header
* [x] Add data from `.shstrtab` (minus the `.note.signature.v1` string)
* [x] Implement sign & store
* [ ] Implement re-signing
* [x] Improve storing stuff, this is a mess right now (good for now)
* [ ] Implement verify
* [x] verify the signature
* [x] add the certificate, and allow enforcing policies
* [x] check using "digest" vs "digested signer"
* [ ] allow more options, currently this is highly opinionated towards sigstore and rekor