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

Simplify verification and secure_cmp interfaces #97

Closed
brycx opened this issue Sep 9, 2019 · 1 comment · Fixed by #102
Closed

Simplify verification and secure_cmp interfaces #97

brycx opened this issue Sep 9, 2019 · 1 comment · Fixed by #102
Labels
breaking change A breaking change

Comments

@brycx
Copy link
Member

brycx commented Sep 9, 2019

As pointed out in issue #92 raised by @snsmac, both verify() and secure_cmp currently return Result<Ok(bool), UknownCryptoError>.

Returning a bool is however redundant, as the verification or comparison only will return Ok() if it was successfull and UknownCryptoError if not. If a user needed a bool to represent the result, this could be done with .is_ok()/.is_err().

Because of this, it seems it would make sense to change secure_cmp and all verify() interfaces in orion to return Result<(), UknownCryptoError>, dropping the needless bool.

Before doing so, these new interfaces should be tested in orion-dudect for constant-time execution.

@brycx
Copy link
Member Author

brycx commented Oct 6, 2019

Testing on different platforms has not shown any issues with constant-time execution, when switching to the verification described above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A breaking change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant