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

fix: safely handle nonces as 64 bit uints #118

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

wemeetagain
Copy link
Member

Resolves #102

  • Remove references to "uint32", which isn't in the spec and was misleading
  • Check for a "max nonce" (Number.MAX_SAFE_INTEGER) when encrypting/decrypting
  • Add comments describing the deviation from the spec, why it exists, and its effect

@codecov-commenter
Copy link

codecov-commenter commented Dec 2, 2021

Codecov Report

Merging #118 (5f945a0) into master (61251ed) will decrease coverage by 0.02%.
The diff coverage is 90.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #118      +/-   ##
==========================================
- Coverage   89.13%   89.11%   -0.03%     
==========================================
  Files          16       16              
  Lines        1831     1846      +15     
  Branches      243      245       +2     
==========================================
+ Hits         1632     1645      +13     
- Misses        199      201       +2     
Impacted Files Coverage Δ
src/handshakes/abstract-handshake.ts 93.59% <90.47%> (-0.56%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 61251ed...5f945a0. Read the comment docs.

dapplion
dapplion previously approved these changes Dec 3, 2021
@wemeetagain wemeetagain merged commit a462844 into master Jan 6, 2022
@wemeetagain wemeetagain deleted the fix/improper-nonce-handling branch January 6, 2022 20:10
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.

Improper nonce handling
3 participants