Tell me more ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

I have a use case where I need to encrypt some text in the browser using javascript. Only the encrypted text will be stored on the server.

The user should then be able to take the encrypted result and decrypt it with gpg on the command line. I want to use gpg as it's easily available and the AES appears to support iteration on passphrase hashing.

I'm hoping to use AES, however I can't what iteration count or salt gpg uses.

For example this site allows you to set parameters for AES decryption using Javascript. http://cheeso.members.winisp.net/AES-Encryption.htm

Would anyone know what parameters to use to be compatible with gpg ?

share|improve this question
1  
Just a note: with your approach of encrypting at the client, your users still have to trust the server to send the right JavaScript, and not a version which gives the key to the server, too. (But they don't have to worry that someone will later force you to give out the keys, if you don't have them then.) – PaĆ­lo Ebermann Aug 31 '11 at 13:38

1 Answer

GnuPG follows the OpenPGP format, which is a protocol in its own right -- it uses AES (among other algorithms) but is more complex than "just AES with the right parameters".

There is at least one OpenPGP implementation in Javascript (I have not tried it, though).

share|improve this answer
The OpenPGP implementation in Javascript seems to only support asymmetric encryption. – Ian Purton Sep 1 '11 at 11:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.