Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5de8f1b562e87ae9d93a4e0897e54c18a5e82915
Commit:     5de8f1b562e87ae9d93a4e0897e54c18a5e82915
Parent:     0b77abb3b2d0c2eee1da79a3f3bd4312a0edb156
Author:     Tan Swee Heng <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 7 17:17:43 2007 +0800
Committer:  Herbert Xu <[EMAIL PROTECTED]>
CommitDate: Fri Jan 11 08:16:36 2008 +1100

    [CRYPTO] tcrypt: Added salsa20 speed test
    
    This patch adds a simple speed test for salsa20.
    Usage: modprobe tcrypt mode=206
    
    Signed-of-by: Tan Swee Heng <[EMAIL PROTECTED]>
    Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
---
 crypto/tcrypt.c |    5 +++++
 crypto/tcrypt.h |   16 ++++++++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 943a514..0cfb8eb 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -1668,6 +1668,11 @@ static void do_test(void)
                                camellia_speed_template);
                break;
 
+       case 206:
+               test_cipher_speed("salsa20", ENCRYPT, sec, NULL, 0,
+                                 salsa20_speed_template);
+               break;
+
        case 300:
                /* fall through */
 
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h
index 175f26a..5b86509 100644
--- a/crypto/tcrypt.h
+++ b/crypto/tcrypt.h
@@ -7947,4 +7947,20 @@ static struct cipher_speed camellia_speed_template[] = {
       {  .klen = 0, .blen = 0, }
 };
 
+static struct cipher_speed salsa20_speed_template[] = {
+      { .klen = 16, .blen = 16, },
+      { .klen = 16, .blen = 64, },
+      { .klen = 16, .blen = 256, },
+      { .klen = 16, .blen = 1024, },
+      { .klen = 16, .blen = 8192, },
+      { .klen = 32, .blen = 16, },
+      { .klen = 32, .blen = 64, },
+      { .klen = 32, .blen = 256, },
+      { .klen = 32, .blen = 1024, },
+      { .klen = 32, .blen = 8192, },
+
+      /* End marker */
+      {  .klen = 0, .blen = 0, }
+};
+
 #endif /* _CRYPTO_TCRYPT_H */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to