1. 17 May, 2019 1 commit
    • Daniel Axtens's avatar
      crypto: vmx - CTR: always increment IV as quadword · 009b30ac
      Daniel Axtens authored
      The kernel self-tests picked up an issue with CTR mode:
      alg: skcipher: p8_aes_ctr encryption test failed (wrong result) on test vector 3, cfg="uneven misaligned splits, may sleep"
      
      Test vector 3 has an IV of FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD, so
      after 3 increments it should wrap around to 0.
      
      In the aesp8-ppc code from OpenSSL, there are two paths that
      increment IVs: the bulk (8 at a time) path, and the individual
      path which is used when there are fewer than 8 AES blocks to
      process.
      
      In the bulk path, the IV is incremented with vadduqm: "Vector
      Add Unsigned Quadword Modulo", which does 128-bit addition.
      
      In the individual path, however, the IV is incremented with
      vadduwm: "Vector Add Unsigned Word Modulo", which instead
      does 4 32-bit additions. Thus the IV would instead become
      FFFFFFFFFFFFFFFFFFFFFFFF00000000, throwing off the result.
      
      Use vadduqm.
      
      This was probably a typo originally, what with q and w being
      adjacent. It is a pretty narrow edge case: I am really
      impressed by the quality of the kernel self-tests!
      
      Fixes: 5c380d62
      
       ("crypto: vmx - Add support for VMS instructions by ASM")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
      Acked-by: default avatarNayna Jain <nayna@linux.ibm.com>
      Tested-by: default avatarNayna Jain <nayna@linux.ibm.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      009b30ac
  2. 22 Mar, 2019 1 commit
  3. 30 May, 2018 1 commit
    • Adam Langley's avatar
      crypto: clarify licensing of OpenSSL asm code · c2e415fe
      Adam Langley authored
      
      Several source files have been taken from OpenSSL. In some of them a
      comment that "permission to use under GPL terms is granted" was
      included below a contradictory license statement. In several cases,
      there was no indication that the license of the code was compatible
      with the GPLv2.
      
      This change clarifies the licensing for all of these files. I've
      confirmed with the author (Andy Polyakov) that a) he has licensed the
      files with the GPLv2 comment under that license and b) that he's also
      happy to license the other files under GPLv2 too. In one case, the
      file is already contained in his CRYPTOGAMS bundle, which has a GPLv2
      option, and so no special measures are needed.
      
      In all cases, the license status of code has been clarified by making
      the GPLv2 license prominent.
      
      The .S files have been regenerated from the updated .pl files.
      
      This is a comment-only change. No code is changed.
      Signed-off-by: default avatarAdam Langley <agl@chromium.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      c2e415fe
  4. 20 Jul, 2016 1 commit
  5. 19 Jul, 2016 1 commit
  6. 18 Aug, 2015 1 commit
  7. 12 Mar, 2015 1 commit
  8. 28 Feb, 2015 1 commit