2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
10 #ifndef __OSSL_AARCH64__
11 #define __OSSL_AARCH64__
13 #include <crypto/openssl/ossl.h>
14 #include <crypto/openssl/ossl_cipher.h>
15 #include <crypto/openssl/aarch64/arm_arch.h>
18 ossl_cipher_encrypt_t aes_v8_cbc_encrypt;
20 ossl_cipher_encrypt_t vpaes_cbc_encrypt;
23 AES_CBC_ENCRYPT(const unsigned char *in, unsigned char *out,
24 size_t length, const void *key, unsigned char *iv, int encrypt)
26 if (OPENSSL_armcap_P & ARMV8_AES)
27 aes_v8_cbc_encrypt(in, out, length, key, iv, encrypt);
29 vpaes_cbc_encrypt(in, out, length, key, iv, encrypt);