remove pentium specific benchmark code
authorjsg <jsg@openbsd.org>
Tue, 15 Apr 2014 12:27:34 +0000 (12:27 +0000)
committerjsg <jsg@openbsd.org>
Tue, 15 Apr 2014 12:27:34 +0000 (12:27 +0000)
ok miod@

18 files changed:
lib/libcrypto/bf/bfs.cpp [deleted file]
lib/libcrypto/cast/casts.cpp [deleted file]
lib/libcrypto/des/des3s.cpp [deleted file]
lib/libcrypto/des/dess.cpp [deleted file]
lib/libcrypto/md4/md4s.cpp [deleted file]
lib/libcrypto/md5/md5s.cpp [deleted file]
lib/libcrypto/rc4/rc4s.cpp [deleted file]
lib/libcrypto/rc5/rc5s.cpp [deleted file]
lib/libcrypto/ripemd/asm/rips.cpp [deleted file]
lib/libssl/src/crypto/bf/bfs.cpp [deleted file]
lib/libssl/src/crypto/cast/casts.cpp [deleted file]
lib/libssl/src/crypto/des/des3s.cpp [deleted file]
lib/libssl/src/crypto/des/dess.cpp [deleted file]
lib/libssl/src/crypto/md4/md4s.cpp [deleted file]
lib/libssl/src/crypto/md5/md5s.cpp [deleted file]
lib/libssl/src/crypto/rc4/rc4s.cpp [deleted file]
lib/libssl/src/crypto/rc5/rc5s.cpp [deleted file]
lib/libssl/src/crypto/ripemd/asm/rips.cpp [deleted file]

diff --git a/lib/libcrypto/bf/bfs.cpp b/lib/libcrypto/bf/bfs.cpp
deleted file mode 100644 (file)
index d74c457..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/blowfish.h>
-
-void main(int argc,char *argv[])
-       {
-       BF_KEY key;
-       unsigned long s1,s2,e1,e2;
-       unsigned long data[2];
-       int i,j;
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<1000; i++) /**/
-                       {
-                       BF_encrypt(&data[0],&key);
-                       GetTSC(s1);
-                       BF_encrypt(&data[0],&key);
-                       BF_encrypt(&data[0],&key);
-                       BF_encrypt(&data[0],&key);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       BF_encrypt(&data[0],&key);
-                       BF_encrypt(&data[0],&key);
-                       BF_encrypt(&data[0],&key);
-                       BF_encrypt(&data[0],&key);
-                       GetTSC(e2);
-                       BF_encrypt(&data[0],&key);
-                       }
-
-               printf("blowfish %d %d (%d)\n",
-                       e1-s1,e2-s2,((e2-s2)-(e1-s1)));
-               }
-       }
-
diff --git a/lib/libcrypto/cast/casts.cpp b/lib/libcrypto/cast/casts.cpp
deleted file mode 100644 (file)
index 8d7bd46..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/cast.h>
-
-void main(int argc,char *argv[])
-       {
-       CAST_KEY key;
-       unsigned long s1,s2,e1,e2;
-       unsigned long data[2];
-       int i,j;
-       static unsigned char d[16]={0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF};
-
-       CAST_set_key(&key, 16,d);
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<1000; i++) /**/
-                       {
-                       CAST_encrypt(&data[0],&key);
-                       GetTSC(s1);
-                       CAST_encrypt(&data[0],&key);
-                       CAST_encrypt(&data[0],&key);
-                       CAST_encrypt(&data[0],&key);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       CAST_encrypt(&data[0],&key);
-                       CAST_encrypt(&data[0],&key);
-                       CAST_encrypt(&data[0],&key);
-                       CAST_encrypt(&data[0],&key);
-                       GetTSC(e2);
-                       CAST_encrypt(&data[0],&key);
-                       }
-
-               printf("cast %d %d (%d)\n",
-                       e1-s1,e2-s2,((e2-s2)-(e1-s1)));
-               }
-       }
-
diff --git a/lib/libcrypto/des/des3s.cpp b/lib/libcrypto/des/des3s.cpp
deleted file mode 100644 (file)
index 02d527c..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/des.h>
-
-void main(int argc,char *argv[])
-       {
-       des_key_schedule key1,key2,key3;
-       unsigned long s1,s2,e1,e2;
-       unsigned long data[2];
-       int i,j;
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<1000; i++) /**/
-                       {
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       GetTSC(s1);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       GetTSC(e2);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       }
-
-               printf("des %d %d (%d)\n",
-                       e1-s1,e2-s2,((e2-s2)-(e1-s1)));
-               }
-       }
-
diff --git a/lib/libcrypto/des/dess.cpp b/lib/libcrypto/des/dess.cpp
deleted file mode 100644 (file)
index 5549bab..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/des.h>
-
-void main(int argc,char *argv[])
-       {
-       des_key_schedule key;
-       unsigned long s1,s2,e1,e2;
-       unsigned long data[2];
-       int i,j;
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<1000; i++) /**/
-                       {
-                       des_encrypt1(&data[0],key,1);
-                       GetTSC(s1);
-                       des_encrypt1(&data[0],key,1);
-                       des_encrypt1(&data[0],key,1);
-                       des_encrypt1(&data[0],key,1);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       des_encrypt1(&data[0],key,1);
-                       des_encrypt1(&data[0],key,1);
-                       des_encrypt1(&data[0],key,1);
-                       des_encrypt1(&data[0],key,1);
-                       GetTSC(e2);
-                       des_encrypt1(&data[0],key,1);
-                       }
-
-               printf("des %d %d (%d)\n",
-                       e1-s1,e2-s2,((e2-s2)-(e1-s1)));
-               }
-       }
-
diff --git a/lib/libcrypto/md4/md4s.cpp b/lib/libcrypto/md4/md4s.cpp
deleted file mode 100644 (file)
index c0ec97f..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/md4.h>
-
-extern "C" {
-void md4_block_x86(MD4_CTX *ctx, unsigned char *buffer,int num);
-}
-
-void main(int argc,char *argv[])
-       {
-       unsigned char buffer[64*256];
-       MD4_CTX ctx;
-       unsigned long s1,s2,e1,e2;
-       unsigned char k[16];
-       unsigned long data[2];
-       unsigned char iv[8];
-       int i,num=0,numm;
-       int j=0;
-
-       if (argc >= 2)
-               num=atoi(argv[1]);
-
-       if (num == 0) num=16;
-       if (num > 250) num=16;
-       numm=num+2;
-       num*=64;
-       numm*=64;
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<10; i++) /**/
-                       {
-                       md4_block_x86(&ctx,buffer,numm);
-                       GetTSC(s1);
-                       md4_block_x86(&ctx,buffer,numm);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       md4_block_x86(&ctx,buffer,num);
-                       GetTSC(e2);
-                       md4_block_x86(&ctx,buffer,num);
-                       }
-               printf("md4 (%d bytes) %d %d (%.2f)\n",num,
-                       e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2);
-               }
-       }
-
diff --git a/lib/libcrypto/md5/md5s.cpp b/lib/libcrypto/md5/md5s.cpp
deleted file mode 100644 (file)
index dd343fd..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/md5.h>
-
-extern "C" {
-void md5_block_x86(MD5_CTX *ctx, unsigned char *buffer,int num);
-}
-
-void main(int argc,char *argv[])
-       {
-       unsigned char buffer[64*256];
-       MD5_CTX ctx;
-       unsigned long s1,s2,e1,e2;
-       unsigned char k[16];
-       unsigned long data[2];
-       unsigned char iv[8];
-       int i,num=0,numm;
-       int j=0;
-
-       if (argc >= 2)
-               num=atoi(argv[1]);
-
-       if (num == 0) num=16;
-       if (num > 250) num=16;
-       numm=num+2;
-       num*=64;
-       numm*=64;
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<10; i++) /**/
-                       {
-                       md5_block_x86(&ctx,buffer,numm);
-                       GetTSC(s1);
-                       md5_block_x86(&ctx,buffer,numm);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       md5_block_x86(&ctx,buffer,num);
-                       GetTSC(e2);
-                       md5_block_x86(&ctx,buffer,num);
-                       }
-               printf("md5 (%d bytes) %d %d (%.2f)\n",num,
-                       e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2);
-               }
-       }
-
diff --git a/lib/libcrypto/rc4/rc4s.cpp b/lib/libcrypto/rc4/rc4s.cpp
deleted file mode 100644 (file)
index 3814fde..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/rc4.h>
-
-void main(int argc,char *argv[])
-       {
-       unsigned char buffer[1024];
-       RC4_KEY ctx;
-       unsigned long s1,s2,e1,e2;
-       unsigned char k[16];
-       unsigned long data[2];
-       unsigned char iv[8];
-       int i,num=64,numm;
-       int j=0;
-
-       if (argc >= 2)
-               num=atoi(argv[1]);
-
-       if (num == 0) num=256;
-       if (num > 1024-16) num=1024-16;
-       numm=num+8;
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<10; i++) /**/
-                       {
-                       RC4(&ctx,numm,buffer,buffer);
-                       GetTSC(s1);
-                       RC4(&ctx,numm,buffer,buffer);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       RC4(&ctx,num,buffer,buffer);
-                       GetTSC(e2);
-                       RC4(&ctx,num,buffer,buffer);
-                       }
-
-               printf("RC4 (%d bytes) %d %d (%d) - 8 bytes\n",num,
-                       e1-s1,e2-s2,(e1-s1)-(e2-s2));
-               }
-       }
-
diff --git a/lib/libcrypto/rc5/rc5s.cpp b/lib/libcrypto/rc5/rc5s.cpp
deleted file mode 100644 (file)
index 1c5518b..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/rc5.h>
-
-void main(int argc,char *argv[])
-       {
-       RC5_32_KEY key;
-       unsigned long s1,s2,e1,e2;
-       unsigned long data[2];
-       int i,j;
-       static unsigned char d[16]={0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF};
-
-       RC5_32_set_key(&key, 16,d,12);
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<1000; i++) /**/
-                       {
-                       RC5_32_encrypt(&data[0],&key);
-                       GetTSC(s1);
-                       RC5_32_encrypt(&data[0],&key);
-                       RC5_32_encrypt(&data[0],&key);
-                       RC5_32_encrypt(&data[0],&key);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       RC5_32_encrypt(&data[0],&key);
-                       RC5_32_encrypt(&data[0],&key);
-                       RC5_32_encrypt(&data[0],&key);
-                       RC5_32_encrypt(&data[0],&key);
-                       GetTSC(e2);
-                       RC5_32_encrypt(&data[0],&key);
-                       }
-
-               printf("cast %d %d (%d)\n",
-                       e1-s1,e2-s2,((e2-s2)-(e1-s1)));
-               }
-       }
-
diff --git a/lib/libcrypto/ripemd/asm/rips.cpp b/lib/libcrypto/ripemd/asm/rips.cpp
deleted file mode 100644 (file)
index f7a1367..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/ripemd.h>
-
-#define ripemd160_block_x86 ripemd160_block_asm_host_order
-
-extern "C" {
-void ripemd160_block_x86(RIPEMD160_CTX *ctx, unsigned char *buffer,int num);
-}
-
-void main(int argc,char *argv[])
-       {
-       unsigned char buffer[64*256];
-       RIPEMD160_CTX ctx;
-       unsigned long s1,s2,e1,e2;
-       unsigned char k[16];
-       unsigned long data[2];
-       unsigned char iv[8];
-       int i,num=0,numm;
-       int j=0;
-
-       if (argc >= 2)
-               num=atoi(argv[1]);
-
-       if (num == 0) num=16;
-       if (num > 250) num=16;
-       numm=num+2;
-#if 0
-       num*=64;
-       numm*=64;
-#endif
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<10; i++) /**/
-                       {
-                       ripemd160_block_x86(&ctx,buffer,numm);
-                       GetTSC(s1);
-                       ripemd160_block_x86(&ctx,buffer,numm);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       ripemd160_block_x86(&ctx,buffer,num);
-                       GetTSC(e2);
-                       ripemd160_block_x86(&ctx,buffer,num);
-                       }
-               printf("ripemd160 (%d bytes) %d %d (%.2f)\n",num*64,
-                       e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2);
-               }
-       }
-
diff --git a/lib/libssl/src/crypto/bf/bfs.cpp b/lib/libssl/src/crypto/bf/bfs.cpp
deleted file mode 100644 (file)
index d74c457..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/blowfish.h>
-
-void main(int argc,char *argv[])
-       {
-       BF_KEY key;
-       unsigned long s1,s2,e1,e2;
-       unsigned long data[2];
-       int i,j;
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<1000; i++) /**/
-                       {
-                       BF_encrypt(&data[0],&key);
-                       GetTSC(s1);
-                       BF_encrypt(&data[0],&key);
-                       BF_encrypt(&data[0],&key);
-                       BF_encrypt(&data[0],&key);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       BF_encrypt(&data[0],&key);
-                       BF_encrypt(&data[0],&key);
-                       BF_encrypt(&data[0],&key);
-                       BF_encrypt(&data[0],&key);
-                       GetTSC(e2);
-                       BF_encrypt(&data[0],&key);
-                       }
-
-               printf("blowfish %d %d (%d)\n",
-                       e1-s1,e2-s2,((e2-s2)-(e1-s1)));
-               }
-       }
-
diff --git a/lib/libssl/src/crypto/cast/casts.cpp b/lib/libssl/src/crypto/cast/casts.cpp
deleted file mode 100644 (file)
index 8d7bd46..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/cast.h>
-
-void main(int argc,char *argv[])
-       {
-       CAST_KEY key;
-       unsigned long s1,s2,e1,e2;
-       unsigned long data[2];
-       int i,j;
-       static unsigned char d[16]={0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF};
-
-       CAST_set_key(&key, 16,d);
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<1000; i++) /**/
-                       {
-                       CAST_encrypt(&data[0],&key);
-                       GetTSC(s1);
-                       CAST_encrypt(&data[0],&key);
-                       CAST_encrypt(&data[0],&key);
-                       CAST_encrypt(&data[0],&key);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       CAST_encrypt(&data[0],&key);
-                       CAST_encrypt(&data[0],&key);
-                       CAST_encrypt(&data[0],&key);
-                       CAST_encrypt(&data[0],&key);
-                       GetTSC(e2);
-                       CAST_encrypt(&data[0],&key);
-                       }
-
-               printf("cast %d %d (%d)\n",
-                       e1-s1,e2-s2,((e2-s2)-(e1-s1)));
-               }
-       }
-
diff --git a/lib/libssl/src/crypto/des/des3s.cpp b/lib/libssl/src/crypto/des/des3s.cpp
deleted file mode 100644 (file)
index 02d527c..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/des.h>
-
-void main(int argc,char *argv[])
-       {
-       des_key_schedule key1,key2,key3;
-       unsigned long s1,s2,e1,e2;
-       unsigned long data[2];
-       int i,j;
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<1000; i++) /**/
-                       {
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       GetTSC(s1);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       GetTSC(e2);
-                       des_encrypt3(&data[0],key1,key2,key3);
-                       }
-
-               printf("des %d %d (%d)\n",
-                       e1-s1,e2-s2,((e2-s2)-(e1-s1)));
-               }
-       }
-
diff --git a/lib/libssl/src/crypto/des/dess.cpp b/lib/libssl/src/crypto/des/dess.cpp
deleted file mode 100644 (file)
index 5549bab..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/des.h>
-
-void main(int argc,char *argv[])
-       {
-       des_key_schedule key;
-       unsigned long s1,s2,e1,e2;
-       unsigned long data[2];
-       int i,j;
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<1000; i++) /**/
-                       {
-                       des_encrypt1(&data[0],key,1);
-                       GetTSC(s1);
-                       des_encrypt1(&data[0],key,1);
-                       des_encrypt1(&data[0],key,1);
-                       des_encrypt1(&data[0],key,1);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       des_encrypt1(&data[0],key,1);
-                       des_encrypt1(&data[0],key,1);
-                       des_encrypt1(&data[0],key,1);
-                       des_encrypt1(&data[0],key,1);
-                       GetTSC(e2);
-                       des_encrypt1(&data[0],key,1);
-                       }
-
-               printf("des %d %d (%d)\n",
-                       e1-s1,e2-s2,((e2-s2)-(e1-s1)));
-               }
-       }
-
diff --git a/lib/libssl/src/crypto/md4/md4s.cpp b/lib/libssl/src/crypto/md4/md4s.cpp
deleted file mode 100644 (file)
index c0ec97f..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/md4.h>
-
-extern "C" {
-void md4_block_x86(MD4_CTX *ctx, unsigned char *buffer,int num);
-}
-
-void main(int argc,char *argv[])
-       {
-       unsigned char buffer[64*256];
-       MD4_CTX ctx;
-       unsigned long s1,s2,e1,e2;
-       unsigned char k[16];
-       unsigned long data[2];
-       unsigned char iv[8];
-       int i,num=0,numm;
-       int j=0;
-
-       if (argc >= 2)
-               num=atoi(argv[1]);
-
-       if (num == 0) num=16;
-       if (num > 250) num=16;
-       numm=num+2;
-       num*=64;
-       numm*=64;
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<10; i++) /**/
-                       {
-                       md4_block_x86(&ctx,buffer,numm);
-                       GetTSC(s1);
-                       md4_block_x86(&ctx,buffer,numm);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       md4_block_x86(&ctx,buffer,num);
-                       GetTSC(e2);
-                       md4_block_x86(&ctx,buffer,num);
-                       }
-               printf("md4 (%d bytes) %d %d (%.2f)\n",num,
-                       e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2);
-               }
-       }
-
diff --git a/lib/libssl/src/crypto/md5/md5s.cpp b/lib/libssl/src/crypto/md5/md5s.cpp
deleted file mode 100644 (file)
index dd343fd..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/md5.h>
-
-extern "C" {
-void md5_block_x86(MD5_CTX *ctx, unsigned char *buffer,int num);
-}
-
-void main(int argc,char *argv[])
-       {
-       unsigned char buffer[64*256];
-       MD5_CTX ctx;
-       unsigned long s1,s2,e1,e2;
-       unsigned char k[16];
-       unsigned long data[2];
-       unsigned char iv[8];
-       int i,num=0,numm;
-       int j=0;
-
-       if (argc >= 2)
-               num=atoi(argv[1]);
-
-       if (num == 0) num=16;
-       if (num > 250) num=16;
-       numm=num+2;
-       num*=64;
-       numm*=64;
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<10; i++) /**/
-                       {
-                       md5_block_x86(&ctx,buffer,numm);
-                       GetTSC(s1);
-                       md5_block_x86(&ctx,buffer,numm);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       md5_block_x86(&ctx,buffer,num);
-                       GetTSC(e2);
-                       md5_block_x86(&ctx,buffer,num);
-                       }
-               printf("md5 (%d bytes) %d %d (%.2f)\n",num,
-                       e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2);
-               }
-       }
-
diff --git a/lib/libssl/src/crypto/rc4/rc4s.cpp b/lib/libssl/src/crypto/rc4/rc4s.cpp
deleted file mode 100644 (file)
index 3814fde..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/rc4.h>
-
-void main(int argc,char *argv[])
-       {
-       unsigned char buffer[1024];
-       RC4_KEY ctx;
-       unsigned long s1,s2,e1,e2;
-       unsigned char k[16];
-       unsigned long data[2];
-       unsigned char iv[8];
-       int i,num=64,numm;
-       int j=0;
-
-       if (argc >= 2)
-               num=atoi(argv[1]);
-
-       if (num == 0) num=256;
-       if (num > 1024-16) num=1024-16;
-       numm=num+8;
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<10; i++) /**/
-                       {
-                       RC4(&ctx,numm,buffer,buffer);
-                       GetTSC(s1);
-                       RC4(&ctx,numm,buffer,buffer);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       RC4(&ctx,num,buffer,buffer);
-                       GetTSC(e2);
-                       RC4(&ctx,num,buffer,buffer);
-                       }
-
-               printf("RC4 (%d bytes) %d %d (%d) - 8 bytes\n",num,
-                       e1-s1,e2-s2,(e1-s1)-(e2-s2));
-               }
-       }
-
diff --git a/lib/libssl/src/crypto/rc5/rc5s.cpp b/lib/libssl/src/crypto/rc5/rc5s.cpp
deleted file mode 100644 (file)
index 1c5518b..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/rc5.h>
-
-void main(int argc,char *argv[])
-       {
-       RC5_32_KEY key;
-       unsigned long s1,s2,e1,e2;
-       unsigned long data[2];
-       int i,j;
-       static unsigned char d[16]={0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF};
-
-       RC5_32_set_key(&key, 16,d,12);
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<1000; i++) /**/
-                       {
-                       RC5_32_encrypt(&data[0],&key);
-                       GetTSC(s1);
-                       RC5_32_encrypt(&data[0],&key);
-                       RC5_32_encrypt(&data[0],&key);
-                       RC5_32_encrypt(&data[0],&key);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       RC5_32_encrypt(&data[0],&key);
-                       RC5_32_encrypt(&data[0],&key);
-                       RC5_32_encrypt(&data[0],&key);
-                       RC5_32_encrypt(&data[0],&key);
-                       GetTSC(e2);
-                       RC5_32_encrypt(&data[0],&key);
-                       }
-
-               printf("cast %d %d (%d)\n",
-                       e1-s1,e2-s2,((e2-s2)-(e1-s1)));
-               }
-       }
-
diff --git a/lib/libssl/src/crypto/ripemd/asm/rips.cpp b/lib/libssl/src/crypto/ripemd/asm/rips.cpp
deleted file mode 100644 (file)
index f7a1367..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// gettsc.inl
-//
-// gives access to the Pentium's (secret) cycle counter
-//
-// This software was written by Leonard Janke (janke@unixg.ubc.ca)
-// in 1996-7 and is entered, by him, into the public domain.
-
-#if defined(__WATCOMC__)
-void GetTSC(unsigned long&);
-#pragma aux GetTSC = 0x0f 0x31 "mov [edi], eax" parm [edi] modify [edx eax];
-#elif defined(__GNUC__)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  asm volatile(".byte 15, 49\n\t"
-              : "=eax" (tsc)
-              :
-              : "%edx", "%eax");
-}
-#elif defined(_MSC_VER)
-inline
-void GetTSC(unsigned long& tsc)
-{
-  unsigned long a;
-  __asm _emit 0fh
-  __asm _emit 31h
-  __asm mov a, eax;
-  tsc=a;
-}
-#endif      
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/ripemd.h>
-
-#define ripemd160_block_x86 ripemd160_block_asm_host_order
-
-extern "C" {
-void ripemd160_block_x86(RIPEMD160_CTX *ctx, unsigned char *buffer,int num);
-}
-
-void main(int argc,char *argv[])
-       {
-       unsigned char buffer[64*256];
-       RIPEMD160_CTX ctx;
-       unsigned long s1,s2,e1,e2;
-       unsigned char k[16];
-       unsigned long data[2];
-       unsigned char iv[8];
-       int i,num=0,numm;
-       int j=0;
-
-       if (argc >= 2)
-               num=atoi(argv[1]);
-
-       if (num == 0) num=16;
-       if (num > 250) num=16;
-       numm=num+2;
-#if 0
-       num*=64;
-       numm*=64;
-#endif
-
-       for (j=0; j<6; j++)
-               {
-               for (i=0; i<10; i++) /**/
-                       {
-                       ripemd160_block_x86(&ctx,buffer,numm);
-                       GetTSC(s1);
-                       ripemd160_block_x86(&ctx,buffer,numm);
-                       GetTSC(e1);
-                       GetTSC(s2);
-                       ripemd160_block_x86(&ctx,buffer,num);
-                       GetTSC(e2);
-                       ripemd160_block_x86(&ctx,buffer,num);
-                       }
-               printf("ripemd160 (%d bytes) %d %d (%.2f)\n",num*64,
-                       e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2);
-               }
-       }
-