VirtualBox

source: vbox/trunk/src/libs/openssl-3.1.7/providers/implementations/ciphers/cipher_aes_siv.h@ 106165

最後變更 在這個檔案從106165是 104078,由 vboxsync 提交於 8 月 前

openssl-3.1.5: Applied and adjusted our OpenSSL changes to 3.1.4. bugref:10638

檔案大小: 1.4 KB
 
1/*
2 * Copyright 2019-2021 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 "prov/ciphercommon.h"
11#include "crypto/aes_platform.h"
12#include "crypto/siv.h"
13
14typedef struct prov_cipher_hw_aes_siv_st {
15 int (*initkey)(void *ctx, const uint8_t *key, size_t keylen);
16 int (*cipher)(void *ctx, unsigned char *out, const unsigned char *in,
17 size_t len);
18 void (*setspeed)(void *ctx, int speed);
19 int (*settag)(void *ctx, const unsigned char *tag, size_t tagl);
20 void (*cleanup)(void *ctx);
21 int (*dupctx)(void *src, void *dst);
22} PROV_CIPHER_HW_AES_SIV;
23
24typedef struct prov_siv_ctx_st {
25 unsigned int mode; /* The mode that we are using */
26 unsigned int enc : 1; /* Set to 1 if we are encrypting or 0 otherwise */
27 size_t keylen; /* The input keylength (twice the alg key length) */
28 size_t taglen; /* the taglen is the same as the sivlen */
29 SIV128_CONTEXT siv;
30 EVP_CIPHER *ctr; /* These are fetched - so we need to free them */
31 EVP_CIPHER *cbc;
32 const PROV_CIPHER_HW_AES_SIV *hw;
33 OSSL_LIB_CTX *libctx;
34} PROV_AES_SIV_CTX;
35
36const PROV_CIPHER_HW_AES_SIV *ossl_prov_cipher_hw_aes_siv(size_t keybits);
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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