Skip to content

Treat passphrases that differ only in HMAC-padded zero bytes as the same key - #32

Merged
LucaCappelletti94 merged 1 commit into
mainfrom
fuzz/hmac-padded-passphrases
Oct 17, 2026
Merged

LucaCappelletti94 merged 1 commit into
mainfrom
fuzz/hmac-padded-passphrases

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Owner

The recent batch run failed in rekey because a sqlcipher database rekeyed from 27 zero bytes to a single zero byte still opened with the old passphrase. PBKDF2's HMAC zero-pads a key shorter than its block, so both passphrases derive the same key, and SQLCipher behaves the same. The harness's key equivalence now ignores trailing zero bytes within the HMAC block, 64 bytes for chacha20 and for sqlcipher with SHA1 or SHA256, 128 for sqlcipher with SHA512 or its default. The failing input joins the rekey corpus.

@coderabbitai

coderabbitai Bot commented Oct 17, 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: Repository: LucaCappelletti94/coderabbit/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 54601d64-1123-402b-975d-886dc4208085
  • 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.

@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b3296c8) to head (22010f0).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #32   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            3         3           
  Branches         3         3           
=========================================
  Hits             3         3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud

Copy link
Copy Markdown

@LucaCappelletti94
LucaCappelletti94 merged commit e81577f into main Oct 17, 2026
26 checks passed
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