Compilation environment fixes to make make install work correctly.
[crypto.git] / lib / silccrypt / silcdh.h
index e66faa8a2a88e2e8fc4c8320e97d76b2eb61da46..c04bb06eded3600962d92ba19d0420eefbdcbd12 100644 (file)
@@ -1,10 +1,10 @@
 /*
 
-  silcdh.h 
+  silcdh.h
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2001 Pekka Riikonen
+  Copyright (C) 2001 - 2008 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
@@ -17,7 +17,7 @@
 
 */
 
-/****h* silccrypt/SilcDH/silcdh.h
+/****h* silccrypt/Diffie Hellman Interface
  *
  * DESCRIPTION
  *
 
 #include "silcmp.h"
 
-/****s* silccrypt/SilcDH/SilcDH
+/****s* silccrypt/SilcDH
  *
  * NAME
- * 
+ *
  *    typedef struct SilcDHStruct *SilcDH;
  *
  * DESCRIPTION
@@ -58,12 +58,12 @@ struct SilcDHStruct {
   SilcMPInt *z;                     /* The computed secret key (z = y' ^ x mod p) */
 };
 
-/****f* silccrypt/SilcDH/silc_dh_alloc
+/****f* silccrypt/silc_dh_alloc
  *
  * SYNOPSIS
- *    
+ *
  *    SilcDH silc_dh_alloc(SilcMPInt *g, SilcMPInt *p, SilcMPInt *lpf);
- * 
+ *
  * DESCRIPTION
  *
  *    Allocate SilcDH context. The `g' is the public base generator used
@@ -72,12 +72,12 @@ struct SilcDHStruct {
  *    publicly as well. The `lpf' is optional and if it is not supplied
  *    then the private values generated satifies 0 < x < p - 1 instead
  *    of 0 < x < lpf. Returns NULL on error or allocated SilcDH context
- *    on success. 
+ *    on success.
  *
  ***/
 SilcDH silc_dh_alloc(SilcMPInt *g, SilcMPInt *p, SilcMPInt *lpf);
 
-/****f* silccrypt/SilcDH/silc_dh_free
+/****f* silccrypt/silc_dh_free
  *
  * SYNOPSIS
  *
@@ -85,13 +85,13 @@ SilcDH silc_dh_alloc(SilcMPInt *g, SilcMPInt *p, SilcMPInt *lpf);
  *
  * DESCRIPTION
  *
- *    Free the SilcDH context. Frees all the allocated data inside the 
- *    SilcDH context. 
+ *    Free the SilcDH context. Frees all the allocated data inside the
+ *    SilcDH context.
  *
  ***/
 void silc_dh_free(SilcDH dh);
 
-/****f* silccrypt/SilcDH/silc_dh_generate_private
+/****f* silccrypt/silc_dh_generate_private
  *
  * SYNOPSIS
  *
@@ -102,12 +102,12 @@ void silc_dh_free(SilcDH dh);
  *    Generates random private value `x' such that 0 < x < lpf at most of
  *    length of lpf. Returns FALSE if the random number could not be generated.
  *    Returns the generated value into `x' pointer sent as argument, unless
- *    the `x' is NULL. The returned `x' must not be freed by the caller. 
+ *    the `x' is NULL. The returned `x' must not be freed by the caller.
  *
  ***/
 SilcBool silc_dh_generate_private(SilcDH dh, const SilcMPInt **x);
 
-/****f* silccrypt/SilcDH/silc_dh_compute_public
+/****f* silccrypt/silc_dh_compute_public
  *
  * SYNOPSIS
  *
@@ -118,12 +118,12 @@ SilcBool silc_dh_generate_private(SilcDH dh, const SilcMPInt **x);
  *    Computes the public key y = g ^ x mod p, and returns it to the `y'
  *    pointer sent as argument, unless the `y' is NULL. Returns FALSE if
  *    the computation could not be performed. The returned `y' must not be
- *    freed by the caller. 
+ *    freed by the caller.
  *
  ***/
 SilcBool silc_dh_compute_public(SilcDH dh, const SilcMPInt **y);
 
-/****f* silccrypt/SilcDH/silc_dh_remote_public
+/****f* silccrypt/silc_dh_remote_public
  *
  * SYNOPSIS
  *
@@ -132,13 +132,13 @@ SilcBool silc_dh_compute_public(SilcDH dh, const SilcMPInt **y);
  * DESCRIPTION
  *
  *    Sets the remote end's public value y' into the SilcDH context.
- *    This must be done before computing the secret key. Returns FALSE 
- *    on error. 
+ *    This must be done before computing the secret key. Returns FALSE
+ *    on error.
  *
  ***/
 SilcBool silc_dh_set_remote_public(SilcDH dh, SilcMPInt *y);
 
-/****f* silccrypt/SilcDH/silc_dh_compute_key
+/****f* silccrypt/silc_dh_compute_key
  *
  * SYNOPSIS
  *
@@ -149,16 +149,16 @@ SilcBool silc_dh_set_remote_public(SilcDH dh, SilcMPInt *y);
  *    Computes the secret key z = y' ^ x mod p, and returns the key to the
  *    `z' pointer sent as argument, unless the `z' is NULL. Returns FALSE if
  *    the computation could not be performed. The returned `z' must not be
- *    freed by the caller. 
+ *    freed by the caller.
  *
  ***/
 SilcBool silc_dh_compute_key(SilcDH dh, const SilcMPInt **z);
 
-/****f* silccrypt/SilcDH/silc_dh_remote_public
+/****f* silccrypt/silc_dh_compute_key_data
  *
  * SYNOPSIS
  *
- *    SilcBool silc_dh_compute_key_data(SilcDH dh, unsigned char **z, 
+ *    SilcBool silc_dh_compute_key_data(SilcDH dh, unsigned char **z,
  *                                  SilcUInt32 *z_len);
  *
  * DESCRIPTION
@@ -167,7 +167,7 @@ SilcBool silc_dh_compute_key(SilcDH dh, const SilcMPInt **z);
  *    string.  The caller must free the returned binary string.
  *
  ***/
-SilcBool silc_dh_compute_key_data(SilcDH dh, unsigned char **z, 
+SilcBool silc_dh_compute_key_data(SilcDH dh, unsigned char **z,
                              SilcUInt32 *z_len);
 
 #endif