From 2062d48dd2fa5645889f2fda06c84de7bf546806 Mon Sep 17 00:00:00 2001 From: Charlie Ozinga Date: Thu, 14 Apr 2016 03:44:43 -0600 Subject: Add 1DES symm ciphers (des-cbc, des-ecb, des-cfb, des-ofb) 1DES is well and truly dead for actual sensitive information, (its keysize is too small for modern purposes), but it can still find use in backwards compatiblity or educational applications. --- openssl/src/crypto/symm_internal.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'openssl/src/crypto/symm_internal.rs') diff --git a/openssl/src/crypto/symm_internal.rs b/openssl/src/crypto/symm_internal.rs index 5c457f3f..37b9025c 100644 --- a/openssl/src/crypto/symm_internal.rs +++ b/openssl/src/crypto/symm_internal.rs @@ -26,6 +26,11 @@ pub fn evpc(t: symm::Type) -> (*const ffi::EVP_CIPHER, u32, u32) { symm::Type::AES_256_CFB128 => (ffi::EVP_aes_256_cfb128(), 32, 16), symm::Type::AES_256_CFB8 => (ffi::EVP_aes_256_cfb8(), 32, 16), + symm::Type::DES_CBC => (ffi::EVP_des_cbc(), 8, 8), + symm::Type::DES_ECB => (ffi::EVP_des_ecb(), 8, 8), + symm::Type::DES_CFB => (ffi::EVP_des_cfb(), 8, 8), + symm::Type::DES_OFB => (ffi::EVP_des_ofb(), 8, 8), + symm::Type::RC4_128 => (ffi::EVP_rc4(), 16, 0), } } -- cgit v1.2.3 From 5682c044696bacb6600617433826141b0a08cd66 Mon Sep 17 00:00:00 2001 From: Charlie Ozinga Date: Tue, 19 Apr 2016 17:28:19 -0600 Subject: Remove des_cfb and des_ofb, since they appear on limit platforms --- openssl/src/crypto/symm_internal.rs | 2 -- 1 file changed, 2 deletions(-) (limited to 'openssl/src/crypto/symm_internal.rs') diff --git a/openssl/src/crypto/symm_internal.rs b/openssl/src/crypto/symm_internal.rs index 37b9025c..ba01e1c1 100644 --- a/openssl/src/crypto/symm_internal.rs +++ b/openssl/src/crypto/symm_internal.rs @@ -28,8 +28,6 @@ pub fn evpc(t: symm::Type) -> (*const ffi::EVP_CIPHER, u32, u32) { symm::Type::DES_CBC => (ffi::EVP_des_cbc(), 8, 8), symm::Type::DES_ECB => (ffi::EVP_des_ecb(), 8, 8), - symm::Type::DES_CFB => (ffi::EVP_des_cfb(), 8, 8), - symm::Type::DES_OFB => (ffi::EVP_des_ofb(), 8, 8), symm::Type::RC4_128 => (ffi::EVP_rc4(), 16, 0), } -- cgit v1.2.3