Question

I am searching for a way to encrypt a binary file and decrypt the file (probably with javacode) later to make use of it. I only want to decrypt it in Java itself because if it's get decrypted on my local drive, the security is gone...

Is this possible with bouncycastle? Is bouncycastle api hard to work with? (I know java basics) Does it need to be decrypted if you want to make use of the file?

Was it helpful?

Solution

Strangely formulated question but:

  • yes of course you can encrypt/decrypt data in java
  • yes bouncy castle can do it but you can also do it without bouncy castle
  • bouncy castle is an awesome library but can be rather complex to work with
  • yes you can perform the encryption/decryption entirely in memory though you should consider whether or not your swap is encrypted as well, otherwise it won't matter

Do you want PBE (password-based encryption)? I would assume so otherwise you need to consider other aspects like how/where to save the keys.

In short: security is hard.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top