Forums: » Register « |  Free Tools |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

New Free Tools on Dev Shed!

#1
November 29th, 2012, 05:35 AM
 antonio19732910
Registered User

Join Date: Nov 2012
Posts: 2
Time spent in forums: 12 m 31 sec
Reputation Power: 0
Crypto Algorithm Question - Encryotion algorithm for full documents

Hi Everybody

is there a way/algorithm to encrypt a document that requires then the full document in order to decrypt it.?

In the sense that, if I intercept only part of the document, I'll not be able to decrypt it also knowing the key or the algorithm.

Thanks
Antonio

#2
November 29th, 2012, 09:58 AM
 E-Oreo
Lost in code

Join Date: Dec 2004
Posts: 8,233
Time spent in forums: 2 Months 2 Days 20 h 11 m 10 sec
Reputation Power: 7170
I'm not aware of an algorithm that has that property. Normally if an attacker knows your encryption key it is basically game-over at that point.

However, for most algorithms I believe you would only be able to decrypt up to missing part of the message. So if you have a 10 block message and block 6 is missing, you would be able to decrypt blocks 1-5, but not 7-10.

You could use two keys and encrypt the message twice. Generate a random key and use that to encrypt the message, then use your shared key to encrypt the random key. Transmit the random key with the document. In that case, the message could only be decrypted if the entirety of the random key is intercepted. However, if 50% of the random key is intercepted then it becomes 50% easier for the attacker to brute force.

You could also mix up the order in which you transmit the encrypted document. For example, if you have a 10 block message, first transmit the first byte from block 1, then the first byte from block 2, etc. rather than transmitting all of block 1, then all of block 2. This assumes that the attacker is going to fail to intercept a substantial number of bytes in a row, one of which will *probably* be a byte from block 1, meaning the furthest they could decrypt would be block 1. However, again, the fewer bytes the attacker is missing the easier it is for them to brute force the missing bytes and continue decryption anyway.
__________________
PHP FAQ
How to program a basic, secure login system using PHP

Quote:
 Originally Posted by Spad Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

#3
November 29th, 2012, 10:35 AM
 antonio19732910
Registered User

Join Date: Nov 2012
Posts: 2
Time spent in forums: 12 m 31 sec
Reputation Power: 0
if I'm able to hide the first block so the user will not have any chance to retrieve it but he will be able only to get the other blocks (example from 2 to 10).. I suppose there is no way in this case to decrypt any block. is it correct?

and can you point to me to this type of algorithm? I mean the one that you may decrypt until the missing part.

ciao
Antonio

#4
March 3rd, 2013, 03:25 PM
 mah\$us
Contributing User

Join Date: Feb 2009
Posts: 188
Time spent in forums: 3 Days 5 h 45 m 52 sec
Reputation Power: 49
I've been away from the forum, so I wasn't present to give a timely response. However, for anyone interested in this question, there is a scheme to exactly meet the original poster's requirement:

http://en.wikipedia.org/wiki/Aont

An All-Or-Nothing Transform, or AONT, allows encryption of a document in such a way that if at least one bit is changed or missing, the document cannot be decrypted.

Last edited by mah\$us : March 6th, 2013 at 03:27 PM.

 Viewing: Dev Shed Forums > System Administration > Security and Cryptography > Crypto Algorithm Question - Encryotion algorithm for full documents