Solved

What exactly is the MessageDigest Class/ Message Digests etc

Posted on 2002-03-21
6
299 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
splitOdd10 challenge 5 104
Where to store the queries for modification of table 4 61
use lov values 2 49
JAVA API design with micro service cloud in mind 1 10
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

816 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

12 Experts available now in Live!

Get 1:1 Help Now