/*
* $Id$
* $Log$
+ * Revision 1.5 2000/10/09 11:37:21 priikone
+ * bugfixes. Made public/private keys protocol compliant.
+ *
+ * Revision 1.4 2000/10/02 18:31:46 priikone
+ * Added rijndael (AES) to cipher list.
+ *
+ * Revision 1.3 2000/09/28 11:28:20 priikone
+ * Changed cipher list order.
+ *
+ * Revision 1.2 2000/07/05 06:08:43 priikone
+ * Global cosmetic change.
+ *
* Revision 1.1.1.1 2000/06/27 11:36:54 priikone
- * Importet from internal CVS/Added Log headers.
+ * Imported from internal CVS/Added Log headers.
*
*
*/
support SIM's. */
SilcCipherObject silc_cipher_builtin_list[] =
{
- { "none", 0, 0, silc_none_set_key, silc_none_set_key_with_string,
- silc_none_encrypt_cbc, silc_none_decrypt_cbc,
- silc_none_context_len },
{ "twofish", 16, 16, silc_twofish_set_key, silc_twofish_set_key_with_string,
silc_twofish_encrypt_cbc, silc_twofish_decrypt_cbc,
silc_twofish_context_len },
+ { "aes", 16, 16, silc_rijndael_set_key,
+ silc_rijndael_set_key_with_string, silc_rijndael_encrypt_cbc,
+ silc_rijndael_decrypt_cbc, silc_rijndael_context_len },
{ "rc6", 16, 16, silc_rc6_set_key, silc_rc6_set_key_with_string,
silc_rc6_encrypt_cbc, silc_rc6_decrypt_cbc,
silc_rc6_context_len },
{ "mars", 16, 16, silc_mars_set_key, silc_mars_set_key_with_string,
silc_mars_encrypt_cbc, silc_mars_decrypt_cbc,
silc_mars_context_len },
+ { "none", 0, 0, silc_none_set_key, silc_none_set_key_with_string,
+ silc_none_encrypt_cbc, silc_none_decrypt_cbc,
+ silc_none_context_len },
{ NULL, 0, 0, NULL, NULL, NULL, NULL, NULL }
};
SILC_LOG_DEBUG(("Registering new cipher"));
new = silc_calloc(1, sizeof(*new));
- if (!new) {
- SILC_LOG_ERROR(("Could not allocate new cipher list object: %s",
- strerror(errno)));
- return FALSE;
- }
-
new->cipher = silc_calloc(1, sizeof(*new->cipher));
- if (!new->cipher) {
- SILC_LOG_ERROR(("Could not allocate new cipher object: %s",
- strerror(errno)));
- return FALSE;
- }
/* Set the pointers */
new->cipher->name = strdup(cipher->name);
/* Allocate the new object */
*new_cipher = silc_calloc(1, sizeof(**new_cipher));
- if (*new_cipher == NULL) {
- SILC_LOG_ERROR(("Could not allocate new cipher object"));
- return FALSE;
- }
if (silc_cipher_list) {