]> git.ipfire.org Git - thirdparty/openssl.git/blame - providers/implementations/ciphers/cipher_aes.h
Update copyright year
[thirdparty/openssl.git] / providers / implementations / ciphers / cipher_aes.h
CommitLineData
e1178600 1/*
eec0ad10 2 * Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
e1178600
SL
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>
604e884b 11#include "prov/ciphercommon.h"
cc731bc3 12#include "crypto/aes_platform.h"
e1178600
SL
13
14typedef struct prov_aes_ctx_st {
15 PROV_CIPHER_CTX base; /* Must be first */
16 union {
17 OSSL_UNION_ALIGN;
18 AES_KEY ks;
19 } ks;
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 /*-
29 * KM-AES parameter block - begin
30 * (see z/Architecture Principles of Operation >= SA22-7832-06)
31 */
32 struct {
33 unsigned char k[32];
34 } km;
35 /* KM-AES parameter block - end */
36 /*-
37 * KMO-AES/KMF-AES parameter block - begin
38 * (see z/Architecture Principles of Operation >= SA22-7832-08)
39 */
40 struct {
41 unsigned char cv[16];
42 unsigned char k[32];
43 } kmo_kmf;
44 /* KMO-AES/KMF-AES parameter block - end */
45 } param;
46 unsigned int fc;
47 int res;
48 } s390x;
49#endif /* defined(OPENSSL_CPUID_OBJ) && defined(__s390__) */
50 } plat;
51
52} PROV_AES_CTX;
53
7d6766cb
P
54#define ossl_prov_cipher_hw_aes_ofb ossl_prov_cipher_hw_aes_ofb128
55#define ossl_prov_cipher_hw_aes_cfb ossl_prov_cipher_hw_aes_cfb128
56const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ecb(size_t keybits);
57const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cbc(size_t keybits);
58const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ofb128(size_t keybits);
59const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cfb128(size_t keybits);
60const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cfb1(size_t keybits);
61const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cfb8(size_t keybits);
62const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ctr(size_t keybits);