• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

Compression function which takes 64-bit msg and 32-bit IV and outputs 32-bit digest.

Any hints on writing a function like so:
Compression function which takes 64-bit msg and 32-bit IV and outputs 32-bit digest.
Any help is majorly appreciated!

0
edifer1984
Asked:
edifer1984
2 Solutions
 
Infinity08Commented:
What does IV stand for ?

Does the hash function need to be secure (as MD5, SHA  eg.) ? Or is it just gonna be used for a simple table lookup eg. ?

Does the 64bit message have a specific format ? Anything you can tell us about that ? Any recurring parts ?

These questions are quite important to propose the best hashing algorithm for you.
0
 
jkrCommented:
Do you want to compress data or do you want to create a digest?
0
 
edifer1984Author Commented:
Apologies, IV = initial vector.
The hash function is MD5. 64-bit message is split into 8 blocks which are 8-bits long each. Two rounds where each round has 8 iterations. The 32-bit chaining variables are bytes.
What can you proprose?

Aim is to get a compression function.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
ozoCommented:
If you want the function to be reversible, you can't do it, unless there are no more than 2^32 different 64-bit messages that could be compressed.
If you just want a hash, there are many you could choose from, includingMD5
0
 
Infinity08Commented:
>> Aim is to get a compression function.
You mean to use the hash to check whether de-compression was ok ... or that the hash itself is the compressed content ? In the last case, then ozo's comment shows the problem with this.

In the first case - when it's just needed to check for errors - a simple CRC might be enough (look up CRC32 eg.).
0
 
Infinity08Commented:
We're still waiting for edifer1984 to respond to our last comments. If you're reading this, can you let us know whether you need further assistance ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now