[CryptoAPI] How to use a binary key file

[CryptoAPI] How to use a binary key file

  
Forge Component
(4)
Published on 2015-11-29 by Ricardo Silva
4 votes
Published on 2015-11-29 by Ricardo Silva
I need to decrypt a string using a binary key file. How is that done?
Hello Gerry,

Please note that this extension is not a general purpose encryption library. It attempts to provide a couple of primitives which work well together and have good defaults for encryption, but it is not possible to decrypt all the possible encryption schemas, since you can't change the algorithms which are used.

That being said, I do provide a set of primitives for encryption and decryption with a binary data key. Note that these will take binary data with exactly 256 bits (32 bytes) to serve as key. If you have a file with 32 bytes corresponding to an AES key, you can use it to encrypt / decrypt using this extension.

You can either upload the file using the upload widget or you can save it somewhere on the disk and access it using the Filesystem extension.

Also note that this extension does absolutely nothing to keep the key a secret, so that particular problem will have to be tackled by the people creating the applications which use it. For example, instead of having a 32 byte file with the key, you can encrypt those 32 bytes (using the Encrypt action) and then ask for the password to unlock that key.

I'm not sure exactly what are your requirements, but if you can elaborate a bit more maybe I can be more helpful.
I'm trying to 1-click publish the ardoCrypto extension, but it will not install becuase the java compile fails. My Outsystems is .NET. Is Java needed?
You can publish the extension directly via Service Center and you shouldn't have that issue.

The Java is not needed for .NET installations, so if you really want to publish the extension from Integration Studio, it should be safe to say that the extension is .NET only.
I did so and got it installed. When I try to use KDecrypt  I get error Arithmetic operation resulted in an overflow.
Can you provide an example of what you're trying to do, including the eSpace and the file used as key ?