Excessive fragmentation put additional burden (of addtional MAC
calculations) on the other size and limiting fragments it to 1KB
limits the overhead to ~6%.
if (inp_len<4096) return 0; /* too short */
- if (OPENSSL_ia32cap_P[2]&(1<<5)) n4x=2; /* AVX2 */
+ if (inp_len>=8192 && OPENSSL_ia32cap_P[2]&(1<<5))
+ n4x=2; /* AVX2 */
key->md = key->head;
SHA1_Update(&key->md,param->inp,13);
if ((param->inp[9]<<8|param->inp[10]) < TLS1_1_VERSION)
return -1;
- if (inp_len<2048) return 0; /* too short */
+ if (inp_len<4096) return 0; /* too short */
- if (OPENSSL_ia32cap_P[2]&(1<<5)) n4x=2; /* AVX2 */
+ if (inp_len>=8192 && OPENSSL_ia32cap_P[2]&(1<<5))
+ n4x=2; /* AVX2 */
key->md = key->head;
SHA256_Update(&key->md,param->inp,13);