Encryption

diaspora* wraps the Salmon Magic Envelope into a simple JSON structure, to encrypt private messages.

Encrypted Magic Envelope

JSON structure

{
  "aes_key": "...",
  "encrypted_magic_envelope": "..."
}
Key Description
aes_key The AES Key JSON encrypted with the recipients public key using RSA and then base64 encoded.
encrypted_magic_envelope The Magic Envelope encrypted with the aes_key using AES-256-CBC and then base64 encoded.

AES Key JSON structure

{
  "key": "...",
  "iv": "..."
}
Key Description
key The base64 encoded AES key.
iv The base64 encoded AES iv.

Both key and iv have to be suitable for AES-256-CBC.

Additional information and specifications