IConv ENCRYPT_FORMAT (OpenInsight 32-bit)
At 26 JUL 2012 02:52:35PM ray chan wrote:
Hello all,
We have been experimenting with IConv/OConv "ENCRYPT_FORMAT" to encrypt images that are stored outside of the OI database. With images that are only a few kB it seems to work quickly enough, but once we deal with larger images it can take several minutes to convert.
Does anyone know of a better way to encrypt large amounts of data using functions built into OI?
In the meantime, I went searching online and found a command line program called "crypt" that I've been able to call from OI and it seems to work very well encrypting and decrypting larger files (multiple megabytes) in less than a second. If anyone has any thoughts on the pros or cons of using that program, please feel free to share!
Thanks,
Ray Chan
At 27 JUL 2012 07:15AM mike ruane wrote:
Ray-
I don't think the ENCRYPT_FORMAT was intended to encrypt images, only 'regular' data stored in Linear Hash files.
I'm sure others will pop in with info about crypt; I have no experience with it.
Mike
At 27 JUL 2012 11:57AM Ray Chan wrote:
Hi Mike,
Thanks for your reply. Now we know :smile:. Prior to playing with ENCRYPT_FORMAT, we were using "VB". Since moving to OI 8.0.8, however, we decided to looked at ENCRYPT_FORMAT as maybe this is a more appropriate function for us to use. (It does have the work "ENCRYPT") After running a big TIFF files through it, however, it was really intolerable – Encrypting was slower than "VB" and UnEncrypting was so slow, you would think the system was "stuck". From a performance point of view, it was must slower than "VB".
Looking for something better, we found a command line program called "crypt" that we can call from OI and it seems to work very well encrypting and decrypting larger files. Amazingly super fast with the same TIFF file.
However, we're no experts in using open-source and wondering if you or anyone know anything about this open-source Crypt program, and using this as part of our OI app? It seems to work great and would make our system more useful.
Thought, Comments appreciated.
Ray Chan
P.S. I might repost this on the other side if there are no response here.
At 27 JUL 2012 12:01PM bshumsky wrote:
Hi Mike,
Thanks for your reply. Now we know :smile:. Prior to playing with ENCRYPT_FORMAT, we were using "VB". Since moving to OI 8.0.8, however, we decided to looked at ENCRYPT_FORMAT as maybe this is a more appropriate function for us to use. (It does have the work "ENCRYPT") After running a big TIFF files through it, however, it was really intolerable – Encrypting was slower than "VB" and UnEncrypting was so slow, you would think the system was "stuck". From a performance point of view, it was must slower than "VB".
Looking for something better, we found a command line program called "crypt" that we can call from OI and it seems to work very well encrypting and decrypting larger files. Amazingly super fast with the same TIFF file.
However, we're no experts in using open-source and wondering if you or anyone know anything about this open-source Crypt program, and using this as part of our OI app? It seems to work great and would make our system more useful.
Thought, Comments appreciated.
Ray Chan
P.S. I might repost this on the other side if there are no response here.
Hi, Ray. Is the intent to actually _encrypt_ the data (so that it's not readable by others), or merely compress them in size, or make them non-binary, or…?
Making the appropriate suggestion depends on figuring out the goal you're striving for.
- Bryan Shumsky
At 27 JUL 2012 12:04PM Ray Chan wrote:
Hi Bryan,
We want to encrypt. Of course, if it compresses as well that's okay too.
Ray Chan
At 27 JUL 2012 12:20PM bshumsky wrote:
Hi Bryan,
We want to encrypt. Of course, if it compresses as well that's okay too.
Ray Chan
Hi, Ray. Oh, ok, since you had used the VB Iconv previously (not really known for strong encryption) I thought maybe you were just trying to "squeeze" the file, and I might have some easy suggestions for doing that in the newer versions (with some .NET utilities we've included).
If you really want to encrypt it, though, it'd be a little more complex, but you still might want to look for .NET assemblies that do what you want and then use RevDotNet to access them. For example, the Ionic Zip library includes the ability to password protect and encrypt files that it zips up, and using that library from RevDotNet isn't that difficult. Your code would look something like this (NOTE: this is untested, but close to what we already use in the ZIP functionality for UTILITY_DOTNET):
oNet = startDotNet("")
if get_status(errCode) then
do some error handling hereend
oiLocn = drive()
if oiLocn[-1,1] <> "\" then oiLocn := "\"
x = set_property.net(oNet, "AssemblyName", oiLocn:"DOTNETZIP\UTILS\Ionic.Zip.dll")
if get_status(errCode) then
do some error handling hereend
oZip = create_class.net(oNet, "Ionic.Zip.ZipFile")
if get_status(errcode) then
do some error handling hereend
x = send_message.net(oZip, "Initialize", zipPath)
if get_status(errcode) then
do some error handling hereend
x = send_message.net(oZip, "Password", pwd) ;* put a password on the next file that we add
if get_status(errcode) then
do some error handling hereend
x = send_message.net(oZip, "AddFile", fileName, "")
if get_status(errcode) then
do some error handling hereend
x = send_message.net(oZip, "Save")
if get_status(errcode) then
do some error handling hereend
x = send_message.net(oZip, "Dispose")
free_class.net()
If you didn't want to use the standard encryption that Zip files normally use, they even have options that let you change to AES encryption instead.
Hope that helps,
- Bryan Shumsky
At 27 JUL 2012 04:01PM Ray Chan wrote:
Maybe I should know this, but is the .NET stuff available only in OI 9?
Thanks,
Ray Chan
At 27 JUL 2012 04:04PM bshumsky wrote:
Maybe I should know this, but is the .NET stuff available only in OI 9?
Thanks,
Ray Chan
Hi, Ray. Yes, I think so; I'd certainly recommend OI 9.3 and above for the .NET stuff.
- Bryan Shumsky
At 27 JUL 2012 04:19PM Ray Chan wrote:
HI Bryan and all,
Thanks. We just upgraded fairly recently to OI 8.08, and arn't ready to move to OI 9 just yet.
We will keep what you suggested when we do, but meanwhile we are living in an OI 8 world.
Meanwhile, any thoughts on the open-source crypt routine that seems to work quick well in OI 8.
Ray Chan
At 31 JUL 2012 06:09AM Carl Pates wrote:
Hi Ray,
<2cents>
1) The Crypt appears to be using the RC2 encryption algorithm, which is not considered to be that secure these days. I don't know how important this is to you - modern routines generally use the AES cipher with something like a 256-bit key.
2) The password has to be passed on the command line in plaintext, so it's possible to see this in task manager or another similar tool while the program runs.
3) It uses the GPL license so you have to make sure you're OK with that when you distribute the program (and I'm not a lawyer so I don't know the ins and outs… but you may have to put a notice in somewhere or something IIRC)
</2cents>
Regards
Carl
World leaders in all things RevSoft
At 02 AUG 2012 12:15PM Ray Chan wrote:
Hey Carl,
As always I appreciate your input. For now, Crypt is an improvement over the ENCRyPT_FORMAT and the VB thingy we were using to "encrypt" imported images and documents into our app. The speed in Crypt is amazingly fast compared to what we were doing and being that we're using OI 808 our options may be more limited until we upgrade to OI 9.
Don't know if you remember, but when we upgraded from OI7 to OI8 we had to make some changes to our app which took us awhile and right now we're resting and enjoying our work for a little bit before we move up the next hill.
Peace,
Ray
At 16 AUG 2012 08:17PM ray chan wrote:
When we use the Utility("RUNWIN",…) function to call the crypt.exe program, it works sometimes, but occasionally it appears to not fully encrypt or decrypt the files. We have used another function (SRP_Run_Command) to call crypt.exe and had no problems at all except that we would see a command prompt flash on our screen. We switched to the Utility function because we set the mode to "minimize" so that we don't see a command prompt flash, but ran into an issue with the files being corrupted occasionally.
Does anybody know of any limitations of using the Utility function? At first, I thought it might not be giving any wait time to the crypt.exe program, but the problem persisted after I put a Delay(3) immediately after the Utility statement.
Any suggestions or workarounds would be appreciated.
Thanks,
Ray Chan
At 17 AUG 2012 03:05AM Warren Auyong wrote:
Maybe a Flush statement might help?
At 19 AUG 2012 07:25PM Barry Stevens wrote:
….. UTILITY_DOTNET ?, can we get this into the help under basic+ commands, forgot it existed.
At 20 AUG 2012 06:21PM Ray Chan wrote:
Is UTILITY_DOTNET available under OI 8.08?
Ray Chan
At 24 AUG 2012 02:13PM jared bratu wrote:
HI Ray, just to finish this thread. No Utility_DOTNET isn't available for OpenInsight 8.x. It is part of the DotNet features in OpenInsight 9.x that allow OpenInsight to consume .NET assemblies (i.e. new equivalent of COM controls).