Willberg.
Changed the SilcCipher to be private context.
channel message with wrong key during backup resuming
protocol. Affected file silcd/packet_send.c.
+ * ROBODoc documented lib/silccrypt/silccipher.h. A patch by
+ Toni Willberg (toniw@iki.fi)
+
+ * Changed the SilcCipher context to be private. Changed the
+ silc_cipher_get_iv to just return pointer to the IV. Added
+ silc_cipher_get_name to return the name of the cipher.
+ Fixed code all around to support these changes. Affected
+ files are lib/silccrypt/silccipher.[ch], client library and
+ server.
+
Wed Oct 23 19:01:41 EEST 2002 Pekka Riikonen <priikone@silcnet.org>
* Fixed unaligned access in lib/silccore/silcattrs.c.
Stuff that needs to be done in order to complete the Tooolkit Reference
Manual (Do these to 0.9.x).
- o ROBOdoc documenting missing from lib/silcutil/silcfileutil.h.
-
- o ROBOdoc documenting missing from lib/silccrypt/silccipher.h.
-
o Write "Programming with Toolkit" document, describing how to build
Toolkit, how the build system works, where is everything, how
new (external) projects can be glued into Toolkit (use irssi as an
tmp = silc_client_chmode(mode,
channel->channel_key ?
- channel->channel_key->cipher->name : "",
+ silc_cipher_get_name(channel->channel_key) : "",
channel->hmac ?
silc_hmac_get_name(channel->hmac) : "");
mode = silc_client_chmode(modei,
channel_entry->channel_key ?
- channel_entry->channel_key->cipher->name : "",
+ silc_cipher_get_name(channel_entry->
+ channel_key) : "",
channel_entry->hmac ?
silc_hmac_get_name(channel_entry->hmac) : "");
g_free_not_null(chanrec->mode);
memset(buf, 0, sizeof(buf));
strncat(buf, " ", 2);
- len = strlen(keys[k]->cipher->cipher->name);
- strncat(buf, keys[k]->cipher->cipher->name, len > 16 ? 16 : len);
+ len = strlen(silc_cipher_get_name(keys[k]->cipher));
+ strncat(buf, silc_cipher_get_name(keys[k]->cipher),
+ len > 16 ? 16 : len);
if (len < 16)
for (i = 0; i < 16 - len; i++)
strcat(buf, " ");
bool resolve;
unsigned char *fkey = NULL;
SilcUInt32 fkey_len = 0;
+ const char *cipher;
SILC_LOG_DEBUG(("Joining client to channel"));
if (!(channel->mode & SILC_CHANNEL_MODE_PRIVKEY)) {
tmp = silc_id_id2str(channel->id, SILC_ID_CHANNEL);
+ cipher = silc_cipher_get_name(channel->channel_key);
keyp = silc_channel_key_payload_encode(silc_id_get_len(channel->id,
SILC_ID_CHANNEL),
tmp,
- strlen(channel->channel_key->
- cipher->name),
- channel->channel_key->cipher->name,
+ strlen(cipher), cipher,
channel->key_len / 8, channel->key);
silc_free(tmp);
}
silc_server_send_channel_key(server, NULL, channel,
server->server_type == SILC_ROUTER ?
FALSE : !server->standalone);
-
- cipher = channel->channel_key->cipher->name;
+
+ cipher = (char *)silc_cipher_get_name(channel->channel_key);
hmac = (char *)silc_hmac_get_name(channel->hmac);
}
}
char *channel_name;
SilcUInt32 name_len;
unsigned char *id;
- SilcUInt32 id_len;
+ SilcUInt32 id_len, cipher_len;
SilcServerEntry server_entry;
SilcChannelEntry channel;
+ const char *cipher;
if (sock->type == SILC_SOCKET_TYPE_CLIENT ||
packet->src_id_type != SILC_ID_SERVER ||
/* Send the new channel key to the server */
id = silc_id_id2str(channel->id, SILC_ID_CHANNEL);
id_len = silc_id_get_len(channel->id, SILC_ID_CHANNEL);
+ cipher = silc_cipher_get_name(channel->channel_key);
+ cipher_len = strlen(cipher);
chk = silc_channel_key_payload_encode(id_len, id,
- strlen(channel->channel_key->
- cipher->name),
- channel->channel_key->cipher->name,
+ cipher_len, cipher,
channel->key_len / 8,
channel->key);
silc_server_packet_send(server, sock, SILC_PACKET_CHANNEL_KEY, 0,
/* Send to the server */
id = silc_id_id2str(channel->id, SILC_ID_CHANNEL);
id_len = silc_id_get_len(channel->id, SILC_ID_CHANNEL);
+ cipher = silc_cipher_get_name(channel->channel_key);
+ cipher_len = strlen(cipher);
chk = silc_channel_key_payload_encode(id_len, id,
- strlen(channel->channel_key->
- cipher->name),
- channel->channel_key->
- cipher->name,
+ cipher_len, cipher,
channel->key_len / 8,
channel->key);
silc_server_packet_send(server, sock, SILC_PACKET_CHANNEL_KEY, 0,
SilcHashTableList htl;
SilcChannelClientEntry chl;
SilcServerResumeResolve r;
+ const char *cipher;
ret = silc_buffer_unformat(buffer,
SILC_STR_UI16_NSTRING(&id_string, &id_len),
}
id_string = silc_id_id2str(channel->id, SILC_ID_CHANNEL);
+ cipher = silc_cipher_get_name(channel->channel_key);
keyp =
silc_channel_key_payload_encode(silc_id_get_len(channel->id,
SILC_ID_CHANNEL),
id_string,
- strlen(channel->channel_key->
- cipher->name),
- channel->channel_key->cipher->name,
+ strlen(cipher), cipher,
channel->key_len / 8, channel->key);
silc_free(id_string);
SilcBuffer packet;
unsigned char *chid;
SilcUInt32 tmp_len;
+ const char *cipher;
SILC_LOG_DEBUG(("Sending key to channel %s", channel->channel_name));
return;
/* Encode channel key packet */
- tmp_len = strlen(channel->channel_key->cipher->name);
+ cipher = silc_cipher_get_name(channel->channel_key);
+ tmp_len = strlen(cipher);
packet = silc_channel_key_payload_encode(silc_id_get_len(channel->id,
SILC_ID_CHANNEL),
- chid, tmp_len,
- channel->channel_key->cipher->name,
+ chid, tmp_len, cipher,
channel->key_len / 8, channel->key);
silc_server_packet_send_to_channel(server, sender, channel,
SILC_PACKET_CHANNEL_KEY,
{
SilcUnknownEntry conn_data;
SilcIDListData idata;
+ const char *cname = silc_cipher_get_name(cipher);
SILC_LOG_DEBUG(("Setting new keys into use"));
idata = (SilcIDListData)conn_data;
/* Allocate cipher to be used in the communication */
- if (!silc_cipher_alloc(cipher->cipher->name, &idata->send_key)) {
+ if (!silc_cipher_alloc((char *)cname, &idata->send_key)) {
silc_free(conn_data);
- SILC_LOG_ERROR(("Cannot allocate algorithm: %s", cipher->cipher->name));
+ SILC_LOG_ERROR(("Cannot allocate algorithm: %s", cname));
return FALSE;
}
- if (!silc_cipher_alloc(cipher->cipher->name, &idata->receive_key)) {
+ if (!silc_cipher_alloc((char *)cname, &idata->receive_key)) {
silc_free(conn_data);
- SILC_LOG_ERROR(("Cannot allocate algorithm: %s", cipher->cipher->name));
+ SILC_LOG_ERROR(("Cannot allocate algorithm: %s", cname));
return FALSE;
}
SILC_LOG_INFO(("%s (%s) security properties: %s %s %s %s",
sock->hostname, sock->ip,
- idata->send_key->cipher->name,
+ silc_cipher_get_name(idata->send_key),
(char *)silc_hmac_get_name(idata->hmac_send),
silc_hash_get_name(idata->hash),
ske->prop->flags & SILC_SKE_SP_FLAG_PFS ? "PFS" : ""));
SILC_SERVER_SEND_NOTIFY(server, sock, SILC_NOTIFY_TYPE_NONE,
("Your connection is secured with %s cipher, "
"key length %d bits",
- idata->send_key->cipher->name,
- idata->send_key->cipher->key_len));
+ silc_cipher_get_name(idata->send_key),
+ silc_cipher_get_key_len(idata->send_key)));
SILC_SERVER_SEND_NOTIFY(server, sock, SILC_NOTIFY_TYPE_NONE,
("Your current nickname is %s",
client->nickname));
SilcSocketConnection sock = conn->sock;
SilcBuffer buffer;
int cipher_len;
+ const char *cipher;
if (!client_entry->send_key || !client_entry->key)
return FALSE;
SILC_LOG_DEBUG(("Sending private message key"));
- cipher_len = strlen(client_entry->send_key->cipher->name);
+ cipher = silc_cipher_get_name(client_entry->send_key);
+ cipher_len = strlen(cipher);
/* Create private message key payload */
buffer = silc_buffer_alloc(2 + client_entry->key_len);
SILC_STR_UI_XNSTRING(client_entry->key,
client_entry->key_len),
SILC_STR_UI_SHORT(cipher_len),
- SILC_STR_UI_XNSTRING(client_entry->send_key->cipher->name,
+ SILC_STR_UI_XNSTRING(cipher,
cipher_len),
SILC_STR_END);
if (entry->send_key) {
keys[count].client_entry = entry;
- keys[count].cipher = entry->send_key->cipher->name;
+ keys[count].cipher = (char *)silc_cipher_get_name(entry->send_key);
keys[count].key = entry->generated == FALSE ? entry->key : NULL;
keys[count].key_len = entry->generated == FALSE ? entry->key_len : 0;
count++;
bool is_responder)
{
SilcClientConnection conn = (SilcClientConnection)sock->user_data;
+ const char *cname = silc_cipher_get_name(cipher);
SILC_LOG_DEBUG(("Setting new keys into use"));
/* Allocate cipher to be used in the communication */
- silc_cipher_alloc(cipher->cipher->name, &conn->send_key);
- silc_cipher_alloc(cipher->cipher->name, &conn->receive_key);
+ silc_cipher_alloc((char *)cname, &conn->send_key);
+ silc_cipher_alloc((char *)cname, &conn->receive_key);
silc_hmac_alloc((char *)silc_hmac_get_name(hmac), NULL, &conn->hmac_send);
silc_hmac_alloc((char *)silc_hmac_get_name(hmac), NULL, &conn->hmac_receive);
/* Encrypt the data area of the packet. */
if (cipher) {
SILC_LOG_DEBUG(("Encrypting packet, cipher %s, len %d",
- cipher->cipher->name, len));
- silc_cipher_encrypt(cipher, buffer->data, buffer->data, len, cipher->iv);
+ silc_cipher_get_name(cipher), len));
+ silc_cipher_encrypt(cipher, buffer->data, buffer->data, len,
+ silc_cipher_get_iv(cipher));
}
/* Pull the HMAC into the visible data area in the buffer */
/* Decrypt first 16 bytes of the packet */
if (!SILC_IS_INBUF_PENDING(sock) && cipher)
silc_cipher_decrypt(cipher, sock->inbuf->data, sock->inbuf->data,
- SILC_PACKET_MIN_HEADER_LEN, cipher->iv);
+ SILC_PACKET_MIN_HEADER_LEN,
+ silc_cipher_get_iv(cipher));
/* Get packet lenght and full packet length with padding */
SILC_PACKET_LENGTH(sock->inbuf, packetlen, paddedlen);
/* Decrypt rest of the packet */
silc_buffer_pull(buffer, SILC_PACKET_MIN_HEADER_LEN);
silc_cipher_decrypt(cipher, buffer->data, buffer->data, buffer->len,
- cipher->iv);
+ silc_cipher_get_iv(cipher));
silc_buffer_push(buffer, SILC_PACKET_MIN_HEADER_LEN);
SILC_LOG_HEXDUMP(("Fully decrypted packet, len %d", buffer->len),
"packet dropped"));
return FALSE;
}
- silc_cipher_decrypt(cipher, buffer->data, buffer->data, len, cipher->iv);
+ silc_cipher_decrypt(cipher, buffer->data, buffer->data, len,
+ silc_cipher_get_iv(cipher));
silc_buffer_push(buffer, SILC_PACKET_MIN_HEADER_LEN);
SILC_LOG_HEXDUMP(("packet, len %d", buffer->len),
buffer->data, buffer->len);
/* Decrypt the payload */
if (cipher)
silc_cipher_decrypt(cipher, buffer.data, buffer.data,
- buffer.len, cipher->iv);
+ buffer.len, silc_cipher_get_iv(cipher));
newp = silc_calloc(1, sizeof(*newp));
if (!newp)
if (cipher) {
/* Encrypt payload of the packet. */
silc_cipher_encrypt(cipher, buffer->data, buffer->data,
- buffer->len, cipher->iv);
+ buffer->len, silc_cipher_get_iv(cipher));
memset(pad, 0, sizeof(pad));
}
#include "silcincludes.h"
#include "ciphers.h" /* Includes cipher definitions */
+/* The SilcCipher context */
+struct SilcCipherStruct {
+ SilcCipherObject *cipher;
+ void *context;
+ unsigned char iv[SILC_CIPHER_MAX_IV_SIZE];
+};
+
#ifndef SILC_EPOC
/* Dynamically registered list of ciphers. */
SilcDList silc_cipher_list = NULL;
*new_cipher = silc_calloc(1, sizeof(**new_cipher));
(*new_cipher)->cipher = entry;
(*new_cipher)->context = silc_calloc(1, entry->context_len());
- (*new_cipher)->set_iv = silc_cipher_set_iv;
- (*new_cipher)->get_iv = silc_cipher_get_iv;
- (*new_cipher)->get_key_len = silc_cipher_get_key_len;
- (*new_cipher)->get_block_len = silc_cipher_get_block_len;
return TRUE;
}
memcpy(&cipher->iv, iv, cipher->cipher->block_len);
}
-/* Returns the IV (initial vector) of the cipher. The IV is returned
- to 'iv' argument. */
+/* Returns the IV (initial vector) of the cipher. */
-void silc_cipher_get_iv(SilcCipher cipher, unsigned char *iv)
+unsigned char *silc_cipher_get_iv(SilcCipher cipher)
{
- memcpy(iv, &cipher->iv, cipher->cipher->block_len);
+ return cipher->iv;
}
/* Returns the key length of the cipher. */
{
return cipher->cipher->block_len;
}
+
+/* Returns the name of the cipher */
+
+const char *silc_cipher_get_name(SilcCipher cipher)
+{
+ return (const char *)cipher->cipher->name;
+}
Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
- Copyright (C) 1997 - 2001 Pekka Riikonen
+ Copyright (C) 1997 - 2002 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifndef SILCCIPHER_H
#define SILCCIPHER_H
-/*
- SILC Cipher object.
+/****h* silccrypt/SILC Cipher Interface
+ *
+ * DESCRIPTION
+ *
+ * This is the interface for cipher functions. It provides cipher
+ * registering and unregistering routines, encryption and decryption
+ * routines.
+ *
+ ***/
- Default SILC cipher object to represent any cipher. The function
- pointers are the stub functions for each implemented cipher. Following
- short description of the fields:
+/****s* silccrypt/SilcCipherAPI/SilcCipher
+ *
+ * NAME
+ *
+ * typedef struct { ... } SilcCipher;
+ *
+ * DESCRIPTION
+ *
+ * This context is the actual cipher context and is allocated
+ * by silc_cipher_alloc and given as argument usually to all
+ * silc_cipher _* functions. It is freed by the silc_cipher_free
+ * function.
+ *
+ ***/
+typedef struct SilcCipherStruct *SilcCipher;
- char *name
-
- Logical name of the cipher.
-
- SilcUInt32 block_len
-
- Block size of the cipher.
-
- SilcUInt32 key_len
-
- Length of the key of the cipher (in bits).
-
-*/
+/* The default SILC Cipher object to represent any cipher in SILC. */
typedef struct {
char *name;
SilcUInt32 block_len;
#define SILC_CIPHER_MAX_IV_SIZE 16
-/* The main SilcCipher structure. Use SilcCipher instead of SilcCipherStruct.
- Also remember that SilcCipher is a pointer. */
-typedef struct SilcCipherStruct {
- SilcCipherObject *cipher;
- void *context;
- unsigned char iv[SILC_CIPHER_MAX_IV_SIZE];
- void (*set_iv)(struct SilcCipherStruct *, const unsigned char *);
- void (*get_iv)(struct SilcCipherStruct *, unsigned char *);
- SilcUInt32 (*get_key_len)(struct SilcCipherStruct *);
- SilcUInt32 (*get_block_len)(struct SilcCipherStruct *);
-} *SilcCipher;
-
/* Marks for all ciphers in silc. This can be used in silc_cipher_unregister
to unregister all ciphers at once. */
#define SILC_ALL_CIPHERS ((SilcCipherObject *)1)
/* Default cipher in the SILC protocol */
#define SILC_DEFAULT_CIPHER "aes-256-cbc"
+
/* Macros */
/* Function names in SILC Crypto modules. The name of the cipher
unsigned char *dst, \
SilcUInt32 len, \
unsigned char *iv)
+
+
#define SILC_CIPHER_API_CONTEXT_LEN(cipher) \
SilcUInt32 silc_##cipher##_context_len()
+
/* Prototypes */
+
+/****f* silccrypt/SilcCipherAPI/
+ *
+ * SYNOPSIS
+ *
+ * bool silc_cipher_register(const SilcCipherObject *cipher);
+ *
+ * DESCRIPTION
+ *
+ * Register a new cipher into SILC. This is used at the initialization of
+ * the SILC. This function allocates a new object for the cipher to be
+ * registered. Therefore, if memory has been allocated for the object sent
+ * as argument it has to be free'd after this function returns succesfully.
+ *
+ ***/
bool silc_cipher_register(const SilcCipherObject *cipher);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_unregister
+ *
+ * SYNOPSIS
+ *
+ * bool silc_cipher_unregister(SilcCipherObject *cipher);
+ *
+ * DESCRIPTION
+ *
+ * Unregister a cipher from the SILC.
+ *
+ ***/
bool silc_cipher_unregister(SilcCipherObject *cipher);
+
+/****f* silccrypt/SilcCipherAPI/
+ *
+ * SYNOPSIS
+ *
+ * bool silc_cipher_register_default(void);
+ *
+ * DESCRIPTION
+ *
+ * Function that registers all the default ciphers (all builtin ciphers).
+ * The application may use this to register the default ciphers if specific
+ * ciphers in any specific order is not wanted.
+ *
+ ***/
bool silc_cipher_register_default(void);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_unregister_all
+ *
+ * SYNOPSIS
+ *
+ * bool silc_cipher_unregister_all(void);
+ *
+ * DESCRIPTION
+ *
+ * Unregisters all ciphers.
+ *
+ ***/
bool silc_cipher_unregister_all(void);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_alloc
+ *
+ * SYNOPSIS
+ *
+ * bool silc_cipher_alloc(const unsigned char *name, SilcCipher *new_cipher);
+ *
+ * DESCRIPTION
+ *
+ * Allocates a new SILC cipher object. Function returns 1 on succes and 0
+ * on error. The allocated cipher is returned in new_cipher argument. The
+ * caller must set the key to the cipher after this function has returned
+ * by calling the ciphers set_key function.
+ *
+ ***/
bool silc_cipher_alloc(const unsigned char *name, SilcCipher *new_cipher);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_free
+ *
+ * SYNOPSIS
+ *
+ * void silc_cipher_free(SilcCipher cipher);
+ *
+ * DESCRIPTION
+ *
+ * Frees the given cipher.
+ *
+ ***/
void silc_cipher_free(SilcCipher cipher);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_is_supported(
+ *
+ * SYNOPSIS
+ *
+ * bool silc_cipher_is_supported(const unsigned char *name);
+ *
+ * DESCRIPTION
+ *
+ * Returns TRUE if cipher `name' is supported.
+ *
+ ***/
bool silc_cipher_is_supported(const unsigned char *name);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_get_supported
+ *
+ * SYNOPSIS
+ *
+ * char *silc_cipher_get_supported(void);
+ *
+ * DESCRIPTION
+ *
+ * Returns comma separated list of supported ciphers.
+ *
+ ***/
char *silc_cipher_get_supported(void);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_encrypt
+ *
+ * SYNOPSIS
+ *
+ * bool silc_cipher_encrypt(SilcCipher cipher, const unsigned char *src,
+ * unsigned char *dst, SilcUInt32 len,
+ * unsigned char *iv);
+ *
+ * DESCRIPTION
+ *
+ * Encrypts data from `src' into `dst' with the specified cipher and
+ * Initial Vector (IV). The `src' and `dst' maybe same buffer.
+ *
+ ***/
bool silc_cipher_encrypt(SilcCipher cipher, const unsigned char *src,
unsigned char *dst, SilcUInt32 len,
unsigned char *iv);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_decrypt
+ *
+ * SYNOPSIS
+ *
+ * bool silc_cipher_decrypt(SilcCipher cipher, const unsigned char *src,
+ * unsigned char *dst, SilcUInt32 len,
+ * unsigned char *iv);
+ *
+ * DESCRIPTION
+ *
+ * Decrypts data from `src' into `dst' with the specified cipher and
+ * Initial Vector (IV). The `src' and `dst' maybe same buffer.
+ *
+ ***/
bool silc_cipher_decrypt(SilcCipher cipher, const unsigned char *src,
unsigned char *dst, SilcUInt32 len,
unsigned char *iv);
+
+/****f* silccrypt/SilcCipherAPI/
+ *
+ * SYNOPSIS
+ *
+ * bool silc_cipher_set_key(SilcCipher cipher, const unsigned char *key,
+ * SilcUInt32 keylen);
+ *
+ * DESCRIPTION
+ *
+ * Sets the key for the cipher. The `keylen' is the key length in
+ * bits.
+ *
+ ***/
bool silc_cipher_set_key(SilcCipher cipher, const unsigned char *key,
SilcUInt32 keylen);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_set_iv
+ *
+ * SYNOPSIS
+ *
+ * void silc_cipher_set_iv(SilcCipher cipher, const unsigned char *iv);
+ *
+ * DESCRIPTION
+ *
+ * Sets the IV (initial vector) for the cipher. The `iv' must be
+ * the size of the block size of the cipher.
+ *
+ ***/
void silc_cipher_set_iv(SilcCipher cipher, const unsigned char *iv);
-void silc_cipher_get_iv(SilcCipher cipher, unsigned char *iv);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_get_iv
+ *
+ * SYNOPSIS
+ *
+ * unsigned char *silc_cipher_get_iv(SilcCipher cipher);
+ *
+ * DESCRIPTION
+ *
+ * Returns the IV (initial vector) of the cipher. The returned
+ * pointer must not be freed by the caller.
+ *
+ ***/
+unsigned char *silc_cipher_get_iv(SilcCipher cipher);
+
+/****f* silccrypt/SilcCipherAPI/SilcUInt32 silc_cipher_get_key_len
+ *
+ * SYNOPSIS
+ *
+ * SilcUInt32 silc_cipher_get_key_len(SilcCipher cipher);
+ *
+ * DESCRIPTION
+ *
+ * Returns the key length of the cipher in bits.
+ *
+ ***/
SilcUInt32 silc_cipher_get_key_len(SilcCipher cipher);
+
+/****f* silccrypt/SilcCipherAPI/silc_cipher_get_block_len
+ *
+ * SYNOPSIS
+ *
+ * SilcUInt32 silc_cipher_get_block_len(SilcCipher cipher);
+ *
+ * DESCRIPTION
+ *
+ * Returns the block size of the cipher in bytes.
+ *
+ ***/
SilcUInt32 silc_cipher_get_block_len(SilcCipher cipher);
+/****f* silccrypt/SilcCipherAPI/silc_cipher_get_name
+ *
+ * SYNOPSIS
+ *
+ * const char *silc_cipher_get_name(SilcCipher cipher);
+ *
+ * DESCRIPTION
+ *
+ * Returns the name of the cipher.
+ *
+ ***/
+const char *silc_cipher_get_name(SilcCipher cipher);
+
#endif