1. A method comprises: generating, by a first device, a self-validating message by: creating a master key; using the master key and a secret function to create a message encryption key; encrypting a message using the message encryption key to produce an encrypted message; encrypting the master key using a public key of a second device to produce an encrypted master key; and including a message authentication code of the first device in the self-validating message; receiving, by a second device, the self-validating message; and decoding, by the second device, the self-validating message by: verifying the message authentication code of the first device; and when the message authentication code of the first device is verified: decrypting the encrypted master key using a private key of the second device to recover the master key; using the master key and the secret function to create the message encryption key; and decrypting the encrypted message using the message encryption key to recover the message.