* Re: MD5 implementation
1996-01-11 5:00 MD5 implementation Michael Gsandtner
1996-01-11 5:00 ` Pierre Vassellerie
1996-01-11 5:00 ` Michael Spratte
@ 1996-01-11 5:00 ` Mike Iglesias
2 siblings, 0 replies; 7+ messages in thread
From: Mike Iglesias @ 1996-01-11 5:00 UTC (permalink / raw)
In article <30F4CCAF.41C6@adv.magwien.gv.at>,
Michael Gsandtner <gsa@adv.magwien.gv.at> wrote:
>Where can I get a MD5 (rfc1321) encryption implementation for a
>64 Bit alpha running DEC/OSF1 ?
>The reference implementation included in the RFC works fine only
>on 32 Bit machines.
Try changing this line:
typedef unsigned long int UINT4;
to this:
typedef unsigned int UINT4;
--
Mike Iglesias Internet: iglesias@draco.acs.uci.edu
University of California, Irvine phone: (714) 824-6926
Office of Academic Computing FAX: (714) 824-2069
^ permalink raw reply [flat|nested] 7+ messages in thread
* MD5 implementation
@ 1996-01-11 5:00 Michael Gsandtner
1996-01-11 5:00 ` Pierre Vassellerie
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Michael Gsandtner @ 1996-01-11 5:00 UTC (permalink / raw)
Where can I get a MD5 (rfc1321) encryption implementation for a
64 Bit alpha running DEC/OSF1 ?
The reference implementation included in the RFC works fine only
on 32 Bit machines.
--
Michael Gsandtner, MA14 ADV, Magistrat Wien, �sterreich
Rathausstr. 1
A-1082 Wien
Austria (NOT where the kangaroos are !), Europe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MD5 implementation
1996-01-11 5:00 MD5 implementation Michael Gsandtner
1996-01-11 5:00 ` Pierre Vassellerie
@ 1996-01-11 5:00 ` Michael Spratte
1996-01-11 5:00 ` Nick Maclaren
` (2 more replies)
1996-01-11 5:00 ` Mike Iglesias
2 siblings, 3 replies; 7+ messages in thread
From: Michael Spratte @ 1996-01-11 5:00 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 859 bytes --]
In article <30F4CCAF.41C6@adv.magwien.gv.at>, Michael Gsandtner <gsa@adv.magwien.gv.at> writes:
|>Where can I get a MD5 (rfc1321) encryption implementation for a
|>64 Bit alpha running DEC/OSF1 ?
|>The reference implementation included in the RFC works fine only
|>on 32 Bit machines.
|>--
|>Michael Gsandtner, MA14 ADV, Magistrat Wien, �sterreich
|>Rathausstr. 1
|>A-1082 Wien
|>Austria (NOT where the kangaroos are !), Europe
|>
I've had no problem with the RFC1321 code running on Digital UNIX. All
I did was modify global.h:
/* UINT4 defines a four byte word */
#if defined(__osf__) && defined(__alpha)
typedef unsigned int UINT4;
#else
typedef unsigned long int UINT4;
#endif
With this modification, the code works identically on ULTRIX, OpenVMS,
Digital UNIX, and Windows NT.
Michael Spratte
DSNlink Engineering
Digital Equipment Corporation
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MD5 implementation
1996-01-11 5:00 MD5 implementation Michael Gsandtner
@ 1996-01-11 5:00 ` Pierre Vassellerie
1996-01-11 5:00 ` Michael Spratte
1996-01-11 5:00 ` Mike Iglesias
2 siblings, 0 replies; 7+ messages in thread
From: Pierre Vassellerie @ 1996-01-11 5:00 UTC (permalink / raw)
To: gsa
I've done a port, I can send it by mail.
--
% VASSELLERIE Pierre *
* DASGAL,Observatoire de Paris-Meudon,5,Place J. Janssen,F-92195 Meudon Cedex %
% Tel: (33 1) 45 07 78 49 - Fax: (33 1) 45 07 78 78 *
* Pierre.Vassellerie@obspm.fr http://dasgal.obspm.fr/~vasselle %
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MD5 implementation
1996-01-11 5:00 ` Michael Spratte
@ 1996-01-11 5:00 ` Nick Maclaren
1996-01-12 5:00 ` Michael Gsandtner
1996-01-12 5:00 ` Donn Cave
2 siblings, 0 replies; 7+ messages in thread
From: Nick Maclaren @ 1996-01-11 5:00 UTC (permalink / raw)
In article <4d3usa$gfm@nntpd2.cxo.dec.com>,
Michael Spratte <spratte@odette.cxo.dec.com> wrote:
>
>In article <30F4CCAF.41C6@adv.magwien.gv.at>, Michael Gsandtner <gsa@adv.magwien.gv.at> writes:
>|>Where can I get a MD5 (rfc1321) encryption implementation for a
>|>64 Bit alpha running DEC/OSF1 ?
>|>The reference implementation included in the RFC works fine only
>|>on 32 Bit machines.
>
>I've had no problem with the RFC1321 code running on Digital UNIX. All
>I did was modify global.h:
>
>/* UINT4 defines a four byte word */
>#if defined(__osf__) && defined(__alpha)
>typedef unsigned int UINT4;
>#else
>typedef unsigned long int UINT4;
>#endif
>
>With this modification, the code works identically on ULTRIX, OpenVMS,
>Digital UNIX, and Windows NT.
I am sorry to say that I think that this is a revolting solution!
It isn't difficult to do the job properly (i.e. without any #ifs
that depend on any particular system). For such code, see
/pub/software/programs/checksum/... on cus.cam.ac.uk.
Yes, that code has #ifs that fix up SunOS (no EXIT_SUCCESS etc.)
and has alternate code for POSIX/UNIX systems (to allow its use in
a pipe). But otherwise it works without #ifs under OS/2, MVS and
many UNICES (including DEC OSF/1).
If it doesn't, please tell me and I shall regard it as a bug.
Nick Maclaren,
University of Cambridge Computer Laboratory,
New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
Email: nmm1@cam.ac.uk
Tel.: +44 1223 334761 Fax: +44 1223 334679
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MD5 implementation
1996-01-11 5:00 ` Michael Spratte
1996-01-11 5:00 ` Nick Maclaren
1996-01-12 5:00 ` Michael Gsandtner
@ 1996-01-12 5:00 ` Donn Cave
2 siblings, 0 replies; 7+ messages in thread
From: Donn Cave @ 1996-01-12 5:00 UTC (permalink / raw)
In article <4d3usa$gfm@nntpd2.cxo.dec.com>, spratte@odette.cxo.dec.com
(Michael Spratte) wrote:
...
| I've had no problem with the RFC1321 code running on Digital UNIX. All
| I did was modify global.h:
|
| /* UINT4 defines a four byte word */
| #if defined(__osf__) && defined(__alpha)
| typedef unsigned int UINT4;
| #else
| typedef unsigned long int UINT4;
| #endif
|
| With this modification, the code works identically on ULTRIX, OpenVMS,
| Digital UNIX, and Windows NT.
That's about the same as what I proposed to the author of Python*, and
it turns out there was already a slightly more elegant solution based on
the symbols LONG_BIT and WORD_BIT, in sys/limits.h. These symbols
evidently are intended to expose the size in bits of "long int" and "int"
respectively. So the following works not only on the Alpha, but also on
64-bit MIPS hardware etc., as long as there's a sys/limits.h and it has these
symbols, which is true at least on several UNIX platforms.
#include <sys/limits.h>
#if WORD_BIT == 32
typedef unsigned int UINT4;
#else
# if LONG_BIT == 32
typedef unsigned long int UINT4;
# else
what have we here
# endif
#endif
Donn Cave, University Computing Services, University of Washington
donn@u.washington.edu
* Python is an interpreted language; it incorporates this code in its MD5
support module. Direct your browser to http://www.python.org.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MD5 implementation
1996-01-11 5:00 ` Michael Spratte
1996-01-11 5:00 ` Nick Maclaren
@ 1996-01-12 5:00 ` Michael Gsandtner
1996-01-12 5:00 ` Donn Cave
2 siblings, 0 replies; 7+ messages in thread
From: Michael Gsandtner @ 1996-01-12 5:00 UTC (permalink / raw)
> I've had no problem with the RFC1321 code running on Digital UNIX. All
> I did was modify global.h:
>
> /* UINT4 defines a four byte word */
> #if defined(__osf__) && defined(__alpha)
> typedef unsigned int UINT4;
> #else
> typedef unsigned long int UINT4;
> #endif
>
Well, that's a very little but very fundamental change !
I refuse saying RFC1321 code has no problems on Digital UNIX.
However, this changed version works great on a alpha too.
Thanks --Michi
--
Michael Gsandtner, MA14 ADV, Magistrat Wien, �sterreich
Rathausstr. 1
A-1082 Wien
Austria (NOT where the kangaroos are !), Europe
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~1996-01-12 5:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-01-11 5:00 MD5 implementation Michael Gsandtner
1996-01-11 5:00 ` Pierre Vassellerie
1996-01-11 5:00 ` Michael Spratte
1996-01-11 5:00 ` Nick Maclaren
1996-01-12 5:00 ` Michael Gsandtner
1996-01-12 5:00 ` Donn Cave
1996-01-11 5:00 ` Mike Iglesias
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox