Function silc_client_add_private_message_key
SYNOPSIS
SilcBool
silc_client_add_private_message_key(SilcClient client,
SilcClientConnection conn,
SilcClientEntry client_entry,
const char *cipher,
const char *hmac,
unsigned char *key,
SilcUInt32 key_len);
DESCRIPTION
Adds a static private message key to the client library. The key
will be used to encrypt all private message between the client and
the remote client indicated by the `client_entry'. The `key' can
be for example a pre-shared-key, passphrase or similar shared secret
string. The `cipher' and `hmac' MAY be provided but SHOULD be NULL
to assure that the requirements of the SILC protocol are met. The
API, however, allows to allocate any cipher and HMAC.
If the private message key is added to client without first receiving
a request for it from the remote `client_entry' this function will
send the request to `client_entry'. Note that, the actual key is
not sent to the network.
It is not necessary to set key for normal private message usage. If the
key is not set then the private messages are encrypted using normal
session keys. Setting the private key, however, increases security.
Returns FALSE if the key is already set for the `client_entry', TRUE
otherwise.
|