lib/libmd: replace SHA-1 implementation with Go's implementationThis lays the foundation for importing Go's excellent assemblyimplementations of the SHA-1 block function.No performance changes o
lib/libmd: replace SHA-1 implementation with Go's implementationThis lays the foundation for importing Go's excellent assemblyimplementations of the SHA-1 block function.No performance changes observed on amd64.Reviewed by: getzDifferential Revision: https://reviews.freebsd.org/D45444
show more ...
Remove $FreeBSD$: one-line .c comment patternRemove /^/[*/]\s*\$FreeBSD\$.*\n/
Use unsigned comparisons. Prior to this commit, SHA1_Update andRIPEMD160_Update were broken when all of the following conditionsapplied:(1) The platform is i386.(2) The program calling *_Update
Use unsigned comparisons. Prior to this commit, SHA1_Update andRIPEMD160_Update were broken when all of the following conditionsapplied:(1) The platform is i386.(2) The program calling *_Update is statically linked to libmd.(3) The buffer provided to *_Update is aligned modulo 4 bytes.(4) The buffer extends beyond 2GB.Due to the design of this code, SHA1_Update and RIPEMD160_Update willstill be broken if conditions (1)-(3) apply AND the buffer extendsbeyond 4GB (i.e., there is an integer overflow in computing "data + len").Since this remaining bug simply replaces SIGSEGV with a bogus hash (andnon-broken programs should never provide such operands) I don't considerit to be a serious problem.MFC After: 1 weekPR: kern/102795
fix for incorrect specification of alignment (it worked for the elfbuild, but broke while doing the aout legacy build). Now using.p2align instead of .align. Fixes broken buildworld.Submitted by
fix for incorrect specification of alignment (it worked for the elfbuild, but broke while doing the aout legacy build). Now using.p2align instead of .align. Fixes broken buildworld.Submitted by: John PolstraReviewed by: John Polstra
Don't build the assembly for shared linkage, PIC isn't implemented.
Add Eric Young's RIPEMD160 implementation as well, in case SHA-1should prove weak. Also fix a few problems with the SHA-1 build.
Fix bug in MDx test suite.Add Eric Young's SHA-[01] implementations.