2 * Copyright 2001-2019 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (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
11 * Fujitsu SPARC64 X support for AES GCM.
12 * This file is included by cipher_gcm_hw.c
15 static int t4_aes_gcm_initkey(PROV_GCM_CTX *ctx, const unsigned char *key,
19 PROV_AES_GCM_CTX *actx = (PROV_AES_GCM_CTX *)ctx;
20 AES_KEY *ks = &actx->ks.ks;
25 ctr = (ctr128_f)aes128_t4_ctr32_encrypt;
28 ctr = (ctr128_f)aes192_t4_ctr32_encrypt;
31 ctr = (ctr128_f)aes256_t4_ctr32_encrypt;
37 GCM_HW_SET_KEY_CTR_FN(ks, aes_t4_set_encrypt_key, aes_t4_encrypt, ctr);
41 static const PROV_GCM_HW t4_aes_gcm = {
49 const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits)
51 return SPARC_AES_CAPABLE ? &t4_aes_gcm : &aes_gcm;