Page MenuHomePhabricator

Merge #11516: crypto: Add test cases covering the relevant HMAC-SHA{256,512} key length boundaries
ClosedPublic

Authored by jasonbcox on Jun 28 2019, 19:34.

Details

Summary

a3f5657 Add test cases covering the relevant key length boundaries: 64 bytes +/- 1 byte for HMAC-SHA256 and 128 bytes +/- 1 byte for HMAC-SHA512 (practicalswift)

Pull request description:

  • Add test cases covering the relevant key length boundaries: 64 bytes +/- 1 byte for HMAC-SHA256 and 128 bytes +/- 1 byte for HMAC-SHA512.
  • Avoid creating a one-past-the-end pointer in the case of key length 64 (HMAC-SHA256) and key length 128 (HMAC-SHA512).
  • Avoid performing a noop memset call (zero length argument) in the case of key length 64 (HMAC-SHA256) and key length 128 (HMAC-SHA512).

Tree-SHA512: 48ff9ab79d41aab97b5b8f6496cc08a39955a07eb424f74ada6440d3b168b6204d3527fa677e175c47e40142f9d62c7456ae162e5a2f5b557e90fb353beef1d0

Backport of Core PR11516

https://github.com/bitcoin/bitcoin/pull/11516/files

Test Plan

make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
pr11516
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 6550
Build 11147: Bitcoin ABC Buildbot (legacy)
Build 11146: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Jun 29 2019, 23:55