Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #18878
| From | mhx@iae.nl (Marcel Hendrix) |
|---|---|
| Subject | Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth |
| Newsgroups | comp.lang.forth |
| Message-ID | <05671318028434@frunobulax.edu> (permalink) |
| Date | 2013-01-17 22:36 +0200 |
| References | <b0dce636-7bb4-4717-9a3a-99bf4ffceafb@googlegroups.com> |
| Organization | Wanadoo |
jzakiya@gmail.com writes Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth
[..]
> Since I (presently) don't have a 64-bit forth, can I get some feedback
> from people who do and let me know if the code in SHA-384_512xxx.F works
> correctly with no problems, including SHAfile, to hash a file.
There are some issues with iForth64:
FORTH> help DIGIT
DIGIT IFORTH
( u -- c )
c is the alphanumeric character that represents the value u. The current
number base is not checked.
ok
: ChooseHash
CR CR ." Selection Menu: "
CR ." For SHA-384 enter 1: " CR ." For SHA-512 enter 2: "
CR ." For SHA-512/256 enter 3: " CR ." For SHA-512/224 enter 4: "
BEGIN CR ." Enter selection: " KEY '0' -
DUP 1 5 WITHIN IF TO SHA? FALSE ELSE DROP TRUE THEN \ A digit 0-9
WHILE ." Invalid input, try again." CR REPEAT \ Repeat if not/invalid digit
CASE SHA?
1 OF ." SHA-384 selected" CR ENDOF
2 OF ." SHA-512 selected" CR ENDOF
3 OF ." SHA-512/256 selected" CR ENDOF
4 OF ." SHA-512/224 selected" CR ENDOF
ENDCASE
;
[DEFINED] .SIGNON [IF]
\ =========== iForth specific timing test words ===========
: TIMER-START ( - ms ) ?ms ;
: TIMER-END ( ms - ) ?ms SWAP - U>D msecs ;
[THEN]
Your test words don't check if the generated result is correct.
-marcel
-- --------
FORTH> in
Redefining split-at-char
Redefining MACRO
Selection Menu:
For SHA-384 enter 1:
For SHA-512 enter 2:
For SHA-512/256 enter 3:
For SHA-512/224 enter 4:
Enter selection: SHA-384 selected
ok
FORTH> SHAtest
SHA-384 test suite:
38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b ""
cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7 "abc"
09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712fcc7c71a557e2db966c3e9fa91746039 "abcdefghbcdefghicdefghijdefghijkefghijklfg
hijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"
f130f26be2fdb404296211c772565814056ec15f1af58a1eb8d71794b5520c6468c6d7f76857c749faef76b90a6c5570 2 million copies of ASCII 'a' (61h)
d1471912409a024e336a1f03051f5663d138d7edf6b521c89329a4f81b20bb3365a245647174bc8a54d9152833b24ca9 400,000 copies of ASCII BL (20h)
ok
FORTH> test1 test2 test3
SHA-384 test for EX1 for 100 loops is 0.001 secs ok
SHA-384 test for EX2 for 100 loops is 0.001 secs
SHA-384 test for EX2 for 100 loops is 2.190 secs ok
FORTH> in
Redefining split-at-char
Redefining MACRO
Selection Menu:
For SHA-384 enter 1:
For SHA-512 enter 2:
For SHA-512/256 enter 3:
For SHA-512/224 enter 4:
Enter selection: SHA-512 selected
ok
FORTH> SHAtest
SHA-512 test suite:
cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e ""
ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f "abc"
8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909 "abcdefghbc
defghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"
9bc68759247e3332bec1c79d128d28a8931d0c9f96c8aa975731b563475fdddddf7f873c25086908effe270e23c5a01e5dfb3289bf5d091d8fb454b1bcf98dda 2 million c
opies of ASCII 'a' (61h)
19ef4876e03c93476e00b486c62108d4d7136f6d4782817b449bacf44d0963e03f5ab474cb6822c2963a979e8e15298cd60f22841c51f6161620c0e031c65f4a 400,000 cop
ies of ASCII BL (20h)
ok
FORTH> test1 test2 test3
SHA-512 test for EX1 for 100 loops is 0.000 secs
SHA-512 test for EX2 for 100 loops is 0.000 secs
SHA-512 test for EX2 for 100 loops is 2.069 secs ok
FORTH> in
Redefining split-at-char
Redefining MACRO
Selection Menu:
For SHA-384 enter 1:
For SHA-512 enter 2:
For SHA-512/256 enter 3:
For SHA-512/224 enter 4:
Enter selection: SHA-512/256 selected
ok
FORTH> SHAtest
SHA-512/256 test suite:
c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a ""
53048e2681941ef99b2e29b76b4c7dabe4c2d0c634fc6d46e0e2f13107e7af23 "abc"
3928e184fb8690f840da3988121d31be65cb9d3ef83ee6146feac861e19b563a "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjk
lmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"
0b99d698b528d8eea61af5e52651abe4963fe7abb65f3132863ac0962542c6b7 2 million copies of ASCII 'a' (61h)
959f1e539598bfc0e33a9926e76adad6a44ff54f3537ba5c79a58e420e4cd49d 400,000 copies of ASCII BL (20h)
ok
FORTH> test1 test2 test3
SHA-512/256 test for EX1 for 100 loops is 0.000 secs
SHA-512/256 test for EX2 for 100 loops is 0.000 secs
SHA-512/256 test for EX2 for 100 loops is 2.202 secs ok
FORTH> in
Redefining split-at-char
Redefining MACRO
Selection Menu:
For SHA-384 enter 1:
For SHA-512 enter 2:
For SHA-512/256 enter 3:
For SHA-512/224 enter 4:
Enter selection: SHA-512/224 selected
ok
FORTH> SHAtest
SHA-512/224 test suite:
6ed0dd02806fa89e25de060c19d3ac86cabb87d6a0ddd05c333b84f4 ""
4634270f707b6a54daae7530460842e20e37ed265ceee9a43e8924aa "abc"
23fec5bb94d60b23308192640b0c453335d664734fe40e7268674af9 "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqkl
mnopqrlmnopqrsmnopqrstnopqrstu"
e4e6eb0b5dc71edec81303eb38e60a89c834c169a9f17a45d18e271c 2 million copies of ASCII 'a' (61h)
86f21595b8a3f940fc20acda3a2d6612b763d65054225c96a79c60fd 400,000 copies of ASCII BL (20h)
ok
FORTH> test1 test2 test3
SHA-512/224 test for EX1 for 100 loops is 0.001 secs
SHA-512/224 test for EX2 for 100 loops is 0.001 secs
SHA-512/224 test for EX2 for 100 loops is 2.096 secs ok
FORTH> shafile
Filename: C:\idfwforth\examples\internet\idata\securehash.frt
Bytesize: 25080
SHA-512/224 : 695aab8f05f91d89f894bc1756588f784b65ceae4fbb73309dbe82e3
ok
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth jzakiya@gmail.com - 2013-01-15 21:31 -0800
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth jzakiya@gmail.com - 2013-01-15 21:57 -0800
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth jzakiya@gmail.com - 2013-01-26 10:01 -0800
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth Bernd Paysan <bernd.paysan@gmx.de> - 2013-01-16 15:25 +0100
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth jzakiya@gmail.com - 2013-01-16 09:45 -0800
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth Bernd Paysan <bernd.paysan@gmx.de> - 2013-01-16 19:08 +0100
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth jzakiya@gmail.com - 2013-01-16 10:32 -0800
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth Bernd Paysan <bernd.paysan@gmx.de> - 2013-01-16 23:33 +0100
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth Alex McDonald <blog@rivadpm.com> - 2013-01-16 14:53 -0800
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth jzakiya@gmail.com - 2013-01-16 20:40 -0800
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth mhx@iae.nl (Marcel Hendrix) - 2013-01-17 22:36 +0200
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth jzakiya@gmail.com - 2013-01-17 22:24 -0800
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth jzakiya@gmail.com - 2013-01-17 22:46 -0800
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth mhx@iae.nl (Marcel Hendrix) - 2013-01-19 09:14 +0200
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth Alex McDonald <blog@rivadpm.com> - 2013-01-19 08:24 -0800
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth jzakiya@gmail.com - 2013-01-19 18:10 -0800
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth mhx@iae.nl (Marcel Hendrix) - 2013-01-20 08:56 +0200
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth Bernd Paysan <bernd.paysan@gmx.de> - 2013-01-20 14:38 +0100
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth mhx@iae.nl (Marcel Hendrix) - 2013-01-20 16:25 +0200
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth Alex McDonald <blog@rivadpm.com> - 2013-01-20 11:44 -0800
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-21 17:22 +0000
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth mhx@iae.nl (Marcel Hendrix) - 2013-01-21 22:51 +0200
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-22 17:26 +0000
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-18 16:50 +0000
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth mhx@iae.nl (Marcel Hendrix) - 2013-01-16 19:53 +0200
Re: ANN: All FIPS 180-4 Secure Hash Algorithms in ANS Forth Bernd Paysan <bernd.paysan@gmx.de> - 2013-01-16 23:29 +0100
csiph-web