You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is currently no supported way to rotate an encryption key. Key rotation is a standard security requirement in compliance frameworks (SOC 2, PCI-DSS, ISO 27001). Without it, a compromised key cannot be remediated without rebuilding the database from scratch.
publicsealedclassKeyRotationOptions{publicboolVerifyAfterRotation{get;init;}=true;// re-read and verify all pagespublicstring?TargetDirectory{get;init;}// null = in-place rotation}
Rabbit Holes
The old key must remain valid until all files are fully rotated and verified.
If rotation fails midway, the original files must be restored — keep originals until rotation is verified.
Never modify files in-place during rotation; always write new files and rename atomically.
No-gos
Online key rotation (while open for writes) is out of scope.
Changing cipher algorithm requires a migration, not a rotation.
This discussion was converted from issue #82 on May 01, 2026 19:42.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem
There is currently no supported way to rotate an encryption key. Key rotation is a standard security requirement in compliance frameworks (SOC 2, PCI-DSS, ISO 27001). Without it, a compromised key cannot be remediated without rebuilding the database from scratch.
Appetite
Medium batch — ~3 days
Solution
New API on
BLiteEngine:Rotation sequence:
newKeyProvider.GetKeyAsync()to obtain the new master keyEncryptionCoordinatorwith the new master keyFileHeadersalt in each new fileKeyRotation; callIKeyProvider.NotifyKeyRotationAsyncRabbit Holes
No-gos
All reactions