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

Replace upper_bound with lower_bound in pgp_s2k #1854

Merged
merged 1 commit into from
Mar 11, 2019

Conversation

evpo
Copy link
Contributor

@evpo evpo commented Mar 10, 2019

Fix: RFC4880_encode_count doesn't return consistent results when processing exact iterations. It returns RFC4880 code + 1.

Fixes: #1853

@codecov-io
Copy link

codecov-io commented Mar 10, 2019

Codecov Report

Merging #1854 into master will increase coverage by 1.21%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1854      +/-   ##
=========================================
+ Coverage   90.18%   91.4%   +1.21%     
=========================================
  Files         527     527              
  Lines       55964   55966       +2     
  Branches     5830    5830              
=========================================
+ Hits        50473   51156     +683     
+ Misses       5491    4810     -681
Impacted Files Coverage Δ
src/tests/test_pbkdf.cpp 97% <100%> (+0.06%) ⬆️
src/lib/pbkdf/pgp_s2k/pgp_s2k.cpp 87.5% <100%> (ø) ⬆️
src/lib/pk_pad/emsa_raw/emsa_raw.cpp 71.42% <0%> (-2.86%) ⬇️
src/lib/pubkey/mce/mceliece_key.cpp 85.39% <0%> (-1.13%) ⬇️
src/lib/tls/tls_channel.cpp 80.52% <0%> (+0.33%) ⬆️
src/lib/stream/chacha/chacha.cpp 100% <0%> (+0.93%) ⬆️
src/lib/hash/sha2_64/sha2_64.cpp 100% <0%> (+1.11%) ⬆️
src/lib/hash/sha2_32/sha2_32.cpp 98.63% <0%> (+1.36%) ⬆️
src/lib/hash/sha3/sha3.cpp 100% <0%> (+1.44%) ⬆️
src/lib/block/threefish_512/threefish_512.cpp 100% <0%> (+3.12%) ⬆️
... and 8 more

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 2920510...beaed39. Read the comment docs.

@randombit
Copy link
Owner

Sorry about that and thanks for the patch. Can you add something to the test (in test_pbkdf.cpp) that would detect this issue?

@evpo
Copy link
Contributor Author

evpo commented Mar 10, 2019

No worries, man. I will look at the test.

Fix: RFC4880_encode_count doesn't return consistent results when
processing exact iterations. It returns RFC4880 code + 1.

Update PGP_S2K_Iter test to verify PGP formula
Add test to verify that encoded values match the PGP formula
@evpo
Copy link
Contributor Author

evpo commented Mar 11, 2019

done

@randombit randombit merged commit beaed39 into randombit:master Mar 11, 2019
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