Path: blob/main/sys/crypto/openssl/ossl_aarch64.h
105670 views
/*1* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.2*3* Licensed under the OpenSSL license (the "License"). You may not use4* this file except in compliance with the License. You can obtain a copy5* in the file LICENSE in the source distribution or at6* https://www.openssl.org/source/license.html7*/89#ifndef __OSSL_AARCH64__10#define __OSSL_AARCH64__1112#include <crypto/openssl/ossl.h>13#include <crypto/openssl/ossl_cipher.h>14#include <crypto/openssl/arm_arch.h>1516/* aesv8-armx.S */17ossl_cipher_encrypt_t aes_v8_cbc_encrypt;18/* vpaes-armv8.S */19ossl_cipher_encrypt_t vpaes_cbc_encrypt;2021static void22AES_CBC_ENCRYPT(const unsigned char *in, unsigned char *out,23size_t length, const void *key, unsigned char *iv, int encrypt)24{25if (OPENSSL_armcap_P & ARMV8_AES)26aes_v8_cbc_encrypt(in, out, length, key, iv, encrypt);27else28vpaes_cbc_encrypt(in, out, length, key, iv, encrypt);29}30#endif313233