Page 1 of 1
DECRYPTION ERROR
Posted: Sat Aug 29, 2009 11:30 pm
by drOrganized
I AM USING THE COMMAND:
decrypt input using "aes-128-cbc" with "1111"
It works fine. However, if I write encrypted text to a text file called dest and then:
open file dest
read from file until ""
put it into input
close file dest
decrypt input using "aes-128-cbc" with "1111"
Then I get an error on the decrypt command: bad decrypt
WHY SHOULD WRITING AND THEN READING ENCRYPTED CONTENT TO A TEXT FILE GENERATE AN ERROR ON DECRYPTION?
I'M PERPLEXED
Posted: Sat Aug 29, 2009 11:46 pm
by BvG
I think the first thing you should do, is fix your keyboard (Especially the caps-lock key).
Some cyphers expect data to be a certain length, and use padding on the input data to get to that length. If you just feed such a cypher "dummy" data, you need to make sure it's the expected length for that cypher.
Posted: Sun Aug 30, 2009 12:08 am
by drOrganized
BvG wrote:I think the first thing you should do, is fix your keyboard (Especially the caps-lock key).
Some cyphers expect data to be a certain length, and use padding on the input data to get to that length. If you just feed such a cypher "dummy" data, you need to make sure it's the expected length for that cypher.
OK, can you help me a little more as this is not well covered in Revolutions documentation. How can I understand whether my data is the right length for the cypher? Can you suggest a cypher that is less stringent?
Thanks!
Posted: Sun Aug 30, 2009 3:41 am
by Mark
Orgy,
You should also read in the docs about the read command. You're doing it wrong.
Also, there is no need to write subjects with ALL CAPS, but BvG wrote that already.
Best regards,
Mark
Posted: Sat Sep 05, 2009 2:54 pm
by Mark Smith
You should probably use:
open file myFile for binary read
The 'binary' keyword lets the engine know that it should not do any translation of line endings and so-on as it would with a text file.
Best,
Mark Smith