cockroachdb / cockroachdb/cockroach

backup: unify online restore's encryption scheme with pebble's EAR

Open
#170,550 1 comment 0 reactions 1 assignee Claimed by @andrew-r-thomas View on GitHub
A-disaster-recovery C-enhancement T-disaster-recovery
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Currently, `BACKUP`/`RESTORE` uses a bespoke AES-GCM chunked encryption scheme for encrypted backups. Given that online restore pushes decryption work into pebble at download time, there is an opportunity to unify our scheme with pebble's native encryption-at-rest functionality.

Some differences between the schemes that will impact considerations here:
- pebble's EAR uses AES-CTR, depending on the compatibility story we want to support, we will either need to teach pebble how to decrypt AES-GCM schemes, or adjust our backup scheme to use the CTR variant
- backup/restore encryption uses 64kb chunks, we should potentially make our chunk size smaller (closer to 4 or 8 kb) for optimal usage by pebble. This has the added benefit of making small point reads during the download phase more performant.

Additionally, the work done in https://github.com/cockroachdb/cockroach/issues/161169 will likely impact the decisions we make here.

Jira issue: CRDB-64067

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.