Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > SHA1 algorithm -- fully portable

Reply
Thread Tools

SHA1 algorithm -- fully portable

 
 
Tomás Ó hÉilidhe
Guest
Posts: n/a
 
      03-24-2008

I've come across a few implementations of the algorithm but none of
them have been fully-portable.

Particularly, I'm looking for an algorithm that doesn't make
assumptions on:
1) Byte order (e.g. big-endian Vs little-endian).
2) The size of any of the integer types.
3) The presence or lack of padding in any of the integer types.

If someone has a fully-portable implementation of the algorithm I'd be
very appreciative if you could post it here, or give me a link, or
perhaps mail it to me:
tKoe AT lavKabit DOT cKom (remove the K's)

Failing that, if someone could point me to a very-well written
implementation of the algorithm that I can edit myself then I'd be
appreciative.
 
Reply With Quote
 
 
 
 
ymuntyan@gmail.com
Guest
Posts: n/a
 
      03-24-2008
On Mar 24, 9:43 am, Tomás Ó hÉilidhe <(E-Mail Removed)> wrote:
> I've come across a few implementations of the algorithm but none of
> them have been fully-portable.
>
> Particularly, I'm looking for an algorithm that doesn't make
> assumptions on:
> 1) Byte order (e.g. big-endian Vs little-endian).
> 2) The size of any of the integer types.
> 3) The presence or lack of padding in any of the integer types.
>
> If someone has a fully-portable implementation of the algorithm I'd be
> very appreciative if you could post it here, or give me a link, or
> perhaps mail it to me:
> tKoe AT lavKabit DOT cKom (remove the K's)
>
> Failing that, if someone could point me to a very-well written
> implementation of the algorithm that I can edit myself then I'd be
> appreciative.


http://rafb.net/p/vOSU0M89.html
Should be portable, but I don't have a nine-bit-byte
machine to test (nor did I test it much on what I have).
It is not very-well written, but that wasn't a goal

Regards,
Yevgen
 
Reply With Quote
 
 
 
 
user923005
Guest
Posts: n/a
 
      03-24-2008
On Mar 24, 7:43*am, Tomás Ó hÉilidhe <(E-Mail Removed)> wrote:
> I've come across a few implementations of the algorithm but none of
> them have been fully-portable.
>
> Particularly, I'm looking for an algorithm that doesn't make
> assumptions on:
> 1) Byte order (e.g. big-endian Vs little-endian).
> 2) The size of any of the integer types.
> 3) The presence or lack of padding in any of the integer types.
>
> If someone has a fully-portable implementation of the algorithm I'd be
> very appreciative if you could post it here, or give me a link, or
> perhaps mail it to me:
> * * tKoe AT lavKabit DOT cKom *(remove the K's)
>
> Failing that, if someone could point me to a very-well written
> implementation of the algorithm that I can edit myself then I'd be
> appreciative.


Did you try news:sci.crypt
?

Follow-up added.
 
Reply With Quote
 
Tomás Ó hÉilidhe
Guest
Posts: n/a
 
      03-25-2008

> http://rafb.net/p/vOSU0M89.html
> Should be portable, but I don't have a nine-bit-byte
> machine to test (nor did I test it much on what I have).
> It is not very-well written, but that wasn't a goal
>
> Regards,
> Yevgen



Thanks Yevgen, but the link appears to be broken.
 
Reply With Quote
 
Bill Reid
Guest
Posts: n/a
 
      03-27-2008

Tomás Ó hÉilidhe <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> I've come across a few implementations of the algorithm but none of
> them have been fully-portable.
>
> Particularly, I'm looking for an algorithm that doesn't make
> assumptions on:
> 1) Byte order (e.g. big-endian Vs little-endian).
> 2) The size of any of the integer types.
> 3) The presence or lack of padding in any of the integer types.


No guarantees about the above, but have you seen the following
(I noticed this when I was answering another question here about
large-scale open source "C" projects:

http://lxr.linux.no/linux/lib/sha1.c

> If someone has a fully-portable implementation of the algorithm I'd be
> very appreciative if you could post it here, or give me a link, or
> perhaps mail it to me:
> tKoe AT lavKabit DOT cKom (remove the K's)
>
> Failing that, if someone could point me to a very-well written
> implementation of the algorithm that I can edit myself then I'd be
> appreciative.


Again, no guarantees about this...who know if it even works on
Torvalds' Timex Sinclair...

---
William Ernest Reid



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Digitally Signing a XML Document (using SHA1+RSA or SHA1+DSA) Adam Tauno Williams Python 2 12-30-2010 10:23 AM
Form sha1.hexdigest to sha1.digest LMZ Python 5 04-06-2008 09:50 PM
portable sha1 hmac sources ed C Programming 2 04-08-2006 01:14 AM
Q: sha1 algorithm .dll or source ? Martin Hvidberg (DMU) C Programming 0 08-18-2004 05:47 AM
Q: sha1 algorithm .dll or source ? Martin Hvidberg (DMU) C Programming 0 08-18-2004 05:45 AM



Advertisments