]> feistymeow.org Git - feisty_meow.git/commitdiff
small progress, still not building. dev
authorFred T. Hamster <fred@feistymeow.org>
Wed, 29 Apr 2026 23:21:06 +0000 (19:21 -0400)
committerFred T. Hamster <fred@feistymeow.org>
Wed, 29 Apr 2026 23:21:06 +0000 (19:21 -0400)
nucleus/library/tests_crypto/makefile
octopi/library/cromp/cromp_client.cpp
octopi/library/cromp/cromp_client.h
octopi/library/tentacles/encryption_infoton.cpp
octopi/library/tentacles/encryption_infoton.h
octopi/library/tentacles/encryption_tentacle.cpp
octopi/library/tentacles/key_repository.cpp
octopi/library/tentacles/key_repository.h

index 58b484714bdd74d485f24385d5668d10517e0b27..58b9ff7c38d9fb449c39f92a26abc23b736aea37 100644 (file)
@@ -2,9 +2,7 @@ include cpp/variables.def
 
 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
index 1c58b010d2c38c0805c67d065f0a6af97714a963..53a86ec8678248be1cf2e2d53e5ffb0407775fe2 100644 (file)
@@ -135,7 +135,7 @@ cromp_client::cromp_client(const internet_address &addr, int connection_wait,
   _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)
index 20434cfbb3f487cba07b66112d52501df8e3c354..333de65e9745740c5f67d4de817ee747f2cfdc2e 100644 (file)
@@ -28,7 +28,7 @@
 
 #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>
@@ -175,7 +175,7 @@ private:
   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.
index 36f069854df997cdbfa4b6d7a39c1db442f5b163..fb3b4c6052dba293f996fc4c03775f92e10c80e9 100644 (file)
@@ -18,7 +18,7 @@
 
 #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>
@@ -103,7 +103,7 @@ bool encryption_infoton::unpack(byte_array &packed_form)
   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.
@@ -114,7 +114,7 @@ outcome encryption_infoton::prepare_blowfish_key(blowfish_crypto &new_key)
   }
 
   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.
@@ -141,7 +141,7 @@ outcome encryption_infoton::prepare_public_key(const old_school_rsa_crypto &priv
 }
 
 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;
index 9f02b2172451f54447b10890908b1144b93268e1..c395d210c6a433d4ac8d34e29f1d7f5335c29bd3 100644 (file)
@@ -15,7 +15,7 @@
 * 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>
@@ -62,7 +62,7 @@ public:
 
   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.
@@ -76,7 +76,7 @@ public:
     //!< 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
index 7cfe50464883c729b52e62a06204757c4d1090e8..2256c87cb6bb27564bfc4d282d85b568c20eb878 100644 (file)
@@ -16,7 +16,7 @@
 #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>
@@ -149,7 +149,7 @@ outcome encryption_tentacle::consume(infoton &to_chow,
   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
@@ -164,7 +164,7 @@ outcome encryption_tentacle::consume(infoton &to_chow,
   } 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) {
index e5d0bc57837ef9497dd31b0659ad9785a2288486..f81b14dd6db0012a158e7e6f3dad005774882fd0 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "key_repository.h"
 
-#include <crypto/blowfish_crypto.h>
+#include <crypto/twofish_crypto.h>
 #include <structures/symbol_table.h>
 
 using namespace basis;
@@ -61,7 +61,7 @@ void key_repository::unlock(octenc_key_record *to_unlock)
 }
 
 outcome key_repository::add(const octopus_entity &ent,
-    const blowfish_crypto &key)
+    const twofish_crypto &key)
 {
 #ifdef DEBUG_KEY_REPOSITORY
   FUNCDEF("add");
index a373098b768a6055ca8422f0bbc19515440bc421..76aead4cb8a4a69f6e92b5a7ab10f4d909d06ab1 100644 (file)
@@ -16,7 +16,7 @@
 \*****************************************************************************/
 
 #include <basis/mutex.h>
-#include <crypto/blowfish_crypto.h>
+#include <crypto/twofish_crypto.h>
 #include <structures/symbol_table.h>
 #include <octopus/entity_defs.h>
 
@@ -34,11 +34,11 @@ class octenc_key_record
 {
 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) {}
 };
 
@@ -59,7 +59,7 @@ public:
   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);