Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MD5 Checksums on Solaris 9/8

701 views
Skip to first unread message

Double Dumbass on You

unread,
Jul 13, 2004, 10:09:37 AM7/13/04
to
Is there an inherent method of generating MD5 checksums on Sol 8/9? If not,
what is the most widely used utility? We are looking for the least
complicated install, if installation is necessary. TIA.


all mail refused

unread,
Jul 13, 2004, 6:09:30 PM7/13/04
to

OpenSSL does it. There'll also be a CPAN module.

I do SHA1 instead of MD5 using the above 2 tools - falling back to the
Perl module where OpenSSL fails a test case (for instance if it's not
installed).

--
Elvis Notargiacomo master AT barefaced DOT cheek
http://www.notatla.org.uk/goen/

Dave Uhring

unread,
Jul 13, 2004, 6:35:29 PM7/13/04
to

md5sum is part of GNU textutils.

Peter Karstens

unread,
Jul 14, 2004, 11:54:27 PM7/14/04
to
"Double Dumbass on You" <spam_me_gently_...@yahoo.com> wrote in message news:<10f7r98...@news.supernews.com>...

> Is there an inherent method of generating MD5 checksums on Sol 8/9? If not,
> what is the most widely used utility? We are looking for the least
> complicated install, if installation is necessary. TIA.

Sun has md5 at http://sunsolve.sun.com/md5/ :-)

-Peter

Martin Paul

unread,
Jul 15, 2004, 4:49:56 AM7/15/04
to

Which, for whatever reason, doesn't use Sun's own optimized MD5 library
(see `man md5`). That's why I used the md5 source distribution from
ftp://ftp.cerias.purdue.edu/pub/tools/unix/crypto/md5/ and modified
it to use Sun's libmd5 instead (one only needs to swap "md5.h" and
md5c.c against <md5.h> and -lmd5). `ldd md5` then shows:

libmd5.so.1 => /usr/lib/libmd5.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
/usr/platform/SUNW,Sun-Fire-880/lib/libmd5_psr.so.1
/usr/platform/SUNW,Sun-Fire-880/lib/libc_psr.so.1

The times to compute md5 of a 100 MB file:

http://sunsolve.sun.com/md5/: 4.220 sec
md5 from ftp://ftp.cerias.purdue.edu/: 2.780 sec
modified md5 using -lmd5: 2.080 sec

The speed-up is neglibible when using md5 to check for correct downloads,
but for certain intrusion detection tools which check lots of file
checksums it can be quite helpful.

mp.
--
Systems Administrator | Institute for Software Science | Univ. of Vienna

Casper H.S. Dik

unread,
Jul 15, 2004, 7:19:40 AM7/15/04
to
Martin Paul <m...@par.univie.ac.at> writes:

>Which, for whatever reason, doesn't use Sun's own optimized MD5 library
>(see `man md5`). That's why I used the md5 source distribution from
>ftp://ftp.cerias.purdue.edu/pub/tools/unix/crypto/md5/ and modified
>it to use Sun's libmd5 instead (one only needs to swap "md5.h" and
>md5c.c against <md5.h> and -lmd5). `ldd md5` then shows:

That's because it predates Sun's own MD5 library.

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

Martin Paul

unread,
Jul 16, 2004, 4:57:02 AM7/16/04
to
Casper H.S. Dik <Caspe...@sun.com> wrote:
> Martin Paul <m...@par.univie.ac.at> writes:
>
>>Which, for whatever reason, doesn't use Sun's own optimized MD5 library
>>(see `man md5`).
>
> That's because it predates Sun's own MD5 library.

I guess the perfect solution would be having a Sun-provided /usr/bin/md5,
coming with the OS, which is linked against libmd5 only if this is
actually available within the OS, too (and statically linked, if it
isn't).

Casper H.S. Dik

unread,
Jul 16, 2004, 10:12:47 AM7/16/04
to
Martin Paul <m...@par.univie.ac.at> writes:

>Casper H.S. Dik <Caspe...@sun.com> wrote:
>> Martin Paul <m...@par.univie.ac.at> writes:
>>
>>>Which, for whatever reason, doesn't use Sun's own optimized MD5 library
>>>(see `man md5`).
>>
>> That's because it predates Sun's own MD5 library.

>I guess the perfect solution would be having a Sun-provided /usr/bin/md5,
>coming with the OS, which is linked against libmd5 only if this is
>actually available within the OS, too (and statically linked, if it
>isn't).

Solaris 10 has it's own built-in md5 command (digest -a md5).

Solaris 10 doesn't have static linking (and those of you who still
think that static linking buys you anything; compare the number of
"bad C libraries" for Solaris with the number of "bad kernel modules"[1];
static linking helps against bad libraries but has no chance of helping
against bad kernel modules.

Casper

[1] I haven't seen a rootkit libc since my SunOS 4.x days; I have seen
somewhere between 5-10 loadable kernel modules from rootkits for Solaris.

0 new messages