473,503 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hash code generating algorithm.

I am trying to provide some security to text files, by adding a
signature
at the end of each text file.
this signature needs to be generated by some kind of
hashing algorithm. so while sending the file,
i will sign the text file and at the receiving end,
the text file will be checked to make sure
that the hash code matches.
( not that it matters for this but my environment is c++ in vs.net2003)
any ideas about what kind of hash algorithm i could use ?
thanks in advance.

Nov 17 '06 #1
5 2055
"lavu" <th******@yahoo.comwrote in message
news:11*********************@j44g2000cwa.googlegro ups.com...
>I am trying to provide some security to text files, by adding a
signature
at the end of each text file.
this signature needs to be generated by some kind of
hashing algorithm. so while sending the file,
i will sign the text file and at the receiving end,
the text file will be checked to make sure
that the hash code matches.
( not that it matters for this but my environment is c++ in vs.net2003)
any ideas about what kind of hash algorithm i could use ?
thanks in advance.
Hashes and digital signatures are not the same. Loosely, a signature on a
message is string which is the value of the hash of a message encrypted with
the signer's private key.

So the first thing you need to do is to decide whether you want a signature
or a hash. Just by the way, signatures usually imply the presence of a whole
infrastructure with a trusted "certificate authority".

Popular hash algorithms go by the name of SHA-1 (secure hash #1) and MD5
(message digest #5). Google is your friend.

Cryptography is a huge and hard-to-grok topic. You might want to start
reading here:

http://msdn2.microsoft.com/en-us/library/aa382450.aspx

or here

http://www.eskimo.com/~weidai/cryptlib.html

Regards,
Will
Nov 17 '06 #2

"William DePalo [MVP VC++]" <wi***********@mvps.orgwrote in message
news:Os**************@TK2MSFTNGP02.phx.gbl...
"lavu" <th******@yahoo.comwrote in message
news:11*********************@j44g2000cwa.googlegro ups.com...
>>I am trying to provide some security to text files, by adding a
signature
at the end of each text file.
this signature needs to be generated by some kind of
hashing algorithm. so while sending the file,
i will sign the text file and at the receiving end,
the text file will be checked to make sure
that the hash code matches.
( not that it matters for this but my environment is c++ in vs.net2003)
any ideas about what kind of hash algorithm i could use ?
thanks in advance.

Hashes and digital signatures are not the same. Loosely, a signature on a
message is string which is the value of the hash of a message encrypted
with the signer's private key.

So the first thing you need to do is to decide whether you want a
signature or a hash. Just by the way, signatures usually imply the
presence of a whole infrastructure with a trusted "certificate authority".

Popular hash algorithms go by the name of SHA-1 (secure hash #1) and MD5
(message digest #5). Google is your friend.
MD5 is considered to be broken... MD4 was broken and the same mathematical
features weaken MD5, making certain attacks feasible using modern computing
systems.
>
Cryptography is a huge and hard-to-grok topic. You might want to start
reading here:

http://msdn2.microsoft.com/en-us/library/aa382450.aspx

or here

http://www.eskimo.com/~weidai/cryptlib.html

Regards,
Will

Nov 20 '06 #3
"Ben Voigt" <rb*@nospam.nospamwrote in message
news:e8*************@TK2MSFTNGP02.phx.gbl...
MD5 is considered to be broken... MD4 was broken and the same mathematical
features weaken MD5, making certain attacks feasible using modern
computing systems.
And for that matter so is SHA-1:

http://www.schneier.com/blog/archive...a1_broken.html

The devil, though, is in the details. Whether the "collision attack"
vulnerability in SHA-1 or a vulnerability in any other algorithm is
significant depends a lot on what one wants to do, the resources one wishes
to expend, and the resources of those who might want to crack one's
security.

Chances are that if someone is posting a question _here_ the security
provided by either MD-5 or SHA-1 (assuming the OP just needs a hash
function) would suffice.

Regards,
Will
Nov 20 '06 #4

Thanku for giving me something to begin with. Looks like I have a lot
of reading about hash code and digital signatures.
I was told to create an ecncrypted hash code that can be appended to
the file to be secured. Sounds simple but looks like I have quite some
ways to go. My journey begins now......

Nov 20 '06 #5

"lavu" <th******@yahoo.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
>
Thanku for giving me something to begin with. Looks like I have a lot
of reading about hash code and digital signatures.
I was told to create an ecncrypted hash code that can be appended to
the file to be secured. Sounds simple but looks like I have quite some
ways to go. My journey begins now......
Rather than searching for hash code or digital signature, try "message
authentication code".
Nov 20 '06 #6

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

Similar topics

34
14422
by: pembed2003 | last post by:
Hi All, Does C++/STL have hashtable where I can do stuff like: Hashtable h<int>; h.store("one",1); h.store("two",2); and then later retrieve them like:
0
5088
by: Dil via .NET 247 | last post by:
Fresher to .NET Aiming to produce a resulting hash of length 24 CHARACTERS, using MD5 or SHA1 Algorithms. According to the Class Libraries, the hash size for the SHA1 algorithm is 160 bits, and...
10
2420
by: Qiangning Hong | last post by:
I'm writing a spider. I have millions of urls in a table (mysql) to check if a url has already been fetched. To check fast, I am considering to add a "hash" column in the table, make it a unique...
1
3579
by: Wayne Deleersnyder | last post by:
Hi All, I was going to write and ask if someone could help me fix the formatting of my output for hash values, but I believe I got it right now. But, because I couldn't find any website or...
3
2927
FishVal
by: FishVal | last post by:
Hi everyone. I need a good idea. I'm developing database (Access2003, WinXP SP2) for documents storing. It is expected that documents will be in PDF format. Particulary I'm meaning scietific...
139
14033
by: ravi | last post by:
Hi can anybody tell me that which ds will be best suited to implement a hash table in C/C++ thanx. in advanced
15
37552
by: Ashish Khandelwal | last post by:
As MSDN is not giving us guarantee upon uniqueness of Hash Code, so could any one suggest me that how to generate a unique Hash Code for same string always, and generate different-2 Hash Code...
6
10029
by: j1mb0jay | last post by:
I am currently working on a dictionary populating program. I currently have a socket connection my local news server and am trawling through all of the articles looking for new words. I am...
4
3448
by: macm | last post by:
Hi Folks I tested <?php echo 'sha256=>' .hash('sha256', 'The quick brown fox jumped over the lazy dog.') .'</br>'; echo 'sha384=>' .hash('sha384', 'The quick brown fox jumped over the lazy...
0
7202
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
7280
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,...
0
7332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
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
4673
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...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.