1. 25 Jun, 2017 2 commits
    • Gilad Ben-Yossef's avatar
      staging: ccree: register setkey for none hash macs · c51831be
      Gilad Ben-Yossef authored
      The original ccree driver was registering a useless setkey
      method even for non-MAC hash transformations. Somewhere
      around v4.9 a check was added that failed hash operations
      if a setkey method was registered but was not called,
      so during the initial upstream port code was added to
      only register the setkey method for MAC type hash transform.
      
      Unfortunately, the ccree driver also registers non-hash based
      MAC transforms and the code had a logic error that stopped
      it registering a setkey callback even for those, thus rendering
      them useless.
      
      This commit fixes the logic mistake, thus correctly registering
      a setkey method only for MAC transformations, leaving it out
      for non-MAC ones, whether they are hash based on not.
      
      Fixes: 50cfbbb7 ("staging: ccree: add ahash support").
      Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c51831be
    • Gilad Ben-Yossef's avatar
      staging: ccree: fix hash import/export · 454527d0
      Gilad Ben-Yossef authored
      Hash import and export was saving and restoring the wrong context
      and therefore disabled. Fix it by restoring intermediate digest
      and additional state needed.
      
      The hash and mac transform now pass testmgr partial hash tests.
      Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      454527d0
  2. 23 Jun, 2017 38 commits