• David S. Miller's avatar
    sparc64: Unroll CTR crypt loops in AES driver. · 4e71bb49
    David S. Miller authored
    Before:
    
    testing speed of ctr(aes) encryption
    test 0 (128 bit key, 16 byte blocks): 1 operation in 206 cycles (16 bytes)
    test 1 (128 bit key, 64 byte blocks): 1 operation in 244 cycles (64 bytes)
    test 2 (128 bit key, 256 byte blocks): 1 operation in 360 cycles (256 bytes)
    test 3 (128 bit key, 1024 byte blocks): 1 operation in 814 cycles (1024 bytes)
    test 4 (128 bit key, 8192 byte blocks): 1 operation in 5021 cycles (8192 bytes)
    test 5 (192 bit key, 16 byte blocks): 1 operation in 206 cycles (16 bytes)
    test 6 (192 bit key, 64 byte blocks): 1 operation in 240 cycles (64 bytes)
    test 7 (192 bit key, 256 byte blocks): 1 operation in 378 cycles (256 bytes)
    test 8 (192 bit key, 1024 byte blocks): 1 operation in 939 cycles (1024 bytes)
    test 9 (192 bit key, 8192 byte blocks): 1 operation in 6395 cycles (8192 bytes)
    test 10 (256 bit key, 16 byte blocks): 1 operation in 209 cycles (16 bytes)
    test 11 (256 bit key, 64 byte blocks): 1 operation in 249 cycles (64 bytes)
    test 12 (256 bit key, 256 byte blocks): 1 operation in 414 cycles (256 bytes)
    test 13 (256 bit key, 1024 byte blocks): 1 operation in 1073 cycles (1024 bytes)
    test 14 (256 bit key, 8192 byte blocks): 1 operation in 7110 cycles (8192 bytes)
    
    testing speed of ctr(aes) decryption
    test 0 (128 bit key, 16 byte blocks): 1 operation in 225 cycles (16 bytes)
    test 1 (128 bit key, 64 byte blocks): 1 operation in 233 cycles (64 bytes)
    test 2 (128 bit key, 256 byte blocks): 1 operation in 344 cycles (256 bytes)
    test 3 (128 bit key, 1024 byte blocks): 1 operation in 810 cycles (1024 bytes)
    test 4 (128 bit key, 8192 byte blocks): 1 operation in 5021 cycles (8192 bytes)
    test 5 (192 bit key, 16 byte blocks): 1 operation in 206 cycles (16 bytes)
    test 6 (192 bit key, 64 byte blocks): 1 operation in 240 cycles (64 bytes)
    test 7 (192 bit key, 256 byte blocks): 1 operation in 376 cycles (256 bytes)
    test 8 (192 bit key, 1024 byte blocks): 1 operation in 938 cycles (1024 bytes)
    test 9 (192 bit key, 8192 byte blocks): 1 operation in 6380 cycles (8192 bytes)
    test 10 (256 bit key, 16 byte blocks): 1 operation in 214 cycles (16 bytes)
    test 11 (256 bit key, 64 byte blocks): 1 operation in 251 cycles (64 bytes)
    test 12 (256 bit key, 256 byte blocks): 1 operation in 411 cycles (256 bytes)
    test 13 (256 bit key, 1024 byte blocks): 1 operation in 1070 cycles (1024 bytes)
    test 14 (256 bit key, 8192 byte blocks): 1 operation in 7114 cycles (8192 bytes)
    
    After:
    
    testing speed of ctr(aes) encryption
    test 0 (128 bit key, 16 byte blocks): 1 operation in 211 cycles (16 bytes)
    test 1 (128 bit key, 64 byte blocks): 1 operation in 246 cycles (64 bytes)
    test 2 (128 bit key, 256 byte blocks): 1 operation in 344 cycles (256 bytes)
    test 3 (128 bit key, 1024 byte blocks): 1 operation in 799 cycles (1024 bytes)
    test 4 (128 bit key, 8192 byte blocks): 1 operation in 4975 cycles (8192 bytes)
    test 5 (192 bit key, 16 byte blocks): 1 operation in 210 cycles (16 bytes)
    test 6 (192 bit key, 64 byte blocks): 1 operation in 236 cycles (64 bytes)
    test 7 (192 bit key, 256 byte blocks): 1 operation in 365 cycles (256 bytes)
    test 8 (192 bit key, 1024 byte blocks): 1 operation in 888 cycles (1024 bytes)
    test 9 (192 bit key, 8192 byte blocks): 1 operation in 6055 cycles (8192 bytes)
    test 10 (256 bit key, 16 byte blocks): 1 operation in 209 cycles (16 bytes)
    test 11 (256 bit key, 64 byte blocks): 1 operation in 255 cycles (64 bytes)
    test 12 (256 bit key, 256 byte blocks): 1 operation in 404 cycles (256 bytes)
    test 13 (256 bit key, 1024 byte blocks): 1 operation in 1010 cycles (1024 bytes)
    test 14 (256 bit key, 8192 byte blocks): 1 operation in 6669 cycles (8192 bytes)
    
    testing speed of ctr(aes) decryption
    test 0 (128 bit key, 16 byte blocks): 1 operation in 210 cycles (16 bytes)
    test 1 (128 bit key, 64 byte blocks): 1 operation in 233 cycles (64 bytes)
    test 2 (128 bit key, 256 byte blocks): 1 operation in 340 cycles (256 bytes)
    test 3 (128 bit key, 1024 byte blocks): 1 operation in 818 cycles (1024 bytes)
    test 4 (128 bit key, 8192 byte blocks): 1 operation in 4956 cycles (8192 bytes)
    test 5 (192 bit key, 16 byte blocks): 1 operation in 206 cycles (16 bytes)
    test 6 (192 bit key, 64 byte blocks): 1 operation in 239 cycles (64 bytes)
    test 7 (192 bit key, 256 byte blocks): 1 operation in 361 cycles (256 bytes)
    test 8 (192 bit key, 1024 byte blocks): 1 operation in 888 cycles (1024 bytes)
    test 9 (192 bit key, 8192 byte blocks): 1 operation in 5996 cycles (8192 bytes)
    test 10 (256 bit key, 16 byte blocks): 1 operation in 214 cycles (16 bytes)
    test 11 (256 bit key, 64 byte blocks): 1 operation in 248 cycles (64 bytes)
    test 12 (256 bit key, 256 byte blocks): 1 operation in 395 cycles (256 bytes)
    test 13 (256 bit key, 1024 byte blocks): 1 operation in 1010 cycles (1024 bytes)
    test 14 (256 bit key, 8192 byte blocks): 1 operation in 6664 cycles (8192 bytes)
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4e71bb49
aes_asm.S 39.6 KB