]> git.ipfire.org Git - thirdparty/openssl.git/blame - providers/common/ciphers/cipher_aes.h
Add basic aria and camellia ciphers modes to default provider
[thirdparty/openssl.git] / providers / common / ciphers / cipher_aes.h
CommitLineData
e1178600
SL
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
12typedef struct prov_aes_ctx_st {
13 PROV_CIPHER_CTX base; /* Must be first */
14 union {
15 OSSL_UNION_ALIGN;
16 AES_KEY ks;
17 } ks;
18
19 /* Platform specific data */
20 union {
21 int dummy;
22#if defined(OPENSSL_CPUID_OBJ) && defined(__s390__)
23 struct {
24 union {
25 OSSL_UNION_ALIGN;
26 /*-
27 * KM-AES parameter block - begin
28 * (see z/Architecture Principles of Operation >= SA22-7832-06)
29 */
30 struct {
31 unsigned char k[32];
32 } km;
33 /* KM-AES parameter block - end */
34 /*-
35 * KMO-AES/KMF-AES parameter block - begin
36 * (see z/Architecture Principles of Operation >= SA22-7832-08)
37 */
38 struct {
39 unsigned char cv[16];
40 unsigned char k[32];
41 } kmo_kmf;
42 /* KMO-AES/KMF-AES parameter block - end */
43 } param;
44 unsigned int fc;
45 int res;
46 } s390x;
47#endif /* defined(OPENSSL_CPUID_OBJ) && defined(__s390__) */
48 } plat;
49
50} PROV_AES_CTX;
51
52#define PROV_CIPHER_HW_aes_ofb PROV_CIPHER_HW_aes_ofb128
53#define PROV_CIPHER_HW_aes_cfb PROV_CIPHER_HW_aes_cfb128
54const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_ecb(size_t keybits);
55const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_cbc(size_t keybits);
56const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_ofb128(size_t keybits);
57const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_cfb128(size_t keybits);
58const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_cfb1(size_t keybits);
59const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_cfb8(size_t keybits);
60const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_ctr(size_t keybits);
61