Great work. I love libraries like these.
I am a bit confused though, in your #updateString: you seem to be implementing UTF-8 encoding, something we already have. Normally, hashing algorithms are defined on bytes and result in bytes (yours returns a plain Array, which is also strange). It seems (Keccak hashMessage: 'foo bar') = (Keccak hashMessage: 'foo bar' asByteArray). is true, but (Keccak hashMessage: 'Les élèves Françaises') = (Keccak hashMessage: 'Les élèves Françaises' utf8Encoded). is false. How come ? Is this UTF-8 encoding really part of the algorithm ? Do your tests cover it ? Another question, how would you compute the invariants given here ? https://en.wikipedia.org/wiki/SHA-3#Examples_of_SHA-3_variants SHAKE128("The quick brown fox jumps over the lazy dog", 256) f4202e3c5852f9182a0430fd8144f0a74b95e7417ecae17db0f8cfeed0e3e66e SHAKE128("The quick brown fox jumps over the lazy dof", 256) 853f4538be0db9621a6cea659a06c1107b1f83f02b13d18297bd39d7411cf10c > On 18 Jul 2017, at 18:32, Santiago Bragagnolo <[hidden email]> wrote: > > Hi there! > > I am just releasing the first version of the Keccak-256 hashing algorithm. https://en.wikipedia.org/wiki/SHA-3 > > You can find it at: https://github.com/sbragagnolo/Keccak > > This version is based on a javascript implementation: https://github.com/emn178/js-sha3 > > This implementation supports as message: bytearray and ascii and utf-8 strings. > > > Soon i will be adding support to the rest of the Keccak family of hashing functions, since the implementations is quite configurable, is just need to add some constructors with specific configurations and tests for this other cases of usage. > > > Here a onliner for building an image with the version v0.1: > > wget -O- https://raw.githubusercontent.com/sbragagnolo/Keccak/v0.1/build.sh | bash > > Hope you find it useful :) > > > Santiago > > |
Hahahaha, Thanks for the feedback. Sven, I am quite new in this domain. I'll study your questions and come with solutions tomorrow :). Thanks, i really need this interaction. On Tue, 18 Jul 2017 at 20:28 Sven Van Caekenberghe <[hidden email]> wrote: Great work. I love libraries like these. |
Free forum by Nabble | Edit this page |