summaryrefslogtreecommitdiff
path: root/crypto/ripemd.h
diff options
context:
space:
mode:
authorAdrian-Ken Rueegsegger <rueegsegger@swiss-it.ch>2008-05-07 22:14:10 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2008-07-10 20:35:09 +0800
commit32cb3a33b0f9c0d4ee8733ac6609daefff4da8ce (patch)
tree600361d29f9e7503b775f7768f547d0299968f74 /crypto/ripemd.h
parentb7ed5cc934eae42ce60bccb1f65da25a4da38742 (diff)
downloadlinux-crypto-32cb3a33b0f9c0d4ee8733ac6609daefff4da8ce.tar.gz
linux-crypto-32cb3a33b0f9c0d4ee8733ac6609daefff4da8ce.zip
[CRYPTO] ripemd: Add support for RIPEMD hash algorithms
This patch adds support for RIPEMD-128 and RIPEMD-160 hash algorithms. Signed-off-by: Adrian-Ken Rueegsegger <rueegsegger@swiss-it.ch> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ripemd.h')
-rw-r--r--crypto/ripemd.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/crypto/ripemd.h b/crypto/ripemd.h
new file mode 100644
index 00000000..2858e226
--- /dev/null
+++ b/crypto/ripemd.h
@@ -0,0 +1,26 @@
+/*
+ * Common values for RIPEMD algorithms
+ */
+
+#ifndef _CRYPTO_RMD_H
+#define _CRYPTO_RMD_H
+
+#define RMD128_DIGEST_SIZE 16
+#define RMD128_BLOCK_SIZE 64
+
+#define RMD160_DIGEST_SIZE 20
+#define RMD160_BLOCK_SIZE 64
+
+#define RMD256_DIGEST_SIZE 32
+#define RMD256_BLOCK_SIZE 64
+
+#define RMD320_DIGEST_SIZE 40
+#define RMD320_BLOCK_SIZE 64
+
+#define RMD_H0 0x67452301UL
+#define RMD_H1 0xefcdab89UL
+#define RMD_H2 0x98badcfeUL
+#define RMD_H3 0x10325476UL
+#define RMD_H4 0xc3d2e1f0UL
+
+#endif