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 11195 invoked from network); 6 Jun 2021 05:20:08 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 6 Jun 2021 05:20:08 -0000 Received: from 149.28.13.84 ([149.28.13.84]) by 1ess; Thu Jun 3 12:08:27 -0400 2021 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit To: 9front@9front.org Date: Thu, 03 Jun 2021 08:24:35 -0700 From: fulton@fulton.software 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: rich-client hosting firewall cache Subject: Re: [9front] [PATCH] sha3 but fixed the code style Reply-To: 9front@9front.org Precedence: bulk Quoth kemal : > hello, > > > - 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 stole go's keccakf code, and translated it into c. it just uses > bitwise operations and loops are unrolled. looks definitely better > than the current one. can fulton test if this actually works? > > http://okturing.com/src/11179/body > That didn't seem to work. it should look like this: ; echo test | sha1sum -3 256 34a0b893b66e312a8b0f7dc4bc4c7930b67f8823513aff5444fb5c64aa060c5a ; echo test | sha1sum -3 512 1a39794b53431e9abc34368ed4824dbac59d6c6417792279b0ec2c91d6eb58af72f9d4b1e3b613a05891c2c1a17a820bcf829cb323c4299b219e5ab299794581 ; sha1sum -3 256 /386/9pc 512b4ee0051cdac52210e1216786aa43625aad842a9d4d2a6f796738692715ef /386/9pc ; Verified by rhash(1) on unix This isi what thr go patch looks like: ; echo test | ./sha1sum -3 256 1b39c5c0855bccd2ebf2a8c490f7cfb49c276a9b81fb336c5621e235fa5390fd ; echo test | ./sha1sum -3 512 dfbef5bc56120523b305cca4254ba61a94393cd7808d5c6434f09664793ecca5ccb2b7ac2b483430d42d6b42654d48d514ad2385699c586f885622e013ce27b0 ; ./sha1sum -3 256 /386/9pc e758b8170222a207a584df37662b9095c71310c1411cfa9b95b63a1dfa30af9d /386/9pc I'll look in to it. It may just be a case of not enough rounds (should be 24) or some simple bug like that, -- Fulton fulton.software!fulton