Re: [PATCH v3 19/29] crypto: mips/poly1305 - incorporate OpenSSL/CRYPTOGAMS optimized implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 7 Oct 2019 at 23:02, René van Dorst <opensource@xxxxxxxxxx> wrote:
>
> Quoting Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>:
>
> > This is a straight import of the OpenSSL/CRYPTOGAMS Poly1305 implementation
> > for MIPS authored by Andy Polyakov, and contributed by him to the OpenSSL
> > project. The file 'poly1305-mips.pl' is taken straight from this upstream
> > GitHub repository [0] at commit 57c3a63be70b4f68b9eec1b043164ea790db6499,
> > and already contains all the changes required to build it as part of a
> > Linux kernel module.
> >
> > [0] https://github.com/dot-asm/cryptogams
> >
> > Co-developed-by: Andy Polyakov <appro@xxxxxxxxxxxxxx>
> > Signed-off-by: Andy Polyakov <appro@xxxxxxxxxxxxxx>
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
> > ---
> >  arch/mips/crypto/Makefile         |   14 +
> >  arch/mips/crypto/poly1305-glue.c  |  203 ++++
> >  arch/mips/crypto/poly1305-mips.pl | 1246 ++++++++++++++++++++
> >  crypto/Kconfig                    |    6 +
> >  4 files changed, 1469 insertions(+)
> >
> > <snip>
>
> Hi Ard,
>
> Is it also an option to include my mip32r2 optimized poly1305 version?
>
> Below the results which shows a good improvement over the Andy
> Polyakov version.
> I swapped the poly1305 assembly file and rename the function to
> <func_name>_mips
> Full WireGuard source with the changes [0]
>
> bytes |  RvD | openssl | delta | delta / openssl
>      0 |  155 |   168   |   -13 |  -7,74%
>      1 |  260 |   283   |   -23 |  -8,13%
>     16 |  215 |   236   |   -21 |  -8,90%
>     64 |  321 |   373   |   -52 | -13,94%
>    576 | 1440 |  1813   |  -373 | -20,57%
>   1280 | 2987 |  3801   |  -814 | -21,42%
>   1408 | 3268 |  4161   |  -893 | -21,46%
>   1420 | 3362 |  4267   |  -905 | -21,21%
>   1440 | 3337 |  4250   |  -913 | -21,48%
>   1536 | 3545 |  4531   |  -986 | -21,76%
>   4096 | 9160 | 11755   | -2595 | -22,08%
>

Hi René,

I agree that, given these numbers, we should definitely switch to your
code when building for 32r2 specifically. I'll incorporate that for
the next revision.




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux