[lkml]   [2009]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[BUGFIX] crypto: Fix ctr(aes) testing by specifying geniv
    When doing "modeprobe tcrypt mode=10", the following error will show
    in dmesg.

    alg: skcipher: Failed to load transform for ctr(aes): -22
    alg: skcipher: Failed to load transform for ctr(aes): -22
    tcrypt: one or more tests failed!

    Because ctr(aes) testing code will allocate ctr(aes) with geniv, but
    defualt geniv mode may not work with ctr(aes). As that of rfc3686,
    this is fixed via specifying geniv mode to "seqiv".

    Signed-off-by: Huang Ying <>
    crypto/ctr.c | 2 ++
    1 file changed, 2 insertions(+)

    --- a/crypto/ctr.c
    +++ b/crypto/ctr.c
    @@ -219,6 +219,8 @@ static struct crypto_instance *crypto_ct
    inst->alg.cra_blkcipher.encrypt = crypto_ctr_crypt;
    inst->alg.cra_blkcipher.decrypt = crypto_ctr_crypt;

    + inst->alg.cra_blkcipher.geniv = "seqiv";
    return inst;

     \ /
      Last update: 2009-08-03 09:47    [W:0.041 / U:2.288 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site