You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There appears to be a serious issue with sha256 digests output by nmtree -- any file I've tested that contains data will have an incorrect sha256 checksum. It seems that only -k sha256 outputs incorrect hashes, the other algorithms I've tested so far (sha1, sha384, sha512, md5, and ripemd160) appear to produce correct results. Interestingly, it seems sha256 is the only sha2 variant with this bug.
I suspect this is a bug in libnbcompat (and presumably was a porting bug since I presume NetBSD wouldn't have a bug this serious go unnoticed).
You can easily test this yourself in this repository:
There appears to be a serious issue with sha256 digests output by
nmtree
-- any file I've tested that contains data will have an incorrect sha256 checksum. It seems that only-k sha256
outputs incorrect hashes, the other algorithms I've tested so far (sha1, sha384, sha512, md5, and ripemd160) appear to produce correct results. Interestingly, it seems sha256 is the only sha2 variant with this bug.I suspect this is a bug in
libnbcompat
(and presumably was a porting bug since I presume NetBSD wouldn't have a bug this serious go unnoticed).You can easily test this yourself in this repository:
For
README
(and some other files I've tested), other checksums work without issue:And for an empty file, they all produce the correct result:
And
cksum
also appears to work properly as well.The text was updated successfully, but these errors were encountered: