aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/kdf
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/kdf')
-rw-r--r--src/lib/kdf/kdf.cpp9
-rw-r--r--src/lib/kdf/prf_ssl3/info.txt7
-rw-r--r--src/lib/kdf/prf_ssl3/prf_ssl3.cpp75
-rw-r--r--src/lib/kdf/prf_ssl3/prf_ssl3.h30
4 files changed, 0 insertions, 121 deletions
diff --git a/src/lib/kdf/kdf.cpp b/src/lib/kdf/kdf.cpp
index 0d963e9a2..820e5234c 100644
--- a/src/lib/kdf/kdf.cpp
+++ b/src/lib/kdf/kdf.cpp
@@ -21,10 +21,6 @@
#include <botan/prf_x942.h>
#endif
-#if defined(BOTAN_HAS_SSL_V3_PRF)
- #include <botan/prf_ssl3.h>
-#endif
-
#if defined(BOTAN_HAS_TLS_V10_PRF)
#include <botan/prf_tls.h>
#endif
@@ -55,11 +51,6 @@ KDF* get_kdf(const std::string& algo_spec)
return new X942_PRF(request.arg(0)); // OID
#endif
-#if defined(BOTAN_HAS_SSL_V3_PRF)
- if(request.algo_name() == "SSL3-PRF" && request.arg_count() == 0)
- return new SSL3_PRF;
-#endif
-
#if defined(BOTAN_HAS_TLS_V10_PRF)
if(request.algo_name() == "TLS-PRF" && request.arg_count() == 0)
return new TLS_PRF;
diff --git a/src/lib/kdf/prf_ssl3/info.txt b/src/lib/kdf/prf_ssl3/info.txt
deleted file mode 100644
index c4e830bac..000000000
--- a/src/lib/kdf/prf_ssl3/info.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-define SSL_V3_PRF 20131128
-
-<requires>
-md5
-sha1
-algo_base
-</requires>
diff --git a/src/lib/kdf/prf_ssl3/prf_ssl3.cpp b/src/lib/kdf/prf_ssl3/prf_ssl3.cpp
deleted file mode 100644
index 40bce53b0..000000000
--- a/src/lib/kdf/prf_ssl3/prf_ssl3.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-* SSLv3 PRF
-* (C) 2004-2006 Jack Lloyd
-*
-* Botan is released under the Simplified BSD License (see license.txt)
-*/
-
-#include <botan/prf_ssl3.h>
-#include <botan/symkey.h>
-#include <botan/exceptn.h>
-#include <botan/sha160.h>
-#include <botan/md5.h>
-
-namespace Botan {
-
-namespace {
-
-/*
-* Return the next inner hash
-*/
-OctetString next_hash(size_t where, size_t want,
- HashFunction& md5, HashFunction& sha1,
- const byte secret[], size_t secret_len,
- const byte seed[], size_t seed_len)
- {
- BOTAN_ASSERT(want <= md5.output_length(),
- "Output size producable by MD5");
-
- const byte ASCII_A_CHAR = 0x41;
-
- for(size_t j = 0; j != where + 1; j++)
- sha1.update(static_cast<byte>(ASCII_A_CHAR + where));
- sha1.update(secret, secret_len);
- sha1.update(seed, seed_len);
- secure_vector<byte> sha1_hash = sha1.final();
-
- md5.update(secret, secret_len);
- md5.update(sha1_hash);
- secure_vector<byte> md5_hash = md5.final();
-
- return OctetString(&md5_hash[0], want);
- }
-
-}
-
-/*
-* SSL3 PRF
-*/
-secure_vector<byte> SSL3_PRF::derive(size_t key_len,
- const byte secret[], size_t secret_len,
- const byte seed[], size_t seed_len) const
- {
- if(key_len > 416)
- throw Invalid_Argument("SSL3_PRF: Requested key length is too large");
-
- MD5 md5;
- SHA_160 sha1;
-
- OctetString output;
-
- int counter = 0;
- while(key_len)
- {
- const size_t produce = std::min<size_t>(key_len, md5.output_length());
-
- output = output + next_hash(counter++, produce, md5, sha1,
- secret, secret_len, seed, seed_len);
-
- key_len -= produce;
- }
-
- return output.bits_of();
- }
-
-}
diff --git a/src/lib/kdf/prf_ssl3/prf_ssl3.h b/src/lib/kdf/prf_ssl3/prf_ssl3.h
deleted file mode 100644
index 9679f744e..000000000
--- a/src/lib/kdf/prf_ssl3/prf_ssl3.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-* SSLv3 PRF
-* (C) 1999-2007 Jack Lloyd
-*
-* Botan is released under the Simplified BSD License (see license.txt)
-*/
-
-#ifndef BOTAN_SSLV3_PRF_H__
-#define BOTAN_SSLV3_PRF_H__
-
-#include <botan/kdf.h>
-
-namespace Botan {
-
-/**
-* PRF used in SSLv3
-*/
-class BOTAN_DLL SSL3_PRF : public KDF
- {
- public:
- secure_vector<byte> derive(size_t, const byte[], size_t,
- const byte[], size_t) const;
-
- std::string name() const { return "SSL3-PRF"; }
- KDF* clone() const { return new SSL3_PRF; }
- };
-
-}
-
-#endif