• Tianjia Zhang's avatar
    crypto: arm64/sm4 - add CE implementation for XTS mode · 01f63311
    Tianjia Zhang authored
    This patch is a CE-optimized assembly implementation for XTS mode.
    
    Benchmark on T-Head Yitian-710 2.75 GHz, the data comes from the 218 mode of
    tcrypt, and compared the performance before and after this patch (the driver
    used before this patch is xts(ecb-sm4-ce)). The abscissas are blocks of
    different lengths. The data is tabulated and the unit is Mb/s:
    
    Before:
    
    xts(ecb-sm4-ce) |      16       64      128      256     1024     1420     4096
    ----------------+--------------------------------------------------------------
            XTS enc |  117.17   430.56   732.92  1134.98  2007.03  2136.23  2347.20
            XTS dec |  116.89   429.02   733.40  1132.96  2006.13  2130.50  2347.92
    
    After:
    
    xts-sm4-ce      |      16       64      128      256     1024     1420     4096
    ----------------+--------------------------------------------------------------
            XTS enc |  224.68   798.91  1248.08  1714.60  2413.73  2467.84  2612.62
            XTS dec |  229.85   791.34  1237.79  1720.00  2413.30  2473.84  2611.95
    Signed-off-by: default avatarTianjia Zhang <tianjia.zhang@linux.alibaba.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    01f63311
Kconfig 8.21 KB