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

ed: Removed warning in docs for VerifyingKey::from_bytes #653

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

Conversation

rozbb
Copy link
Contributor

@rozbb rozbb commented May 10, 2024

There was a big warning in VerifyingKey::from_bytes that said the user is responsible for ensuring that the provided bytes represent a verifying key. I think this was confusing, since the function returns a Result that clearly reflects this possible error mode. I've fixed up the wording in the docs.

@rozbb rozbb requested a review from tarcieri May 10, 2024 10:38
@pinkforest
Copy link
Contributor

Wouldn't this lose the information what actually the byte string input represents and constructor here is not fallible:

 let compressed = CompressedEdwardsY(*bytes);

Only the decompress is fallible but isn't it too late and makes figuring out what the correct bytes input hard/er ?

@tarcieri
Copy link
Contributor

I think the old warning was kind of bad (point decompression ensures a valid curve point), but it might be good to replace that note with one that it's using the ZIP-215 rules, since the point validation rules being applied have been a source of confusion in the past (see #380, #623)

@Genio40921

This comment was marked as spam.

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.

5 participants