Path: blob/main/crypto/openssl/providers/implementations/ciphers/cipher_aes_gcm.h
48383 views
/*1* Copyright 2019-2021 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 "prov/ciphercommon_gcm.h"12#include "crypto/aes_platform.h"1314typedef struct prov_aes_gcm_ctx_st {15PROV_GCM_CTX base; /* must be first entry in struct */16union {17OSSL_UNION_ALIGN;18AES_KEY ks;19} ks; /* AES key schedule to use */2021/* Platform specific data */22union {23int dummy;24#if defined(OPENSSL_CPUID_OBJ) && defined(__s390__)25struct {26union {27OSSL_UNION_ALIGN;28S390X_KMA_PARAMS kma;29} param;30unsigned int fc;31unsigned int hsflag; /* hash subkey set flag */32unsigned char ares[16];33unsigned char mres[16];34unsigned char kres[16];35int areslen;36int mreslen;37int kreslen;38int res;39} s390x;40#endif /* defined(OPENSSL_CPUID_OBJ) && defined(__s390__) */41} plat;42} PROV_AES_GCM_CTX;4344const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits);454647