Add SecurityTier enum and PBKDF2 key derivation to crypto module#7
Draft
Copilot wants to merge 3 commits into
Draft
Add SecurityTier enum and PBKDF2 key derivation to crypto module#7Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
Agent-Logs-Url: https://github.com/ropeadope62/zeroenv/sessions/83f58a8b-035d-4ee9-85d3-846d84e2611b Co-authored-by: ropeadope62 <26491441+ropeadope62@users.noreply.github.com>
…and tests Agent-Logs-Url: https://github.com/ropeadope62/zeroenv/sessions/83f58a8b-035d-4ee9-85d3-846d84e2611b Co-authored-by: ropeadope62 <26491441+ropeadope62@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add SecurityTier enum and PBKDF2 key derivation in crypto module
Add SecurityTier enum and PBKDF2 key derivation to crypto module
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ZeroEnvCryptolacked a typed security tier abstraction and required callers to pre-derive keys externally. This adds first-class tier support directly on the class, along with salt serialization helpers.crypto.pySecurityTier(str, Enum)—standard | enhanced | max; inheritsstrso existing string-based callers are unaffectedZeroEnvCrypto.__init__— now accepts optionaltierandsalt; standard tier (default) is a no-op derivation, preserving backward compatibility_derive_key()— private instance method; delegates to existingderive_key()static method using instance statesalt_to_string()/string_to_salt()— base64 encode/decode pair for salt persistence, parallel to existingkey_to_string()/string_to_key()test_crypto.pyTestSecurityTierEnum— enum values, string equality, construction from valueTestZeroEnvCryptoInitWithTier— per-tier init, missing-salt error paths,SecurityTierenum acceptance, encrypt/decrypt roundtrips, cross-tier incompatibilityTestSaltConversionMethods— type checks, roundtrip equality, valid base64 output