Page 1 of 2
Encrypt Decrypt
Posted: Sun Sep 07, 2008 7:55 am
by keyless
I've seen some examples of using Encrypt and Decrypt for text and data in fields, but have not seen/found anything about Encrypting whole binary files. Anyone have a code example?
Posted: Sun Sep 07, 2008 8:49 am
by Mark
Hi Keyless,
Just read the binary file, put its content into a variable, and encrypt the variable instead of a field. It works exactly the same as the example with the fields.
Best,
Mark
Posted: Sun Sep 07, 2008 5:14 pm
by keyless
Does this work well with large files?
Would this be as fast as using the actual openSSL program where I could just give it the file path and the destination path and it would encode?
Posted: Sun Sep 07, 2008 6:03 pm
by Mark
Dear Keyless,
How big is big? I've never had any problems encrypting photos of a few megabytes large.
I don't know what "actual OpenSSL programme" you are using, but if you refer to openssl.org, then I can tell you that both OpenSSL and Revolution depend on the same SSLeay, which means that there should hardly be any speed difference.
Best,
Mark
Posted: Sun Sep 07, 2008 6:23 pm
by keyless
Mark wrote:Dear Keyless,
How big is big? I've never had any problems encrypting photos of a few megabytes large.
I don't know what "actual OpenSSL programme" you are using, but if you refer to openssl.org, then I can tell you that both OpenSSL and Revolution depend on the same SSLeay, which means that there should hardly be any speed difference.
Best,
Mark
I'm talking about DV video files which average about 600megs.
...I'm refering to the OpenSSL command-line executable. I also think it can be done like that with the dll, but the rev implimentation seems to need you to read the file into rev first then encrypt, then write it to a file.
Posted: Sun Sep 07, 2008 9:04 pm
by Mark
Hi Keyless,
Why don't you set up a streaming server with password authentication?
I don't think it makes sense to encrypt an entire 600MB video. Ultimately, it will be decrypted and could be recorded again. Do you know how easy it is to record a computer screen onto a DVD or video recorder?
Best,
Mark
Posted: Sun Sep 07, 2008 10:13 pm
by keyless
Mark wrote:Hi Keyless,
Why don't you set up a streaming server with password authentication?
I don't think it makes sense to encrypt an entire 600MB video. Ultimately, it will be decrypted and could be recorded again. Do you know how easy it is to record a computer screen onto a DVD or video recorder?
Best,
Mark
Mark, they want it encrypted for secure storage and transfer, they are not looking to make them playable on the web or server or anything. When it is encrypted you can't play it so, it would not be possible for a screen recording.
I makes perfect sense to encrypt it, if you don't want someone to view it.
Posted: Sun Sep 07, 2008 10:38 pm
by Mark
You didn't say what it was for, keyless. Now, I can understand why a streaming server is not what you are looking for.
Are you going to use the OpenSSL command line utility, or are you still looking for a Rev-only solution?
Mark
Posted: Mon Sep 08, 2008 12:36 am
by keyless
Mark wrote:You didn't say what it was for, keyless. Now, I can understand why a streaming server is not what you are looking for.
Are you going to use the OpenSSL command line utility, or are you still looking for a Rev-only solution?
Mark
Looking for a rev only solution. OpenSSL command line works fine but I'd rather not have to pass the password/keyphrase to the command line. Doesn't seem as secure as a pass to a DLL.
Posted: Mon Sep 08, 2008 7:24 am
by Mark
Hi Keyless,
You could repeatedly read a small chunk of the movie file, encrypt this and encode it with base64encode before writing it to the destination file. Make sure to use a special item delimiter, which is not used by base64encode, between the chunks. You can experiment with chunk sizes to obtain the highest speed.
Best,
Mark
Posted: Tue Sep 09, 2008 1:18 am
by keyless
Mark wrote:Hi Keyless,
You could repeatedly read a small chunk of the movie file, encrypt this and encode it with base64encode before writing it to the destination file. Make sure to use a special item delimiter, which is not used by base64encode, between the chunks. You can experiment with chunk sizes to obtain the highest speed.
Best,
Mark
Thats an pretty good idea.
I've finished the program though with a command line Blowfish encryptor I found. For the final production we are going to have a DLL made.
I do like your idea though, and will do some testing with it, might come in handy, Thanks Mark.
Posted: Thu Sep 11, 2008 6:19 am
by keyless
For future consideration:
Is there more access to the ssl dlls then just the encrypt and decrypt in Rev? can you pass proper openSSL commands and peramiters? -stream & -a would be very helpful.
Posted: Thu Sep 11, 2008 7:14 am
by Bernard
I believe the only way you can do that is using the 'shell' and 'open process' commands built into rev.
Posted: Sun Sep 14, 2008 1:24 am
by keyless
Thanks.
It's too bad, the DLL's to do such are right there.
Posted: Sun Sep 14, 2008 8:08 am
by Janschenkel
You could always file an enhancement request at
http://quality.runrev.com and ask the Rev team to expose more OpenSSL functions.
Explain what you would like to see extra and give them a compelling business case. Or contact them directly to see how much it would cost to extend if you really need it but it doesn't fit in with their current strategic plan.
Jan Schenkel.