Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #18021

Re: SHA-512

Newsgroups comp.lang.forth
Date 2012-12-14 16:39 -0800
References <0bea10e6-ccf1-4ec0-ba3a-fe0183afd4ad@googlegroups.com> <93831389918435@frunobulax.edu>
Message-ID <c6d2ba2e-adaa-41cd-a9e2-3edb96cc988d@googlegroups.com> (permalink)
Subject Re: SHA-512
From jzakiya@gmail.com

Show all headers | View raw


On Friday, December 14, 2012 3:52:10 PM UTC-5, Marcel Hendrix wrote:
> jzakiya@gmail.com writes Re: SHA-512
> 
> 
> 
> > On Thursday, December 13, 2012 2:33:28 PM UTC-5, Marcel Hendrix wrote:
> 
> >> jzakiya@gmail.com writes Re: SHA-512
> 
> > [..]
> 
> > I thought the problem was bytes>< because 'abc' was too small to show the 
> 
> > bytes being reversed incorrectly.
> 
> 
> 
> If you thought bytes>< was wrong, why didn't you tell me so? Luckily 
> 
> I immediately spotted the problem when I dumped the W buffer at the start 
> 
> of SHA512.
> 
> 
> 
> > So now use shafile and take the sha512 hash of a really big file (like a 
> 
> > linux distro or video file) and see that it works correctly. I haven't found 
> 
> > sha512 signatures of distros yet, but FREEBSD has sha256 hashes of their iso 
> 
> > which I've checked them against with shafile.
> 
> 
> 
> Further checks are only possible when the SHA512 hash of the test file is 
> 
> known. SHA256 can't tell me that SHA512 is correct. SHA512 might fail when
> 
> size is a multiple of 128 bytes, a multiple + some, or a multiple of 
> 
> 4 GBytes.
> 
> 
> 
> > In fact on Windows 7, SwiftForth ran test3 in 15+ seconds for sha256, which
> 
> > VFX took 17+ seconds (haven't done Win32Forth).
> 
> > Will try on Gforth when I get a chance.
> 
> [..]
> 
> 
> 
> On my machine (i7 920 2,66 GHz) I now get 14.4 seconds for SHA512. This is
> 
> 1000 * 1MB / 14.4s / 2.66 GHz = 26 MB/s/GHz.
> 
> 
> 
> For a big file:
> 
> 
> 
> FORTH> S" C:\idfwforth\df_snapshot_4.0_2010_08_19.tar.gz" TIMER-RESET @SHAfile .ELAPSED
> 
> Bytesize: 385,241,618
> 
> SHA-512 :
> 
> 45800c7d8fe7c13f 6670176b93b82c34 6f6f072ff1f50aee 586ccd6e7b02ef7c e27eb8f5a3cb814a 74e1d18b3107ea9b 8fdf171bf573a420 2a666c67703437bf
> 
> 3.320 seconds elapsed. ok
> 
> 
> 
> FORTH> 385.241618e 3.320e f/ 2.66e f/ f. 43.622794  ok
> 
> FORTH> 385.241618e 3.320e f/ f. 116.036632  ok
> 
> 
> 
> Strangely enough this is 43.6 MB/s/GHz, or 116MB/s, so diskfile I/O makse it 
> 
> twice faster??
> 
> 
> 
> The NIST reference implementation for SHA512 quotes 99 MB/s on a 1.8 GHz Core2.
> 
> 
> 
> -marcel

Correction about VFX vs SwiftForth times.

VFX is about 10x faster than SwiftForth for "test3".
The first times I ran SwiftForth it was only doing 100 iterations for test3 while VFX was doing 1000. Doing 1000 iterations with SwiftForth is about 150+ seconds, but 16-17 secs with VFX.

I assume you got your times with your PICK-less :-) version?

Now Marcel, if you go look back in this thread I asked you to check to see if the cell reversal words were working, so I did try to steer you there.  :-)

To check out 'shafile' create text files with the reference phrase ('abc', et al) and enter them into shafile.  Be sure to check the length of the text file first and subtract off any control characters that are inserted in the file so they don't get hashed too. That's why I put the 0 0 D- line in shafile so I could test file hashing with the reference phrases. Usually you just need to do a 1 0 D- for LF or CR, or 2 0 D- if both a CR|LF are inserted.

I've just about finished converting SHA-512 to SHA-384, SHA-512/224 and SHA-512/256, to round out the 64-bit family of hashes, and the same for SHA-224 for the 32-bit hashes. When I finish I'll upload them to my 4Share site and let you know.

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

SHA-512 mhx@iae.nl (Marcel Hendrix) - 2012-12-02 23:48 +0200
  Re: SHA-512 jzakiya@gmail.com - 2012-12-07 14:47 -0800
    Re: SHA-512 Coos Haak <chforth@hccnet.nl> - 2012-12-08 00:49 +0100
      Re: SHA-512 jzakiya@gmail.com - 2012-12-07 16:54 -0800
        Re: SHA-512 Coos Haak <chforth@hccnet.nl> - 2012-12-08 18:21 +0100
      Re: SHA-512 jzakiya@gmail.com - 2012-12-08 18:36 -0800
        Re: SHA-512 mhx@iae.nl (Marcel Hendrix) - 2012-12-09 09:14 +0200
          Re: SHA-512 jzakiya@gmail.com - 2012-12-09 17:23 -0800
            Re: SHA-512 jzakiya@gmail.com - 2012-12-09 17:29 -0800
              Re: SHA-512 jzakiya@gmail.com - 2012-12-09 20:46 -0800
              Re: SHA-512 m.a.m.hendrix@tue.nl - 2012-12-10 03:53 -0800
                Re: SHA-512 jzakiya@gmail.com - 2012-12-10 13:05 -0800
                Re: SHA-512 mhx@iae.nl (Marcel Hendrix) - 2012-12-10 23:17 +0200
                Re: SHA-512 jzakiya@gmail.com - 2012-12-13 06:30 -0800
                Re: SHA-512 mhx@iae.nl (Marcel Hendrix) - 2012-12-13 21:33 +0200
                Re: SHA-512 jzakiya@gmail.com - 2012-12-13 19:38 -0800
                Re: SHA-512 mhx@iae.nl (Marcel Hendrix) - 2012-12-14 22:52 +0200
                Re: SHA-512 jzakiya@gmail.com - 2012-12-14 16:39 -0800
                Re: SHA-512 mhx@iae.nl (Marcel Hendrix) - 2012-12-15 19:11 +0200
                Re: SHA-512 mhx@iae.nl (Marcel Hendrix) - 2012-12-16 16:00 +0200
                Re: SHA-512 jzakiya@gmail.com - 2012-12-16 17:33 -0800
                Re: SHA-512 jzakiya@gmail.com - 2012-12-16 22:35 -0800
                Re: SHA-512 mhx@iae.nl (Marcel Hendrix) - 2012-12-17 10:14 +0200
                Re: SHA-512 mhx@iae.nl (Marcel Hendrix) - 2012-12-17 10:51 +0200
                Re: SHA-512 jzakiya@gmail.com - 2012-12-17 09:13 -0800
                Re: SHA-512 mhx@iae.nl (Marcel Hendrix) - 2012-12-17 22:24 +0200
                Re: SHA-512 Howerd <howerdo@yahoo.co.uk> - 2012-12-13 13:06 -0800
                Re: SHA-512 Howerd <howerdo@yahoo.co.uk> - 2012-12-13 13:03 -0800
    Re: SHA-512 mhx@iae.nl (Marcel Hendrix) - 2012-12-08 22:08 +0200

csiph-web