Commit 2f3af3dc authored by Andy Polyakov's avatar Andy Polyakov
Browse files

aesni-sha1-x86_64.pl: add stiched decrypt procedure,

but keep it disabled, too little gain... Add some Atom-specific
optimization.
parent b77b58a3
Loading
Loading
Loading
Loading
+568 −65

File changed.

Preview size limit exceeded, changes collapsed.

+85 −11

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Changes for crypto/evp/e_aes_cbc_hmac_sha256.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -400,7 +400,7 @@ static int aesni_cbc_hmac_sha256_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
			iv = AES_BLOCK_SIZE;

#if defined(STITCHED_CALL)
		if (OPENSSL_ia32cap_P[1]&(1<<(60-32)) &&
		if (OPENSSL_ia32cap_P[1]&(1<<(60-32)) && /* AVX? */
		    plen>(sha_off+iv) &&
		    (blocks=(plen-(sha_off+iv))/SHA256_CBLOCK)) {
			SHA256_Update(&key->md,in+iv,sha_off);
@@ -451,7 +451,7 @@ static int aesni_cbc_hmac_sha256_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
		aesni_cbc_encrypt(in,out,len,
				&key->ks,ctx->iv,0);

		if (plen) {	/* "TLS" mode of operation */
		if (plen != NO_PAYLOAD_LENGTH) {	/* "TLS" mode of operation */
			size_t inp_len, mask, j, i;
			unsigned int res, maxpad, pad, bitlen;
			int ret = 1;