Added "ctmulq" implementation of Poly1305 (using 64->128 multiplications when available).

This commit is contained in:
Thomas Pornin 2017-03-18 16:46:00 +01:00
parent 2f88a67304
commit 5db2d48b12
10 changed files with 588 additions and 17 deletions

View file

@ -28,10 +28,21 @@
void
br_ssl_engine_set_default_chapol(br_ssl_engine_context *cc)
{
#if BR_INT128 || BR_UMUL128
br_poly1305_run bp;
#endif
br_ssl_engine_set_chapol(cc,
&br_sslrec_in_chapol_vtable,
&br_sslrec_out_chapol_vtable);
br_ssl_engine_set_chacha20(cc, &br_chacha20_ct_run);
#if BR_INT128 || BR_UMUL128
bp = br_poly1305_ctmulq_get();
if (bp) {
br_ssl_engine_set_poly1305(cc, bp);
return;
}
#endif
#if BR_LOMUL
br_ssl_engine_set_poly1305(cc, &br_poly1305_ctmul32_run);
#else