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

Accumulate private key using blinding factor when deriving routing keys #2

Open
youngjoon-lee opened this issue Jan 12, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@youngjoon-lee
Copy link
Owner

youngjoon-lee commented Jan 12, 2024

In the current implementation, only an initial ephemeral private key is used to derive the routing keys of all mix nodes in the route.

To make this consistent with https://github.com/nymtech/sphinx, an initial ephemeral private key must be accumulated for each mix node using a blinding factor.
https://github.com/nymtech/sphinx/blob/ca107d94360cdf8bbfbdb12fe5320ed74f80e40c/src/header/keys.rs#L128-L128

At the same time, we must blind the shared key when deriving a shared public key to unwrap a SphinxHeader.
https://github.com/nymtech/sphinx/blob/ca107d94360cdf8bbfbdb12fe5320ed74f80e40c/src/header/mod.rs#L236-L236
If not, the first mix node can unwrap all remaining layers using the same shared key.

@youngjoon-lee youngjoon-lee added the enhancement New feature or request label Jan 12, 2024
@youngjoon-lee youngjoon-lee self-assigned this Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant