]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Increased priority of CPU assisted ciphers.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 12 Apr 2011 10:10:59 +0000 (12:10 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 12 Apr 2011 10:10:59 +0000 (12:10 +0200)
lib/accelerated/intel/aes-x86.c
lib/crypto.c
lib/includes/gnutls/crypto.h

index 55ee6ffd6b82a7d999176eb385691e940c2b73b5..eeeca30134b257585093086c46ab097a17aec878 100644 (file)
@@ -178,19 +178,19 @@ register_x86_crypto (void)
 int ret;
        if (check_optimized_aes()) {
                fprintf(stderr, "Intel AES accelerator was detected\n");
-               ret = gnutls_crypto_single_cipher_register (GNUTLS_CIPHER_AES_128_CBC, 90, &cipher_struct);
+               ret = gnutls_crypto_single_cipher_register (GNUTLS_CIPHER_AES_128_CBC, 80, &cipher_struct);
                if (ret < 0)
                {
                  gnutls_assert ();
                }
 
-               ret = gnutls_crypto_single_cipher_register (GNUTLS_CIPHER_AES_192_CBC, 90, &cipher_struct);
+               ret = gnutls_crypto_single_cipher_register (GNUTLS_CIPHER_AES_192_CBC, 80, &cipher_struct);
                if (ret < 0)
                {
                  gnutls_assert ();
                }
 
-               ret = gnutls_crypto_single_cipher_register (GNUTLS_CIPHER_AES_256_CBC, 90, &cipher_struct);
+               ret = gnutls_crypto_single_cipher_register (GNUTLS_CIPHER_AES_256_CBC, 80, &cipher_struct);
                if (ret < 0)
                {
                  gnutls_assert ();
index 853df9ed705b4ebb2e530251b8a4101ceae3ce86..aa914b08730672bce82e2473b8ff69437252ce90 100644 (file)
@@ -156,7 +156,7 @@ _gnutls_crypto_deregister (void)
  * This function will register a cipher algorithm to be used by
  * gnutls.  Any algorithm registered will override the included
  * algorithms and by convention kernel implemented algorithms have
- * priority of 90.  The algorithm with the lowest priority will be
+ * priority of 90 and CPU-assisted of 80.  The algorithm with the lowest priority will be
  * used by gnutls.
  *
  * This function should be called before gnutls_global_init().
@@ -197,7 +197,7 @@ _gnutls_get_crypto_cipher (gnutls_cipher_algorithm_t algo)
  * This function will register a random generator to be used by
  * gnutls.  Any generator registered will override the included
  * generator and by convention kernel implemented generators have
- * priority of 90 The generator with the lowest priority will be
+ * priority of 90 and CPU-assisted of 80. The generator with the lowest priority will be
  * used by gnutls.
  *
  * This function should be called before gnutls_global_init().
@@ -238,7 +238,8 @@ gnutls_crypto_rnd_register2 (int priority, int version,
  *
  * This function will register a MAC algorithm to be used by gnutls.
  * Any algorithm registered will override the included algorithms and
- * by convention kernel implemented algorithms have priority of 90.
+ * by convention kernel implemented algorithms have priority of 90
+ *  and CPU-assisted of 80.
  * The algorithm with the lowest priority will be used by gnutls.
  *
  * This function should be called before gnutls_global_init().
@@ -280,7 +281,7 @@ _gnutls_get_crypto_mac (gnutls_mac_algorithm_t algo)
  * This function will register a digest (hash) algorithm to be used by
  * gnutls.  Any algorithm registered will override the included
  * algorithms and by convention kernel implemented algorithms have
- * priority of 90.  The algorithm with the lowest priority will be
+ * priority of 90  and CPU-assisted of 80.  The algorithm with the lowest priority will be
  * used by gnutls.
  *
  * This function should be called before gnutls_global_init().
@@ -409,7 +410,7 @@ gnutls_crypto_pk_register2 (int priority, int version,
  * This function will register a cipher interface to be used by
  * gnutls. Any interface registered will override the included engine
  * and by convention kernel implemented interfaces should have
- * priority of 90. The interface with the lowest priority will be used
+ * priority of 90  and CPU-assisted of 80. The interface with the lowest priority will be used
  * by gnutls.
  *
  * This function should be called before gnutls_global_init().
@@ -450,7 +451,7 @@ gnutls_crypto_cipher_register2 (int priority, int version,
  * This function will register a mac interface to be used by
  * gnutls. Any interface registered will override the included engine
  * and by convention kernel implemented interfaces should have
- * priority of 90. The interface with the lowest priority will be used
+ * priority of 90  and CPU-assisted of 80. The interface with the lowest priority will be used
  * by gnutls.
  *
  * This function should be called before gnutls_global_init().
@@ -491,7 +492,7 @@ gnutls_crypto_mac_register2 (int priority, int version,
  * This function will register a digest interface to be used by
  * gnutls. Any interface registered will override the included engine
  * and by convention kernel implemented interfaces should have
- * priority of 90. The interface with the lowest priority will be used
+ * priority of 90  and CPU-assisted of 80. The interface with the lowest priority will be used
  * by gnutls.
  *
  * This function should be called before gnutls_global_init().
index 0b2b00bb6abef7fdb797c83e42b9d0500dae2ab5..f1312eeeb7ba753e2612de8c03db5edb39253c6c 100644 (file)
@@ -43,7 +43,7 @@ extern "C"
   int gnutls_cipher_decrypt2 (gnutls_cipher_hd_t handle,
                               const void *ciphertext, size_t ciphertextlen,
                               void *text, size_t textlen);
-  int gnutls_cipher_encrypt2 (gnutls_cipher_hd_t handle, void *text,
+  int gnutls_cipher_encrypt2 (gnutls_cipher_hd_t handle, const void *text,
                               size_t textlen, void *ciphertext,
                               size_t ciphertextlen);