aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/rmd160.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-05-15 18:49:19 +0000
committerWerner Koch <[email protected]>1998-05-15 18:49:19 +0000
commitf9a70437820d05f7f98ffd1c9003edd83872e9b5 (patch)
treedc17bdc0dea76ddc28ae651a3dc341b83784dd12 /cipher/rmd160.c
parentcan create v4 signatures (diff)
downloadgnupg-f9a70437820d05f7f98ffd1c9003edd83872e9b5.tar.gz
gnupg-f9a70437820d05f7f98ffd1c9003edd83872e9b5.zip
new releaseV0-2-18
Diffstat (limited to '')
-rw-r--r--cipher/rmd160.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/cipher/rmd160.c b/cipher/rmd160.c
index f0072f78a..ad28299fc 100644
--- a/cipher/rmd160.c
+++ b/cipher/rmd160.c
@@ -186,7 +186,19 @@ transform( RMD160_CONTEXT *hd, byte *data )
}
}
#else
- u32 *x = (u32*)data;
+ #if 0
+ u32 *x =(u32*)data;
+ #else
+ /* this version is better because it is always aligned;
+ * The performance penalty on a 586-100 is about 6% which
+ * is acceptable - because the data is more local it might
+ * also be possible that this is faster on some machines.
+ * This function (when compiled with -02 on gcc 2.7.2)
+ * executes on a 586-100 (39.73 bogomips) at about 1900kb/sec;
+ * [measured with a 4MB data and "gpgm --print-md rmd160"] */
+ u32 x[16];
+ memcpy( x, data, 64 );
+ #endif
#endif
@@ -396,7 +408,6 @@ transform( RMD160_CONTEXT *hd, byte *data )
}
-
/* Update the message digest with the contents
* of INBUF with length INLEN.
*/
@@ -429,7 +440,6 @@ rmd160_write( RMD160_CONTEXT *hd, byte *inbuf, size_t inlen)
hd->buf[hd->count++] = *inbuf++;
}
-
/****************
* Apply the rmd160 transform function on the buffer which must have
* a length 64 bytes. Do not use this function together with the