News for hackers. Stuff that matters.
Re:The BitTorrent Protocol Specification v2 by RJIb8RBYxzAMX9u on Monday August 07, 2017 @08:55PM (#14952608)
> They've decided to move forward with SHA256 truncated to 20 bytes [...]

I wonder why not SHA512? It's actually faster to compute than SHA512 on 64-bit architectures.

Re:The BitTorrent Protocol Specification v2 by silotis on Monday August 07, 2017 @09:08PM (#14952664)
SHA256 was chosen over SHA512 because the two most popular 64-bit ISAs (x86-64 and ARMv8) both define instruction extensions to provide hardware acceleration of SHA256. Hardware support makes SHA256 much faster than SHA512 in software, even on 64-bit processors.
Re:The BitTorrent Protocol Specification v2 by RJIb8RBYxzAMX9u on Monday August 07, 2017 @09:54PM (#14952969)
Huh, I didn't know that's the case for x86. My quick search suggests that support is still quite limited though, and none of my HW (1~4 yrs old) support it. I suppose by the time the spec is finalized and widely adopted HW-accelerated SHA256 would be, too (and I should switch my zfs checksum back from SHA512/256 to SHA256).
Re:The BitTorrent Protocol Specification v2 by AbacusAvenger on Monday August 07, 2017 @11:19PM (#14953768)
I haven't found any Intel hardware with the SHA extensions actually implemented. I was expecting it in Skylake but apparently that's not the case... Not sure when we can expect to see them.
Re:The BitTorrent Protocol Specification v2 by silotis on Monday August 07, 2017 @11:35PM (#14953901)
Right now the most common x86 CPU which implements the SHA instructions is AMD's Ryzen. The only available Intel CPU which supports them is Goldmont, the latest generation of Atom CPU. It seems likely that Cannon Lake and possibly Coffee Lake will also implement them, but I haven't seen any rumors pointing one way or the other.
Re:The BitTorrent Protocol Specification v2 by mtgx on Tuesday August 08, 2017 @03:02AM (#14955184)
Intel has recently implemented SHA1 in hardware. So give it another decade or so.
Re:The BitTorrent Protocol Specification v2 by ko27 on Tuesday August 08, 2017 @03:49AM (#14955467)
SHA-1 & SHA-256 were both implemented at the same time.

https://en.wikipedia.org/wiki/Intel_SHA_extensions

Re:The BitTorrent Protocol Specification v2 by baby on Tuesday August 08, 2017 @07:53AM (#14956823)
hopefully SHA-3 (or better, the Keccak permutation) is implemented in hardware first.
Re:The BitTorrent Protocol Specification v2 by snakeanus on Tuesday August 08, 2017 @01:01PM (#14959842)
> SHA-3 (or better, the Keccak permutation)

SHA-3 is just Keccak with specific capacities. If you mean that they should not implement only the standard SHA-3 functions then I agree, having c/raw/SHAKE256 as well would be nice.

Re:The BitTorrent Protocol Specification v2 by baby on Wednesday August 09, 2017 @04:37PM (#14973341)
Implementing the permutation would be even better, because other stuff like Strobe, Keyak, Ketje, etc... could use it.
Re:The BitTorrent Protocol Specification v2 by ComputerGuru on Tuesday August 08, 2017 @07:04AM (#14956511)