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

Add Better Zero Key Checks #9022

Merged
merged 3 commits into from
Jun 11, 2021
Merged

Add Better Zero Key Checks #9022

merged 3 commits into from
Jun 11, 2021

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented Jun 11, 2021

What type of PR is this?

Cleanup

What does this PR do? Why is it needed?

  • Removes unneeded padding when marshalling the secret key.
  • Use custom zero key check.

Which issues(s) does this PR fix?

N.A

Other notes for review

@nisdas nisdas requested a review from a team as a code owner June 11, 2021 11:33
@codecov
Copy link

codecov bot commented Jun 11, 2021

Codecov Report

Merging #9022 (3b4897e) into develop (6981b16) will decrease coverage by 0.01%.
The diff coverage is 60.00%.

@@             Coverage Diff             @@
##           develop    #9022      +/-   ##
===========================================
- Coverage    60.90%   60.88%   -0.02%     
===========================================
  Files          531      531              
  Lines        37609    37607       -2     
===========================================
- Hits         22905    22897       -8     
- Misses       11430    11437       +7     
+ Partials      3274     3273       -1     

return s.p.Equals(zeroKey)
// IsZero checks if the secret key is a zero key. This returns
// an uint8 which can either be 0 or 1.
func IsZero(sKey []byte) uint8 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not return a boolean?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed back

@rauljordan rauljordan merged commit fb08014 into develop Jun 11, 2021
@rauljordan rauljordan deleted the haveBetterZeroChecks branch June 11, 2021 18:49
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.

3 participants