2012-03-19 18:08:51

by Zdenek Kaspar

[permalink] [raw]
Subject: serpent-sse2 - different key size same speed?

Hello everyone,

I just quick tested 3.3.0 kernel (x86_64) to get idea how serpent-sse2
implementation works on Core2 machine. My dirty testing revealed that
key size doesn't have impact on speed. Is such behavior normal ?

Test machine: Core2 E6600 (2.40GHz), 3GB RAM, Scientific Linux 6.2
dm-crypt on /dev/loop0, 1.5G image file:
/dev/loop0: [0010]:11323 (/dev/shm/test.img)


Encrypt (dd if=/dev/zero of=/dev/mapper/test bs=1M)
-s 256 -c aes-xts-plain64 : 159 - 162 MB/s
-s 512 -c aes-xts-plain64 : 129 - 141 MB/s

-s 256 -c serpent-xts-plain64 : 142 - 146 MB/s
-s 512 -c serpent-xts-plain64 : 139 - 148 MB/s


Decrypt (dd if=/dev/mapper/test of=/dev/null bs=1M)
-s 256 -c aes-xts-plain64 : 113 - 114 MB/s
-s 512 -c aes-xts-plain64 : 90.1 MB/s

-s 256 -c serpent-xts-plain64 : 105.0 MB/s
-s 512 -c serpent-xts-plain64 : 105.0 MB/s


(perf top shows as expected high usage of: serpent_dec_blk_8way and
serpent_enc_blk_8way)

Z.


2012-03-20 06:53:23

by Jussi Kivilinna

[permalink] [raw]
Subject: Re: serpent-sse2 - different key size same speed?

Quoting Zdenek Kaspar <[email protected]>:

> Hello everyone,
>
> I just quick tested 3.3.0 kernel (x86_64) to get idea how serpent-sse2
> implementation works on Core2 machine. My dirty testing revealed that
> key size doesn't have impact on speed. Is such behavior normal ?

It's expected result, serpent speed does not depend on key-size and
for example twofish and blowfish are another such ciphers where speed
is key-size independent.

-Jussi

>
> Test machine: Core2 E6600 (2.40GHz), 3GB RAM, Scientific Linux 6.2
> dm-crypt on /dev/loop0, 1.5G image file:
> /dev/loop0: [0010]:11323 (/dev/shm/test.img)
>
>
> Encrypt (dd if=/dev/zero of=/dev/mapper/test bs=1M)
> -s 256 -c aes-xts-plain64 : 159 - 162 MB/s
> -s 512 -c aes-xts-plain64 : 129 - 141 MB/s
>
> -s 256 -c serpent-xts-plain64 : 142 - 146 MB/s
> -s 512 -c serpent-xts-plain64 : 139 - 148 MB/s
>
>
> Decrypt (dd if=/dev/mapper/test of=/dev/null bs=1M)
> -s 256 -c aes-xts-plain64 : 113 - 114 MB/s
> -s 512 -c aes-xts-plain64 : 90.1 MB/s
>
> -s 256 -c serpent-xts-plain64 : 105.0 MB/s
> -s 512 -c serpent-xts-plain64 : 105.0 MB/s
>
>
> (perf top shows as expected high usage of: serpent_dec_blk_8way and
> serpent_enc_blk_8way)
>
> Z.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>

2012-03-20 08:10:38

by Zdenek Kaspar

[permalink] [raw]
Subject: Re: serpent-sse2 - different key size same speed?

Dne 20.3.2012 7:53, Jussi Kivilinna napsal(a):
> Quoting Zdenek Kaspar <[email protected]>:
>
>> Hello everyone,
>>
>> I just quick tested 3.3.0 kernel (x86_64) to get idea how serpent-sse2
>> implementation works on Core2 machine. My dirty testing revealed that
>> key size doesn't have impact on speed. Is such behavior normal ?
>
> It's expected result, serpent speed does not depend on key-size and for
> example twofish and blowfish are another such ciphers where speed is
> key-size independent.
>
> -Jussi

Thanks for clarification and enlighten me :) (btw: nice work with
serpent-sse2)

Z.