<div dir="ltr">Thank you Matt. You have been very helpful.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 7, 2019 at 6:40 PM Matt Caswell <<a href="mailto:matt@openssl.org">matt@openssl.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 07/05/2019 20:47, Mirko J. Ploch wrote:<br>
> Thank you for your response. You answered my question. It is not available on my<br>
> target platform architecture (arm64).<br>
> <br>
> I do have a specific need for that cipher, and it does not have anything to do<br>
> with TLS. An app that I am working on requires it for JSON Web Encryption (JWE)<br>
> as the required encryption algorithm.<br>
> <br>
> <a href="https://tools.ietf.org/html/draft-ietf-jose-json-web-encryption-31#appendix-B" rel="noreferrer" target="_blank">https://tools.ietf.org/html/draft-ietf-jose-json-web-encryption-31#appendix-B</a><br>
<br>
Then (in spite of the name) this is not the cipher you want to use. This cipher<br>
can *only* do the AAD specified for TLS - it is not a general purpose cipher and<br>
so will not be capable of doing the AAD specified in that draft.<br>
<br>
You can probably achieve what you want using EVP_aes_128_cbc() and then using<br>
HMAC-SHA256 separately.<br>
<br>
Matt<br>
<br>
> <br>
> Best Regards,<br>
> Mirko<br>
> <br>
> On Tue, May 7, 2019 at 11:45 AM Matt Caswell <<a href="mailto:matt@openssl.org" target="_blank">matt@openssl.org</a><br>
> <mailto:<a href="mailto:matt@openssl.org" target="_blank">matt@openssl.org</a>>> wrote:<br>
> <br>
> <br>
> <br>
>     On 06/05/2019 16:41, Mirko J. Ploch wrote:<br>
>     > Hello,<br>
>     ><br>
>     > I'm trying to use EVP_aes_128_cbc_hmac_sha256() for encryption on an iOS<br>
>     device<br>
>     > with arm64 architecture. I was able to get it working with the x86_64<br>
>     > architecture when running the iOS device simulator on an iMac. Is this<br>
>     just not<br>
>     > capable of working on an arm64 platform?<br>
>     ><br>
>     > Looking at the code for EVP_aes_128_cbc_hmac_sha256, it does not look like it.<br>
>     > I'm hoping that there is a way to get it working.<br>
>     ><br>
>     <a href="https://github.com/openssl/openssl/blob/OpenSSL_1_1_1b/crypto/evp/e_aes_cbc_hmac_sha256.c" rel="noreferrer" target="_blank">https://github.com/openssl/openssl/blob/OpenSSL_1_1_1b/crypto/evp/e_aes_cbc_hmac_sha256.c</a><br>
> <br>
>     This cipher is a special purpose cipher not intended for general use. It is<br>
>     specifically targeted at usage in TLS. Unless you're writing a TLS stack you<br>
>     probably don't want to use this. It is only available on some platforms and does<br>
>     runtime detection to check whether the platform is suitable or not. Most<br>
>     importantly the platform must have AES-NI support.<br>
> <br>
>     It's usefulness even in a TLS stack is somewhat limited these days since it is<br>
>     not relevant for TLSv1.3 and does not get used if encrypt-then-mac is negotiated<br>
>     (which recent versions of OpenSSL will try to negotiate by default).<br>
> <br>
>     Matt<br>
> <br>
</blockquote></div>