xref: /freebsd-src/crypto/openssl/providers/implementations/ciphers/cipher_des.h (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1*b077aed3SPierre Pronchery /*
2*b077aed3SPierre Pronchery  * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
3*b077aed3SPierre Pronchery  *
4*b077aed3SPierre Pronchery  * Licensed under the Apache License 2.0 (the "License").  You may not use
5*b077aed3SPierre Pronchery  * this file except in compliance with the License.  You can obtain a copy
6*b077aed3SPierre Pronchery  * in the file LICENSE in the source distribution or at
7*b077aed3SPierre Pronchery  * https://www.openssl.org/source/license.html
8*b077aed3SPierre Pronchery  */
9*b077aed3SPierre Pronchery 
10*b077aed3SPierre Pronchery #include <openssl/des.h>
11*b077aed3SPierre Pronchery #include "crypto/des_platform.h"
12*b077aed3SPierre Pronchery 
13*b077aed3SPierre Pronchery #define TDES_FLAGS 0
14*b077aed3SPierre Pronchery 
15*b077aed3SPierre Pronchery typedef struct prov_des_ctx_st {
16*b077aed3SPierre Pronchery     PROV_CIPHER_CTX base;      /* Must be first */
17*b077aed3SPierre Pronchery     union {
18*b077aed3SPierre Pronchery         OSSL_UNION_ALIGN;
19*b077aed3SPierre Pronchery         DES_key_schedule ks;
20*b077aed3SPierre Pronchery     } dks;
21*b077aed3SPierre Pronchery     union {
22*b077aed3SPierre Pronchery         void (*cbc) (const void *, void *, size_t,
23*b077aed3SPierre Pronchery                      const DES_key_schedule *, unsigned char *);
24*b077aed3SPierre Pronchery     } dstream;
25*b077aed3SPierre Pronchery 
26*b077aed3SPierre Pronchery } PROV_DES_CTX;
27*b077aed3SPierre Pronchery 
28*b077aed3SPierre Pronchery const PROV_CIPHER_HW *ossl_prov_cipher_hw_des_cbc(void);
29*b077aed3SPierre Pronchery const PROV_CIPHER_HW *ossl_prov_cipher_hw_des_ecb(void);
30*b077aed3SPierre Pronchery const PROV_CIPHER_HW *ossl_prov_cipher_hw_des_ofb64(void);
31*b077aed3SPierre Pronchery const PROV_CIPHER_HW *ossl_prov_cipher_hw_des_cfb64(void);
32*b077aed3SPierre Pronchery const PROV_CIPHER_HW *ossl_prov_cipher_hw_des_cfb1(void);
33*b077aed3SPierre Pronchery const PROV_CIPHER_HW *ossl_prov_cipher_hw_des_cfb8(void);
34