Add PCF-SIG signing/verification to CLI tooling#20
Merged
Conversation
Introduce a generic `pcf-sig` tool (crate tools/pcf-sig, lib pcf_sig_cli + bin pcf-sig) for signing and verifying any PCF file with PCF-SIG (Ed25519): keygen, incremental sign, verify with optional trust check, and key listing. Signing is incremental by default — partitions already covered by a valid signature from the same key are skipped — with --resign to force. Wire PCF-SIG into the `pfs` CLI: keygen and verify-sig delegate to pcf_sig_cli, and every mutating command (mkfs/mkdir/put/mv/rm/create/update) accepts --key to auto-sign after its commit. Because PFS-MS is append-only with a backward-linked session chain, naively appending signature partitions corrupts the chain. Signing a PFS-MS file is therefore committed as a dedicated signature session (pfs-ms sign_archive), covering content and node records; the generic pcf-sig sign refuses PFS-MS files and points to `pfs sign`. Includes roundtrip/incremental/tamper/refusal tests for both crates, a dedicated CI workflow, release-binary packaging for pcf-sig, and README docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Introduce a generic
pcf-sigtool (crate tools/pcf-sig, lib pcf_sig_cli +bin pcf-sig) for signing and verifying any PCF file with PCF-SIG (Ed25519):
keygen, incremental sign, verify with optional trust check, and key listing.
Signing is incremental by default — partitions already covered by a valid
signature from the same key are skipped — with --resign to force.
Wire PCF-SIG into the
pfsCLI: keygen and verify-sig delegate topcf_sig_cli, and every mutating command (mkfs/mkdir/put/mv/rm/create/update)
accepts --key to auto-sign after its commit.
Because PFS-MS is append-only with a backward-linked session chain, naively
appending signature partitions corrupts the chain. Signing a PFS-MS file is
therefore committed as a dedicated signature session (pfs-ms sign_archive),
covering content and node records; the generic pcf-sig sign refuses PFS-MS
files and points to
pfs sign.Includes roundtrip/incremental/tamper/refusal tests for both crates, a
dedicated CI workflow, release-binary packaging for pcf-sig, and README docs.