Solvek
Solvek

Reputation: 5360

I need to decrypt file encrypted by gpg (in command line)

I have a file, which I encrypted on PC from command line using aes256 and a passphrase.

gpg --cipher-algo AES256 --output testfile.gpg --symmetric testfile.txt

Now I need to decrypt this file from my android application.

I had expiarance with decryption data (encrypted with aes256) in android before but then I had to provide KEY (256 bit) and a salt (128 bit) to decrypt.

How can I convert my passphrase to key/salt pair? Or how having key/salt pair I can encrypt a file using GPG (and using the same key/salt to decrypt later)?

Upvotes: 0

Views: 2131

Answers (1)

Solvek
Solvek

Reputation: 5360

I decided to use AESCrypt app for encryption and then I can decrypt this file on android side using standard android API (no libraries needed).

AES crypt has documented its file format. They also has open source implementation for java which allowed me to write my code.

Upvotes: 1

Related Questions