multihash icon indicating copy to clipboard operation
multihash copied to clipboard

Clarify sha3

Open subtly opened this issue 10 years ago • 6 comments

subtly avatar Jun 15 '15 06:06 subtly

Thanks great point. I had missed the internal state discussion and just labeled sha3. I've been using sha3-512: https://github.com/jbenet/go-multihash/blob/master/sum.go#L67-L71 and not sure if people have been using it. so i dont want to change that code to mean sha3-256 now.

Also, I think we should have all functions:

SHA3-224
SHA3-256
SHA3-384
SHA3-512
SHAKE128
SHAKE256

perhaps:

0x14, sha3-512
0x17, sha3-224
0x16, sha3-256
0x15, sha3-384
0x18, shake-128
0x19, shake-256

?

jbenet avatar Jun 15 '15 09:06 jbenet

@jbenet I think that your last proposal makes total sense and bears no conflict (besides maybe adopting sha3 as a deprecated name for sha3-512), also nothing in the spec claims that functions with a higher code should be better, newer, more secure or have bigger hash sizes than functions with lower codes, so they may appear in any order.

I'll be implementing it like this in pymultihash.

ivilata avatar Jan 19 '16 11:01 ivilata

@ivilata great sounds good. could you file a PR against this repo with code table updates you see fit?

jbenet avatar Jan 19 '16 11:01 jbenet

@jbenet Done, see #20.

ivilata avatar Jan 19 '16 12:01 ivilata

@ivilata sorry for the months delay on review.

(besides maybe adopting sha3 as a deprecated name for sha3-512

i think we SHOULD keep sha3-512, as thats' what's been established so far by implementations. i wouldn't want a bad surprise for someone.

jbenet avatar Jul 30 '16 13:07 jbenet

This PR is out of date and should be closed.

celeduc avatar Sep 04 '17 20:09 celeduc