MD5: Anyone know how to deal with it??

A

Abby

Hi,

I've come to the part that I need to have MD5 in my program. The
only problem is that ... I don't have any clue how to do it!!

The algorithm I need to include in my program is:

Msg = hash(Password,Length);

where
- Msg = 16 bytes result
- hash = MD5 hash function
- Password = user's password
- Length = password length


I need to get the Msg so that I can go on with my program. I don't
know if there's MD5() function built in gcc and ready for use. If not,
please guide me where to get start. Thank you so much.
 
L

LVB

Hi,

I've come to the part that I need to have MD5 in my program. The
only problem is that ... I don't have any clue how to do it!!

The algorithm I need to include in my program is:

Msg = hash(Password,Length);

where
- Msg = 16 bytes result
- hash = MD5 hash function
- Password = user's password
- Length = password length


I need to get the Msg so that I can go on with my program. I don't
know if there's MD5() function built in gcc and ready for use. If not,
please guide me where to get start. Thank you so much.

Have a look in the document RFC 1321. That's where MD5 is described, and
where you can find a reference implementation.
 
G

Greg P.

| Hi,
|
| I've come to the part that I need to have MD5 in my program. The
| only problem is that ... I don't have any clue how to do it!!
|
| The algorithm I need to include in my program is:
|
| Msg = hash(Password,Length);
|
| where
| - Msg = 16 bytes result
| - hash = MD5 hash function
| - Password = user's password
| - Length = password length
|
|
| I need to get the Msg so that I can go on with my program. I don't
| know if there's MD5() function built in gcc and ready for use. If not,
| please guide me where to get start. Thank you so much.

I did this before (a long time ago) with what was standard on my Linux
distro (no extra libraries), but can't find the old code.

I found this in one of my links folders: it's a library for cryptography.
Good luck!

http://www.eskimo.com/~weidai/cryptlib.html
 
G

Greg P.

Can;t believe I failed to mention this. in my last 2 messages. You may find
better (expert) help in a newsgroup like comp.unix.programmer. =)
 
A

Abby

LVB said:
Have a look in the document RFC 1321. That's where MD5 is described, and
where you can find a reference implementation.

I've look through that RFC. For me, it's kinda hard since I'm a
beginner in C programming. It'd be good if there's an available
function ready for use. Any idea about easier way to get this done,
please recommend. Thank you so much.
 
C

craigbeanhead

Have a look in the document RFC 1321. That's where MD5 is described, and
I've look through that RFC. For me, it's kinda hard since I'm a
beginner in C programming. It'd be good if there's an available
function ready for use. Any idea about easier way to get this done,
please recommend. Thank you so much.

"reference implementation" means "somebody wrote it already, for *you*
to refer to" but I'm sure you knew that.

How much easier do you want it to be? You want an RPM? Self-extracting
EXE?

-- Craig
 
C

CBFalconer

Abby said:
I've look through that RFC. For me, it's kinda hard since I'm a
beginner in C programming. It'd be good if there's an available
function ready for use. Any idea about easier way to get this done,
please recommend. Thank you so much.

Something of that nature is the easiest thing to program. It
stands by itself, and requires no nasty i/o. Such routines are
the heart of portable programming, so get at it.
 
A

Arthur J. O'Dwyer

...

I've look through that RFC. For me, it's kinda hard since I'm a
beginner in C programming. It'd be good if there's an available
function ready for use. Any idea about easier way to get this done,
please recommend. Thank you so much.

Despite Craig's and Chuck's recommendations, I must admit that the
code in RFC1321 is very much non-idiomatic, ancient-style C. This
is unfortunately the state of the art in "reference implementations"
in general. There's a *lot* of stuff that will need fixing or
updating, or at least understanding, in order to compile the "reference"
code on your platform.

You might try sci.crypt. They will know much more about the various
libraries that may already exist for your platform, and they will even
be more than glad to point out why your algorithm is fundamentally
insecure, and MD5 won't help. [I dunno, but that's always how it
goes. ;-) ]

<OT> You mention gcc, which implies you might be using Linux. Lots of
Linux systems have 'libcrypt' or some such, which should have some
semi-useful library code. Ask sci.crypt. </OT>

-Arthur
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top