RFC Errata
RFC 1321, "The MD5 Message-Digest Algorithm", April 1992
Note: This RFC has been updated by RFC 6151
Source of RFC: pem (sec)
Errata ID: 7814
Status: Rejected
Type: Technical
Publication Format(s) : TEXT
Reported By: Nilstrieb
Date Reported: 2024-02-19
Rejected by: Paul Wouters
Date Rejected: 2025-03-07
Appendix A.1 says:
/* POINTER defines a generic pointer type */ typedef unsigned char *POINTER; /* UINT2 defines a two byte word */ typedef unsigned short int UINT2; /* UINT4 defines a four byte word */ typedef unsigned long int UINT4;
It should say:
#include <stdint.h> /* POINTER defines a generic pointer type */ typedef unsigned char *POINTER; /* UINT2 defines a two byte word */ typedef uint16_t UINT2; /* UINT4 defines a four byte word */ typedef uint32_t UINT4;
Notes:
On some modern systems like x86-64 Linux, unsigned long int is 8 bytes, which causes the original implementation to be incorrect.
--VERIFIER NOTES--
Sec AD(Paul Wouters): At the time of writing, this was correct. As this document is not going to be updated in the future, there is no point updating the C code to modern or future compiler features.