/* -*-c-*-
*
- * $Id: crypt.h,v 1.2 1997/08/04 10:24:21 mdw Exp $
+ * $Id: crypt.h,v 1.4 1998/01/12 16:45:57 mdw Exp $
*
* Cryptographic transfer of `become' requests
*
- * (c) 1997 EBI
+ * (c) 1998 EBI
*/
/*----- Licensing notice --------------------------------------------------*
/*----- Revision history --------------------------------------------------*
*
* $Log: crypt.h,v $
+ * Revision 1.4 1998/01/12 16:45:57 mdw
+ * Fix copyright date.
+ *
+ * Revision 1.3 1997/09/26 09:14:58 mdw
+ * Merged blowfish branch into trunk.
+ *
+ * Revision 1.2.2.1 1997/09/26 09:08:04 mdw
+ * Use the Blowfish encryption algorithm instead of IDEA. This is partly
+ * because I prefer Blowfish (without any particularly strong evidence) but
+ * mainly because IDEA is patented and Blowfish isn't.
+ *
* Revision 1.2 1997/08/04 10:24:21 mdw
* Sources placed under CVS control.
*
/* --- Encryption formats --- */
enum {
- cryptType_idea, /* Symmetric IDEA encryption */
+ cryptType_blowfish, /* Symmetric Blowfish encryption */
cryptType_rsa /* Public key RSA (later project) */
};
+/* --- Blowfish has a variable key size --- *
+ *
+ * Fix a key size here.
+ */
+
+#define BLOWFISH_KEYSIZE (16u)
+
/* --- Encrypted buffer format --- *
*
* C structures are no good here. Time for some explicit offsets.
enum {
crq_cryptType = 0, /* Encryption type (1 byte) */
crq_iv = crq_cryptType + 1, /* Plaintext IV (8 bytes) */
- crq_session = crq_iv + 8, /* IDEA session key (16 bytes) */
+ crq_session = crq_iv + 8, /* Session key (16 bytes) */
crq_cipher = crq_session + 16, /* Where to start encrypting */
crq_time = crq_cipher, /* Time stamp (4 bytes) */
crq_pid = crq_time + 4, /* Process ID (4 bytes) */