2

With hybrid encryption, a symmetric key is generated and used to encrypt the plaintext. The symmetric key is then encrypted with a public key. The payload consists of the ciphertext plus the encrypted symmetric key.

I've come accross a number of different methods for storing the ciphertext+encrypted key payload. one option is to use Json key/values for the base64 encoded ciphertext and encrypted key. Another option is to simply concatenation the ciphertext and encrypted key. PGP also uses a hybrid encryption and has its own file format.

Is there any standard data/file format for storing the result of a hybrid encryption operation besides PGP? It seems like such a format would encourage interoperability.

2

Yes, there are other standards, including the original RSA PKCS#7, its successor CMS (sometimes also referred to as PKCS#7), and the related S/MIME which is used in email.

However OpenPGP is more "general purpose" than any of these and is designed with useful features in mind such as sophisticated key management, configurable ciphers, and compression, among other things. You aren't going to find anything much more general purpose than that.

  • See also JSON Web Encryption (JSE) and JSON Web Signature (JWS), respectively RFC 7516 and RFC 7515 for some examples of structure to store all cryptographic materials. – Patrick Mevzek May 30 '18 at 1:32
  • CMS/PKCS#7 is pretty much what I was looking for. Thanks! – freb May 30 '18 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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