]> git.ipfire.org Git - thirdparty/openssl.git/blame - providers/implementations/ciphers/cipher_aes_gcm.h
Deprecate Low Level Camellia APIs
[thirdparty/openssl.git] / providers / implementations / ciphers / cipher_aes_gcm.h
CommitLineData
dc7aa029
RL
1/*
2 * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
3 *
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
8 */
9
10#include <openssl/aes.h>
11#include "prov/ciphercommon.h"
12#include "prov/ciphercommon_gcm.h"
cc731bc3 13#include "crypto/aes_platform.h"
dc7aa029
RL
14
15typedef struct prov_aes_gcm_ctx_st {
16 PROV_GCM_CTX base; /* must be first entry in struct */
17 union {
18 OSSL_UNION_ALIGN;
19 AES_KEY ks;
20 } ks; /* AES key schedule to use */
21
22 /* Platform specific data */
23 union {
24 int dummy;
25#if defined(OPENSSL_CPUID_OBJ) && defined(__s390__)
26 struct {
27 union {
28 OSSL_UNION_ALIGN;
29 S390X_KMA_PARAMS kma;
30 } param;
31 unsigned int fc;
32 unsigned char ares[16];
33 unsigned char mres[16];
34 unsigned char kres[16];
35 int areslen;
36 int mreslen;
37 int kreslen;
38 int res;
39 } s390x;
40#endif /* defined(OPENSSL_CPUID_OBJ) && defined(__s390__) */
41 } plat;
42} PROV_AES_GCM_CTX;
43
44const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits);