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

Extend RSA-PSS examples. #346

Closed
duesee opened this issue Jan 23, 2023 · 5 comments · Fixed by #425
Closed

Extend RSA-PSS examples. #346

duesee opened this issue Jan 23, 2023 · 5 comments · Fixed by #425
Labels
documentation 🗒 Improvements or additions to documentation help wanted Extra attention is needed

Comments

@duesee
Copy link
Contributor

duesee commented Jan 23, 2023

The examples do not consider the case of broken keys.

@duesee duesee self-assigned this Jan 24, 2023
@duesee duesee removed their assignment Apr 27, 2023
@ma-ilsi
Copy link
Contributor

ma-ilsi commented Sep 4, 2023

The example in the docs, correct?

@franziskuskiefer franziskuskiefer changed the title Fix RSA-PSS examples. Extend RSA-PSS examples. Sep 4, 2023
@franziskuskiefer
Copy link
Member

Yes, the examples in the docs. They are generally correct. But they could be extended to deal with incorrect keys.
Are you interested in working on this @ma-ilsi ?

@franziskuskiefer franziskuskiefer added documentation 🗒 Improvements or additions to documentation help wanted Extra attention is needed labels Sep 4, 2023
@ma-ilsi
Copy link
Contributor

ma-ilsi commented Sep 4, 2023

Are you interested in working on this @ma-ilsi ?

Yup. I'll take it on.

@ma-ilsi
Copy link
Contributor

ma-ilsi commented Sep 6, 2023

Looking at tests/rsapss.cc, it seems a comparison of skey and pkey against NULL (similar to the sign and verify bool checks) will get the message across and make the API reference example clearer.
Apart from that, the load_skey/pkey functions' return values in the docs currently only specify that a pointer to the key is returned. It should also specify that NULL will be returned if parameters are deemed invalid (broken key).

That's my reading of the issue, did I miss something? If my understanding is clear I can PR soon and we'll review.

@franziskuskiefer
Copy link
Member

That's my reading of the issue, did I miss something? If my understanding is clear I can PR soon and we'll review.

Sounds about right.
Generally, looking at the function in F* with the pre and post conditions (both in comment and code) should be able to tell whether that's all or if you missed something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 🗒 Improvements or additions to documentation help wanted Extra attention is needed
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants