?
Solved

What exactly is the MessageDigest Class/ Message Digests etc

Posted on 2002-03-21
6
Medium Priority
?
303 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 

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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses
Course of the Month13 days, 5 hours left to enroll

777 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