summaryrefslogtreecommitdiffstats
path: root/providers/default/ciphers/cipher_des.h
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2019-09-23 14:35:16 +1000
committerShane Lontis <shane.lontis@oracle.com>2019-09-23 14:35:16 +1000
commite3f3ee448f6c9d6765efc8739a09def8a04f0dc0 (patch)
treea9fd41b14a0bdb9af70260f3e03e9ae0324df080 /providers/default/ciphers/cipher_des.h
parenta941054ad7f5af9445896a37754ae451fad7ed98 (diff)
Add des ciphers to default provider
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9954)
Diffstat (limited to 'providers/default/ciphers/cipher_des.h')
-rw-r--r--providers/default/ciphers/cipher_des.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/providers/default/ciphers/cipher_des.h b/providers/default/ciphers/cipher_des.h
new file mode 100644
index 0000000000..92dcfa11e9
--- /dev/null
+++ b/providers/default/ciphers/cipher_des.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
+#include <openssl/des.h>
+
+/* TODO(3.0) Figure out what flags need to be here */
+#define TDES_FLAGS (EVP_CIPH_RAND_KEY)
+
+typedef struct prov_des_ctx_st {
+ PROV_CIPHER_CTX base; /* Must be first */
+ union {
+ OSSL_UNION_ALIGN;
+ DES_key_schedule ks;
+ } dks;
+ union {
+ void (*cbc) (const void *, void *, size_t,
+ const DES_key_schedule *, unsigned char *);
+ } dstream;
+
+} PROV_DES_CTX;
+
+const PROV_CIPHER_HW *PROV_CIPHER_HW_des_cbc(void);
+const PROV_CIPHER_HW *PROV_CIPHER_HW_des_ecb(void);
+const PROV_CIPHER_HW *PROV_CIPHER_HW_des_ofb64(void);
+const PROV_CIPHER_HW *PROV_CIPHER_HW_des_cfb64(void);
+const PROV_CIPHER_HW *PROV_CIPHER_HW_des_cfb1(void);
+const PROV_CIPHER_HW *PROV_CIPHER_HW_des_cfb8(void);