updates.
authorPekka Riikonen <priikone@silcnet.org>
Sun, 8 Jul 2007 17:34:24 +0000 (17:34 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sun, 8 Jul 2007 17:34:24 +0000 (17:34 +0000)
CHANGES.RUNTIME
TODO
includes/silc.h.in

index 56734857db201dd4e30ed7dc3b4abde444597727..55a723dcc17f8b65a52ed15b442513bdde76f24b 100644 (file)
@@ -1,3 +1,38 @@
+Sun Jul  8 20:20:22 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
+
+       * Moved Base64 routines to lib/silcutil/silcbase64.[ch].  Added
+         SilcStack support to the API.
+
+       * Added allocation support from given stack with SILC_ASN1_ALLOC
+         flag.  Added support for detecting if SILC_ASN1_NULL is present
+         with SILC_ASN1_OPTIONAL flag.  Added support for getting th
+         choice index with SILC_ASN1_CHOICE.  Affected files are
+         lib/silcasn1/silcasn1.h, silcasn1_encode.c and silcasn1_decode.c.
+
+       * Crypto library changes.
+
+         Rewrote and redesigned crypto library initialization.  Added
+         silc_crypto_init and silc_crypto_uninit.
+
+         Added SilcPKCSObject and SilcPKSCAlgorithm contexts to all
+         SilcPKCSObject operation callbacks and SilcPKCSAlgorithm
+         operation callbacks, respectively, as argument.
+
+         Changed silc_pkcs_encrypt, silc_pkcs_decrypt, silc_pkcs_sign
+         and silc_pkcs_verify APIs asynchronous.  They take callback
+         functions now.  Added same callbacks to all SilcPKCSObject
+         and SilcPKCSAlgorithm operation callbacks.
+
+       * Inherit the lock from parent in SilcStack child.  If child
+         doesn't find stack blocks, check from parent.  Added
+         silc_stack_purge.  Affected file is lib/silcutil/silcstack.c.
+
+       * Changed message payload encoding async, due to the PKCS API
+         changes.  Affected files are lib/silccore/silcmessage.[ch].
+
+       * Added new PKCS API support for connauth and SKE.  Affected
+         files are lib/silcske/silconnauth.c and silcske.c.
+
 Wed Jul  4 20:20:05 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
 
        * Unified the SILC_STR_FUNC callback.  Affected files are
 Wed Jul  4 20:20:05 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
 
        * Unified the SILC_STR_FUNC callback.  Affected files are
@@ -37,7 +72,7 @@ Tue Jul  3 18:17:54 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
          also test program lib/silcutil/tests/test_silcdll.c.
 
        * Added SILC Environment manipulation API to
          also test program lib/silcutil/tests/test_silcdll.c.
 
        * Added SILC Environment manipulation API to
-         lib/silcutil/silcenv.[ch] and test program to 
+         lib/silcutil/silcenv.[ch] and test program to
          lib/silcutil/tests/test_silcenv.c.
 
        * Renamed silc_hash_table_replace to silc_hash_table_set.
          lib/silcutil/tests/test_silcenv.c.
 
        * Renamed silc_hash_table_replace to silc_hash_table_set.
diff --git a/TODO b/TODO
index 7ab7b9ad6f8e1fec44dcb2edf030841781e29f31..a8144872547ee1690cac3956e881423061fd7c7c 100644 (file)
--- a/TODO
+++ b/TODO
@@ -290,18 +290,12 @@ Crypto Library, lib/silccrypt/
 ==============================
 
  o Add silc_crypto_init and silc_crypto_uninit.  The _init should take
 ==============================
 
  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 
+   SilcStack that will act as global memory pool for all of crypto
    library.  It should not be necessary anymore to separately register
    default ciphers, HMACs, etc, the _init would do that.  However, if
    user after _init calls silc_pkcs_register, for example, it would take
    preference over the default once, ie. user can always dictate the
    library.  It should not be necessary anymore to separately register
    default ciphers, HMACs, etc, the _init would do that.  However, if
    user after _init calls silc_pkcs_register, for example, it would take
    preference over the default once, ie. user can always dictate the
-   order of algorithms.
-
-   The global SilcStack should be used by all routines in lib/silccrypt, 
-   lib/silcacc (and lib/silcmath).  lib/silcskr and lib/silcasn1 has support 
-   in the API for providing SilcStack, however, if not provided, they 
-   should look for global SilcStack, if SILC_DIST_CRYPTO is defined.
-   Same SILC_DIST_CRYPTO ifdef for other libs.
+   order of algorithms. (***DONE)
 
  o Add fingerprint to SilcSILCPublicKey and retrieval to silcpk.h, and
    possibly to silcpkcs.h.
 
  o Add fingerprint to SilcSILCPublicKey and retrieval to silcpk.h, and
    possibly to silcpkcs.h.
@@ -315,62 +309,12 @@ Crypto Library, lib/silccrypt/
 
  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
 
  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.
-
-   /* Signature computation callback */
-   typedef void (*SilcPKCSSignCb)(SilcBool success,
-                                 const unsigned char *signature,
-                                 SilcUInt32 signature_len,
-                                 void *context);
-
-   /* Signature verification callback */
-   typedef void (*SilcPKCSVerifyCb)(SilcBool success, void *context);
-
-   /* Encryption callback */
-   typedef void (*SilcPKCSEncryptCb)(SilcBool success,
-                                    const unsigned char *encrypted,
-                                    SilcUInt32 encrypted_len,
-                                    void *context);
-
-   /* Decryption callback */
-   typedef void (*SilcPKCSDecryptCb)(SilcBool success,
-                                    const unsigned char *decrypted,
-                                    SilcUInt32 decrypted_len,
-                                    void *context);
-
-   Either add new _async functions or add the callbacks to existing API
-   and if the callback is NULL then the API is not async and if provided
-   it may be async.  For example;
-
-   SilcBool silc_pkcs_sign(SilcPrivateKey private_key,
-                          unsigned char *src, SilcUInt32 src_len,
-                          unsigned char *dst, SilcUInt32 dst_size,
-                          SilcUInt32 *dst_len,
-                          SilcBool compute_hash, SilcHash hash,
-                          SilcPKCSSignCb async_sign,
-                          void *async_sign_context);
-
-   (if this is done then there's no reason why the buffers in the
-    callbacks cannot be the ones user gives here) or allow only async:
-
-   SilcBool silc_pkcs_sign(SilcPrivateKey private_key,
-                          unsigned char *src, SilcUInt32 src_len,
-                          SilcBool compute_hash, SilcHash hash,
-                          SilcPKCSSignCb async_sign,
-                          void *async_sign_context);
-
-   or add new:
-
-   SilcBool silc_pkcs_sign_async(SilcPrivateKey private_key,
-                                unsigned char *src, SilcUInt32 src_len,
-                                SilcBool compute_hash, SilcHash hash,
-                                SilcPKCSSignCb async_sign,
-                                void *async_sign_context);
+   be delivered to SilcPKCSObject and SilcPKCSAlgorithm too. (***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
 
  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.
+   to all other functions in SilcPKCSAlgorithm to be consistent. (***DONE)
 
  o Add DSS support.  Take implementation from Tom or make it yourself.
 
 
  o Add DSS support.  Take implementation from Tom or make it yourself.
 
@@ -521,11 +465,11 @@ lib/silcasn1
 
  o SILC_ASN1_CHOICE should perhaps return an index what choice in the
    choice list was found.  Currently it is left for caller to figure out
 
  o SILC_ASN1_CHOICE should perhaps return an index what choice in the
    choice list was found.  Currently it is left for caller to figure out
-   which choice was found.
+   which choice was found. (***DONE)
 
  o SILC_ASN1_NULL in decoding should return SilcBool whether or not
    the NULL was present.  It's important when it's SILC_ASN1_OPTIONAL
 
  o SILC_ASN1_NULL in decoding should return SilcBool whether or not
    the NULL was present.  It's important when it's SILC_ASN1_OPTIONAL
-   and we need to know whether it was present or not.
+   and we need to know whether it was present or not. (***DONE)
 
 
 lib/silcpgp
 
 
 lib/silcpgp
index b758c50a8a350f4762335922e3c79aa217233a17..5c63c403116d860844dfbb4789d322b76ccbbdd3 100644 (file)
@@ -237,8 +237,10 @@ extern "C" {
 #include "silclog.h"
 #include "silcbuffer.h"
 #include "silcbuffmt.h"
 #include "silclog.h"
 #include "silcbuffer.h"
 #include "silcbuffmt.h"
+#include "silcasync.h"
 
 /* Crypto library includes */
 
 /* Crypto library includes */
+#include "silccrypto.h"
 #include "silccipher.h"
 #include "silchash.h"
 #include "silchmac.h"
 #include "silccipher.h"
 #include "silchash.h"
 #include "silchmac.h"
@@ -252,10 +254,10 @@ extern "C" {
 #include "silcdll.h"
 #include "silchashtable.h"
 #include "silcdlist.h"
 #include "silcdll.h"
 #include "silchashtable.h"
 #include "silcdlist.h"
-#include "silcasync.h"
 #include "silcstream.h"
 #include "silcnet.h"
 #include "silcfileutil.h"
 #include "silcstream.h"
 #include "silcnet.h"
 #include "silcfileutil.h"
+#include "silcbase64.h"
 #include "silcstrutil.h"
 #include "silcutf8.h"
 #include "silcstringprep.h"
 #include "silcstrutil.h"
 #include "silcutf8.h"
 #include "silcstringprep.h"