Skip to content

Commit

Permalink
doc : mention constant-time in crypto doc
Browse files Browse the repository at this point in the history
Included reference to 'constant time' in
crypto.timingSafeEqual description.

The Node website would score higher on a Google search
and the API would be more discoverable if it used the words
"constant time" in its description.

PR-URL: #16604
Fixes: #16504
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
mithunsasidharan authored and joyeecheung committed Nov 2, 2017
1 parent 367db92 commit 841e305
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1969,6 +1969,7 @@ added: v6.6.0
- `a` {Buffer | TypedArray | DataView}
- `b` {Buffer | TypedArray | DataView}

This function is based on a constant-time algorithm.
Returns true if `a` is equal to `b`, without leaking timing information that
would allow an attacker to guess one of the values. This is suitable for
comparing HMAC digests or secret values like authentication cookies or
Expand Down

0 comments on commit 841e305

Please sign in to comment.