LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

inverse of hash function

how to get the inverse of hash function,

Is there any block in labview to get the inverse of this function

0 Kudos
Message 1 of 23
(7,939 Views)

"A given hash value can not feasibly be reversed to get a message that produces that hash value. I.e. There is no useful inverse hash function f'(hash) = message"

Source Wikibooks

 

Hash values are intentionally one way streets to validate the integrity of the input string.  There is no useful purpose in going the opposite direction.  

 

If that is what you need, then investigate cryptography.

 


Paul
0 Kudos
Message 2 of 23
(7,930 Views)

i need get back to the original signal using transmit.vi

So i need inverse hash function and RSA decreprition

is there anyway to get back the original signal without using this functions??

0 Kudos
Message 3 of 23
(7,908 Views)

I don't have LV 9.0, does it have a hash block now?  Had to implement my own on LV7.0, which contains an inverse function.

0 Kudos
Message 4 of 23
(7,900 Views)

Can you explain me how to get the inverse function in LV 7.0

0 Kudos
Message 5 of 23
(7,879 Views)

It is not possible (well almost) to get the original message back from the hash of that function. It would be very unsave if that was even possible. (if it was possible, it would be impossible to us Internet banking in a secure and safe way).

 

If you want to decrypt an RSA message on the other hand, you will need the private key from the encryption party as explained on wikipedia.

 

For anyone who is interested I have uploaded a set of VIs to Bitbucket with the following hashes (LabVIEW 2010):

SHA-1

SHA-224

SHA-256

SHA-384

SHA-512

 

and the HMACs for these hashes.

 

The SHA posted by desham is SHA-1.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 6 of 23
(7,866 Views)

Hash functions are irreversible in general. But if you have a small enough subset of possible hased values you could hash those and see if any of them match. I'm not sure what your transmit function is trying to do, the rsa function seems to just be encrypting the number 31 (and the keys are quite weak), and you're only sending small subsets of the data. In my mind you should hash the entire message, and rsa the message with the attached hash, then you can use the hash to verify the message was decrypted properly. But anyway the hash function is only applied against 2 bytes at a time which is only 2^16 possible values (so pretty easy to generate a table from hash codes to numbers).

 

I attached a VI that can unhash any two character string (which is all of the hashed values in your transmit example), the first call takes a bit to generate the table then it should run fast. My guess is that transmit function isn't the proper solution for what it's trying to solve.

0 Kudos
Message 7 of 23
(7,846 Views)

Hi ,

I am finding difficulty with your unhash funtion.

I took the last message from the tranmit function(concatenation message) and tried to unhash it, It doesnt work. 

Can u help me 

 

I am trying to take the last message, unhash and decrypt the message so that i can get the original message

0 Kudos
Message 8 of 23
(7,806 Views)

The unhash only works for the chunks of the message that are hashed, and I can only unhash it because only two bytes are ever used in the calls to the hash function.

 

I'm not sure what you consider to be the original message, the transmit function is only using 8 bytes from the waveform to produce the message, and it's not encrypting any part of the waveform (I can't say for certain what it's doing since I don't have the RSA vi). I doubt the transmit is even doing what it's supposed to.

0 Kudos
Message 9 of 23
(7,800 Views)

RSA encryption

For Rsa encryption i did the Rsa decryption but i dont know whether it is correct or not

Download All
0 Kudos
Message 10 of 23
(7,782 Views)