473,425 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

MD5: Anyone know how to deal with it??

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.
Nov 13 '05 #1
7 4071
LVB
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.
Nov 13 '05 #2
"Abby" <ab*****@yahoo.com> wrote in message
news:b4**************************@posting.google.c 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
Nov 13 '05 #3
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. =)
Nov 13 '05 #4
"LVB" <Lv*@sdc.net> wrote in message news:<pa****************************@sdc.net>...
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.
Nov 13 '05 #5
> > 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
Nov 13 '05 #6
Abby wrote:
"LVB" <Lv*@sdc.net> 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 (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!

Nov 13 '05 #7

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
Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Randell D. | last post by:
Folks, I use md5 hash with some of my cookies and occassionally a hidden form field - I know the physical data on my network is insecure (unless being served via https) but I was wondering if...
4
by: Christian Meisinger | last post by:
hi. has anyone tryed to check .htpasswd passwords with php? everythink works fine as long as they are encrypted with the default CRYPT mode of apaches htpasswd. crypt($pass, $htpass) ===...
1
by: Marco Herrn | last post by:
Hi, I don't know wether this is really the best place for asking this question. If you know a better, please tell me. The problem is an understanding of the 3 modules for hash algorithms. I need...
27
by: frizzle | last post by:
Hi there, I've read in a few places that you should *never* store original passwords in a mySQL DB. Now i wonder if you encrypt it (with MD5 ?), how should i create a lost password function,...
3
by: Amir Hadi | last post by:
Hi @ all I am new in programming C under GNU/Linux I want to ask you, is there any md5 solution in C under Linux? If yes, can you give me some pages with informations about md5 in C? I allready...
2
by: chis2k | last post by:
I need help figuring out how to get the MD5 hash of large files. I cannot go about the traditional way of reading the entire file into a byte array, because then the huge file is placed in memory,...
6
by: samn | last post by:
i compiled and installed the release version of python 2.5 for linux to a directory accessible to 2 computers, configured with --prefix=/usr/arch (which is accessible to both machines). the...
4
by: Jonathan Wood | last post by:
Does anyone know why the documentation for System.Security.Cryptography.MD5.Create() seems to omit completely any description of allowed arguments. I'm trying to convert some C++ code to C# and...
4
by: MS | last post by:
Hi, I'm writing a PHP login script for a web site. I've looked at several examples on the web and some of them use MD5 hashes for the password. They do this in various ways. EG. a) Storing...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.