Best way for Encrypting / Decrypting files with XOJO

Hello guys,

While I found so many things about encryption so far I did not find anything except pgp that might have some issues, related to file encryption / decryption and specially to be able to do that with XOJO.

It should be able to be cross platform, Linux / Mac / Windows

Any advices, ideas ? Files are generally below 10 MB can it can be any tile.

Thanks.

Did you check CipherMBS class in MBS Xojo Encryption Plugin?

This includes AES 256 and Blowfish.

Perhaps the open-source M_Crypto library would work:

https://github.com/ktekinay/M_Crypto

We have a pure-xojo version of RC4: https://forum.xojo.com/13818-faster-encyrption-obscuration-than-rc4-for-large-24mb-15mb-file/p1#p110903

Hi Aurelian. Only one question and you are already thrown into the problems of encryption, i.e. cross-platform compatibility.

Even though I am not an expert, let me tell you about where things can go wrong:

  1. Some may interpret the maths differently. That is the worst case, but also the rarest one
  2. The result depends on the first value (i.e. the “salt value”) which may be different
  3. For Certificates and alike, the output file format is important

[quote=418987:@StphaneMons]Hi Aurelian. Only one question and you are already thrown into the problems of encryption, i.e. cross-platform compatibility.

Even though I am not an expert, let me tell you about where things can go wrong:

  1. Some may interpret the maths differently. That is the worst case, but also the rarest one
  2. The result depends on the first value (i.e. the “salt value”) which may be different
  3. For Certificates and alike, the output file format is important[/quote]
    Well considering the fact that I need to secure the documents that will be stored in a public place maybe then yes, I do need to look into this and as the previous posts are saying they do have cross platform compatibility so I guess I will have to do some tests .

thanks for your points.

Hi Michael , so far as far as I remember RC4 is not quite safe so looking into something in the range of AES 256 and up.

Thanks.

[quote=418908:@Paul Lefebvre]Perhaps the open-source M_Crypto library would work:

https://github.com/ktekinay/M_Crypto[/quote]
Thanks Paul, I’ll have a look on that as well, so far from what I see all are handling strings and small text, nothing so far about entire files. so I will have to do some tests .

[quote=418896:@Christian Schmitz]Did you check CipherMBS class in MBS Xojo Encryption Plugin?

This includes AES 256 and Blowfish.[/quote]
Hi Christian,

How do you handle the openssl ? do you have something with declares or using some kind of terminal calls ? I saw this URL but does not mention about the encryption level .

Is this included in the Full MBS plugins package or it is separate package?

Thanks.

The project includes tests that demonstrate how you’d do this. In short, read the file in blocks divisible by 16, encrypt those, and write them back out.

Thanks Kem,

Looking on that now.

You can just download our encryption plugin and try it.
No declared needed.

Storing documents containing sensitive data in a public area is like putting a target on your back!

Encryption should be your last line of defense, not your only line defense and preferably it should be done outside your application to ensure that anyone who gets hold of your application can not just hack the program to access the data.