Solved

What exactly is the MessageDigest Class/ Message Digests etc

Posted on 2002-03-21
6
297 Views
Last Modified: 2010-03-31
The MessageDigest Class from a definaition i have seen provides functionality for cryptographically secure message digests such as SHA1 or MD5.

What I want to know is what are message digests (SHA1 and MD5 are given in the definition I've seen but not sure what they are either)?

Are message digests for email messages or for some other form of message. And if so then what is used for email messaging?
0
Comment
Question by:seoirse
6 Comments
 
LVL 9

Expert Comment

by:Venci75
ID: 6885724
.
0
 

Expert Comment

by:0xDEADBEEF
ID: 6885895
A message digest calculates a number out of a message. The number can be considered to be unique for every message (well, not really unique, but the probability that two messages get the same key is really quite improbable.). Also, it cannot be decoded without really big effort and some billion years of spare time.
Message digests are afaik usually used to check whether what you got is what the sender sent, not for actually encoding messages to keep them secret.
SHA (Secure Hash Algorithm) and MD5 (Message Digest 5) are two different algorithms to calculate the number. SAH was developed (and is probably used) by the National Institute of Standards and Technology and uses 160 bit outputs, MD5 was invented by Ron L. Rivest and uses 128 bit. SAH therefore is more secure (2^32 times, to be precise), but usually both work quite well.
0
 
LVL 4

Expert Comment

by:sanjay_thakur
ID: 6886503
Message digest is extensively used for
Password Authentication

Most OS store passwords in some form of Hash
rather than the clear text

When you try to log in the password is hashed and those Hashes are compared


Message digests are one way hash functions
so it is not possible to decrypt the hash to
find the password

The Message digest Algorithms

1) MD5
2) SHA and SHA-1

MD5 is one way a Message digest is implemented

MD5 is used to store password in unix and linux systems

All the password entries in /etc/shadow  in linux file system is stored in MD5 format


refer to this link to get a simple feel of Unix Crypt
which implements MD5 to store passwords

http://locutus.kingwoodcable.com/jfd/crypt.html


0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:seoirse
ID: 6888175
Guys, thanks for the help on this.
I'm going to accept 0xDEADBEEF's answer as it was first adn is also a good explanation. However cheers both of you for the help.
I did wonder also though if you could possibly let me know of any methods of encrypting emails sent froma java program? Is it possible to do such a thing, and if so then what examples are out there for doing so?
0
 

Accepted Solution

by:
0xDEADBEEF earned 35 total points
ID: 6893459
Thx a lot.

For encryption purposes, I would use the JCE (Java Cryptograpohy Extension), package javax.crypto. Anyway, I never did this before, so you'd better check http://java.sun.com/products/jce/ on this.

Hope this helps.
0
 

Author Comment

by:seoirse
ID: 6894383
cheers 0xDEADBEEF
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now