Added initiator rekey support.
[silc.git] / lib / silcske / silcske.h
1 /*
2
3   silcske.h
4
5   Author: Pekka Riikonen <priikone@silcnet.org>
6
7   Copyright (C) 2000 - 2006 Pekka Riikonen
8
9   This program is free software; you can redistribute it and/or modify
10   it under the terms of the GNU General Public License as published by
11   the Free Software Foundation; version 2 of the License.
12
13   This program is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18 */
19
20 /****h* silcske/SILC SKE Interface
21  *
22  * DESCRIPTION
23  *
24  * The SILC Key Exchange (SKE) protocol interface. The SKE protocol
25  * is used to negotiate secret key material between two parties, to be used
26  * as session key or some other key. For example, when client connects to
27  * server SKE is performed to exchange public keys, and to generate the key
28  * that is then used as session key. Two clients can execute SKE as well
29  * two create secret key material for securing for example file transfer
30  * stream. This SKE implementation provides easy interface for application
31  * that wants to use SKE.
32  *
33  ***/
34
35 #ifndef SILCSKE_H
36 #define SILCSKE_H
37
38 /* Forward declarations */
39 typedef struct SilcSKECallbacksStruct *SilcSKECallbacks;
40 typedef struct SilcSKEStruct *SilcSKE;
41
42 /****d* silcske/SilcSKEAPI/SilcSKEStatus
43  *
44  * NAME
45  *
46  *    typedef enum { ... } SilcSKEStatus;
47  *
48  * DESCRIPTION
49  *
50  *    Status types returned in SKE callbacks. This tell the status of
51  *    the SKE session, and if an error occurred. Application can map the
52  *    status to human readable string with silc_ske_map_status function.
53  *
54  * SOURCE
55  */
56 typedef enum {
57   /* These are defined by the protocol */
58   SILC_SKE_STATUS_OK                     = 0,  /* No error */
59   SILC_SKE_STATUS_ERROR                  = 1,  /* Unknown error */
60   SILC_SKE_STATUS_BAD_PAYLOAD            = 2,  /* Malformed payload */
61   SILC_SKE_STATUS_UNKNOWN_GROUP          = 3,  /* Unsupported DH group */
62   SILC_SKE_STATUS_UNKNOWN_CIPHER         = 4,  /* Unsupported cipher */
63   SILC_SKE_STATUS_UNKNOWN_PKCS           = 5,  /* Unsupported PKCS algorithm */
64   SILC_SKE_STATUS_UNKNOWN_HASH_FUNCTION  = 6,  /* Unsupported hash function */
65   SILC_SKE_STATUS_UNKNOWN_HMAC           = 7,  /* Unsupported HMAC */
66   SILC_SKE_STATUS_UNSUPPORTED_PUBLIC_KEY = 8,  /* Unsupported/not trusted PK */
67   SILC_SKE_STATUS_INCORRECT_SIGNATURE    = 9,  /* Incorrect signature */
68   SILC_SKE_STATUS_BAD_VERSION            = 10, /* Unsupported version */
69   SILC_SKE_STATUS_INVALID_COOKIE         = 11, /* Cookie was modified */
70
71   /* Implementation specific status types */
72   SILC_SKE_STATUS_PUBLIC_KEY_NOT_PROVIDED,     /* Remote did not send PK */
73   SILC_SKE_STATUS_BAD_RESERVED_FIELD,          /* Reserved field was not 0 */
74   SILC_SKE_STATUS_BAD_PAYLOAD_LENGTH,          /* Payload includes garbage */
75   SILC_SKE_STATUS_SIGNATURE_ERROR,             /* Error computing signature */
76   SILC_SKE_STATUS_OUT_OF_MEMORY,               /* System out of memory */
77   SILC_SKE_STATUS_TIMEOUT,                     /* Timeout */
78 } SilcSKEStatus;
79 /***/
80
81 #include "silcske_groups.h"
82 #include "silcske_payload.h"
83
84 /****d* silcske/SilcSKEAPI/SilcSKESecurityPropertyFlag
85  *
86  * NAME
87  *
88  *    typedef enum { ... } SilcSKESecurityPropertyFlag
89  *
90  * DESCRIPTION
91  *
92  *    SKE security property flags as defined by the SK protocol.
93  *
94  * SOURCE
95  */
96 typedef enum {
97   SILC_SKE_SP_FLAG_NONE         = 0x00,  /* No flags */
98   SILC_SKE_SP_FLAG_IV_INCLUDED  = 0x01,  /* IV included in packet */
99   SILC_SKE_SP_FLAG_PFS          = 0x02,  /* Perfect Forward Secrecy */
100   SILC_SKE_SP_FLAG_MUTUAL       = 0x04,  /* Mutual authentication */
101 } SilcSKESecurityPropertyFlag;
102 /***/
103
104 /****s* silcske/SilcSKEAPI/SilcSKESecurityProperties
105  *
106  * NAME
107  *
108  *    typedef struct { ... } *SilcSKESecurityProperties;
109  *
110  * DESCRIPTION
111  *
112  *    Security Properties negotiated between key exchange parties. This
113  *    structure is filled from the Key Exchange Start Payload which is used
114  *    to negotiate what security properties must be used in the
115  *    communication.
116  *
117  * SOURCE
118  */
119 typedef struct {
120   SilcSKESecurityPropertyFlag flags;     /* Flags */
121   SilcSKEDiffieHellmanGroup group;       /* Selected Diffie Hellman group */
122   SilcCipher cipher;                     /* Selected cipher */
123   SilcHmac hmac;                         /* Selected HMAC */
124   SilcHash hash;                         /* Selected hash algorithm */
125   SilcPublicKey public_key;              /* Remote public key */
126   SilcUInt16 remote_port;                /* Remote port, set when IV Included
127                                             set and using UDP/IP */
128 } *SilcSKESecurityProperties;
129 /***/
130
131 /****s* silcske/SilcSKEAPI/SilcSKEKeyMaterial
132  *
133  * NAME
134  *
135  *    typedef struct { ... } *SilcSKEKeyMaterial;
136  *
137  * DESCRIPTION
138  *
139  *    This is the key material structure, and is passed as argument by the
140  *    application to silc_ske_process_key_material_data function. It includes
141  *    the processed key material which can be used as SILC session keys.
142  *
143  * SOURCE
144  */
145 typedef struct {
146   unsigned char *send_iv;
147   unsigned char *receive_iv;
148   SilcUInt32 iv_len;
149   unsigned char *send_enc_key;
150   unsigned char *receive_enc_key;
151   SilcUInt32 enc_key_len;
152   unsigned char *send_hmac_key;
153   unsigned char *receive_hmac_key;
154   SilcUInt32 hmac_key_len;
155 } *SilcSKEKeyMaterial;
156 /***/
157
158 /****s* silcske/SilcSKEAPI/SilcSKERekeyMaterial
159  *
160  * NAME
161  *
162  *    typedef struct { ... } *SilcSKERekeyMaterial;
163  *
164  * DESCRIPTION
165  *
166  *    This context is returned after key exchange protocol to application
167  *    in the completion callback.  Application may save it and use it later
168  *    to perform the rekey with silc_ske_rekey_initiator and/or
169  *    silc_ske_rekey_responder functions.  If application does not
170  *    need the context, it may free it with silc_ske_free_rekey_material
171  *    function.
172  *
173  ***/
174 typedef struct {
175   unsigned char *send_enc_key;
176   char *hash;
177   unsigned int enc_key_len  : 23;
178   unsigned int ske_group    : 8;
179   unsigned int pfs          : 1;
180 } *SilcSKERekeyMaterial;
181
182 /****s* silcske/SilcSKEAPI/SilcSKEParams
183  *
184  * NAME
185  *
186  *    typedef struct { ... } *SilcSKEParams, SilcSKEParamsStruct;
187  *
188  * DESCRIPTION
189  *
190  *    SKE parameters structure.  This structure is given as argument to
191  *    silc_ske_initiator and silc_ske_responder functions.
192  *
193  * SOURCE
194  */
195 typedef struct {
196   /* The SKE version string that is sent to the remote end.  This field
197      must be set.  Caller must free the pointer. */
198   char *version;
199
200   /* Security property flags.  When initiator sets these it requests them
201      from the responder.  Responder may set here the flags it supports
202      and wants to enforce for the initiator. */
203   SilcSKESecurityPropertyFlag flags;
204
205   /* SILC Session port when using UDP/IP and SILC_SKE_SP_FLAG_IV_INCLUDED
206      flag.  It is the port the remote will use as SILC session port after
207      the key exchange protocol.  Ignored without SILC_SKE_SP_FLAG_IV_INCLUDED
208      flag. */
209   SilcUInt16 session_port;
210 } *SilcSKEParams, SilcSKEParamsStruct;
211 /***/
212
213 /****d* silcske/SilcSKEAPI/SilcSKEPKType
214  *
215  * NAME
216  *
217  *    typedef enum { ... } SilcSKEPKType;
218  *
219  * DESCRIPTION
220  *
221  *    Public key and certificate types defined by the SKE protocol.
222  *
223  * SOURCE
224  */
225 typedef enum {
226   SILC_SKE_PK_TYPE_SILC    = 1, /* SILC Public Key, mandatory */
227   SILC_SKE_PK_TYPE_SSH2    = 2, /* SSH2 Public key, not supported */
228   SILC_SKE_PK_TYPE_X509V3  = 3, /* X.509v3 certificate, not supported */
229   SILC_SKE_PK_TYPE_OPENPGP = 4, /* OpenPGP certificate, not supported */
230   SILC_SKE_PK_TYPE_SPKI    = 5  /* SPKI certificate, not supported */
231 } SilcSKEPKType;
232 /***/
233
234 /****f* silcske/SilcSKEAPI/SilcSKEVerifyCbCompletion
235  *
236  * SYNOPSIS
237  *
238  *    typedef void (*SilcSKEVerifyCbCompletion)(SilcSKE ske,
239  *                                              SilcSKEStatus status,
240  *                                              void *context);
241  *
242  * DESCRIPTION
243  *
244  *    Completion callback that will be called when the public key
245  *    has been verified.  The `status' will indicate whether the public
246  *    key were trusted or not.
247  *
248  ***/
249 typedef void (*SilcSKEVerifyCbCompletion)(SilcSKE ske,
250                                           SilcSKEStatus status,
251                                           void *context);
252
253 /****f* silcske/SilcSKEAPI/SilcSKEVerifyCb
254  *
255  * SYNOPSIS
256  *
257  *    typedef void (*SilcSKEVerifyCb)(SilcSKE ske,
258  *                                    SilcPublicKey public_key,
259  *                                    void *context,
260  *                                    SilcSKEVerifyCbCompletion completion,
261  *                                    void *completion_context);
262  *
263  * DESCRIPTION
264  *
265  *    Callback function used to verify the received public key or certificate.
266  *    The verification process is most likely asynchronous.  That's why the
267  *    application must call the `completion' callback when the verification
268  *    process has been completed.  The `context' is the context given as
269  *    arugment to silc_ske_set_callbacks.  See silc_ske_set_callbacks for
270  *    more information.
271  *
272  *    If the key repository was provided in silc_ske_alloc this callback
273  *    is called only if the public key was not found from the repository.
274  *
275  ***/
276 typedef void (*SilcSKEVerifyCb)(SilcSKE ske,
277                                 SilcPublicKey public_key,
278                                 void *context,
279                                 SilcSKEVerifyCbCompletion completion,
280                                 void *completion_context);
281
282 /****f* silcske/SilcSKEAPI/SilcSKECompletionCb
283  *
284  * SYNOPSIS
285  *
286  *    typedef void (*SilcSKECompletionCb)(SilcSKE ske,
287  *                                        SilcSKEStatus status,
288  *                                        const SilcSKESecurityProperties prop,
289  *                                        const SilcSKEKeyMaterial keymat,
290  *                                        SilcSKERekeyMaterial rekey,
291  *                                        void *context);
292  *
293  * DESCRIPTION
294  *
295  *    Completion callback.  This is called after the key exchange protocol
296  *    has been completed.  It delivers the status of the protocol, and if
297  *    successful the security properties `prop' that was negotiated in the
298  *    protocol and the key material `keymat' that can be set into use by
299  *    calling silc_ske_set_keys, and the rekey key material `rekey' which
300  *    can be used later to start rekey protocol.  The `prop' and `keymat'
301  *    will remain valid as long as `ske' is valid.  The `rekey' will remain
302  *    valid until silc_ske_free_rekey_material is called.  The application
303  *    must call it to free the `rekey'.
304  *
305  *    When doing rekey, this completion callback delivers the `keymat' and
306  *    new `rekey'.  The `prop' is ignored.  The `keymat' has already been set
307  *    to the packet stream associated with the `ske'.  Thus, after this
308  *    is called the new keys are in use.
309  *
310  ***/
311 typedef void (*SilcSKECompletionCb)(SilcSKE ske,
312                                     SilcSKEStatus status,
313                                     const SilcSKESecurityProperties prop,
314                                     const SilcSKEKeyMaterial keymat,
315                                     SilcSKERekeyMaterial rekey,
316                                     void *context);
317
318 /* Prototypes */
319
320 /****f* silcske/SilcSKEAPI/silc_ske_alloc
321  *
322  * SYNOPSIS
323  *
324  *    SilcSKE silc_ske_alloc(SilcRng rng, SilcSchedule schedule,
325  *                           SilcSKR repository, SilcPublicKey public_key,
326  *                           SilcPrivateKey private_key, void *context);
327  *
328  * DESCRIPTION
329  *
330  *    Allocates the SKE session context and returns it.  The `rng' is
331  *    the random number generator the SKE is going to use when it needs
332  *    random number generation during the SKE session.  The `context' is
333  *    user context that the libary will not touch.  Application can get the
334  *    context by calling the fuction silc_ske_get_context function.  The
335  *    application is responsible of freeing the `context'.  After the
336  *    SKE session context is allocated application must call the
337  *    silc_ske_set_callbacks.
338  *
339  *    If the `repository' is non-NULL then the remote's public key will be
340  *    verified from the repository.  If it is not provided then the
341  *    SilcSKEVerifyCb callback must be set, and it will be called to
342  *    verify the key.  If both `repository' and the callback is provided the
343  *    callback is called only if the key is not found from the repository.
344  *
345  *    The `public_key' and `private_key' is the caller's identity used
346  *    during the key exchange.  Giving `private_key' is optional if the
347  *    SILC_SKE_SP_FLAG_MUTUAL is not set and you are initiator.  For
348  *    responder both `public_key' and `private_key' must be set.
349  *
350  * EXMPALE
351  *
352  *    // Initiator example
353  *    params.version = version;
354  *    params.flags = SILC_SKE_SP_FLAG_PFS | SILC_SKE_SP_FLAG_MUTUAL;
355  *    ske = silc_ske_alloc(rng, scheduler, NULL, pk, prv, app);
356  *    silc_ske_set_callbacks(ske, verify_public_key, completion, app);
357  *    silc_ske_initiator_start(ske, stream, &params, NULL);
358  *
359  ***/
360 SilcSKE silc_ske_alloc(SilcRng rng, SilcSchedule schedule,
361                        SilcSKR repository, SilcPublicKey public_key,
362                        SilcPrivateKey private_key, void *context);
363
364 /****f* silcske/SilcSKEAPI/silc_ske_free
365  *
366  * SYNOPSIS
367  *
368  *    void silc_ske_free(SilcSKE ske);
369  *
370  * DESCRIPTION
371  *
372  *    Frees the SKE session context and all allocated resources.
373  *
374  ***/
375 void silc_ske_free(SilcSKE ske);
376
377 /****f* silcske/SilcSKEAPI/silc_ske_get_context
378  *
379  * SYNOPSIS
380  *
381  *    void *silc_ske_get_context(SilcSKE ske);
382  *
383  * DESCRIPTION
384  *
385  *    Returns the context that was given as argument to silc_ske_alloc.
386  *
387  ***/
388 void *silc_ske_get_context(SilcSKE ske);
389
390 /****f* silcske/SilcSKEAPI/silc_ske_set_callbacks
391  *
392  * SYNOPSIS
393  *
394  *    void silc_ske_set_callbacks(SilcSKE ske,
395  *                                SilcSKEVerifyCb verify_key,
396  *                                SilcSKECompletion completed,
397  *                                void *context);
398  *
399  * DESCRIPTION
400  *
401  *    Sets the callback functions for the SKE session.
402  *
403  *    The `verify_key' callback is called to verify the received public key
404  *    or certificate.  The verification process is most likely asynchronous.
405  *    That is why the application must call the completion callback when the
406  *    verification process has been completed.  If this SKE session context
407  *    is used to perform  rekey, this callback usually is not provided as
408  *    argument since sending public key in rekey is not mandatory.  Setting
409  *    this callback implies that remote end MUST send its public key.
410  *
411  *    The `completed' callback will be called once the protocol has completed,
412  *    either successfully or with an error.  The status of the protocol is
413  *    delivered to application with the callback.
414  *
415  *    The `context' is passed as argument to all of the above callback
416  *    functions.
417  *
418  ***/
419 void silc_ske_set_callbacks(SilcSKE ske,
420                             SilcSKEVerifyCb verify_key,
421                             SilcSKECompletionCb completed,
422                             void *context);
423
424 /****f* silcske/SilcSKEAPI/silc_ske_initiator_start
425  *
426  * SYNOPSIS
427  *
428  *    SilcAsyncOperation
429  *    silc_ske_initiator(SilcSKE ske,
430  *                       SilcPacketStream stream,
431  *                       SilcSKEParams params,
432                          SilcSKEStartPayload start_payload);
433  *
434  * DESCRIPTION
435  *
436  *    Starts the SILC Key Exchange protocol as initiator.  The completion
437  *    callback that was set in silc_ske_set_callbacks will be called once
438  *    the protocol has completed.  The `stream' is the network connection
439  *    to the remote host.  The SKE library will handle all key exchange
440  *    packets sent and received in the `stream' connection.  The library will
441  *    also set the remote host's ID automatically to the `stream'.  The
442  *    `params' include SKE parameters, and it must be provided.
443  *
444  *    If the `start_payload' is NULL the library will generate it
445  *    automatically.  Caller may provide it if it wants to send its own
446  *    security properties instead of using the default ones library
447  *    generates.  If caller provides it, it must not free it once it has
448  *    been given as argument to this function.
449  *
450  *    This function returns SilcAsyncOperation operation context which can
451  *    be used to control the protocol from the application.  Application may
452  *    for example safely abort the protocol at any point, if needed.  Returns
453  *    NULL on error.
454  *
455  ***/
456 SilcAsyncOperation
457 silc_ske_initiator(SilcSKE ske,
458                    SilcPacketStream stream,
459                    SilcSKEParams params,
460                    SilcSKEStartPayload start_payload);
461
462 /****f* silcske/SilcSKEAPI/silc_ske_responder
463  *
464  * SYNOPSIS
465  *
466  *    SilcAsyncOperation
467  *    silc_ske_responder(SilcSKE ske,
468  *                       SilcPacketStream stream,
469  *                       SilcSKEParams params);
470  *
471  * DESCRIPTION
472  *
473  *    Starts SILC Key Exchange protocol as responder.  The completion
474  *    callback that was set in silc_ske_set_callbacks will be called once
475  *    the protocol has completed.  The `stream' is the network connection
476  *    to the remote host.  The SKE library will handle all key exchange
477  *    packets sent and received in the `stream' connection.  The `params'
478  *    include SKE parameters, and must be provided.
479  *
480  *    This function returns SilcAsyncOperation operation context which can
481  *    be used to control the protocol from the application.  Application may
482  *    for example safely abort the protocol at any point, if needed.  Returns
483  *    NULL on error.
484  *
485  ***/
486 SilcAsyncOperation
487 silc_ske_responder(SilcSKE ske,
488                    SilcPacketStream stream,
489                    SilcSKEParams params);
490
491 SilcAsyncOperation
492 silc_ske_rekey_initiator(SilcSKE ske,
493                          SilcPacketStream stream,
494                          SilcSKERekeyMaterial rekey);
495
496 SilcAsyncOperation
497 silc_ske_rekey_responder(SilcSKE ske,
498                          SilcPacketStream stream,
499                          SilcSKERekeyMaterial rekey);
500
501 /****f* silcske/SilcSKEAPI/silc_ske_set_keys
502  *
503  * SYNOPSIS
504  *
505  *    SilcBool silc_ske_set_keys(SilcSKE ske,
506  *                               SilcSKEKeyMaterial keymat,
507  *                               SilcSKESecurityProperties prop,
508  *                               SilcCipher *ret_send_key,
509  *                               SilcCipher *ret_receive_key,
510  *                               SilcHmac *ret_hmac_send,
511  *                               SilcHmac *ret_hmac_receive,
512  *                               SilcHash *ret_hash);
513  *
514  * DESCRIPTION
515  *
516  *    This function can be used after successful key exchange to take the
517  *    key material `keymat' with security properties `prop' into use.
518  *    This will allocate send and receive ciphers, HMACs and hash for the
519  *    application.  Caller must free the returned contexts.  This is an
520  *    utility function.
521  *
522  ***/
523 SilcBool silc_ske_set_keys(SilcSKE ske,
524                            SilcSKEKeyMaterial keymat,
525                            SilcSKESecurityProperties prop,
526                            SilcCipher *ret_send_key,
527                            SilcCipher *ret_receive_key,
528                            SilcHmac *ret_hmac_send,
529                            SilcHmac *ret_hmac_receive,
530                            SilcHash *ret_hash);
531
532 /****f* silcske/SilcSKEAPI/silc_ske_parse_version
533  *
534  * SYNOPSIS
535  *
536  *    SilcBool silc_ske_parse_version(SilcSKE ske,
537  *                                    SilcUInt32 *protocol_version,
538  *                                    char **protocol_version_string,
539  *                                    SilcUInt32 *software_version,
540  *                                    char **software_version_string,
541  *                                    char **vendor_version);
542  *
543  * DESCRIPTION
544  *
545  *    Utility function to parse the remote host's version string.  This can
546  *    be called after the key exchange has been completed.
547  *
548  ***/
549 SilcBool silc_ske_parse_version(SilcSKE ske,
550                                 SilcUInt32 *protocol_version,
551                                 char **protocol_version_string,
552                                 SilcUInt32 *software_version,
553                                 char **software_version_string,
554                                 char **vendor_version);
555
556 /****f* silcske/SilcSKEAPI/silc_ske_get_security_properties
557  *
558  * SYNOPSIS
559  *
560  *    SilcSKESecurityProperties silc_ske_get_security_properties(SilcSKE ske);
561  *
562  * DESCRIPTION
563  *
564  *    Returns negotiated security properties from the `ske' or NULL if they
565  *    have not yet been negotiated.  This may be called to retrieve the
566  *    security properties after the SilcSKECompletionCb has been called.
567  *
568  ***/
569 SilcSKESecurityProperties silc_ske_get_security_properties(SilcSKE ske);
570
571 /****f* silcske/SilcSKEAPI/silc_ske_get_key_material
572  *
573  * SYNOPSIS
574  *
575  *    SilcSKEKeyMaterial silc_ske_get_key_material(SilcSKE ske);
576  *
577  * DESCRIPTION
578  *
579  *    Returns the negotiated key material from the `ske' or NULL if the
580  *    key material does not exist.  The caller must not free the returned
581  *    pointer.
582  *
583  ***/
584 SilcSKEKeyMaterial silc_ske_get_key_material(SilcSKE ske);
585
586 /****f* silcske/SilcSKEAPI/silc_ske_process_key_material_data
587  *
588  * SYNOPSIS
589  *
590  *    const char *silc_ske_map_status(SilcSKEStatus status);
591  *
592  * DESCRIPTION
593  *
594  *    Utility function to process key data `data' in the way specified
595  *    by the SILC Key Exchange protocol.  This returns the processed key
596  *    material or NULL on error.  Caller must free the returned key
597  *    material context by calling silc_ske_free_key_material.
598  *
599  ***/
600 SilcSKEKeyMaterial
601 silc_ske_process_key_material_data(unsigned char *data,
602                                    SilcUInt32 data_len,
603                                    SilcUInt32 req_iv_len,
604                                    SilcUInt32 req_enc_key_len,
605                                    SilcUInt32 req_hmac_key_len,
606                                    SilcHash hash);
607
608 /****f* silcske/SilcSKEAPI/silc_ske_free_key_material
609  *
610  * SYNOPSIS
611  *
612  *    void silc_ske_free_key_material(SilcSKEKeyMaterial key)
613  *
614  * DESCRIPTION
615  *
616  *    Utility function to free the key material created by calling
617  *    silc_ske_process_key_material_data.
618  *
619  ***/
620 void silc_ske_free_key_material(SilcSKEKeyMaterial key);
621
622 /****f* silcske/SilcSKEAPI/silc_ske_free_key_material
623  *
624  * SYNOPSIS
625  *
626  *    void silc_ske_free_rekey_material(SilcSKERekeyMaterial rekey);
627  *
628  * DESCRIPTION
629  *
630  *    Utility function to free the rekey material returned in the
631  *    SilcSKECompletionCb callback.
632  *
633  ***/
634 void silc_ske_free_rekey_material(SilcSKERekeyMaterial rekey);
635
636 /****f* silcske/SilcSKEAPI/silc_ske_map_status
637  *
638  * SYNOPSIS
639  *
640  *    const char *silc_ske_map_status(SilcSKEStatus status);
641  *
642  * DESCRIPTION
643  *
644  *    Utility function to map the `status' into human readable message.
645  *
646  ***/
647 const char *silc_ske_map_status(SilcSKEStatus status);
648
649 #include "silcske_i.h"
650
651 #endif  /* !SILCSKE_H */