Path: blob/main/crypto/openssl/providers/implementations/ciphers/cipher_aes.h
48383 views
/*1* Copyright 2019-2024 The OpenSSL Project Authors. All Rights Reserved.2*3* Licensed under the Apache License 2.0 (the "License"). You may not use4* this file except in compliance with the License. You can obtain a copy5* in the file LICENSE in the source distribution or at6* https://www.openssl.org/source/license.html7*/89#include <openssl/aes.h>10#include "prov/ciphercommon.h"11#include "crypto/aes_platform.h"1213typedef struct prov_aes_ctx_st {14PROV_CIPHER_CTX base; /* Must be first */15union {16OSSL_UNION_ALIGN;17AES_KEY ks;18} ks;1920/* Platform specific data */21union {22int dummy;23#if defined(OPENSSL_CPUID_OBJ) && defined(__s390__)24struct {25union {26OSSL_UNION_ALIGN;27/*-28* KM-AES parameter block - begin29* (see z/Architecture Principles of Operation >= SA22-7832-06)30*/31struct {32unsigned char k[32];33} km;34/* KM-AES parameter block - end */35/*-36* KMO-AES/KMF-AES parameter block - begin37* (see z/Architecture Principles of Operation >= SA22-7832-08)38*/39struct {40unsigned char cv[16];41unsigned char k[32];42} kmo_kmf;43/* KMO-AES/KMF-AES parameter block - end */44} param;45unsigned int fc;46} s390x;47#endif /* defined(OPENSSL_CPUID_OBJ) && defined(__s390__) */48} plat;4950} PROV_AES_CTX;5152#define ossl_prov_cipher_hw_aes_ofb ossl_prov_cipher_hw_aes_ofb12853#define ossl_prov_cipher_hw_aes_cfb ossl_prov_cipher_hw_aes_cfb12854const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ecb(size_t keybits);55const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cbc(size_t keybits);56const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ofb128(size_t keybits);57const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cfb128(size_t keybits);58const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cfb1(size_t keybits);59const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cfb8(size_t keybits);60const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ctr(size_t keybits);616263