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

SIP-27: BLS-12381 Encryption Key Management for Non Private Key Wallet #27

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

joyqvq
Copy link
Contributor

@joyqvq joyqvq commented May 17, 2024

No description provided.


1. Server holds a master seed.
2. Server defines an endpoint and an authentication scheme. The request contains an unique user ID and an application ID.
3. The server validates and authenticate the request, then responds with an encryption key by deriving it from master seed with domain separator as `sub || app_id` using [HKDF](https://datatracker.ietf.org/doc/html/rfc5869).
Copy link

Choose a reason for hiding this comment

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

Instead of "domain separator", let's use HKDF(ikm=master key, info = sub | app_if)

1. Server holds a master seed.
2. Server defines an endpoint and an authentication scheme. The request contains an unique user ID and an application ID.
3. The server validates and authenticate the request, then responds with an encryption key by deriving it from master seed with domain separator as `sub || app_id` using [HKDF](https://datatracker.ietf.org/doc/html/rfc5869).

Copy link

Choose a reason for hiding this comment

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

HKDF returns a random byte array - Let's say that the output of the HKDF is of length field size + 128 bit -> and the secret key is computed using modulo the field size.

Eis-D-Z
Eis-D-Z previously approved these changes Jun 27, 2024

The algorithm can be applied to BLS-12381 as well as Ristretto group. The field order for for BLS-12381 is defined [here](https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-bls-signature-05) as `52435875175126190479447740508185965837690552500527637822603658699938581184513`.

The `user_id` must be unique to ensure that each user receives a distinct encryption key.
Copy link
Contributor Author

@joyqvq joyqvq Jun 28, 2024

Choose a reason for hiding this comment

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

mention multiple user ids for multiple encryption keys

Copy link
Contributor Author

@joyqvq joyqvq Jun 28, 2024

Choose a reason for hiding this comment

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

encode info as bcs { index, user_id }, add definition

@Eis-D-Z Eis-D-Z changed the title SIP: encryption key server for non private key wallet SIP-27: BLS-12381 Encryption Key Management for Non Private Key Wallet Aug 8, 2024
@Eis-D-Z Eis-D-Z added the active Active SIPs that are either in Draft, Review, Fast Track or Last Call status. label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
active Active SIPs that are either in Draft, Review, Fast Track or Last Call status.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants