bytinbit / strongswan

strongSwan - IPsec-based VPN
https://www.strongswan.org
Other
2 stars 0 forks source link

libtls: Add HKDF implementation for TLS 1.3 #35

Closed ryru closed 4 years ago

ryru commented 4 years ago

TLS 1.3 uses HMAC-based Extract-and-Expand Key Derivation Function (HKDF) as defined in RFC 5869 to compute traffic secrets.

ryru commented 4 years ago

Line 164: / HKDFLabel / Instead of memcpy() of chunks the chunk_cat() function could be used

Still open, unsure how to use chunk_cat() correctly.

bytinbit commented 4 years ago

Remove bool is_server method argument, it is not used in any public method.

codecov-io commented 4 years ago

Codecov Report

Merging #35 into sa-dev-libtls will increase coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@                Coverage Diff                @@
##           sa-dev-libtls      #35      +/-   ##
=================================================
+ Coverage          39.04%   39.08%   +0.03%     
=================================================
  Files                933      934       +1     
  Lines             124022   124085      +63     
=================================================
+ Hits               48429    48496      +67     
+ Misses             75593    75589       -4     
Impacted Files Coverage Δ
src/libtls/tests/suites/test_hkdf.c 100.00% <100.00%> (ø)
src/libstrongswan/tests/suites/test_threading.c 97.95% <0.00%> (+0.12%) :arrow_up:
src/libstrongswan/tests/suites/test_hashtable.c 99.46% <0.00%> (+0.53%) :arrow_up:
src/libstrongswan/plugins/bliss/bliss_utils.c 95.16% <0.00%> (+3.22%) :arrow_up:

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 3273667...529beb8. Read the comment docs.

codecov-commenter commented 4 years ago

Codecov Report

Merging #35 into sa-dev-libtls will increase coverage by 0.02%. The diff coverage is 100.00%.

Impacted file tree graph

@@                Coverage Diff                @@
##           sa-dev-libtls      #35      +/-   ##
=================================================
+ Coverage          39.04%   39.07%   +0.02%     
=================================================
  Files                933      934       +1     
  Lines             124022   124093      +71     
=================================================
+ Hits               48429    48491      +62     
- Misses             75593    75602       +9     
Impacted Files Coverage Δ
src/libtls/tests/suites/test_hkdf.c 100.00% <100.00%> (ø)
src/libstrongswan/plugins/bliss/bliss_utils.c 88.70% <0.00%> (-3.23%) :arrow_down:
...rc/libstrongswan/plugins/bliss/bliss_private_key.c 91.83% <0.00%> (-1.37%) :arrow_down:
src/libstrongswan/collections/enumerator.c 88.55% <0.00%> (-1.00%) :arrow_down:
src/libstrongswan/tests/suites/test_threading.c 97.95% <0.00%> (+0.12%) :arrow_up:
src/libstrongswan/settings/settings.c 96.41% <0.00%> (+0.47%) :arrow_up:

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 3273667...b924f26. Read the comment docs.