Skip to content

Add server.migrateSetupFromV3 to convert opaque-ke v3 setups to v4 - #189

Open
bochaco wants to merge 1 commit into
serenity-kit:mainfrom
bochaco:feat-server-setup-upgrade
Open

Add server.migrateSetupFromV3 to convert opaque-ke v3 setups to v4#189
bochaco wants to merge 1 commit into
serenity-kit:mainfrom
bochaco:feat-server-setup-upgrade

Conversation

@bochaco

@bochaco bochaco commented Aug 28, 2026

Copy link
Copy Markdown

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.

migrateSetupFromV3 converts a serverSetup from any pre-1.0 release (0.8.2 through 0.9.x, all on opaque-ke 3.x — confirmed via pinned dependencies) into the format 1.x+ requires (opaque-ke 4.x). It's a re-encoding, not a rotation: the OPRF seed and real AKE private key pass through unchanged, so existing registrationRecord's keep working with no changes of their own.

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.
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.

1 participant