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

fix: improved encryption key handling #5027

Merged

Conversation

AaronFeickert
Copy link
Collaborator

Description

Improves handling of database encryption keys.

Motivation and Context

A recent PR hardens the codebase's handling of encrypted database fields. It stores the derived key used for encryption as a Zeroizing array.

This work changes the key type to be a Hidden wrapper of a SafeArray, which prevents unintended output of the key and tries to prevent copies and moves.

How Has This Been Tested?

Existing tests pass.

@AaronFeickert AaronFeickert force-pushed the key-handling-fixes branch 3 times, most recently from ea695fd to c0c69ed Compare December 13, 2022 15:52
sdbondi
sdbondi previously approved these changes Dec 14, 2022
Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@stringhandler stringhandler merged commit b2bed79 into tari-project:development Jan 3, 2023
@AaronFeickert AaronFeickert deleted the key-handling-fixes branch January 3, 2023 15:27
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.

None yet

4 participants