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

Computation of note sk in owns is repeated #246

Closed
moCello opened this issue Sep 18, 2024 · 0 comments · Fixed by #247
Closed

Computation of note sk in owns is repeated #246

moCello opened this issue Sep 18, 2024 · 0 comments · Fixed by #247

Comments

@moCello
Copy link
Member

moCello commented Sep 18, 2024

Summary

Call gen_note_sk in owns method when checking the ownership.

Detailed Description

From the audit:

In 'phoenix/core/src/keys/secret.rs', the method owns computes whether or not a given note public key corresponds to an owned private key. The first 3 lines compute the note secret key, which are also implemented in the method gen_note_sk. It would be advised to not repeat code and instead use the gen_note_sk method to compute the note secret key, and then retrieving the value out of the generated struct for further computation. This will increase readability and reduce potential error if this logic needs changing or fixing.

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 a pull request may close this issue.

1 participant