Skip to content

perf(crypto): reuse the key for consecutive operations - #65401

Draft
RobinDev wants to merge 1 commit into
nextcloud:masterfrom
RobinDev:perf/crypto-key-reuse
Draft

RobinDev wants to merge 1 commit into
nextcloud:masterfrom
RobinDev:perf/crypto-key-reuse

Conversation

@RobinDev

Copy link
Copy Markdown

Passwords decrypts six fields with the same key. PBKDF2 is repeated for each field and took 91–94% of hydration/decryption time in our measurement.

Reuse the current AES key while its input is unchanged. Keep one fingerprint per instance; retain per-field IV and HMAC checks and the existing ciphertext formats.

  • Synthetic benchmark: 342 revisions, 2,052 → 342 derivations; all plaintext checks pass.
  • Tests: 21 tests, 111 assertions pass on SQLite; coding style check passes.

Draft pending human review and DCO sign-off. Assisted by Codex (GPT-6).

This branch has not been deployed

No deployments
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