RFC Errata
RFC 4634, "US Secure Hash Algorithms (SHA and HMAC-SHA)", July 2006
Note: This RFC has been obsoleted by RFC 6234
Source of RFC: IETF - NON WORKING GROUPArea Assignment: sec
Errata ID: 2436
Status: Held for Document Update
Type: Technical
Publication Format(s) : TEXT
Reported By: Alfred Hoenes
Date Reported: 2006-08-13
Held for Document Update by: Sean Turner
Date Held: 2010-08-06
Section 8.2.3 says:
Within the '#ifndef USE_32BIT_ONLY' macro definition branch of the file, on mid-page 51 the RFC says: /* * add "length" to the length */ static uint64_t addTemp; #define SHA384_512AddLength(context, length) \ (addTemp = context->Length_Low, context->Corrupted = \ ((context->Length_Low += length) < addTemp) && \ (++context->Length_High == 0) ? 1 : 0) It should say: /* * add "length" to the length */ static uint64_t addTemp; #define SHA384_512AddLength(context, length) \ (addTemp = (context)->Length_Low, (context)->Corrupted = \ (((context)->Length_Low += length) < addTemp) && \ (++(context)->Length_High == 0) ? shaInputTooLong : shaSuccess ) Rationale: Same as for item (7) and (14) above, cf. item (26) as well. Additionally, parentheses have been added around all invocations of the macro argument `context` to protect it against various artifacts, as has been done consistently in the remainder of the sample code.