PROJECT = tests_crypto
TYPE = test
-TARGETS = test_blowfish_crypto.exe test_old_school_rsa_crypto.exe test_twofish_crypto.exe
-# test_blowfish_crypto.exe -- currently blows up, which we think is an error in openssl, because the twofish crypto works perfectly using the same
-# cryptical envelopment base. this is annoying, but we could stop using the legacy provider entirely if we didn't do blowfish any more. not yet.
+TARGETS = test_blowfish_crypto.exe test_old_school_rsa_crypto.exe test_twofish_crypto.exe
LOCAL_LIBS_USED = unit_test crypto application processes loggers configuration textual timely \
filesystem structures basis
USE_SSL = t
_disallowed(false),
_asynch_connector(NULL_POINTER),
_channel_secured(false),
- _crypto(new blowfish_crypto(encryption_infoton::BLOWFISH_KEY_SIZE)),
+ _crypto(new twofish_crypto(encryption_infoton::BLOWFISH_KEY_SIZE)),
_encrypt_arm(NULL_POINTER),
_guardian(new blank_entity_registry),
c_verification(new byte_array)
#include "cromp_common.h"
-#include <crypto/blowfish_crypto.h>
+#include <crypto/twofish_crypto.h>
#include <sockets/internet_address.h>
#include <structures/roller.h>
#include <tentacles/encryption_tentacle.h>
friend class asynch_connection_thread; // solely so it can use r_p_c method.
asynch_connection_thread *_asynch_connector; // b-ground connection thread.
bool _channel_secured; // true if an encrypted connection has been made.
- crypto::blowfish_crypto *_crypto; // tracks our key, once we have one.
+ crypto::twofish_crypto *_crypto; // tracks our key, once we have one.
octopi::encryption_tentacle *_encrypt_arm; // processes encryption for us.
octopi::blank_entity_registry *_guardian; // simple security support.
basis::byte_array *c_verification; // verification token we were given.
#include <basis/mutex.h>
#include <basis/functions.h>
-#include <crypto/blowfish_crypto.h>
+#include <crypto/twofish_crypto.h>
#include <crypto/old_school_rsa_crypto.h>
#include <octopus/tentacle.h>
#include <structures/static_memory_gremlin.h>
return true;
}
-outcome encryption_infoton::prepare_blowfish_key(blowfish_crypto &new_key)
+outcome encryption_infoton::prepare_blowfish_key(twofish_crypto &new_key)
{
FUNCDEF("prepare_blowfish_key");
_encrypted_blowfish_key.reset(); // clean out stuff to create.
}
old_school_rsa_crypto pub(_public_key); // suck in the provided key.
- blowfish_crypto agreed_key(BLOWFISH_KEY_SIZE); // random blowfish key.
+ twofish_crypto agreed_key(BLOWFISH_KEY_SIZE); // random blowfish key.
new_key = agreed_key;
// now encrypt the new key for transit.
}
outcome encryption_infoton::extract_response(const old_school_rsa_crypto &private_key,
- blowfish_crypto &new_key) const
+ twofish_crypto &new_key) const
{
FUNCDEF("extract_response");
if (_success != tentacle::OKAY) return _success;
* Please send any updates to: fred@gruntose.com *
\*****************************************************************************/
-#include <crypto/blowfish_crypto.h>
+#include <crypto/twofish_crypto.h>
#include <crypto/old_school_rsa_crypto.h>
#include <octopus/entity_defs.h>
#include <octopus/infoton.h>
encryption_infoton &operator =(const encryption_infoton &to_copy);
- basis::outcome prepare_blowfish_key(crypto::blowfish_crypto &new_key);
+ basis::outcome prepare_blowfish_key(crypto::twofish_crypto &new_key);
//!< performs the server side's job on the current key.
/*!< the public key had better be set already or this will fail. the
"new_key" will always be used to communicate with the client after this.
//!< sets up both keys by randomly generating the "private_key".
basis::outcome extract_response(const crypto::old_school_rsa_crypto &private_key,
- crypto::blowfish_crypto &new_key) const;
+ crypto::twofish_crypto &new_key) const;
//!< used by the client to extract the shared blowfish key from the server.
/*!< using the private key, the server's response is decrypted and stored
in "new_key". note that this will only succeed if the _success member
#include "encryption_wrapper.h"
#include "key_repository.h"
-#include <crypto/blowfish_crypto.h>
+#include <crypto/twofish_crypto.h>
#include <crypto/old_school_rsa_crypto.h>
#include <loggers/program_wide_logger.h>
#include <structures/symbol_table.h>
if (!_server_side) {
// client's side must track the key we were given for decryption. we'll
// use that from now on.
- blowfish_crypto new_key(blowfish_crypto::minimum_key_size()); // bogus.
+ twofish_crypto new_key(twofish_crypto::minimum_key_size()); // bogus.
outcome ret = inf->extract_response(*_rsa_private, new_key);
if (ret != OKAY) {
#ifdef DEBUG_ENCRYPTION_TENTACLE
} else {
// server's side need to process a key request and send it back using
// the public key the requester provided.
- blowfish_crypto agreed_key(blowfish_crypto::minimum_key_size());
+ twofish_crypto agreed_key(twofish_crypto::minimum_key_size());
// initialized with junk.
outcome worked = inf->prepare_blowfish_key(agreed_key);
if (worked != OKAY) {
#include "key_repository.h"
-#include <crypto/blowfish_crypto.h>
+#include <crypto/twofish_crypto.h>
#include <structures/symbol_table.h>
using namespace basis;
}
outcome key_repository::add(const octopus_entity &ent,
- const blowfish_crypto &key)
+ const twofish_crypto &key)
{
#ifdef DEBUG_KEY_REPOSITORY
FUNCDEF("add");
\*****************************************************************************/
#include <basis/mutex.h>
-#include <crypto/blowfish_crypto.h>
+#include <crypto/twofish_crypto.h>
#include <structures/symbol_table.h>
#include <octopus/entity_defs.h>
{
public:
octopus_entity _entity; //!< who the key belongs to.
- crypto::blowfish_crypto _key; //!< used for communicating with an entity.
+ crypto::twofish_crypto _key; //!< used for communicating with an entity.
octenc_key_record() : _key(200) {} //!< bogus blank constructor.
- octenc_key_record(const octopus_entity &entity, const crypto::blowfish_crypto &key)
+ octenc_key_record(const octopus_entity &entity, const crypto::twofish_crypto &key)
: _entity(entity), _key(key) {}
};
void unlock(octenc_key_record *to_unlock);
//!< drops the lock on the key record in "to_unlock".
- basis::outcome add(const octopus_entity &ent, const crypto::blowfish_crypto &key);
+ basis::outcome add(const octopus_entity &ent, const crypto::twofish_crypto &key);
//!< adds a "key" for the "ent". this will fail if one is already listed.
basis::outcome whack(const octopus_entity &ent);