Messages sent through the Nela protocol are digitally signed to ensure authenticity and integrity. The sender signs the message with a private key, and the recipient verifies it using the corresponding public key. This mechanism ensures that:
The message has not been altered during transit.
The message genuinely comes from the claimed sender.
Certificates are used to verify the sender's identity. Each sender provides a certificate in PEM format along with each message, which allows the recipient to validate the authenticity of the message.
Messages follow a JSON-based structure that includes information about the sender, receiver, content, and reference details for context.
{
"message": {
"title": "Hello World",
"body": "Nice to meet you",
"sender": "matthias@withnela.com",
"direct_receiver": "lou@withnela.com",
"all_receivers": ["lou@withnela.com", "clara@withnela.com"],
"conversation_ref": "b3222267-5e86-4a05-9f07-ead7c85bc580",
"message_ref": "cb97a34f-dadf-4579-9a55-485f1cc2c68c",
"handshake_ref": "851a8754-6887-4b3f-8553-fdd779d8baa4"
}
}
Nela Message Structure
The handshake mechanism guarantees that a message was deliberately transmitted by the sender and is genuinely present within their infrastructure. This process enables the receiver to authenticate the sender's identity and confirm that the message has not been fabricated or impersonated.
Sender: Send the message with a handshake_ref.
Receiver: Send a handshake request to the sender including the handshake_ref.
Receiver: Flag the message as valid (or drop otherwise) if it exists on the sender's infrastructure, ensuring that the sender address has not been manipulated.
Each message includes a digital signature (signature_base64) that is verified by the receiver using the public certificate.
The sender field is validated against the domain presented in the certificate to ensure consistency and guard against impersonation attacks.