From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1225 Path: news.gmane.org!not-for-mail From: Solar Designer Newsgroups: gmane.linux.lib.musl.general Subject: Re: FreeSec crypt() Date: Sun, 24 Jun 2012 11:32:25 +0400 Message-ID: <20120624073225.GA4435@openwall.com> References: <20120612235113.GA21296@openwall.com> <20120613011842.GA163@brightrain.aerifal.cx> <20120613120754.GA21900@openwall.com> <20120613145318.GC163@brightrain.aerifal.cx> <20120624072112.GA3792@openwall.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1340523156 4311 80.91.229.3 (24 Jun 2012 07:32:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 24 Jun 2012 07:32:36 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1226-gllmg-musl=m.gmane.org@lists.openwall.com Sun Jun 24 09:32:35 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SihJC-0006MC-KO for gllmg-musl@plane.gmane.org; Sun, 24 Jun 2012 09:32:34 +0200 Original-Received: (qmail 10003 invoked by uid 550); 24 Jun 2012 07:32:33 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 9995 invoked from network); 24 Jun 2012 07:32:33 -0000 Content-Disposition: inline In-Reply-To: <20120624072112.GA3792@openwall.com> User-Agent: Mutt/1.4.2.3i Xref: news.gmane.org gmane.linux.lib.musl.general:1225 Archived-At: On Sun, Jun 24, 2012 at 11:21:12AM +0400, Solar Designer wrote: > struct _crypt_extended_shared { > uint32_t psbox[8][64]; > uint32_t ip_maskl[16][16], ip_maskr[16][16]; > uint32_t fp_maskl[8][16], fp_maskr[8][16]; > uint32_t key_perm_maskl[8][16], key_perm_maskr[12][16]; > uint32_t comp_maskl0[4][8], comp_maskr0[4][8]; > uint32_t comp_maskl1[4][16], comp_maskr1[4][16]; > }; Actually, we should re-order the first two lines. That is make it: struct _crypt_extended_shared { uint32_t ip_maskl[16][16], ip_maskr[16][16]; uint32_t psbox[8][64]; uint32_t fp_maskl[8][16], fp_maskr[8][16]; uint32_t key_perm_maskl[8][16], key_perm_maskr[12][16]; uint32_t comp_maskl0[4][8], comp_maskr0[4][8]; uint32_t comp_maskl1[4][16], comp_maskr1[4][16]; }; That's because IP is not always used (it's only used for "new"-style hashes, not for "old"-style ones where the initial block is always 0 and thus IP is skipped). When it is used, it's used right before psbox[] is. Alexander