lkml.org 
[lkml]   [2009]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 075/108] crypto: aes-ni - Fix cbc mode IV saving
    2.6.30-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Huang Ying <ying.huang@intel.com>

    commit e6efaa025384f86a18814a6b9f4e5d54484ab9ff upstream.

    Original implementation of aesni_cbc_dec do not save IV if input
    length % 4 == 0. This will make decryption of next block failed.

    Signed-off-by: Huang Ying <ying.huang@intel.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    arch/x86/crypto/aesni-intel_asm.S | 5 +++--
    1 file changed, 3 insertions(+), 2 deletions(-)

    --- a/arch/x86/crypto/aesni-intel_asm.S
    +++ b/arch/x86/crypto/aesni-intel_asm.S
    @@ -845,7 +845,7 @@ ENTRY(aesni_cbc_enc)
    */
    ENTRY(aesni_cbc_dec)
    cmp $16, LEN
    - jb .Lcbc_dec_ret
    + jb .Lcbc_dec_just_ret
    mov 480(KEYP), KLEN
    add $240, KEYP
    movups (IVP), IV
    @@ -891,6 +891,7 @@ ENTRY(aesni_cbc_dec)
    add $16, OUTP
    cmp $16, LEN
    jge .Lcbc_dec_loop1
    - movups IV, (IVP)
    .Lcbc_dec_ret:
    + movups IV, (IVP)
    +.Lcbc_dec_just_ret:
    ret



    \
     
     \ /
      Last update: 2009-07-01 03:25    [W:0.021 / U:120.448 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site