VirtualBox

source: vbox/trunk/src/libs/openssl-3.1.0/providers/implementations/ciphers/cipher_chacha20.h@ 100947

Last change on this file since 100947 was 99366, checked in by vboxsync, 22 months ago

openssl-3.1.0: Applied and adjusted our OpenSSL changes to 3.0.7. bugref:10418

File size: 1.1 KB
Line 
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 "include/crypto/chacha.h"
11#include "prov/ciphercommon.h"
12
13typedef struct {
14 PROV_CIPHER_CTX base; /* must be first */
15 union {
16 OSSL_UNION_ALIGN;
17 unsigned int d[CHACHA_KEY_SIZE / 4];
18 } key;
19 unsigned int counter[CHACHA_CTR_SIZE / 4];
20 unsigned char buf[CHACHA_BLK_SIZE];
21 unsigned int partial_len;
22} PROV_CHACHA20_CTX;
23
24typedef struct prov_cipher_hw_chacha20_st {
25 PROV_CIPHER_HW base; /* must be first */
26 int (*initiv)(PROV_CIPHER_CTX *ctx);
27
28} PROV_CIPHER_HW_CHACHA20;
29
30const PROV_CIPHER_HW *ossl_prov_cipher_hw_chacha20(size_t keybits);
31
32OSSL_FUNC_cipher_encrypt_init_fn ossl_chacha20_einit;
33OSSL_FUNC_cipher_decrypt_init_fn ossl_chacha20_dinit;
34void ossl_chacha20_initctx(PROV_CHACHA20_CTX *ctx);
Note: See TracBrowser for help on using the repository browser.

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