News for hackers. Stuff that matters.
Re:Maybe Skip SHA-3 by baby on Wednesday May 31, 2017 @04:53PM (#14455826)
Re:Maybe Skip SHA-3 by koenigdavidmj on Wednesday May 31, 2017 @05:20PM (#14456024)
Which is ROT(ate), one of the listed options, even though you have to express it with shifts when writing C.
Re:Maybe Skip SHA-3 by baby on Wednesday May 31, 2017 @05:34PM (#14456114)
I'm not sure I understand what you two mean.

1) How does not having SHR makes it easier to audit?

2) how are sha-3 implementations actually using SHR not making the parent's comment moot?

Re:Maybe Skip SHA-3 by remcob on Wednesday May 31, 2017 @06:03PM (#14456288)
A rotate operation is invertible, a logic shift by itself is not.

Another fun one is x ^= x >> n with n some strictly positive constant, this is also invertible. It's used a lot in the murmurhash family of non-cryptograhic hash functions.

Re:Maybe Skip SHA-3 by oh_sigh on Wednesday May 31, 2017 @06:34PM (#14456467)
Why does invertibility matter? AND and OR are not invertible, but they are used?
Re:Maybe Skip SHA-3 by baby on Wednesday May 31, 2017 @09:26PM (#14457270)
Here's an answer: https://crypto.stackexchange.com/questions/47872/why-is-kecc...

1) it forces you to allocate more memory (to do the Davies-Mayer construction)

2) it complicates the security analysis because you get collisions (if you do not use a permutation, it means you have an injective construction)

Re:Maybe Skip SHA-3 by baby on Thursday June 01, 2017 @05:47AM (#14459020)
And more from http://sponge.noekeon.org/CSF-0.1.pdf section 8.1.3

screenshot here: http://i.imgur.com/4xncceB.png

Re:Maybe Skip SHA-3 by baby on Wednesday May 31, 2017 @07:18PM (#14456678)
Indeed, the whole permutation is invertible and I'm not sure why either.
Re:Maybe Skip SHA-3 by yorwba on Wednesday May 31, 2017 @09:04PM (#14457175)
Permutations are always invertible. Otherwise several different inputs will be mapped to the same output, which needlessly reduces your state space.

The inverse is also required for decryption: If you encrypt as ciphertext = permutation(plaintext + key), decryption is plaintext = inverse(ciphertext) - key.

Re:Maybe Skip SHA-3 by baby on Wednesday May 31, 2017 @09:20PM (#14457241)
My question is why does Keccak not use a one-way function instead of a permutation.

> The inverse is also required for decryption: If you encrypt as ciphertext = permutation(plaintext + key), decryption is plaintext = inverse(ciphertext) - key.

This is not how encryption/decryption works with Keccak. Keccak is used to create a stream (it is then XORed with the plaintext or ciphertext).

Re:Maybe Skip SHA-3 by an27 on Wednesday May 31, 2017 @05:52PM (#14456226)
GP disputed SHR is used in the snippet you highlighted.