diaspora_federation/docs/federation/encryption.md
2017-01-15 04:09:02 +01:00

1.3 KiB

title
Encryption

diaspora* wraps the Salmon [Magic Envelope][magicsig] 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][magicsig] 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

  • [Magic Envelope][magicsig]

[magicsig]: {{ site.baseurl }}/federation/magicsig.html#magic-envelope