SHA1 algorithm -- fully portable

  • Thread starter Tomás Ó hÉilidhe
  • Start date
T

Tomás Ó hÉilidhe

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.
 
Y

ymuntyan

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
 
U

user923005

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 ?

Follow-up added.
 
B

Bill Reid

Tomás Ó hÉilidhe said:
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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top