[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Simple cryptographic hash function

Posted on 2004-10-20
3
Medium Priority
?
513 Views
Last Modified: 2010-04-17
I am aware of the theory and purpose of cryptographic hashes like MD5, SHA, etc.
I also am interested in using a simple crypto hash in a small project I am currently dreaming up.  I say simple because i want the code for this project to be *extremely* small.  Under 1k would be good, under 512 bytes is my true goal.

I need to take in 10-50 bytes of a seed and create a 4-10 byte hash that can, of course, be guaranteed the same each time with the same input, and maximizing unique outputs for unique inputs.

I realize that this is a difficult, if not impossible, task.  What I am looking for is resources describing some lower theory of crypto hashes, like how to program them from scratch, and possibly some examples of existing simple crypto hash algorithms.
0
Comment
Question by:arantius
[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
3 Comments
 
LVL 7

Accepted Solution

by:
LRHGuy earned 999 total points
ID: 12366629
You might consider looking here:

http://sourceforge.net/projects/tplockbox/

TurboPower's lockbox is free, with source (Delphi) ... but more than that, it has multiple methods, and the documentation is excellent...you'll find lots of info about MD5, etc...in the documentation, even if you don't use delphi.
0
 
LVL 84

Expert Comment

by:ozo
ID: 12366738
What cryptographic propertys do you require of your hash function?
A 4 byte hash would be extremely weak against attack, and collisions could easily be found by exhaustive search.
http://en.wikipedia.org/wiki/Cryptographic_hash_function
0
 
LVL 18

Author Comment

by:arantius
ID: 12369846
In short, I'm trying to write my own version of this password bookmarklet, there's a few changes I'd like to incorporate: http://www.angel.net/~nic/passwdlet.html

That one uses full MD5 (AFAIK) but I don't think it's necessary for this particular project.  The hash does not have to be so cryptographically strong, though I'm quite leaning towards the 8+ byte end of the size.  I just want to make sure that whatever I choose it won't be too big and break a website.  It will also, though, likely be encoded into hex so the 4 bytes would become 8 wasted bytes in the end.  Haven't decided which characters exactly I'd include.
The point of the project is minimization of risk should the password you use for a website be found/leaked.  Collisions are no problem.  There is not, necessarily, even the knowledge that you used this generator should the password become public.

With the further looking I've done since my first post, I am probably going to end up largely giving up on trying to keep it small enough to fit into IE's 508 byte limit.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Six Sigma Control Plans

656 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