Header documentation changes and other small fixes
authorPekka Riikonen <priikone@silcnet.org>
Wed, 13 Feb 2008 15:18:47 +0000 (17:18 +0200)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 13 Feb 2008 15:18:47 +0000 (17:18 +0200)
15 files changed:
TODO
lib/silcacc/silcacc.h
lib/silcasn1/silcasn1.h
lib/silcasn1/silcasn1_decode.c
lib/silcasn1/silcasn1_encode.c
lib/silcasn1/silcber.h
lib/silccrypt/ciphers_def.h
lib/silccrypt/sha256_x86.S
lib/silccrypt/silccipher.h
lib/silccrypt/tests/Makefile.am
lib/silccrypt/tests/test_cast5.c
lib/silcmath/silcmath.h
lib/silcmath/silcmp.h
lib/silcssh/silcssh.c
lib/silcssh/silcssh.h

diff --git a/TODO b/TODO
index 057a5976e4c1a108fb904c55e7257ddf398de763..1308c5a302afc2fb308efc6fe7599cd084e5be39 100644 (file)
--- a/TODO
+++ b/TODO
@@ -11,50 +11,41 @@ on some of the TODO entries simply let us know about it by dropping a note
 to silc-devel mailing list or appear on 'silc' channel on SILCNet.
 
 
 to silc-devel mailing list or appear on 'silc' channel on SILCNet.
 
 
-SKR Library, lib/silcskr/
-=========================
+Crypto Library, lib/silccrypt/
+==============================
 
 
- o Add fingerprint as search constraint.
+ o SilcHmac must be replaced with generic SilcMac so that we can add
+   others than just HMAC algorithms.  Backwards support (via #define's)
+   must be preserved.
 
 
- o Add OpenPGP support.  Adding, removing, fetching PGP keys.  (Keyring
-   support?)
+ o Change the DSA implementation to support FIPS186-3.  This means that
+   the q length is determined by the key length.  Also note that specific
+   hash functions must be used with different q lengths.
 
 
- o Add support for importing public keys from a directory and/or from a
-   file.  Add support for exporting the repository (different formats for
-   different key types?).
-
- o Change the entire silc_skr_find API.  Remove SilcSKRFind and just simply
-   add the find constraints as variable argument list to silc_skr_find, eg:
-
-  silc_skr_find(skr, schedule, callback, context,
-               SILC_SKR_FIND_PUBLIC_KEY, public_key,
-               SILC_SKR_FIND_COUNTRY, "FI",
-               SILC_SKR_FIND_USAGE, SILC_SKR_USAGE_AUTH,
-               SILC_SKR_FIND_END);
+ o AES CBC is missing proper alignment code (see silc_1_1_branch).
 
 
-   NULL argument would be ignored and skipped.
+ o The asynchronous functions to perhaps to _async to preserve backwards
+   compatibility with synchronous versions, and make easier to migrate
+   from 1.1 to 1.2.
 
 
- o Add OR logical rule in addition of the current default AND, eg:
+ o Do GCC vs ICC benchmarks of all key algorithms.
 
 
-  // Found key(s) MUST have this public key AND this country.
-  silc_skr_find(skr, schedule, callback, context,
-               SILC_SKR_FIND_RULE_AND,
-               SILC_SKR_FIND_PUBLIC_KEY, public_key,
-               SILC_SKR_FIND_COUNTRY, "FI",
-               SILC_SKR_FIND_END);
+ o silc_pkcs_public_key_alloc should accept also SILC_PKCS_ANY as argument
+   and try all supported PKCS until one succeeds (ala load_public_key).
 
 
-  // Found key(s) MUST have this public key OR this key context
-  silc_skr_find(skr, schedule, callback, context,
-               SILC_SKR_FIND_RULE_OR,
-               SILC_SKR_FIND_PUBLIC_KEY, public_key,
-               SILC_SKR_FIND_CONTEXT, key_context,
-               SILC_SKR_FIND_END);
+ o Add fingerprint to SilcSILCPublicKey and retrieval to silcpk.h, and
+   possibly to silcpkcs.h.
 
 
- o SilcStack to SKR API.
+   /* Return fingerprint of the `public_key'.  Returns also the algorithm
+      that has been used to make the fingerprint. */
+   const unsigned char *
+   silc_pkcs_get_fingerprint(SilcPublicKey public_key,
+                            const char **hash_algorithm,
+                            SilcUInt32 *fingerprint_len);
 
 
+ o Add DSA support to SILC public key.
 
 
-Crypto Library, lib/silccrypt/
-==============================
+ o Global RNG must be changed to use SILC Global API.
 
  o Add silc_crypto_init and silc_crypto_uninit.  The _init should take
    SilcStack that will act as global memory pool for all of crypto
 
  o Add silc_crypto_init and silc_crypto_uninit.  The _init should take
    SilcStack that will act as global memory pool for all of crypto
@@ -64,31 +55,15 @@ Crypto Library, lib/silccrypt/
    preference over the default once, ie. user can always dictate the
    order of algorithms. (***DONE)
 
    preference over the default once, ie. user can always dictate the
    order of algorithms. (***DONE)
 
- o Add fingerprint to SilcSILCPublicKey and retrieval to silcpk.h, and
-   possibly to silcpkcs.h.
-
-   /* Return fingerprint of the `public_key'.  Returns also the algorithm
-      that has been used to make the fingerprint. */
-   const unsigned char *
-   silc_pkcs_get_fingerprint(SilcPublicKey public_key,
-                            const char **hash_algorithm,
-                            SilcUInt32 *fingerprint_len);
-
  o Change SILC PKCS API to asynchronous, so that accelerators can be used.
    All PKCS routines should now take callbacks as argument and they should
    be delivered to SilcPKCSObject and SilcPKCSAlgorithm too. (***DONE)
 
  o Change SILC PKCS API to asynchronous, so that accelerators can be used.
    All PKCS routines should now take callbacks as argument and they should
    be delivered to SilcPKCSObject and SilcPKCSAlgorithm too. (***DONE)
 
- o The asynchronous functions to perhaps to _async to preserve backwards
-   compatibility with synchronous versions, and make easier to migrate
-   from 1.1 to 1.2.
-
  o Change PKCS Algorithm API to take SilcPKCSAlgorithm as argument to
    encrypt, decrypt, sign and verify functions.  We may need to for exmaple
    check the alg->hash, supported hash functions.  Maybe deliver it also
    to all other functions in SilcPKCSAlgorithm to be consistent. (***DONE)
 
  o Change PKCS Algorithm API to take SilcPKCSAlgorithm as argument to
    encrypt, decrypt, sign and verify functions.  We may need to for exmaple
    check the alg->hash, supported hash functions.  Maybe deliver it also
    to all other functions in SilcPKCSAlgorithm to be consistent. (***DONE)
 
- o Add DSA support to SILC public key.
-
  o Add DSS support. (***DONE)
 
  o Implement the defined SilcDH API.  The definition is in
  o Add DSS support. (***DONE)
 
  o Implement the defined SilcDH API.  The definition is in
@@ -96,27 +71,65 @@ Crypto Library, lib/silccrypt/
    be accelerated.  Also take into account that it could use elliptic
    curves.
 
    be accelerated.  Also take into account that it could use elliptic
    curves.
 
+ o All cipher, hash, hmac etc. allocation routines should take their name
+   in as const char * not const unsigned char *. (***DONE)
+
  o Add ECDSA support.
 
  o Add ECDH support.
 
  o Add ECDSA support.
 
  o Add ECDH support.
 
- o AES CBC is missing proper alignment code (see silc_1_1_branch).
 
 
- o All cipher, hash, hmac etc. allocation routines should take their name
-   in as const char * not const unsigned char *. (***DONE)
+SKR Library, lib/silcskr/
+=========================
+
+ o Add fingerprint as search constraint.
+
+ o Add SSH support. (***DONE, TESTING NEEDED)
+
+ o Add OpenPGP support.  Adding, removing, fetching PGP keys.  (Keyring
+   support?)
+
+ o Add support for importing public keys from a directory and/or from a
+   file.  Add support for exporting the repository (different formats for
+   different key types?).
+
+ o Change the entire silc_skr_find API.  Remove SilcSKRFind and just simply
+   add the find constraints as variable argument list to silc_skr_find, eg:
+
+  silc_skr_find(skr, schedule, callback, context,
+               SILC_SKR_FIND_PUBLIC_KEY, public_key,
+               SILC_SKR_FIND_COUNTRY, "FI",
+               SILC_SKR_FIND_USAGE, SILC_SKR_USAGE_AUTH,
+               SILC_SKR_FIND_END);
+
+   NULL argument would be ignored and skipped.
+
+ o Add OR logical rule in addition of the current default AND, eg:
+
+  // Found key(s) MUST have this public key AND this country.
+  silc_skr_find(skr, schedule, callback, context,
+               SILC_SKR_FIND_RULE_AND,
+               SILC_SKR_FIND_PUBLIC_KEY, public_key,
+               SILC_SKR_FIND_COUNTRY, "FI",
+               SILC_SKR_FIND_END);
+
+  // Found key(s) MUST have this public key OR this key context
+  silc_skr_find(skr, schedule, callback, context,
+               SILC_SKR_FIND_RULE_OR,
+               SILC_SKR_FIND_PUBLIC_KEY, public_key,
+               SILC_SKR_FIND_CONTEXT, key_context,
+               SILC_SKR_FIND_END);
+
+ o SilcStack to SKR API.
 
 
 SILC Accelerator Library
 ========================
 
 
 
 SILC Accelerator Library
 ========================
 
- o SILC Accelerator API.  Provides generic way to use different kind of
-   accelerators.  Basically implements SILC PKCS API so that SilcPublicKey
-   and SilcPrivateKey can be used but they call the accelerators.
-   (***DONE)
-
- o Implement software accelerator.  It is a thread pool system where the
-   public key and private key operations are executed in threads.
-   (***DONE)
+ o Add SilcCipher support to SilcAccelerator and software accelerator.
+   Accelerate at least ciphers using CTR mode which can be done in
+   parallel.  Do it in producer/consumer fashion where threads generate
+   key stream and other thread(s) encrypt using the key stream.
 
  o Add init options to SilcAcceleratorObject as a SilcAcceleratorOption
    structure.  Each accelerator defines the options that they support and
 
  o Add init options to SilcAcceleratorObject as a SilcAcceleratorOption
    structure.  Each accelerator defines the options that they support and
@@ -139,9 +152,14 @@ SILC Accelerator Library
 
  o Diffie-Hellman acceleration
 
 
  o Diffie-Hellman acceleration
 
- (o Symmetric key cryptosystem acceleration?  They are always sycnhronouos
-   even with hardware acceleration so the crypto API shouldn't require
-   changes.) maybe
+ o SILC Accelerator API.  Provides generic way to use different kind of
+   accelerators.  Basically implements SILC PKCS API so that SilcPublicKey
+   and SilcPrivateKey can be used but they call the accelerators.
+   (***DONE)
+
+ o Implement software accelerator.  It is a thread pool system where the
+   public key and private key operations are executed in threads.
+   (***DONE)
 
 
 lib/silcmath
 
 
 lib/silcmath
@@ -194,12 +212,34 @@ lib/silcasn1
 lib/silcpgp
 ===========
 
 lib/silcpgp
 ===========
 
- o OpenPGP certificate support, allowing the use of PGP public keys.
+ o OpenPGP certificate support, allowing the use of PGP public keys and
+   private keys.
+
+ o Signatures for data, public keys and private keys (Signature packet).
+
+ o Signature verification from public keys, private keys and other signed
+   data (Signature packet).
+
+ o Encryption and decryption support (Packet tags 8 and 18 most likely).
+
+ o Retrieval of User ID from public key and private key (Used ID packet
+   and User Attribute packet).
+
+ o Creation of OpenPGP key pairs.
+
+ o Trust packet handling (GNU PG compatible) from public and private keys.
+
+ o Add option that the signature format doesn't use the OpenPGP format
+   but whatever is the default in SILC crypto library.
 
 
 lib/silcssh
 ===========
 
 
 
 lib/silcssh
 ===========
 
+ o Add option that the signature format doesn't use the SSH2 protocol
+   but whatever is the default in SILC crypto library;
+   silc_ssh_private_key_set_signature_type, or something.
+
  o SSH2 public key/private key support, allowing the use of SSH2 keys.
    RFC 4716.  (***DONE)
 
  o SSH2 public key/private key support, allowing the use of SSH2 keys.
    RFC 4716.  (***DONE)
 
index ea97437ae8ea3150a7ce0caa089ea543cd069303..a7ec70b2fe26f648f38ac17c4f1e5f334dbccc14 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2007 Pekka Riikonen
+  Copyright (C) 2007 - 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
 
   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
@@ -26,7 +26,7 @@
 #ifndef SILCACC_H
 #define SILCACC_H
 
 #ifndef SILCACC_H
 #define SILCACC_H
 
-/****s* silcacc/SilcAccAPI/SilcAccelerator
+/****s* silcacc/SilcAccelerator
  *
  * NAME
  *
  *
  * NAME
  *
@@ -56,7 +56,7 @@ typedef struct SilcAcceleratorObject {
 #endif /* 0 */
 } *SilcAccelerator, SilcAcceleratorStruct;
 
 #endif /* 0 */
 } *SilcAccelerator, SilcAcceleratorStruct;
 
-/****f* silcacc/SilcAccAPI/silc_acc_register
+/****f* silcacc/silc_acc_register
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -76,7 +76,7 @@ typedef struct SilcAcceleratorObject {
  ***/
 SilcBool silc_acc_register(const SilcAccelerator acc);
 
  ***/
 SilcBool silc_acc_register(const SilcAccelerator acc);
 
-/****f* silcacc/SilcAccAPI/silc_acc_unregister
+/****f* silcacc/silc_acc_unregister
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -90,7 +90,7 @@ SilcBool silc_acc_register(const SilcAccelerator acc);
  ***/
 void silc_acc_unregister(SilcAccelerator acc);
 
  ***/
 void silc_acc_unregister(SilcAccelerator acc);
 
-/****f* silcacc/SilcAccAPI/silc_acc_find
+/****f* silcacc/silc_acc_find
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -104,7 +104,7 @@ void silc_acc_unregister(SilcAccelerator acc);
  ***/
 SilcAccelerator silc_acc_find(const char *name);
 
  ***/
 SilcAccelerator silc_acc_find(const char *name);
 
-/****f* silcacc/SilcAccAPI/silc_acc_init
+/****f* silcacc/silc_acc_init
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -126,7 +126,7 @@ SilcAccelerator silc_acc_find(const char *name);
  ***/
 SilcBool silc_acc_init(SilcAccelerator acc, SilcSchedule schedule, ...);
 
  ***/
 SilcBool silc_acc_init(SilcAccelerator acc, SilcSchedule schedule, ...);
 
-/****f* silcacc/SilcAccAPI/silc_acc_uninit
+/****f* silcacc/silc_acc_uninit
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -142,7 +142,7 @@ SilcBool silc_acc_init(SilcAccelerator acc, SilcSchedule schedule, ...);
  ***/
 SilcBool silc_acc_uninit(SilcAccelerator acc);
 
  ***/
 SilcBool silc_acc_uninit(SilcAccelerator acc);
 
-/****f* silcacc/SilcAccAPI/silc_acc_get_supported
+/****f* silcacc/silc_acc_get_supported
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -156,7 +156,7 @@ SilcBool silc_acc_uninit(SilcAccelerator acc);
  ***/
 SilcDList silc_acc_get_supported(void);
 
  ***/
 SilcDList silc_acc_get_supported(void);
 
-/****f* silcacc/SilcAccAPI/silc_acc_get_name
+/****f* silcacc/silc_acc_get_name
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -169,7 +169,7 @@ SilcDList silc_acc_get_supported(void);
  ***/
 const char *silc_acc_get_name(SilcAccelerator acc);
 
  ***/
 const char *silc_acc_get_name(SilcAccelerator acc);
 
-/****f* silcacc/SilcAccAPI/silc_acc_public_key
+/****f* silcacc/silc_acc_public_key
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -192,7 +192,7 @@ const char *silc_acc_get_name(SilcAccelerator acc);
 SilcPublicKey silc_acc_public_key(SilcAccelerator acc,
                                  SilcPublicKey public_key);
 
 SilcPublicKey silc_acc_public_key(SilcAccelerator acc,
                                  SilcPublicKey public_key);
 
-/****f* silcacc/SilcAccAPI/silc_acc_private_key
+/****f* silcacc/silc_acc_private_key
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -215,7 +215,7 @@ SilcPublicKey silc_acc_public_key(SilcAccelerator acc,
 SilcPrivateKey silc_acc_private_key(SilcAccelerator acc,
                                    SilcPrivateKey private_key);
 
 SilcPrivateKey silc_acc_private_key(SilcAccelerator acc,
                                    SilcPrivateKey private_key);
 
-/****f* silcacc/SilcAccAPI/silc_acc_get_public_key
+/****f* silcacc/silc_acc_get_public_key
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -232,7 +232,7 @@ SilcPrivateKey silc_acc_private_key(SilcAccelerator acc,
 SilcPublicKey silc_acc_get_public_key(SilcAccelerator acc,
                                      SilcPublicKey public_key);
 
 SilcPublicKey silc_acc_get_public_key(SilcAccelerator acc,
                                      SilcPublicKey public_key);
 
-/****f* silcacc/SilcAccAPI/silc_acc_get_private_key
+/****f* silcacc/silc_acc_get_private_key
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
index c04451829fdefd8fa4e4870ba9a16e28a7ea402b..baef012d099d3066d917b8cb15b741650f9e0fa9 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2003 - 2007 Pekka Riikonen
+  Copyright (C) 2003 - 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
 
   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
@@ -23,6 +23,7 @@
  *
  * Efficient Abstract Syntax Notation One (ASN.1) implementation.  This
  * interface provides simple and efficient ASN.1 encoder and decoder.
  *
  * Efficient Abstract Syntax Notation One (ASN.1) implementation.  This
  * interface provides simple and efficient ASN.1 encoder and decoder.
+ *
  * The encoder directly encodes BER encoded data blocks from variable
  * argument list of ASN.1 types.  Multiple trees can be encoded at once
  * and multiple nodes can be encoded into the tree at once.  By default
  * The encoder directly encodes BER encoded data blocks from variable
  * argument list of ASN.1 types.  Multiple trees can be encoded at once
  * and multiple nodes can be encoded into the tree at once.  By default
  * References: ITU-T X.680 - X.693
  * http://www.itu.int/ITU-T/studygroups/com17/languages/
  *
  * References: ITU-T X.680 - X.693
  * http://www.itu.int/ITU-T/studygroups/com17/languages/
  *
+ * EXAMPLE
+ *
+ * silc_asn1_encode(asn1, buf,
+ *                  SILC_ASN1_SEQUENCE,
+ *                    SILC_ASN1_BOOLEAN(bool_val),
+ *                    SILC_ASN1_OCTET_STRING(string, string_len),
+ *                    SILC_ASN1_SEQUENCE_T(0, 2),
+ *                      SILC_ASN1_BOOLEAN_T(SILC_ASN1_EXPLICIT, 100, foo),
+ *                     SILC_ASN1_END,
+ *                     SILC_ASN1_OCTET_STRING_T(0, 1, string2, string2_len),
+ *                   SILC_ASN1_END, SILC_ASN1_END);
+ *
+ * Creates ASN.1 tree that looks something like:
+ *
+ * buf ::= SEQUENCE {
+ *   bool_val      BOOLEAN,
+ *   string        OCTET-STRING,
+ *            [2]  SEQUENCE {
+ *                   foo   [100] EXPLICIT BOOLEAN }
+ *   string2  [1]  OCTET-STRING }
+ *
  ***/
 
 #ifndef SILCASN1_H
 #define SILCASN1_H
 
  ***/
 
 #ifndef SILCASN1_H
 #define SILCASN1_H
 
-/****s* silcasn1/SilcASN1API/SilcAsn1
+/****s* silcasn1/SilcAsn1
  *
  * NAME
  *
  *
  * NAME
  *
@@ -68,7 +90,7 @@
  ***/
 typedef struct SilcAsn1Object *SilcAsn1;
 
  ***/
 typedef struct SilcAsn1Object *SilcAsn1;
 
-/****s* silcasn1/SilcASN1API/SilcAsn1Struct
+/****s* silcasn1/SilcAsn1Struct
  *
  * NAME
  *
  *
  * NAME
  *
@@ -84,7 +106,7 @@ typedef struct SilcAsn1Object *SilcAsn1;
  ***/
 typedef struct SilcAsn1Object SilcAsn1Struct;
 
  ***/
 typedef struct SilcAsn1Object SilcAsn1Struct;
 
-/****d* silcasn1/SilcASN1API/SilcAsn1Options
+/****d* silcasn1/SilcAsn1Options
  *
  * NAME
  *
  *
  * NAME
  *
@@ -130,7 +152,7 @@ typedef enum {
   /* Default. If only this is set then defaults are implied. */
   SILC_ASN1_DEFAULT      = 0x0000,
 
   /* Default. If only this is set then defaults are implied. */
   SILC_ASN1_DEFAULT      = 0x0000,
 
-  /* Class options.  User does not need to set these unless specificly
+  /* Class options.  User does not need to set these unless specifically
      wanted to do so.  If SILC_ASN1_DEFAULT is set the SILC_ASN1_CONTEXT is
      implied if any of the tag options are set.  Otherwise SILC_ASN1_UNIVERSAL
      is implied. Only one of these can bet set at once. */
      wanted to do so.  If SILC_ASN1_DEFAULT is set the SILC_ASN1_CONTEXT is
      implied if any of the tag options are set.  Otherwise SILC_ASN1_UNIVERSAL
      is implied. Only one of these can bet set at once. */
@@ -163,7 +185,7 @@ typedef enum {
 } SilcAsn1Options;
 /***/
 
 } SilcAsn1Options;
 /***/
 
-/****d* silcasn1/SilcASN1API/SilcAsn1Tag
+/****d* silcasn1/SilcAsn1Tag
  *
  * NAME
  *
  *
  * NAME
  *
@@ -212,7 +234,7 @@ typedef enum {
 
 #include "silcasn1_i.h"
 
 
 #include "silcasn1_i.h"
 
-/****f* silcasn1/SilcASN1API/silc_asn1_alloc
+/****f* silcasn1/silc_asn1_alloc
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -240,7 +262,7 @@ typedef enum {
  ***/
 SilcAsn1 silc_asn1_alloc(SilcStack stack);
 
  ***/
 SilcAsn1 silc_asn1_alloc(SilcStack stack);
 
-/****f* silcasn1/SilcASN1API/silc_asn1_free
+/****f* silcasn1/silc_asn1_free
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -255,7 +277,7 @@ SilcAsn1 silc_asn1_alloc(SilcStack stack);
  ***/
 void silc_asn1_free(SilcAsn1 asn1);
 
  ***/
 void silc_asn1_free(SilcAsn1 asn1);
 
-/****f* silcasn1/SilcASN1API/silc_asn1_init
+/****f* silcasn1/silc_asn1_init
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -276,7 +298,7 @@ void silc_asn1_free(SilcAsn1 asn1);
  ***/
 SilcBool silc_asn1_init(SilcAsn1 asn1, SilcStack stack);
 
  ***/
 SilcBool silc_asn1_init(SilcAsn1 asn1, SilcStack stack);
 
-/****f* silcasn1/SilcASN1API/silc_asn1_uninit
+/****f* silcasn1/silc_asn1_uninit
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -290,7 +312,7 @@ SilcBool silc_asn1_init(SilcAsn1 asn1, SilcStack stack);
  ***/
 void silc_asn1_uninit(SilcAsn1 asn1);
 
  ***/
 void silc_asn1_uninit(SilcAsn1 asn1);
 
-/****f* silcasn1/SilcASN1API/silc_asn1_encode
+/****f* silcasn1/silc_asn1_encode
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -303,7 +325,7 @@ void silc_asn1_uninit(SilcAsn1 asn1);
  *    trees and nodes that are encoded into the `dest'.  By default, the
  *    memory for `dest' is allocated from the `asn1', and the buffer becomes
  *    invalid either by calling silc_asn1_free, silc_asn1_uninit, or when
  *    trees and nodes that are encoded into the `dest'.  By default, the
  *    memory for `dest' is allocated from the `asn1', and the buffer becomes
  *    invalid either by calling silc_asn1_free, silc_asn1_uninit, or when
- *    silc_asn1_encode is called for the next time.
+ *    silc_asn1_encode is called for the next time with `asn1' context.
  *
  *    If the SILC_ASN1_OPTS macro with SILC_ASN1_ALLOC option is given then
  *    the `dest' is dynamically allocated and caller must free it by itself.
  *
  *    If the SILC_ASN1_OPTS macro with SILC_ASN1_ALLOC option is given then
  *    the `dest' is dynamically allocated and caller must free it by itself.
@@ -344,7 +366,7 @@ void silc_asn1_uninit(SilcAsn1 asn1);
  ***/
 SilcBool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...);
 
  ***/
 SilcBool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...);
 
-/****f* silcasn1/SilcASN1API/silc_asn1_decode
+/****f* silcasn1/silc_asn1_decode
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -402,7 +424,7 @@ SilcBool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...);
  ***/
 SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 
  ***/
 SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_OPTS
+/****f* silcasn1/SILC_ASN1_OPTS
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -433,7 +455,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
  ***/
 #define SILC_ASN1_OPTS(opts) SILC_ASN1_TAG_OPTS, (opts)
 
  ***/
 #define SILC_ASN1_OPTS(opts) SILC_ASN1_TAG_OPTS, (opts)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_ANY
+/****f* silcasn1/SILC_ASN1_ANY
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -473,7 +495,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_ANY(x) SILC_ASN1_U1(ANY, x)
 #define SILC_ASN1_ANY_T(o, t, x) SILC_ASN1_T1(ANY, o, t, x)
 
 #define SILC_ASN1_ANY(x) SILC_ASN1_U1(ANY, x)
 #define SILC_ASN1_ANY_T(o, t, x) SILC_ASN1_T1(ANY, o, t, x)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_ANY_PRIMITIVE
+/****f* silcasn1/SILC_ASN1_ANY_PRIMITIVE
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -519,7 +541,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_ANY_PRIMITIVE(t, x) SILC_ASN1_T1(ANY_PRIMITIVE, 0, t, x)
 #define SILC_ASN1_ANY_PRIMITIVE_T(o, t, x) SILC_ASN1_T1(ANY_PRIMITIVE, o, t, x)
 
 #define SILC_ASN1_ANY_PRIMITIVE(t, x) SILC_ASN1_T1(ANY_PRIMITIVE, 0, t, x)
 #define SILC_ASN1_ANY_PRIMITIVE_T(o, t, x) SILC_ASN1_T1(ANY_PRIMITIVE, o, t, x)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_SEQUENCE
+/****f* silcasn1/SILC_ASN1_SEQUENCE
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -546,11 +568,17 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
  *                       SILC_ASN1_BOOLEAN(boolval),
  *                     SILC_ASN1_END, SILC_ASN1_END);
  *
  *                       SILC_ASN1_BOOLEAN(boolval),
  *                     SILC_ASN1_END, SILC_ASN1_END);
  *
+ *    silc_asn1_encode(asn1, tree2,
+ *                     SILC_ASN1_SEQUENCE_T(SILC_ASN1_PRIVATE, 101),
+ *                       SILC_ASN1_ANY(node),
+ *                       SILC_ASN1_BOOLEAN(boolval),
+ *                     SILC_ASN1_END, SILC_ASN1_END);
+ *
  ***/
 #define SILC_ASN1_SEQUENCE SILC_ASN1_U0(SEQUENCE)
 #define SILC_ASN1_SEQUENCE_T(o, t) SILC_ASN1_T0(SEQUENCE, o, t)
 
  ***/
 #define SILC_ASN1_SEQUENCE SILC_ASN1_U0(SEQUENCE)
 #define SILC_ASN1_SEQUENCE_T(o, t) SILC_ASN1_T0(SEQUENCE, o, t)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_SET
+/****f* silcasn1/SILC_ASN1_SET
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -580,7 +608,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_SET SILC_ASN1_U0(SET)
 #define SILC_ASN1_SET_T(o, t) SILC_ASN1_T0(SET, o, t)
 
 #define SILC_ASN1_SET SILC_ASN1_U0(SET)
 #define SILC_ASN1_SET_T(o, t) SILC_ASN1_T0(SET, o, t)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_SEQUENCE_OF
+/****f* silcasn1/SILC_ASN1_SEQUENCE_OF
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -614,7 +642,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
  ***/
 #define SILC_ASN1_SEQUENCE_OF(x, c) SILC_ASN1_U2(SEQUENCE_OF, x, c)
 
  ***/
 #define SILC_ASN1_SEQUENCE_OF(x, c) SILC_ASN1_U2(SEQUENCE_OF, x, c)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_SET_OF
+/****f* silcasn1/SILC_ASN1_SET_OF
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -645,7 +673,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
  ***/
 #define SILC_ASN1_SET_OF(x, c) SILC_ASN1_U2(SEQUENCE_OF, x, c)
 
  ***/
 #define SILC_ASN1_SET_OF(x, c) SILC_ASN1_U2(SEQUENCE_OF, x, c)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_CHOICE
+/****f* silcasn1/SILC_ASN1_CHOICE
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -674,7 +702,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
  ***/
 #define SILC_ASN1_CHOICE(x) SILC_ASN1_U1(CHOICE, x)
 
  ***/
 #define SILC_ASN1_CHOICE(x) SILC_ASN1_U1(CHOICE, x)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_BOOLEAN
+/****f* silcasn1/SILC_ASN1_BOOLEAN
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -697,13 +725,13 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_BOOLEAN(x) SILC_ASN1_U1(BOOLEAN, x)
 #define SILC_ASN1_BOOLEAN_T(o, t, x) SILC_ASN1_T1(BOOLEAN, o, t, x)
 
 #define SILC_ASN1_BOOLEAN(x) SILC_ASN1_U1(BOOLEAN, x)
 #define SILC_ASN1_BOOLEAN_T(o, t, x) SILC_ASN1_T1(BOOLEAN, o, t, x)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_INT
+/****f* silcasn1/SILC_ASN1_INT
  *
  * SYNOPSIS
  *
  *    Encoding:
  *    SILC_ASN1_INT(integer)
  *
  * SYNOPSIS
  *
  *    Encoding:
  *    SILC_ASN1_INT(integer)
- *    SILC_ASN1_INT_T(opts, tag, &integer)
+ *    SILC_ASN1_INT_T(opts, tag, integer)
  *
  *    Decoding:
  *    SILC_ASN1_INT(&integer)
  *
  *    Decoding:
  *    SILC_ASN1_INT(&integer)
@@ -720,13 +748,13 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_INT(x) SILC_ASN1_U1(INTEGER, x)
 #define SILC_ASN1_INT_T(o, t, x) SILC_ASN1_T1(INTEGER, o, t, x)
 
 #define SILC_ASN1_INT(x) SILC_ASN1_U1(INTEGER, x)
 #define SILC_ASN1_INT_T(o, t, x) SILC_ASN1_T1(INTEGER, o, t, x)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_SHORT_INT
+/****f* silcasn1/SILC_ASN1_SHORT_INT
  *
  * SYNOPSIS
  *
  *    Encoding:
  *    SILC_ASN1_SHORT_INT(integer)
  *
  * SYNOPSIS
  *
  *    Encoding:
  *    SILC_ASN1_SHORT_INT(integer)
- *    SILC_ASN1_SHORT_INT_T(opts, tag, &integer)
+ *    SILC_ASN1_SHORT_INT_T(opts, tag, integer)
  *
  *    Decoding:
  *    SILC_ASN1_SHORT_INT(&integer)
  *
  *    Decoding:
  *    SILC_ASN1_SHORT_INT(&integer)
@@ -743,13 +771,13 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_SHORT_INT(x) SILC_ASN1_U1(SHORT_INTEGER, x)
 #define SILC_ASN1_SHORT_INT_T(o, t, x) SILC_ASN1_T1(SHORT_INTEGER, o, t, x)
 
 #define SILC_ASN1_SHORT_INT(x) SILC_ASN1_U1(SHORT_INTEGER, x)
 #define SILC_ASN1_SHORT_INT_T(o, t, x) SILC_ASN1_T1(SHORT_INTEGER, o, t, x)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_ENUM
+/****f* silcasn1/SILC_ASN1_ENUM
  *
  * SYNOPSIS
  *
  *    Encoding:
  *    SILC_ASN1_ENUM(enum)
  *
  * SYNOPSIS
  *
  *    Encoding:
  *    SILC_ASN1_ENUM(enum)
- *    SILC_ASN1_ENUM_T(opts, tag, &enum)
+ *    SILC_ASN1_ENUM_T(opts, tag, enum)
  *
  *    Decoding:
  *    SILC_ASN1_ENUM(&enum)
  *
  *    Decoding:
  *    SILC_ASN1_ENUM(&enum)
@@ -766,7 +794,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_ENUM(x) SILC_ASN1_U1(ENUM, x)
 #define SILC_ASN1_ENUM_T(o, t, x) SILC_ASN1_T1(ENUM, o, t, x)
 
 #define SILC_ASN1_ENUM(x) SILC_ASN1_U1(ENUM, x)
 #define SILC_ASN1_ENUM_T(o, t, x) SILC_ASN1_T1(ENUM, o, t, x)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_BIT_STRING
+/****f* silcasn1/SILC_ASN1_BIT_STRING
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -791,7 +819,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_BIT_STRING(x, xl) SILC_ASN1_U2(BIT_STRING, x, xl)
 #define SILC_ASN1_BIT_STRING_T(o, t, x, xl) SILC_ASN1_T2(BIT_STRING, o, t, x, xl)
 
 #define SILC_ASN1_BIT_STRING(x, xl) SILC_ASN1_U2(BIT_STRING, x, xl)
 #define SILC_ASN1_BIT_STRING_T(o, t, x, xl) SILC_ASN1_T2(BIT_STRING, o, t, x, xl)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_NULL
+/****f* silcasn1/SILC_ASN1_NULL
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -817,7 +845,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_NULL(x) SILC_ASN1_U1(NULL, x)
 #define SILC_ASN1_NULL_T(o, t, x) SILC_ASN1_T1(NULL, o, t, x)
 
 #define SILC_ASN1_NULL(x) SILC_ASN1_U1(NULL, x)
 #define SILC_ASN1_NULL_T(o, t, x) SILC_ASN1_T1(NULL, o, t, x)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_OID
+/****f* silcasn1/SILC_ASN1_OID
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -840,7 +868,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_OID(x) SILC_ASN1_U1(OID, x)
 #define SILC_ASN1_OID_T(o, t, x) SILC_ASN1_UT(OID, o, t, x)
 
 #define SILC_ASN1_OID(x) SILC_ASN1_U1(OID, x)
 #define SILC_ASN1_OID_T(o, t, x) SILC_ASN1_UT(OID, o, t, x)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_OCTET_STRING
+/****f* silcasn1/SILC_ASN1_OCTET_STRING
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -864,7 +892,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_OCTET_STRING(x, xl) SILC_ASN1_U2(OCTET_STRING, x, xl)
 #define SILC_ASN1_OCTET_STRING_T(o, t, x, xl) SILC_ASN1_T2(OCTET_STRING, o, t, x, xl)
 
 #define SILC_ASN1_OCTET_STRING(x, xl) SILC_ASN1_U2(OCTET_STRING, x, xl)
 #define SILC_ASN1_OCTET_STRING_T(o, t, x, xl) SILC_ASN1_T2(OCTET_STRING, o, t, x, xl)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_UTF8_STRING
+/****f* silcasn1/SILC_ASN1_UTF8_STRING
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -893,7 +921,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_UTF8_STRING(x, xl) SILC_ASN1_U2(UTF8_STRING, x, xl)
 #define SILC_ASN1_UTF8_STRING_T(o, t, x, xl) SILC_ASN1_T2(UTF8_STRING, o, t, x, xl)
 
 #define SILC_ASN1_UTF8_STRING(x, xl) SILC_ASN1_U2(UTF8_STRING, x, xl)
 #define SILC_ASN1_UTF8_STRING_T(o, t, x, xl) SILC_ASN1_T2(UTF8_STRING, o, t, x, xl)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_NUMERIC_STRING
+/****f* silcasn1/SILC_ASN1_NUMERIC_STRING
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -922,7 +950,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_NUMERIC_STRING(x, xl) SILC_ASN1_U2(NUMERIC_STRING, x, xl)
 #define SILC_ASN1_NUMERIC_STRING_T(o, t, x, xl) SILC_ASN1_T2(NUMERIC_STRING, o, t, x, xl)
 
 #define SILC_ASN1_NUMERIC_STRING(x, xl) SILC_ASN1_U2(NUMERIC_STRING, x, xl)
 #define SILC_ASN1_NUMERIC_STRING_T(o, t, x, xl) SILC_ASN1_T2(NUMERIC_STRING, o, t, x, xl)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_PRINTABLE_STRING
+/****f* silcasn1/SILC_ASN1_PRINTABLE_STRING
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -951,7 +979,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_PRINTABLE_STRING(x, xl) SILC_ASN1_U2(PRINTABLE_STRING, x, xl)
 #define SILC_ASN1_PRINTABLE_STRING_T(o, t, x, xl) SILC_ASN1_T2(PRINTABLE_STRING, o, t, x, xl)
 
 #define SILC_ASN1_PRINTABLE_STRING(x, xl) SILC_ASN1_U2(PRINTABLE_STRING, x, xl)
 #define SILC_ASN1_PRINTABLE_STRING_T(o, t, x, xl) SILC_ASN1_T2(PRINTABLE_STRING, o, t, x, xl)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_TELETEX_STRING
+/****f* silcasn1/SILC_ASN1_TELETEX_STRING
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -980,7 +1008,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_TELETEX_STRING(x, xl) SILC_ASN1_U2(TELETEX_STRING, x, xl)
 #define SILC_ASN1_TELETEX_STRING_T(o, t, x, xl) SILC_ASN1_T2(TELETEX_STRING, o, t, x, xl)
 
 #define SILC_ASN1_TELETEX_STRING(x, xl) SILC_ASN1_U2(TELETEX_STRING, x, xl)
 #define SILC_ASN1_TELETEX_STRING_T(o, t, x, xl) SILC_ASN1_T2(TELETEX_STRING, o, t, x, xl)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_IA5_STRING
+/****f* silcasn1/SILC_ASN1_IA5_STRING
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -1009,7 +1037,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_IA5_STRING(x, xl) SILC_ASN1_U2(IA5_STRING, x, xl)
 #define SILC_ASN1_IA5_STRING_T(o, t, x, xl) SILC_ASN1_T2(IA5_STRING, o, t, x, xl)
 
 #define SILC_ASN1_IA5_STRING(x, xl) SILC_ASN1_U2(IA5_STRING, x, xl)
 #define SILC_ASN1_IA5_STRING_T(o, t, x, xl) SILC_ASN1_T2(IA5_STRING, o, t, x, xl)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_VISIBLE_STRING
+/****f* silcasn1/SILC_ASN1_VISIBLE_STRING
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -1038,7 +1066,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_VISIBLE_STRING(x, xl) SILC_ASN1_U2(VISIBLE_STRING, x, xl)
 #define SILC_ASN1_VISIBLE_STRING_T(o, t, x, xl) SILC_ASN1_T2(VISIBLE_STRING, o, t, x, xl)
 
 #define SILC_ASN1_VISIBLE_STRING(x, xl) SILC_ASN1_U2(VISIBLE_STRING, x, xl)
 #define SILC_ASN1_VISIBLE_STRING_T(o, t, x, xl) SILC_ASN1_T2(VISIBLE_STRING, o, t, x, xl)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_UNIVERSAL_STRING
+/****f* silcasn1/SILC_ASN1_UNIVERSAL_STRING
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -1067,7 +1095,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_UNIVERSAL_STRING(x, xl) SILC_ASN1_U2(UNIVERSAL_STRING, x, xl)
 #define SILC_ASN1_UNIVERSAL_STRING_T(o, t, x, xl) SILC_ASN1_T2(UNIVERSAL_STRING, o, t, x, xl)
 
 #define SILC_ASN1_UNIVERSAL_STRING(x, xl) SILC_ASN1_U2(UNIVERSAL_STRING, x, xl)
 #define SILC_ASN1_UNIVERSAL_STRING_T(o, t, x, xl) SILC_ASN1_T2(UNIVERSAL_STRING, o, t, x, xl)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_BMP_STRING
+/****f* silcasn1/SILC_ASN1_BMP_STRING
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -1096,7 +1124,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_BMP_STRING(x, xl) SILC_ASN1_U2(BMP_STRING, x, xl)
 #define SILC_ASN1_BMP_STRING_T(o, t, x, xl) SILC_ASN1_T2(BMP_STRING, o, t, x, xl)
 
 #define SILC_ASN1_BMP_STRING(x, xl) SILC_ASN1_U2(BMP_STRING, x, xl)
 #define SILC_ASN1_BMP_STRING_T(o, t, x, xl) SILC_ASN1_T2(BMP_STRING, o, t, x, xl)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_UNRESTRICTED_STRING
+/****f* silcasn1/SILC_ASN1_UNRESTRICTED_STRING
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -1125,7 +1153,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_UNRESTRICTED_STRING(x, xl) SILC_ASN1_U2(UNRESTRICTED_STRING, x, xl)
 #define SILC_ASN1_UNRESTRICTED_STRING_T(o, t, x, xl) SILC_ASN1_T2(UNRESTRICTED_STRING, o, t, x, xl)
 
 #define SILC_ASN1_UNRESTRICTED_STRING(x, xl) SILC_ASN1_U2(UNRESTRICTED_STRING, x, xl)
 #define SILC_ASN1_UNRESTRICTED_STRING_T(o, t, x, xl) SILC_ASN1_T2(UNRESTRICTED_STRING, o, t, x, xl)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_GENERAL_STRING
+/****f* silcasn1/SILC_ASN1_GENERAL_STRING
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -1154,7 +1182,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_GENERAL_STRING(x, xl) SILC_ASN1_U2(GENERAL_STRING, x, xl)
 #define SILC_ASN1_GENERAL_STRING_T(o, t, x, xl) SILC_ASN1_T2(GENERAL_STRING, o, t, x, xl)
 
 #define SILC_ASN1_GENERAL_STRING(x, xl) SILC_ASN1_U2(GENERAL_STRING, x, xl)
 #define SILC_ASN1_GENERAL_STRING_T(o, t, x, xl) SILC_ASN1_T2(GENERAL_STRING, o, t, x, xl)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_UTC_TIME
+/****f* silcasn1/SILC_ASN1_UTC_TIME
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -1177,7 +1205,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_UTC_TIME(x) SILC_ASN1_U1(UTC_TIME, x)
 #define SILC_ASN1_UTC_TIME_T(o, t, x) SILC_ASN1_T1(UTC_TIME, o, t, x)
 
 #define SILC_ASN1_UTC_TIME(x) SILC_ASN1_U1(UTC_TIME, x)
 #define SILC_ASN1_UTC_TIME_T(o, t, x) SILC_ASN1_T1(UTC_TIME, o, t, x)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_GEN_TIME
+/****f* silcasn1/SILC_ASN1_GEN_TIME
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -1200,7 +1228,7 @@ SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
 #define SILC_ASN1_GEN_TIME(x) SILC_ASN1_U1(GENERALIZED_TIME, x)
 #define SILC_ASN1_GEN_TIME_T(o, t, x) SILC_ASN1_T1(GENERALIZED_TIME, o, t, x)
 
 #define SILC_ASN1_GEN_TIME(x) SILC_ASN1_U1(GENERALIZED_TIME, x)
 #define SILC_ASN1_GEN_TIME_T(o, t, x) SILC_ASN1_T1(GENERALIZED_TIME, o, t, x)
 
-/****f* silcasn1/SilcASN1API/SILC_ASN1_END
+/****f* silcasn1/SILC_ASN1_END
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
index 0d7416c965ea0dda1768c23ecbed43988f509232..a85f27402851ad5858e01191ab7408bb78a514fc 100644 (file)
@@ -590,7 +590,7 @@ silc_asn1_decoder(SilcAsn1 asn1, SilcStack stack1, SilcAsn1Tag type,
            goto fail;
          }
 
            goto fail;
          }
 
-         *(*val) = (rdata[0] == 0xff ? TRUE : FALSE);
+         *(*val) = (rdata[0] != 0x00 ? TRUE : FALSE);
          break;
        }
 
          break;
        }
 
index 8b4c7a8cbd4fffddd2af93e4af084ede2fe32d97..5b4c00713fb9b971f39724fa993acb9141e2a485 100644 (file)
@@ -189,7 +189,7 @@ silc_asn1_encoder(SilcAsn1 asn1, SilcStack stack1, SilcStack stack2,
            SILC_LOG_DEBUG(("Error decoding underlaying node for ANY"));
            goto fail;
          }
            SILC_LOG_DEBUG(("Error decoding underlaying node for ANY"));
            goto fail;
          }
-         assert(enc == SILC_BER_ENC_CONSTRUCTED);
+         SILC_VERIFY(enc == SILC_BER_ENC_CONSTRUCTED);
 
          /* Now encode with implicit tagging */
          len = silc_ber_encoded_len(tag, d_len, FALSE);
 
          /* Now encode with implicit tagging */
          len = silc_ber_encoded_len(tag, d_len, FALSE);
@@ -485,7 +485,7 @@ silc_asn1_encoder(SilcAsn1 asn1, SilcStack stack1, SilcStack stack2,
        /* Encode empty BER block */
        SilcBool val = va_arg(asn1->ap, SilcUInt32);
 
        /* Encode empty BER block */
        SilcBool val = va_arg(asn1->ap, SilcUInt32);
 
-       assert(indef == FALSE);
+       SILC_VERIFY(indef == FALSE);
 
        if (!val)
          break;
 
        if (!val)
          break;
index 8c0ec6942f7bd9e94f0cfe616d0bf821327f4f15..d4df8974ac35f5b8c5460008d95e8ad53dbcdf31 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2003 - 2007 Pekka Riikonen
+  Copyright (C) 2003 - 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
 
   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
@@ -35,7 +35,7 @@
 #ifndef SILCBER_H
 #define SILCBER_H
 
 #ifndef SILCBER_H
 #define SILCBER_H
 
-/****d* silcasn1/SilcBerAPI/SilcBerClass
+/****d* silcasn1/SilcBerClass
  *
  * NAME
  *
  *
  * NAME
  *
@@ -54,7 +54,7 @@ typedef enum {
 } SilcBerClass;
 /***/
 
 } SilcBerClass;
 /***/
 
-/****d* silcasn1/SilcBerAPI/SilcBerEncoding
+/****d* silcasn1/SilcBerEncoding
  *
  * NAME
  *
  *
  * NAME
  *
@@ -71,7 +71,7 @@ typedef enum {
 } SilcBerEncoding;
 /***/
 
 } SilcBerEncoding;
 /***/
 
-/****f* silcasn1/SilcBerAPI/silc_ber_encode
+/****f* silcasn1/silc_ber_encode
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -95,7 +95,7 @@ SilcBool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class,
                         const unsigned char *data, SilcUInt32 data_len,
                         SilcBool indefinite);
 
                         const unsigned char *data, SilcUInt32 data_len,
                         SilcBool indefinite);
 
-/****f* silcasn1/SilcBerAPI/silc_ber_decode
+/****f* silcasn1/silc_ber_decode
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -123,7 +123,7 @@ SilcBool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class,
                         const unsigned char **data, SilcUInt32 *data_len,
                         SilcBool *indefinite, SilcUInt32 *identifier_len);
 
                         const unsigned char **data, SilcUInt32 *data_len,
                         SilcBool *indefinite, SilcUInt32 *identifier_len);
 
-/****f* silcasn1/SilcBerAPI/silc_ber_encoded_len
+/****f* silcasn1/silc_ber_encoded_len
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
index c550827e4ea30ada95443633df11c4fb2e7ed5ed..d99da6df3539e7d147e892a379ec685445685250 100644 (file)
@@ -80,7 +80,7 @@ do {                                                                  \
 #define SILC_CBC_DEC_LSB_128_32(len, iv, block_prev, block,            \
                                block_dec, src, dst, i, dec)            \
 do {                                                                   \
 #define SILC_CBC_DEC_LSB_128_32(len, iv, block_prev, block,            \
                                block_dec, src, dst, i, dec)            \
 do {                                                                   \
-  if (len & (16 - 1))                                                  \
+  if (!len || len & (16 - 1))                                          \
     return FALSE;                                                      \
                                                                        \
   SILC_GET32_LSB(block_prev[0], &iv[0]);                               \
     return FALSE;                                                      \
                                                                        \
   SILC_GET32_LSB(block_prev[0], &iv[0]);                               \
@@ -162,7 +162,7 @@ do {                                                                        \
 #define SILC_CBC_DEC_MSB_128_32(len, iv, block_prev, block,            \
                                block_dec, src, dst, i, dec)            \
 do {                                                                   \
 #define SILC_CBC_DEC_MSB_128_32(len, iv, block_prev, block,            \
                                block_dec, src, dst, i, dec)            \
 do {                                                                   \
-  if (len & (16 - 1))                                                  \
+  if (!len || len & (16 - 1))                                          \
     return FALSE;                                                      \
                                                                        \
   SILC_GET32_MSB(block_prev[0], &iv[0]);                               \
     return FALSE;                                                      \
                                                                        \
   SILC_GET32_MSB(block_prev[0], &iv[0]);                               \
@@ -236,7 +236,7 @@ do {                                                                        \
 #define SILC_CBC_DEC_MSB_64_32(len, iv, block_prev, block,             \
                               block_dec, src, dst, i, dec)             \
 do {                                                                   \
 #define SILC_CBC_DEC_MSB_64_32(len, iv, block_prev, block,             \
                               block_dec, src, dst, i, dec)             \
 do {                                                                   \
-  if (len & (8 - 1))                                                   \
+  if (!len || len & (8 - 1))                                           \
     return FALSE;                                                      \
                                                                        \
   SILC_GET32_MSB(block_prev[0], &iv[0]);                               \
     return FALSE;                                                      \
                                                                        \
   SILC_GET32_MSB(block_prev[0], &iv[0]);                               \
@@ -438,6 +438,7 @@ do {                                                                        \
 
 #define SILC_CFB_DEC_LSB_128_32(iv, cfb, pad, src, dst, dec)           \
 do {                                                                   \
 
 #define SILC_CFB_DEC_LSB_128_32(iv, cfb, pad, src, dst, dec)           \
 do {                                                                   \
+  unsigned char temp;                                                  \
   while (len-- > 0) {                                                  \
     if (pad == 16) {                                                   \
       SILC_GET32_LSB(cfb[0], iv);                                      \
   while (len-- > 0) {                                                  \
     if (pad == 16) {                                                   \
       SILC_GET32_LSB(cfb[0], iv);                                      \
@@ -453,9 +454,9 @@ do {                                                                        \
       SILC_PUT32_LSB(cfb[3], iv + 12);                                 \
       pad = 0;                                                         \
     }                                                                  \
       SILC_PUT32_LSB(cfb[3], iv + 12);                                 \
       pad = 0;                                                         \
     }                                                                  \
-    iv[pad] = *src ^ iv[pad];                                          \
-    *dst = iv[pad];                                                    \
-    iv[pad++] = *src;                                                  \
+    temp = *src;                                                       \
+    *dst = temp ^ iv[pad];                                             \
+    iv[pad++] = temp;                                                  \
     dst++;                                                             \
     src++;                                                             \
   }                                                                    \
     dst++;                                                             \
     src++;                                                             \
   }                                                                    \
@@ -491,6 +492,7 @@ do {                                                                        \
 
 #define SILC_CFB_DEC_MSB_128_32(iv, cfb, pad, src, dst, dec)           \
 do {                                                                   \
 
 #define SILC_CFB_DEC_MSB_128_32(iv, cfb, pad, src, dst, dec)           \
 do {                                                                   \
+  unsigned char temp;                                                  \
   while (len-- > 0) {                                                  \
     if (pad == 16) {                                                   \
       SILC_GET32_MSB(cfb[0], iv);                                      \
   while (len-- > 0) {                                                  \
     if (pad == 16) {                                                   \
       SILC_GET32_MSB(cfb[0], iv);                                      \
@@ -506,9 +508,9 @@ do {                                                                        \
       SILC_PUT32_MSB(cfb[3], iv + 12);                                 \
       pad = 0;                                                         \
     }                                                                  \
       SILC_PUT32_MSB(cfb[3], iv + 12);                                 \
       pad = 0;                                                         \
     }                                                                  \
-    iv[pad] = *src ^ iv[pad];                                          \
-    *dst = iv[pad];                                                    \
-    iv[pad++] = *src;                                                  \
+    temp = *src;                                                       \
+    *dst = temp ^ iv[pad];                                             \
+    iv[pad++] = temp;                                                  \
     dst++;                                                             \
     src++;                                                             \
   }                                                                    \
     dst++;                                                             \
     src++;                                                             \
   }                                                                    \
@@ -540,6 +542,7 @@ do {                                                                        \
 
 #define SILC_CFB_DEC_MSB_64_32(iv, cfb, pad, src, dst, dec)            \
 do {                                                                   \
 
 #define SILC_CFB_DEC_MSB_64_32(iv, cfb, pad, src, dst, dec)            \
 do {                                                                   \
+  unsigned char temp;                                                  \
   while (len-- > 0) {                                                  \
     if (pad == 8) {                                                    \
       SILC_GET32_MSB(cfb[0], iv);                                      \
   while (len-- > 0) {                                                  \
     if (pad == 8) {                                                    \
       SILC_GET32_MSB(cfb[0], iv);                                      \
@@ -551,9 +554,9 @@ do {                                                                        \
       SILC_PUT32_MSB(cfb[1], iv + 4);                                  \
       pad = 0;                                                         \
     }                                                                  \
       SILC_PUT32_MSB(cfb[1], iv + 4);                                  \
       pad = 0;                                                         \
     }                                                                  \
-    iv[pad] = *src ^ iv[pad];                                          \
-    *dst = iv[pad];                                                    \
-    iv[pad++] = *src;                                                  \
+    temp = *src;                                                       \
+    *dst = temp ^ iv[pad];                                             \
+    iv[pad++] = temp;                                                  \
     dst++;                                                             \
     src++;                                                             \
   }                                                                    \
     dst++;                                                             \
     src++;                                                             \
   }                                                                    \
@@ -578,15 +581,16 @@ do {                                                                      \
 /* CFB 128-bit block, MSB, the 8-bit iv argument must be decrypted. */
 
 #define SILC_CFB_DEC_MSB_128_8(iv, pad, src, dst, dec)                 \
 /* CFB 128-bit block, MSB, the 8-bit iv argument must be decrypted. */
 
 #define SILC_CFB_DEC_MSB_128_8(iv, pad, src, dst, dec)                 \
- do {                                                                  \
+do {                                                                   \
+  unsigned char temp;                                                  \
   while (len-- > 0) {                                                  \
     if (pad == 16) {                                                   \
       dec;                                                             \
       pad = 0;                                                         \
     }                                                                  \
   while (len-- > 0) {                                                  \
     if (pad == 16) {                                                   \
       dec;                                                             \
       pad = 0;                                                         \
     }                                                                  \
-    iv[pad] = *src ^ iv[pad];                                          \
-    *dst = iv[pad];                                                    \
-    iv[pad++] = *src;                                                  \
+    temp = *src;                                                       \
+    *dst = temp ^ iv[pad];                                             \
+    iv[pad++] = temp;                                                  \
     dst++;                                                             \
     src++;                                                             \
   }                                                                    \
     dst++;                                                             \
     src++;                                                             \
   }                                                                    \
index a2ab83d222ce1f5eece81f16cf4a3403fd141848..cfc1ee83ca24290502b7930bb287cded29287085 100644 (file)
@@ -48,7 +48,7 @@
 
 */
 
 
 */
 
-#include "../../silcdefs.h"
+#include "../../cryptodefs.h"
 
 #ifdef SILC_SHA256_X86
 
 
 #ifdef SILC_SHA256_X86
 
index a0503c899105d6ffa06c1f3c72fde2f8e332a2af..7011bdfd40bbe375ae7e02b22efeb883fc87fe16 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1997 - 2007 Pekka Riikonen
+  Copyright (C) 1997 - 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
 
   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
@@ -301,7 +301,7 @@ SilcBool silc_cipher_decrypt(SilcCipher cipher, const unsigned char *src,
  * SYNOPSIS
  *
  *    SilcBool silc_cipher_set_key(SilcCipher cipher, const unsigned char *key,
  * SYNOPSIS
  *
  *    SilcBool silc_cipher_set_key(SilcCipher cipher, const unsigned char *key,
- *                                 SilcUInt32 keylen, SilcBool encryption);
+ *                                 SilcUInt32 bit_keylen, SilcBool encryption);
  *
  * DESCRIPTION
  *
  *
  * DESCRIPTION
  *
@@ -311,7 +311,7 @@ SilcBool silc_cipher_decrypt(SilcCipher cipher, const unsigned char *src,
  *
  ***/
 SilcBool silc_cipher_set_key(SilcCipher cipher, const unsigned char *key,
  *
  ***/
 SilcBool silc_cipher_set_key(SilcCipher cipher, const unsigned char *key,
-                            SilcUInt32 keylen, SilcBool encryption);
+                            SilcUInt32 bit_keylen, SilcBool encryption);
 
 /****f* silccrypt/SilcCipherAPI/silc_cipher_set_iv
  *
 
 /****f* silccrypt/SilcCipherAPI/silc_cipher_set_iv
  *
index 838a57c3c10112f06b44ab1f0d95edf571d80f53..443d1a9cdd6332782ced577e68267d5394c70599 100644 (file)
@@ -48,6 +48,6 @@ test_silcpkcs_SOURCES = test_silcpkcs.c
 test_dsa_SOURCES = test_dsa.c
 
 LIBS = $(SILC_COMMON_LIBS)
 test_dsa_SOURCES = test_dsa.c
 
 LIBS = $(SILC_COMMON_LIBS)
-LDADD = -L.. -L../.. -lsilc
+LDADD = -L.. -L../.. -lsct
 
 include $(top_srcdir)/Makefile.defines.in
 
 include $(top_srcdir)/Makefile.defines.in
index af76bced7e7a7550eefcba046e68c400188fdd6e..aa201b02d5839f2df223dd38ff2e77e0875ce418 100644 (file)
@@ -1,4 +1,4 @@
-#include "silc.h"
+#include "silccrypto.h"
 
 /* First test vector, 8 bytes plaintext, 128 bits key */
 const unsigned char key1[] = "\x01\x23\x45\x67\x12\x34\x56\x78\x23\x45\x67\x89\x34\x56\x78\x9a";
 
 /* First test vector, 8 bytes plaintext, 128 bits key */
 const unsigned char key1[] = "\x01\x23\x45\x67\x12\x34\x56\x78\x23\x45\x67\x89\x34\x56\x78\x9a";
index c3e09b470c0c4ac696ff1c6b251fe9a8e50e1868..966cd6d9f5ce0e5fca025283993e7ac2225c3de4 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1997 - 2007 Pekka Riikonen
+  Copyright (C) 1997 - 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
 
   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
@@ -32,7 +32,7 @@
 
 #include "silcrng.h"
 
 
 #include "silcrng.h"
 
-/****f* silcmath/SilcMathAPI/silc_math_gen_prime
+/****f* silcmath/silc_math_gen_prime
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -54,7 +54,7 @@
 SilcBool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits,
                             SilcBool verbose, SilcRng rng);
 
 SilcBool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits,
                             SilcBool verbose, SilcRng rng);
 
-/****f* silcmath/SilcMathAPI/silc_math_prime_test
+/****f* silcmath/silc_math_prime_test
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
index 662de1720c0072cbfa3f64ff6f623a1c004081d3..fe8939025ef07092f101063c0d687a56a4061514 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1997 - 2007 Pekka Riikonen
+  Copyright (C) 1997 - 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
 
   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
@@ -43,7 +43,7 @@
 #endif /* SILC_DIST_TFM */
 #endif
 
 #endif /* SILC_DIST_TFM */
 #endif
 
-/****d* silcmath/SilcMPAPI/SilcMPInt
+/****d* silcmath/SilcMPInt
  *
  * NAME
  *
  *
  * NAME
  *
@@ -60,7 +60,7 @@
 typedef SILC_MP_INT SilcMPInt;
 /***/
 
 typedef SILC_MP_INT SilcMPInt;
 /***/
 
-/****f* silcmath/SilcMPAPI/silc_mp_init
+/****f* silcmath/silc_mp_init
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -75,7 +75,7 @@ typedef SILC_MP_INT SilcMPInt;
  ***/
 void silc_mp_init(SilcMPInt *mp);
 
  ***/
 void silc_mp_init(SilcMPInt *mp);
 
-/****f* silcmath/SilcMPAPI/silc_mp_sinit
+/****f* silcmath/silc_mp_sinit
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -92,7 +92,7 @@ void silc_mp_init(SilcMPInt *mp);
  ***/
 SilcBool silc_mp_sinit(SilcStack stack, SilcMPInt *mp);
 
  ***/
 SilcBool silc_mp_sinit(SilcStack stack, SilcMPInt *mp);
 
-/****f* silcmath/SilcMPAPI/silc_mp_uninit
+/****f* silcmath/silc_mp_uninit
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -105,7 +105,7 @@ SilcBool silc_mp_sinit(SilcStack stack, SilcMPInt *mp);
  ***/
 void silc_mp_uninit(SilcMPInt *mp);
 
  ***/
 void silc_mp_uninit(SilcMPInt *mp);
 
-/****f* silcmath/SilcMPAPI/silc_mp_suninit
+/****f* silcmath/silc_mp_suninit
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -118,7 +118,7 @@ void silc_mp_uninit(SilcMPInt *mp);
  ***/
 void silc_mp_suninit(SilcStack stack, SilcMPInt *mp);
 
  ***/
 void silc_mp_suninit(SilcStack stack, SilcMPInt *mp);
 
-/****f* silcmath/SilcMPAPI/silc_mp_size
+/****f* silcmath/silc_mp_size
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -131,7 +131,7 @@ void silc_mp_suninit(SilcStack stack, SilcMPInt *mp);
  ***/
 size_t silc_mp_size(SilcMPInt *mp);
 
  ***/
 size_t silc_mp_size(SilcMPInt *mp);
 
-/****f* silcmath/SilcMPAPI/silc_mp_sizeinbase
+/****f* silcmath/silc_mp_sizeinbase
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -153,7 +153,7 @@ size_t silc_mp_size(SilcMPInt *mp);
  ***/
 size_t silc_mp_sizeinbase(SilcMPInt *mp, int base);
 
  ***/
 size_t silc_mp_sizeinbase(SilcMPInt *mp, int base);
 
-/****f* silcmath/SilcMPAPI/silc_mp_set
+/****f* silcmath/silc_mp_set
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -167,7 +167,7 @@ size_t silc_mp_sizeinbase(SilcMPInt *mp, int base);
  ***/
 void silc_mp_set(SilcMPInt *dst, SilcMPInt *src);
 
  ***/
 void silc_mp_set(SilcMPInt *dst, SilcMPInt *src);
 
-/****f* silcmath/SilcMPAPI/silc_mp_set_ui
+/****f* silcmath/silc_mp_set_ui
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -181,7 +181,7 @@ void silc_mp_set(SilcMPInt *dst, SilcMPInt *src);
  ***/
 void silc_mp_set_ui(SilcMPInt *dst, SilcUInt32 ui);
 
  ***/
 void silc_mp_set_ui(SilcMPInt *dst, SilcUInt32 ui);
 
-/****f* silcmath/SilcMPAPI/silc_mp_set_si
+/****f* silcmath/silc_mp_set_si
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -195,7 +195,7 @@ void silc_mp_set_ui(SilcMPInt *dst, SilcUInt32 ui);
  ***/
 void silc_mp_set_si(SilcMPInt *dst, SilcInt32 si);
 
  ***/
 void silc_mp_set_si(SilcMPInt *dst, SilcInt32 si);
 
-/****f* silcmath/SilcMPAPI/silc_mp_set_str
+/****f* silcmath/silc_mp_set_str
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -214,7 +214,7 @@ void silc_mp_set_si(SilcMPInt *dst, SilcInt32 si);
  ***/
 void silc_mp_set_str(SilcMPInt *dst, const char *str, int base);
 
  ***/
 void silc_mp_set_str(SilcMPInt *dst, const char *str, int base);
 
-/****f* silcmath/SilcMPAPI/silc_mp_get_ui
+/****f* silcmath/silc_mp_get_ui
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -227,7 +227,7 @@ void silc_mp_set_str(SilcMPInt *dst, const char *str, int base);
  ***/
 SilcUInt32 silc_mp_get_ui(SilcMPInt *mp);
 
  ***/
 SilcUInt32 silc_mp_get_ui(SilcMPInt *mp);
 
-/****f* silcmath/SilcMPAPI/silc_mp_get_str
+/****f* silcmath/silc_mp_get_str
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -247,7 +247,7 @@ SilcUInt32 silc_mp_get_ui(SilcMPInt *mp);
  ***/
 char *silc_mp_get_str(char *str, SilcMPInt *mp, int base);
 
  ***/
 char *silc_mp_get_str(char *str, SilcMPInt *mp, int base);
 
-/****f* silcmath/SilcMPAPI/silc_mp_add
+/****f* silcmath/silc_mp_add
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -260,7 +260,7 @@ char *silc_mp_get_str(char *str, SilcMPInt *mp, int base);
  ***/
 void silc_mp_add(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
  ***/
 void silc_mp_add(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
-/****f* silcmath/SilcMPAPI/silc_mp_add_ui
+/****f* silcmath/silc_mp_add_ui
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -274,7 +274,7 @@ void silc_mp_add(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  ***/
 void silc_mp_add_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
  ***/
 void silc_mp_add_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
-/****f* silcmath/SilcMPAPI/silc_mp_sub
+/****f* silcmath/silc_mp_sub
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -287,7 +287,7 @@ void silc_mp_add_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
  ***/
 void silc_mp_sub(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
  ***/
 void silc_mp_sub(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
-/****f* silcmath/SilcMPAPI/silc_mp_sub_ui
+/****f* silcmath/silc_mp_sub_ui
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -301,7 +301,7 @@ void silc_mp_sub(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  ***/
 void silc_mp_sub_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
  ***/
 void silc_mp_sub_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
-/****f* silcmath/SilcMPAPI/silc_mp_mul
+/****f* silcmath/silc_mp_mul
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -314,7 +314,7 @@ void silc_mp_sub_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
  ***/
 void silc_mp_mul(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
  ***/
 void silc_mp_mul(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
-/****f* silcmath/SilcMPAPI/silc_mp_mul_ui
+/****f* silcmath/silc_mp_mul_ui
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -328,7 +328,7 @@ void silc_mp_mul(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  ***/
 void silc_mp_mul_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
  ***/
 void silc_mp_mul_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
-/****f* silcmath/SilcMPAPI/silc_mp_mul_2exp
+/****f* silcmath/silc_mp_mul_2exp
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -342,7 +342,7 @@ void silc_mp_mul_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
  ***/
 void silc_mp_mul_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp);
 
  ***/
 void silc_mp_mul_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp);
 
-/****f* silcmath/SilcMPAPI/silc_mp_sqrt
+/****f* silcmath/silc_mp_sqrt
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -355,7 +355,7 @@ void silc_mp_mul_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp);
  ***/
 void silc_mp_sqrt(SilcMPInt *dst, SilcMPInt *src);
 
  ***/
 void silc_mp_sqrt(SilcMPInt *dst, SilcMPInt *src);
 
-/****f* silcmath/SilcMPAPI/silc_mp_div
+/****f* silcmath/silc_mp_div
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -369,7 +369,7 @@ void silc_mp_sqrt(SilcMPInt *dst, SilcMPInt *src);
  ***/
 void silc_mp_div(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
  ***/
 void silc_mp_div(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
-/****f* silcmath/SilcMPAPI/silc_mp_div_ui
+/****f* silcmath/silc_mp_div_ui
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -383,7 +383,7 @@ void silc_mp_div(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  ***/
 void silc_mp_div_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
  ***/
 void silc_mp_div_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
-/****f* silcmath/SilcMPAPI/silc_mp_div_qr
+/****f* silcmath/silc_mp_div_qr
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -401,7 +401,7 @@ void silc_mp_div_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 void silc_mp_div_qr(SilcMPInt *q, SilcMPInt *r, SilcMPInt *mp1,
                    SilcMPInt *mp2);
 
 void silc_mp_div_qr(SilcMPInt *q, SilcMPInt *r, SilcMPInt *mp1,
                    SilcMPInt *mp2);
 
-/****f* silcmath/SilcMPAPI/silc_mp_div_2exp
+/****f* silcmath/silc_mp_div_2exp
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -415,7 +415,7 @@ void silc_mp_div_qr(SilcMPInt *q, SilcMPInt *r, SilcMPInt *mp1,
  ***/
 void silc_mp_div_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp);
 
  ***/
 void silc_mp_div_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp);
 
-/****f* silcmath/SilcMPAPI/silc_mp_div_2exp_qr
+/****f* silcmath/silc_mp_div_2exp_qr
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -433,7 +433,7 @@ void silc_mp_div_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp);
 void silc_mp_div_2exp_qr(SilcMPInt *q, SilcMPInt *r, SilcMPInt *mp1,
                         SilcUInt32 exp);
 
 void silc_mp_div_2exp_qr(SilcMPInt *q, SilcMPInt *r, SilcMPInt *mp1,
                         SilcUInt32 exp);
 
-/****f* silcmath/SilcMPAPI/silc_mp_mod
+/****f* silcmath/silc_mp_mod
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -449,7 +449,7 @@ void silc_mp_div_2exp_qr(SilcMPInt *q, SilcMPInt *r, SilcMPInt *mp1,
  ***/
 void silc_mp_mod(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
  ***/
 void silc_mp_mod(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
-/****f* silcmath/SilcMPAPI/silc_mp_mod_ui
+/****f* silcmath/silc_mp_mod_ui
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -464,7 +464,7 @@ void silc_mp_mod(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  ***/
 void silc_mp_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
  ***/
 void silc_mp_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
-/****f* silcmath/SilcMPAPI/silc_mp_mod_2exp
+/****f* silcmath/silc_mp_mod_2exp
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -480,7 +480,7 @@ void silc_mp_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
  ***/
 void silc_mp_mod_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
  ***/
 void silc_mp_mod_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
 
-/****f* silcmath/SilcMPAPI/silc_mp_pow
+/****f* silcmath/silc_mp_pow
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -494,7 +494,7 @@ void silc_mp_mod_2exp(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 ui);
  ***/
 void silc_mp_pow(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *exp);
 
  ***/
 void silc_mp_pow(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *exp);
 
-/****f* silcmath/SilcMPAPI/silc_mp_pow_ui
+/****f* silcmath/silc_mp_pow_ui
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -508,7 +508,7 @@ void silc_mp_pow(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *exp);
  ***/
 void silc_mp_pow_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp);
 
  ***/
 void silc_mp_pow_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp);
 
-/****f* silcmath/SilcMPAPI/silc_mp_pow_mod
+/****f* silcmath/silc_mp_pow_mod
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -524,7 +524,7 @@ void silc_mp_pow_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp);
 void silc_mp_pow_mod(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *exp,
                     SilcMPInt *mod);
 
 void silc_mp_pow_mod(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *exp,
                     SilcMPInt *mod);
 
-/****f* silcmath/SilcMPAPI/silc_mp_pow_mod_ui
+/****f* silcmath/silc_mp_pow_mod_ui
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -540,7 +540,7 @@ void silc_mp_pow_mod(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *exp,
 void silc_mp_pow_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp,
                        SilcMPInt *mod);
 
 void silc_mp_pow_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp,
                        SilcMPInt *mod);
 
-/****f* silcmath/SilcMPAPI/silc_mp_modinv
+/****f* silcmath/silc_mp_modinv
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -568,7 +568,7 @@ void silc_mp_pow_mod_ui(SilcMPInt *dst, SilcMPInt *mp1, SilcUInt32 exp,
  ***/
 void silc_mp_modinv(SilcMPInt *inv, SilcMPInt *a, SilcMPInt *n);
 
  ***/
 void silc_mp_modinv(SilcMPInt *inv, SilcMPInt *a, SilcMPInt *n);
 
-/****f* silcmath/SilcMPAPI/silc_mp_gcd
+/****f* silcmath/silc_mp_gcd
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -582,7 +582,7 @@ void silc_mp_modinv(SilcMPInt *inv, SilcMPInt *a, SilcMPInt *n);
  ***/
 void silc_mp_gcd(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
  ***/
 void silc_mp_gcd(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
-/****f* silcmath/SilcMPAPI/silc_mp_gcdext
+/****f* silcmath/silc_mp_gcdext
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -598,7 +598,7 @@ void silc_mp_gcd(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 void silc_mp_gcdext(SilcMPInt *g, SilcMPInt *s, SilcMPInt *t, SilcMPInt *mp1,
                    SilcMPInt *mp2);
 
 void silc_mp_gcdext(SilcMPInt *g, SilcMPInt *s, SilcMPInt *t, SilcMPInt *mp1,
                    SilcMPInt *mp2);
 
-/****f* silcmath/SilcMPAPI/silc_mp_cmp
+/****f* silcmath/silc_mp_cmp
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -612,7 +612,7 @@ void silc_mp_gcdext(SilcMPInt *g, SilcMPInt *s, SilcMPInt *t, SilcMPInt *mp1,
  ***/
 int silc_mp_cmp(SilcMPInt *mp1, SilcMPInt *mp2);
 
  ***/
 int silc_mp_cmp(SilcMPInt *mp1, SilcMPInt *mp2);
 
-/****f* silcmath/SilcMPAPI/silc_mp_cmp_si
+/****f* silcmath/silc_mp_cmp_si
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -626,7 +626,7 @@ int silc_mp_cmp(SilcMPInt *mp1, SilcMPInt *mp2);
  ***/
 int silc_mp_cmp_si(SilcMPInt *mp1, SilcInt32 si);
 
  ***/
 int silc_mp_cmp_si(SilcMPInt *mp1, SilcInt32 si);
 
-/****f* silcmath/SilcMPAPI/silc_mp_cmp_ui
+/****f* silcmath/silc_mp_cmp_ui
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -641,7 +641,7 @@ int silc_mp_cmp_si(SilcMPInt *mp1, SilcInt32 si);
  ***/
 int silc_mp_cmp_ui(SilcMPInt *mp1, SilcUInt32 ui);
 
  ***/
 int silc_mp_cmp_ui(SilcMPInt *mp1, SilcUInt32 ui);
 
-/****f* silcmath/SilcMPAPI/silc_mp_mp2bin
+/****f* silcmath/silc_mp_mp2bin
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -658,7 +658,7 @@ int silc_mp_cmp_ui(SilcMPInt *mp1, SilcUInt32 ui);
 unsigned char *silc_mp_mp2bin(SilcMPInt *val, SilcUInt32 len,
                              SilcUInt32 *ret_len);
 
 unsigned char *silc_mp_mp2bin(SilcMPInt *val, SilcUInt32 len,
                              SilcUInt32 *ret_len);
 
-/****f* silcmath/SilcMPAPI/silc_mp_mp2bin_noalloc
+/****f* silcmath/silc_mp_mp2bin_noalloc
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -674,7 +674,7 @@ unsigned char *silc_mp_mp2bin(SilcMPInt *val, SilcUInt32 len,
 void silc_mp_mp2bin_noalloc(SilcMPInt *val, unsigned char *dst,
                            SilcUInt32 dst_len);
 
 void silc_mp_mp2bin_noalloc(SilcMPInt *val, unsigned char *dst,
                            SilcUInt32 dst_len);
 
-/****f* silcmath/SilcMPAPI/silc_mp_bin2mp
+/****f* silcmath/silc_mp_bin2mp
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -689,7 +689,7 @@ void silc_mp_mp2bin_noalloc(SilcMPInt *val, unsigned char *dst,
  ***/
 void silc_mp_bin2mp(unsigned char *data, SilcUInt32 len, SilcMPInt *ret);
 
  ***/
 void silc_mp_bin2mp(unsigned char *data, SilcUInt32 len, SilcMPInt *ret);
 
-/****f* silcmath/SilcMPAPI/silc_mp_abs
+/****f* silcmath/silc_mp_abs
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -702,7 +702,7 @@ void silc_mp_bin2mp(unsigned char *data, SilcUInt32 len, SilcMPInt *ret);
  ***/
 void silc_mp_abs(SilcMPInt *dst, SilcMPInt *src);
 
  ***/
 void silc_mp_abs(SilcMPInt *dst, SilcMPInt *src);
 
-/****f* silcmath/SilcMPAPI/silc_mp_neg
+/****f* silcmath/silc_mp_neg
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -715,7 +715,7 @@ void silc_mp_abs(SilcMPInt *dst, SilcMPInt *src);
  ***/
 void silc_mp_neg(SilcMPInt *dst, SilcMPInt *src);
 
  ***/
 void silc_mp_neg(SilcMPInt *dst, SilcMPInt *src);
 
-/****f* silcmath/SilcMPAPI/silc_mp_and
+/****f* silcmath/silc_mp_and
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -728,7 +728,7 @@ void silc_mp_neg(SilcMPInt *dst, SilcMPInt *src);
  ***/
 void silc_mp_and(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
  ***/
 void silc_mp_and(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
-/****f* silcmath/SilcMPAPI/silc_mp_or
+/****f* silcmath/silc_mp_or
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -741,7 +741,7 @@ void silc_mp_and(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
  ***/
 void silc_mp_or(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
  ***/
 void silc_mp_or(SilcMPInt *dst, SilcMPInt *mp1, SilcMPInt *mp2);
 
-/****f* silcmath/SilcMPAPI/silc_mp_xor
+/****f* silcmath/silc_mp_xor
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
index 6252929cb6ae0ae539b159daf25e5fbec1452f2f..927489c3ce2b1a08fe62a518adf1c5d98b24dc3c 100644 (file)
@@ -284,7 +284,7 @@ int silc_ssh_public_key_decode(unsigned char *key, SilcUInt32 key_len,
                           SILC_STR_ADVANCE,
                           SILC_STR_UI32_STRING_ALLOC(&type),
                           SILC_STR_END) < 0) {
                           SILC_STR_ADVANCE,
                           SILC_STR_UI32_STRING_ALLOC(&type),
                           SILC_STR_END) < 0) {
-    SILC_LOG_ERROR(("Malformed SSH2 public key"));
+    SILC_LOG_DEBUG(("Malformed SSH2 public key"));
     goto err;
   }
 
     goto err;
   }
 
index 6c52bc7a8ea28e95748220fa389548256810657a..f07b7cb11b0aaa45543289e342a2fd997db7425e 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2007 Pekka Riikonen
+  Copyright (C) 2007 - 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
 
   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
@@ -31,7 +31,8 @@
  * signatures and verification.  Both RSA and DSS SSH2 keys are supported.
  * The library supports the standard SSH2 public key file format defined
  * in RFC 4716 and the OpenSSH public key file format.  The private key file
  * signatures and verification.  Both RSA and DSS SSH2 keys are supported.
  * The library supports the standard SSH2 public key file format defined
  * in RFC 4716 and the OpenSSH public key file format.  The private key file
- * format support includes OpenSSH private key files.
+ * format support includes OpenSSH private key files.  The signature format
+ * is compliant with the SSH2 protocol.
  *
  * EXAMPLE
  *
  *
  * EXAMPLE
  *
@@ -69,7 +70,7 @@
 #ifndef SILCSSH_H
 #define SILCSSH_H
 
 #ifndef SILCSSH_H
 #define SILCSSH_H
 
-/****d* silcssh/SilcSshAPI/SilcSshKeyType
+/****d* silcssh/SilcSshKeyType
  *
  * NAME
  *
  *
  * NAME
  *
@@ -87,7 +88,7 @@ typedef enum {
   SILC_SSH_KEY_SSH2      = 2,     /* SSH2 public key, RFC 4716 */
 } SilcSshKeyType;
 
   SILC_SSH_KEY_SSH2      = 2,     /* SSH2 public key, RFC 4716 */
 } SilcSshKeyType;
 
-/****s* silcssh/SilcSshAPI/SilcSshPublicKey
+/****s* silcssh/SilcSshPublicKey
  *
  * NAME
  *
  *
  * NAME
  *
@@ -109,7 +110,7 @@ typedef struct SilcSshPublicKeyStruct  {
 } *SilcSshPublicKey;
 /***/
 
 } *SilcSshPublicKey;
 /***/
 
-/****s* silcssh/SilcSshAPI/SilcSshPrivateKey
+/****s* silcssh/SilcSshPrivateKey
  *
  * NAME
  *
  *
  * NAME
  *
@@ -131,7 +132,7 @@ typedef struct SilcSshPrivateKeyStruct  {
 } *SilcSshPrivateKey;
 /***/
 
 } *SilcSshPrivateKey;
 /***/
 
-/****f* silcssh/SilcSshAPI/silc_ssh_generate_key
+/****f* silcssh/silc_ssh_generate_key
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -160,7 +161,7 @@ SilcBool silc_ssh_generate_key(const char *algorithm,
                               SilcPublicKey *ret_public_key,
                               SilcPrivateKey *ret_private_key);
 
                               SilcPublicKey *ret_public_key,
                               SilcPrivateKey *ret_private_key);
 
-/****f* silcssh/SilcSshAPI/silc_ssh_public_key_decode
+/****f* silcssh/silc_ssh_public_key_decode
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -184,7 +185,7 @@ SilcBool silc_ssh_generate_key(const char *algorithm,
 int silc_ssh_public_key_decode(unsigned char *key, SilcUInt32 key_len,
                               SilcSshPublicKey *ret_public_key);
 
 int silc_ssh_public_key_decode(unsigned char *key, SilcUInt32 key_len,
                               SilcSshPublicKey *ret_public_key);
 
-/****f* silcssh/SilcSshAPI/silc_ssh_public_key_encode
+/****f* silcssh/silc_ssh_public_key_encode
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -208,7 +209,7 @@ unsigned char *silc_ssh_public_key_encode(SilcStack stack,
                                          SilcSshPublicKey public_key,
                                          SilcUInt32 *ret_key_len);
 
                                          SilcSshPublicKey public_key,
                                          SilcUInt32 *ret_key_len);
 
-/****f* silcssh/SilcSshAPI/silc_ssh_public_key_free
+/****f* silcssh/silc_ssh_public_key_free
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -223,7 +224,7 @@ unsigned char *silc_ssh_public_key_encode(SilcStack stack,
  ***/
 void silc_ssh_public_key_free(SilcSshPublicKey public_key);
 
  ***/
 void silc_ssh_public_key_free(SilcSshPublicKey public_key);
 
-/****f* silcssh/SilcSshAPI/silc_ssh_public_key_get_field
+/****f* silcssh/silc_ssh_public_key_get_field
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -244,7 +245,7 @@ void silc_ssh_public_key_free(SilcSshPublicKey public_key);
 const char *silc_ssh_public_key_get_field(SilcSshPublicKey public_key,
                                          const char *field);
 
 const char *silc_ssh_public_key_get_field(SilcSshPublicKey public_key,
                                          const char *field);
 
-/****f* silcssh/SilcSshAPI/silc_ssh_public_key_add_field
+/****f* silcssh/silc_ssh_public_key_add_field
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *
@@ -262,7 +263,7 @@ SilcBool silc_ssh_public_key_add_field(SilcSshPublicKey public_key,
                                       const char *field,
                                       const char *value);
 
                                       const char *field,
                                       const char *value);
 
-/****f* silcssh/SilcSshAPI/silc_ssh_public_key_set_type
+/****f* silcssh/silc_ssh_public_key_set_type
  *
  * SYNOPSIS
  *
  *
  * SYNOPSIS
  *