ietf
[Top] [All Lists]

RE: RFC 6234 code

2013-06-28 03:59:36
I think we must agree to differ on whether the IETF should do this. If it takes 
twenty minutes work for everyone who has to do it, either that stacks up, or no 
one is actually interested, so is the RFC worth it?

As for maintaining the code, I'm just suggesting the same snapshot as the RFC 
is maintained. It could even be another link off the tools page: here's the 
text, here's the XML, here's any code.

-- 
Christopher Dearlove
Senior Principal Engineer, Communications Group
Communications, Networks and Image Analysis Capability
BAE Systems Advanced Technology Centre
West Hanningfield Road, Great Baddow, Chelmsford, CM2 8HN, UK
Tel: +44 1245 242194 |  Fax: +44 1245 242124
chris(_dot_)dearlove(_at_)baesystems(_dot_)com | http://www.baesystems.com

BAE Systems (Operations) Limited
Registered Office: Warwick House, PO Box 87, Farnborough Aerospace Centre, 
Farnborough, Hants, GU14 6YU, UK
Registered in England & Wales No: 1996687


-----Original Message-----
From: Joe Abley [mailto:jabley(_at_)hopcount(_dot_)ca] 
Sent: 27 June 2013 18:22
To: Dearlove, Christopher (UK)
Cc: ietf(_at_)ietf(_dot_)org
Subject: Re: RFC 6234 code

----------------------! WARNING ! ----------------------
This message originates from outside our organisation,
either from an external partner or from the internet.
Keep this in mind if you answer this message.
Follow the 'Report Suspicious Emails' link on IT matters
for instructions on reporting suspicious email messages.
--------------------------------------------------------

On 2013-06-27, at 11:49, "Dearlove, Christopher (UK)" 
<chris(_dot_)dearlove(_at_)baesystems(_dot_)com> wrote:

RFC 6234 contains, embedded in it, code to implement various functions, 
including SHA-2.

Extracting that code from the RFC is not a clean process. In addition the 
code must have existed unembedded before being embedded.

Is that code available from the IETF or elsewhere?

(I have tried some approaches to finding such code before posting here, but 
none successful.)

Turns out that extracting the code from the RFC is only twenty minutes' work. 
Probably faster just to do it than to talk about it. If you'd like a copy of 
the files I extracted from the RFC text, I can easily send you a tarball.

In general I think that maintaining code repositories is non-trivial, and also 
has been known (especially with respect to crypto/hash algorithms) to run into 
export licensing issues. Maintaining an archives of RFCs is already a core 
competency for the IETF, and (at least in some cases) exporting text is less 
problematic than exporting code.


Joe

[krill:~]% mkdir 6234
[krill:~]% cd 6234
[krill:~/6234]% curl -O 'http://tools.ietf.org/rfc/rfc6234.txt'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  231k  100  231k    0     0   190k      0  0:00:01  0:00:01 --:--:--  190k
[krill:~/6234]% vi rfc6234.txt 
[krill:~/6234]% ls
hkdf.c                  sha.h                   stdint-example.h
hmac.c                  sha1.c                  test-driver.c
rfc6234.txt             sha224-256.c            usha.c
sha-private.h           sha384-512.c
[krill:~/6234]% vi *.h *.c
10 files to edit
[krill:~/6234]% date
Thu 27 Jun 2013 13:14:53 EDT
[krill:~/6234]% 
[krill:~/6234]% cc -c hmac.c
[krill:~/6234]% cc -c sha1.c
[krill:~/6234]% cc -c sha224-256.c
[krill:~/6234]% cc -c sha384-512.c 
[krill:~/6234]% cc -c usha.c
[krill:~/6234]% cc -c test-driver.c
[krill:~/6234]% ls
hkdf.c                  sha.h                   sha384-512.o
hkdf.o                  sha1.c                  stdint-example.h
hmac.c                  sha1.o                  test-driver.c
hmac.o                  sha224-256.c            test-driver.o
rfc6234.txt             sha224-256.o            usha.c
sha-private.h           sha384-512.c            usha.o
[krill:~/6234]% cc -o test-driver *.o
[krill:~/6234]% ./test-driver| egrep '(PASS|FAIL)'
SHA1 sha standard test 1: PASSED
SHA1 sha standard test 2: PASSED
SHA1 sha standard test 3: PASSED
SHA1 sha standard test 4: PASSED
SHA1 sha standard test 5: PASSED
SHA1 sha standard test 6: PASSED
SHA1 sha standard test 7: PASSED
SHA1 sha standard test 8: PASSED
SHA1 sha standard test 9: PASSED
SHA1 sha standard test 10: PASSED
SHA1 random test 0: PASSED
SHA1 random test 1: PASSED
SHA1 random test 2: PASSED
SHA1 random test 3: PASSED
SHA224 sha standard test 1: PASSED
SHA224 sha standard test 2: PASSED
SHA224 sha standard test 3: PASSED
SHA224 sha standard test 4: PASSED
SHA224 sha standard test 5: PASSED
SHA224 sha standard test 6: PASSED
SHA224 sha standard test 7: PASSED
SHA224 sha standard test 8: PASSED
SHA224 sha standard test 9: PASSED
SHA224 sha standard test 10: PASSED
SHA224 random test 0: PASSED
SHA224 random test 1: PASSED
SHA224 random test 2: PASSED
SHA224 random test 3: PASSED
SHA256 sha standard test 1: PASSED
SHA256 sha standard test 2: PASSED
SHA256 sha standard test 3: PASSED
SHA256 sha standard test 4: PASSED
SHA256 sha standard test 5: PASSED
SHA256 sha standard test 6: PASSED
SHA256 sha standard test 7: PASSED
SHA256 sha standard test 8: PASSED
SHA256 sha standard test 9: PASSED
SHA256 sha standard test 10: PASSED
SHA256 random test 0: PASSED
SHA256 random test 1: PASSED
SHA256 random test 2: PASSED
SHA256 random test 3: PASSED
SHA384 sha standard test 1: PASSED
SHA384 sha standard test 2: PASSED
SHA384 sha standard test 3: PASSED
SHA384 sha standard test 4: PASSED
SHA384 sha standard test 5: PASSED
SHA384 sha standard test 6: PASSED
SHA384 sha standard test 7: PASSED
SHA384 sha standard test 8: PASSED
SHA384 sha standard test 9: PASSED
SHA384 sha standard test 10: PASSED
SHA384 random test 0: PASSED
SHA384 random test 1: PASSED
SHA384 random test 2: PASSED
SHA384 random test 3: PASSED
SHA512 sha standard test 1: PASSED
SHA512 sha standard test 2: PASSED
SHA512 sha standard test 3: PASSED
SHA512 sha standard test 4: PASSED
SHA512 sha standard test 5: PASSED
SHA512 sha standard test 6: PASSED
SHA512 sha standard test 7: PASSED
SHA512 sha standard test 8: PASSED
SHA512 sha standard test 9: PASSED
SHA512 sha standard test 10: PASSED
SHA512 random test 0: PASSED
SHA512 random test 1: PASSED
SHA512 random test 2: PASSED
SHA512 random test 3: PASSED
[krill:~/6234]% 


********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************


<Prev in Thread] Current Thread [Next in Thread>