Skip to content

fix(crypto)!: fingerprint, sid, and verify owners - #78

Open
sephynox wants to merge 2 commits into
fix/audit-phase-9-1from
fix/audit-phase-9-2
Open

sephynox wants to merge 2 commits into
fix/audit-phase-9-1from
fix/audit-phase-9-2

Conversation

@sephynox

@sephynox sephynox commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Finishes typed certificate fingerprints and SKIDs, forces low-s on every verify path that already holds a prehash, and puts mux accept/authorize on one negotiation carrier. Callers can no longer skip SID checks or mint fingerprints from raw digests.

Related Issues

None

Changes Made

  • Mint fingerprints only via Fingerprint::from_certificate
  • Require low-s on CMS, ECIES, frame, and receipt verify
  • Put mux accept and authorize on TransportNegotiation
  • Share expiry checks through validate_expiry_at
  • Drop unused CryptoPolicyError, apply_domain, and Secret FixedTag

Testing

  • make test-all: passes

Breaking Changes

  • Fingerprint / Skid are newtypes. Replace [u8; 32] / [u8; 20] aliases
  • Const pin/deny lists take &'static [u8; 32]. Runtime pins take Fingerprint<D>
  • CryptoPolicyError and apply_domain are gone. Map rejects to CertificateValidationError
  • Signature types used with SigningProvider / Frame::verify must implement LowSEncoding

Note

High Risk
Touches authentication-critical paths (signature verification, certificate trust/pinning, handshake receipts, and peer identity) with breaking API changes; incorrect migration could weaken identity binding or accept malleable signatures.

Overview
Introduces typed Fingerprint<D> and Skid for certificate identity, routes trust/pinning/revocation and cluster peer keys through Fingerprint::from_certificate and CertificateTrustStore::to_fingerprint::<Sha3_256>, and centralizes SKID parsing in Skid::parse.

Adds LowSEncoding and threads it through verify_canonical, SigningProvider, frame verify, CMS/ECIES handshake, and session receipts so high-s ECDSA encodings are rejected consistently. EcdsaSignatureVerifier now always requires a matching SignerIdentifier, and signer IDs are built via shared compute_signer_identifier.

Handshake mux negotiation moves onto TransportNegotiation (accept / authorize), replacing the old free functions. Certificate expiry checks share validate_expiry_at. Cleanup removes CryptoPolicyError, apply_domain, and Secret’s FixedTag; X9.63 KDF expansion is deduplicated in X963Sha3_256::expand.

Reviewed by Cursor Bugbot for commit 63decea. Bugbot is set up for automated code reviews on this repo. Configure here.

@sephynox sephynox self-assigned this Sep 18, 2026
@sephynox
sephynox added this pull request to stack #55 September 18, 2026 06:29
@sephynox sephynox added the bug Something isn't working label Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant