Add server.migrateSetupFromV3 to convert opaque-ke v3 setups to v4 - #189
Open
bochaco wants to merge 1 commit into
Open
Add server.migrateSetupFromV3 to convert opaque-ke v3 setups to v4#189bochaco wants to merge 1 commit into
bochaco wants to merge 1 commit into
Conversation
Upgrading past opaque-ke 4.0.0 (opaque 1.0.0+) breaks deserialization of serverSetup values created under 3.x, since the dummy-user record's encoding changed from a private key to the corresponding public key. This adds a migration function (and matching CLI command) that re-encodes an old setup in place, preserving the real OPRF seed and AKE key so existing registrationRecords keep working unmodified. Trims incidental whitespace from the input since it's typically pasted in from a shell or config file.
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.
Upgrading past opaque-ke 4.0.0 (opaque 1.0.0+) breaks deserialization of serverSetup values created under 3.x, since the dummy-user record's encoding changed from a private key to the corresponding public key. This adds a migration function (and matching CLI command) that re-encodes an old setup in place, preserving the real OPRF seed and AKE key so existing registrationRecords keep working unmodified. Trims incidental whitespace from the input since it's typically pasted in from a shell or config file.
migrateSetupFromV3converts aserverSetupfrom any pre-1.0 release (0.8.2 through 0.9.x, all onopaque-ke3.x — confirmed via pinned dependencies) into the format 1.x+ requires (opaque-ke4.x). It's a re-encoding, not a rotation: the OPRF seed and real AKE private key pass through unchanged, so existingregistrationRecord's keep working with no changes of their own.