From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 11833 invoked from network); 2 Jun 2021 12:25:42 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 2 Jun 2021 12:25:42 -0000 Received: from duke.felloff.net ([216.126.196.34]) by 1ess; Wed Jun 2 08:15:38 -0400 2021 Message-ID: <81A58E6C8B19C6A43FC236CFCED33CE5@felloff.net> Date: Wed, 02 Jun 2021 14:15:27 +0200 From: cinap_lenrek@felloff.net To: 9front@9front.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: callback injection database Subject: Re: [9front] [PATCH] sha3 but fixed the code style Reply-To: 9front@9front.org Precedence: bulk - sha3() needs to return nil on final run. - still the aliasing with DigestState.b[200] note, that this also will not work on big endian machines. you can try this with the mips instruction emulator vi(1). byte-by-byte xor is stupid. - sha3_keccakf() seems more than sub-optimal 64-bit constants need to have ULL prefix. for example, the indexing will be done twice because of the ROTL64() macro loops not unrolled, especially with the mod 5 indexing (divisions can be very slow) i bet you havnt written this code, where is this from? if you use someone elses code it is always a good idea to attribute the original authors. do you have test vectors? -- cinap