VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.1/providers/implementations/ciphers/cipher_aes.h@ 94320

Last change on this file since 94320 was 94320, checked in by vboxsync, 3 years ago

libs/openssl-3.0.1: Export to OSE and fix copyright headers in Makefiles, bugref:10128

File size: 2.2 KB
Line 
1/*
2 * Copyright 2019-2020 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 "crypto/aes_platform.h"
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
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);
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette