1. 05 Apr, 2016 1 commit
    • Nicolai Stange's avatar
      lib/mpi: mpi_write_sgl(): fix skipping of leading zero limbs · f2d1362f
      Nicolai Stange authored
      Currently, if the number of leading zeros is greater than fits into a
      complete limb, mpi_write_sgl() skips them by iterating over them limb-wise.
      
      However, it fails to adjust its internal leading zeros tracking variable,
      lzeros, accordingly: it does a
      
        p -= sizeof(alimb);
        continue;
      
      which should really have been a
      
        lzeros -= sizeof(alimb);
        continue;
      
      Since lzeros never decreases if its initial value >= sizeof(alimb), nothing
      gets copied by mpi_write_sgl() in that case.
      
      Instead of skipping the high order zero limbs within the loop as shown
      above, fix the issue by adjusting the copying loop's bounds.
      
      Fixes: 2d4d1eea
      
       ("lib/mpi: Add mpi sgl helpers")
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      f2d1362f
  2. 27 Feb, 2016 1 commit
  3. 17 Nov, 2015 1 commit
  4. 20 Oct, 2015 1 commit
  5. 14 Oct, 2015 2 commits
  6. 25 Aug, 2015 1 commit
  7. 16 Jun, 2015 1 commit
  8. 12 Jun, 2013 1 commit
  9. 01 Feb, 2013 1 commit
  10. 08 Oct, 2012 1 commit
  11. 26 May, 2012 1 commit
  12. 01 Feb, 2012 3 commits
  13. 19 Jan, 2012 1 commit
  14. 09 Nov, 2011 1 commit
    • Dmitry Kasatkin's avatar
      crypto: GnuPG based MPI lib - source files (part 1) · cdec9cb5
      Dmitry Kasatkin authored
      
      
      Adds the multi-precision-integer maths library which was originally taken
      from GnuPG and ported to the kernel by (among others) David Howells.
      This version is taken from Fedora kernel 2.6.32-71.14.1.el6.
      The difference is that checkpatch reported errors and warnings have been fixed.
      
      This library is used to implemenet RSA digital signature verification
      used in IMA/EVM integrity protection subsystem.
      
      Due to patch size limitation, the patch is divided into 4 parts.
      Signed-off-by: default avatarDmitry Kasatkin <dmitry.kasatkin@intel.com>
      cdec9cb5