RFC 1319:The MD2 Message-Digest Algorithm
RFC-Ref

md2


Click on the red underlined text to get to the source

... This document describes the MD2 message-digest algorithm. The algorithm ...
... message having a given prespecified target message digest. The MD2 algorithm is intended for digital signature ...
... License to use MD2 is granted for non-commerical Internet Privacy- ...
... 1115hist(-> 1423hist) [3], which also gives a reference implementation of MD2. The main differences are that a textual description of MD2 is included, and that the ...
... also gives a reference implementation of MD2. The main differences are that a textual description of MD2 is included, and that the reference implementation of MD2 is more portable. ...
... are that a textual description of MD2 is included, and that the reference implementation of MD2 is more portable. ...
... For OSI-based applications, MD2's object identifier is ...
... md2 OBJECT IDENTIFIER ::= iso(1) member-body(2) US(840) rsadsi(113549) digestAlgorithm ...
... In the X.509 type AlgorithmIdentifier [4], the parameters for MD2 should have type NULL. ...


... MD2 Algorithm Description ...
... This completes the description of MD2. A reference implementation in C is given in the appendix. ...


... The MD2 message-digest algorithm is simple to implement, and provides a "fingerprint ...
... and that the difficulty of coming up with any message having a given message digest is on the order of 2^128 operations. The MD2 algorithm has been carefully scrutinized for weaknesses. It is, however, a ...


... header file md2.h -- header file for MD2 ...
... md2.h -- header file for MD2 md2c.c -- source code for MD2 ...
... MD2 md2c.c -- source code for MD2 ...
... mddriver.c -- test driver for MD2, MD4 and MD5 ...
... The driver compiles for MD5 by default but can compile for MD2 or MD4 if the symbol MD is defined on the C compiler command line ...
... A.2 md2.h ...
... /* MD2.H - header file for MD2C.C */ ...
... identified as the "RSA Data Security, Inc. MD2 Message Digest Algorithm ...
... buffer[16]; /* input buffer */ } MD2_CTX; void MD2Init PROTO_LIST ((MD2 ...
... MD2_CTX; void MD2Init PROTO_LIST ((MD2_CTX *)); void MD2Update PROTO_LIST ((MD2 ...
... MD2_CTX *)); void MD2Update PROTO_LIST ((MD2_CTX *, unsigned char *, unsigned int)); void MD2Final PROTO_LIST ((unsigned char [16], MD2_CTX *)); ...
... ((MD2_CTX *, unsigned char *, unsigned int)); void MD2Final PROTO_LIST ((unsigned char [16], MD2_CTX *)); ...
... /* MD2C.C - RSA Data Security, Inc., MD2 message-digest algorithm */ ...
... identified as the "RSA Data Security, Inc. MD2 Message Digest Algorithm ...
... #include "global.h" #include "md2.h" static void MD2Transform PROTO_LIST ...
... static void MD2Transform PROTO_LIST ((unsigned char [16], unsigned char [16], unsigned char [16])); static void MD2_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int)); static void MD2_memset PROTO_LIST ((POINTER, int, unsigned int)); ...
... static void MD2_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int)); static void MD2_memset PROTO_LIST ((POINTER, int, unsigned int)); /* Permutation of 0..255 constructed from the digits of pi. It gives a ...
... }; /* MD2 initialization. Begins an MD2 operation, writing a new context ...
... /* MD2 initialization. Begins an MD2 operation, writing a new context. */ ...
... */ void MD2Init (context) MD2_CTX *context; /* context */ ...
... context->count = 0; MD2_memset ((POINTER)context->state, 0, sizeof (context ...
... context->state)); MD2_memset ((POINTER)context->checksum ...
... } /* MD2 block update operation. Continues an MD2 message-digest ...
... /* MD2 block update operation. Continues an MD2 message-digest operation, processing another message block, and updating the ...
... */ void MD2Update (context, input, inputLen) MD2_CTX *context; /* context */ ...
... */ if (inputLen >= partLen) { MD2_memcpy ((POINTER)&context->buffer ...
... /* Buffer remaining input */ MD2_memcpy ((POINTER)&context->buffer ...
... } /* MD2 finalization. Ends an MD2 message-digest operation, writing the ...
... /* MD2 finalization. Ends an MD2 message-digest operation, writing the message digest ...
... unsigned char digest[16]; /* message digest */ MD2_CTX *context; /* context */ ...
... /* Store state in digest */ MD2_memcpy ((POINTER)digest, (POINTER)context->state, 16); ...
... /* Zeroize sensitive information. */ MD2_memset ((POINTER)context, 0, sizeof (*context)); ...
... } /* MD2 basic transformation. Transforms state and updates checksum ...
... state ^ block. */ MD2_memcpy ((POINTER)x, (POINTER)state, 16); MD2 ...
... MD2_memcpy ((POINTER)x, (POINTER)state, 16); MD2_memcpy ((POINTER)x+16, (POINTER)block, 16); for (i = 0; i < 16; i++) x[i+32] = state ...
... /* Save new state */ MD2_memcpy ((POINTER)state, (POINTER)x, 16); ...
... /* Zeroize sensitive information. */ MD2_memset ((POINTER)x, 0, sizeof (x)); } ...
... /* Note: Replace "for loop" with standard memcpy if possible. */ static void MD2_memcpy (output, input, len) POINTER output; POINTER input; ...
... /* Note: Replace "for loop" with standard memset if possible. */ static void MD2_memset (output, value, len) POINTER output; int value; ...
... /* MDDRIVER.C - test driver for MD2, MD4 and MD5 */ ...
... #if MD == 2 #include "md2.h" #endif #if MD ...
... MD == 2 #define MD_CTX MD2_CTX #define MDInit MD2Init #define MDUpdate MD2Update ...
... The MD2 test suite (driver option "-x") should print the following results: ...
... MD2 test suite: MD2 ("") = 8350e5a3e24c153df2275c9f80692773 MD2 ...
... MD2 test suite: MD2 ("") = 8350e5a3e24c153df2275c9f80692773 MD2 ("a") = 32ec01ec4a6dac72c0ab96fb34c0b5d1 MD2 ...
... MD2 test suite: MD2 ("") = 8350e5a3e24c153df2275c9f80692773 MD2 ("a") = 32ec01ec4a6dac72c0ab96fb34c0b5d1 MD2 ("abc") = da853b0d3f88d99b30283a69e6ded6bb MD2 ...
... MD2 ("") = 8350e5a3e24c153df2275c9f80692773 MD2 ("a") = 32ec01ec4a6dac72c0ab96fb34c0b5d1 MD2 ("abc") = da853b0d3f88d99b30283a69e6ded6bb MD2 ("message digest") = ab4f496bfb2a530b219ff33031fe06b0 ...
... MD2 ("a") = 32ec01ec4a6dac72c0ab96fb34c0b5d1 MD2 ("abc") = da853b0d3f88d99b30283a69e6ded6bb MD2 ("message digest") = ab4f496bfb2a530b219ff33031fe06b0 MD2 ("abcdefghijklmnopqrstuvwxyz") = 4e8ddff3650292ab5a4108c3aa47940b ...
... MD2 ("message digest") = ab4f496bfb2a530b219ff33031fe06b0 MD2 ("abcdefghijklmnopqrstuvwxyz") = 4e8ddff3650292ab5a4108c3aa47940b MD2 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = da33def2a42df13975352846c30338cd ...
... message digest") = ab4f496bfb2a530b219ff33031fe06b0 MD2 ("abcdefghijklmnopqrstuvwxyz") = 4e8ddff3650292ab5a4108c3aa47940b MD2 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = da33def2a42df13975352846c30338cd MD2 ("123456789012345678901234567890123456789012345678901234567890123456 ...
... MD2 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = da33def2a42df13975352846c30338cd MD2 ("123456789012345678901234567890123456789012345678901234567890123456 78901234567890") = d5976f79d83d3a0dc9806c3c66f3efd8 ...


... sufficient for implementing very high security hybrid digital signature schemes based on MD2 and a public-key cryptosystem. ...



Google
Web
RFC-Ref