8000 security(cre-hmac): strengthen credential revocation guards, constant-time checks, and memory zeroization by mozluk · Pull Request #1 · DUCAT-UNIT/cre-hmac · GitHub
[go: up one dir, main page]

Skip to content

security(cre-hmac): strengthen credential revocation guards, constant-time checks, and memory zeroization - #1

Open
mozluk wants to merge 1 commit into
DUCAT-UNIT:mainfrom
mozluk:mozluk-patch-1
Open

mozluk wants to merge 1 commit into
DUCAT-UNIT:mainfrom
mozluk:mozluk-patch-1

Conversation

@mozluk
@mozluk mozluk commented Oct 13, 2026
Copy link
Copy Markdown

Summary of Changes

Implements key security enhancements and hardening for the cre-hmac cryptographic threshold execution motor:

  • Revoked Credential Guards (crypto.go):

    • Integrated one-way SHA-256 fingerprints (revokedOraclePrivateKeySHA256, revokedChainlinkClientSecretSHA256) and revoked Schnorr public identity checks (RevokedOracleSchnorrPubkey) to reject historically exposed credentials at runtime without storing raw secrets in the source tree[cite: 19].
  • Constant-Time Verification (crypto.go):

    • Utilized subtle.ConstantTimeCompare across all fingerprint and identity validation paths (ValidateOraclePrivateKeyNotRevoked, ValidateClientSecretNotRevoked, ValidateSchnorrPubkeyNotRevoked, VerifyThresholdCommitment) to prevent timing side-channel attacks[cite: 19].
  • Memory Zeroization Enforcement (crypto.go):

    • Ensured secure memory wiping via zeroBytes and defer patterns across all sensitive key material handlers, including KeyDerivation.Zero(), GetTholdKey(), and CreatePriceContract()[cite: 19].
  • Testing & Vectors (crypto_test.go, secrets.yaml):

    • Added comprehensive test suites verifying revoked credential guards, signature malleability resistance, and cross-implementation vector alignment[cite: 20].
    • Maintained structured configuration schemas in secrets.yaml for environment secret mappings[cite: 21].

Affected Files

  • crypto/crypto.go[cite: 19]
  • crypto/crypto_test.go[cite: 20]
  • secrets.yaml[cite: 21]

Verification

  • Ran all unit tests and cryptographic vector verifications successfully (go test -v ./crypto/...).

…-time checks, and memory zeroization

### Summary of Changes
Implements key security enhancements and hardening for the `cre-hmac` cryptographic threshold execution motor:

- **Revoked Credential Guards (`crypto.go`):**
  - Integrated one-way SHA-256 fingerprints (`revokedOraclePrivateKeySHA256`, `revokedChainlinkClientSecretSHA256`) and revoked Schnorr public identity checks (`RevokedOracleSchnorrPubkey`) to reject historically exposed credentials at runtime without storing raw secrets in the source tree[cite: 19].

- **Constant-Time Verification (`crypto.go`):**
  - Utilized `subtle.ConstantTimeCompare` across all fingerprint and identity validation paths (`ValidateOraclePrivateKeyNotRevoked`, `ValidateClientSecretNotRevoked`, `ValidateSchnorrPubkeyNotRevoked`, `VerifyThresholdCommitment`) to prevent timing side-channel attacks[cite: 19].

- **Memory Zeroization Enforcement (`crypto.go`):**
  - Ensured secure memory wiping via `zeroBytes` and `defer` patterns across all sensitive key material handlers, including `KeyDerivation.Zero()`, `GetTholdKey()`, and `CreatePriceContract()`[cite: 19].

- **Testing & Vectors (`crypto_test.go`, `secrets.yaml`):**
  - Added comprehensive test suites verifying revoked credential guards, signature malleability resistance, and cross-implementation vector alignment[cite: 20].
  - Maintained structured configuration schemas in `secrets.yaml` for environment secret mappings[cite: 21].

### Affected Files
- `crypto/crypto.go`[cite: 19]
- `crypto/crypto_test.go`[cite: 20]
- `secrets.yaml`[cite: 21]

### Verification
- Ran all unit tests and cryptographic vector verifications successfully (`go test -v ./crypto/...`).
@coderabbitai
coderabbitai Bot commented Oct 13, 2026
Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4069302a-e70e-4d4e-b54c-07014bf7f0ff
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0