Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > MD5: Anyone know how to deal with it??

Reply
Thread Tools

MD5: Anyone know how to deal with it??

 
 
Abby
Guest
Posts: n/a
 
      08-15-2003
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.
 
Reply With Quote
 
 
 
 
LVB
Guest
Posts: n/a
 
      08-15-2003
On Thu, 14 Aug 2003 17:12:07 -0700, Abby wrote:

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


 
Reply With Quote
 
 
 
 
Greg P.
Guest
Posts: n/a
 
      08-15-2003
"Abby" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
| 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


 
Reply With Quote
 
Greg P.
Guest
Posts: n/a
 
      08-15-2003
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. =)


 
Reply With Quote
 
Abby
Guest
Posts: n/a
 
      08-15-2003
"LVB" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> On Thu, 14 Aug 2003 17:12:07 -0700, Abby wrote:
>
> > 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.


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.
 
Reply With Quote
 
craigbeanhead
Guest
Posts: n/a
 
      08-15-2003
> > 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.


"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
 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      08-15-2003
Abby wrote:
> "LVB" <(E-Mail Removed)> wrote:
> > On Thu, 14 Aug 2003 17:12:07 -0700, Abby wrote:
> > >
> > > 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.

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

--
Chuck F ((E-Mail Removed)) ((E-Mail Removed))
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!

 
Reply With Quote
 
Arthur J. O'Dwyer
Guest
Posts: n/a
 
      08-15-2003

On Fri, 14 Aug 2003, Abby wrote:
>
> "LVB" writes...
> > On Thu, 14 Aug 2003 17:12:07 -0700, Abby wrote:
> > >
> > > 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!!
> > >
> > > 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.

>
> 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
 
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: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
AMD64 or Semperon, deal or no deal? Tad Confused Computer Information 7 04-13-2006 05:43 PM
deal or no deal rbt Python 7 12-28-2005 08:57 PM
LOOK! i just want to know does anyone know... Simon Egginton Javascript 3 07-26-2004 08:11 PM
I know, I know, I don't know Andries Perl Misc 3 04-23-2004 02:17 AM



Advertisments