Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sharded counter for nonces #11422

Open
DemiMarie opened this issue Jan 1, 2021 · 1 comment
Open

Use sharded counter for nonces #11422

DemiMarie opened this issue Jan 1, 2021 · 1 comment
Labels
Component: Encryption "native encryption" feature Type: Feature Feature request or new feature

Comments

@DemiMarie
Copy link

Describe the feature would like to see added to OpenZFS

I would like to see OpenZFS use a sharded counter for encryption. This can be implemented by using a CPU-local 32-bit counter for the least significant bits. When it overflows, a global counter is atomically incremented, and the new value is used for the most significant bits.

How will this feature improve OpenZFS?

Currently, OpenZFS uses a random nonce for every encryption. This forces it to rotate keys frequently, and still risks nonce reuse in certain scenarios. This allows guaranteeing that nonces will never be reused, which means that keys only need to be derived once.

Additional context

This would allow AES-GCM to replace AES-CCM as the default encryption method.

@DemiMarie DemiMarie added the Type: Feature Feature request or new feature label Jan 1, 2021
@ahrens
Copy link
Member

ahrens commented Jan 4, 2021

@tcaputi could you comment on how significant this improvement would be?

@rincebrain rincebrain added the Component: Encryption "native encryption" feature label Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Encryption "native encryption" feature Type: Feature Feature request or new feature
Projects
None yet
Development

No branches or pull requests

3 participants