crypto: throw on invalid authentication tag length by tniessen · Pull Request #17825 · nodejs/node
nodejs-github-bot
added
c++
labels
Dec 22, 2017
tniessen
added
notable-change
labels
Dec 22, 2017This was referenced
Jan 21, 2018jasnell pushed a commit that referenced this pull request
Apr 14, 2018jasnell pushed a commit that referenced this pull request
Apr 14, 2018jasnell pushed a commit that referenced this pull request
Apr 14, 2018tniessen added a commit to tniessen/node that referenced this pull request
May 23, 2018The current implementation performs limited checks only and silently ignores superfluous bytes of the authentication tag. This change makes setAuthTag throw when - the user-specified authTagLength does not match the actual tag length, especially when the authentication tag is longer than 16 bytes, and when - the mode is GCM, no authTagLength option has been specified and the tag length is not a valid GCM tag length. This change makes the conditional assignment in SetAuthTag unnecessary, which is replaced with a CHECK. Refs: nodejs#17825
tniessen added a commit that referenced this pull request
Jun 1, 2018The current implementation performs limited checks only and silently ignores superfluous bytes of the authentication tag. This change makes setAuthTag throw when - the user-specified authTagLength does not match the actual tag length, especially when the authentication tag is longer than 16 bytes, and when - the mode is GCM, no authTagLength option has been specified and the tag length is not a valid GCM tag length. This change makes the conditional assignment in SetAuthTag unnecessary, which is replaced with a CHECK. Refs: #17825 PR-URL: #20040 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Yihong Wang <yh.wang@ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request
Jun 24, 2018This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters