MD5: Anyone know how to deal with it??

Discussion in 'C Programming' started by Abby, Aug 15, 2003.

  1. Abby

    Abby Guest

    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.
    Abby, Aug 15, 2003
    #1
    1. Advertising

  2. Abby

    LVB Guest

    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.
    LVB, Aug 15, 2003
    #2
    1. Advertising

  3. Abby

    Greg P. Guest

    Re: Anyone know how to deal with it??

    "Abby" <> wrote in message
    news:...
    | 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
    Greg P., Aug 15, 2003
    #3
  4. Abby

    Greg P. Guest

    Re: Anyone know how to deal with it??

    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. =)
    Greg P., Aug 15, 2003
    #4
  5. Abby

    Abby Guest

    "LVB" <> wrote in message news:<>...
    > 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.
    Abby, Aug 15, 2003
    #5
  6. > > 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
    craigbeanhead, Aug 15, 2003
    #6
  7. Abby

    CBFalconer Guest

    Abby wrote:
    > "LVB" <> 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 () ()
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net> USE worldnet address!
    CBFalconer, Aug 15, 2003
    #7
  8. 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
    Arthur J. O'Dwyer, Aug 15, 2003
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rbt

    deal or no deal

    rbt, Dec 22, 2005, in forum: Python
    Replies:
    7
    Views:
    528
    Duncan Smith
    Dec 28, 2005
  2. Replies:
    9
    Views:
    17,066
    John Salerno
    May 8, 2006
  3. Peter Woodsky

    create a md5 / md5 passwd with a salt

    Peter Woodsky, Nov 20, 2008, in forum: Ruby
    Replies:
    6
    Views:
    198
    Brian Candler
    Nov 21, 2008
  4. Simon Egginton

    LOOK! i just want to know does anyone know...

    Simon Egginton, Jul 26, 2004, in forum: Javascript
    Replies:
    3
    Views:
    169
    Dr John Stockton
    Jul 26, 2004
  5. Andries

    I know, I know, I don't know

    Andries, Apr 23, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    222
    Gregory Toomey
    Apr 23, 2004
Loading...

Share This Page