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" |
13 | |
14 | typedef struct prov_aes_gcm_ctx_st { |
15 | PROV_GCM_CTX base; /* must be first entry in struct */ |
16 | union { |
17 | OSSL_UNION_ALIGN; |
18 | AES_KEY ks; |
19 | } ks; /* AES key schedule to use */ |
20 | |
21 | /* Platform specific data */ |
22 | union { |
23 | int dummy; |
24 | #if defined(OPENSSL_CPUID_OBJ) && defined(__s390__) |
25 | struct { |
26 | union { |
27 | OSSL_UNION_ALIGN; |
28 | S390X_KMA_PARAMS kma; |
29 | } param; |
30 | unsigned int fc; |
31 | unsigned char ares[16]; |
32 | unsigned char mres[16]; |
33 | unsigned char kres[16]; |
34 | int areslen; |
35 | int mreslen; |
36 | int kreslen; |
37 | int res; |
38 | } s390x; |
39 | #endif /* defined(OPENSSL_CPUID_OBJ) && defined(__s390__) */ |
40 | } plat; |
41 | } PROV_AES_GCM_CTX; |
42 | |
43 | const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits); |
44 | |