If you can be reasonably sure that an attacker will not be able to get access to the hardware/software, you could easily obfuscate the data so that it's hard to decipher.
Note that this technically security through obscurity; it is only safe as long as an attacker doesn't have the code.
The sender:
- Uses the pseudo-random number generator of your IOT platform to generate a specified number of bytes.
- Compresses the extended message using whatever compression method your platform makes available.
- Removes the header that compression programs usually prepend to the output. (this is the obfuscation bit; compression headers are a dead giveaway)
- Sends it.
The receiver;
- Receives the message.
- Adds the header back to the compressed data.
- Uncompresses it.
- Discards the specified number of speudo-random bytes from the beginning of the message.
An example in Python 3:
In [1]: from os import urandom
In [2]: salt = urandom(8)
In [3]: salt
Out[3]: b'Wa=\xd4\xc0\x15^\xef'
In [4]: message = "This is a test. Since I am not sure what the real message should be.".encode('utf-8')
...:
In [5]: combination = salt + message
In [6]: import zlib
In [7]: out = zlib.compress(combination)
In [8]: to_send = out[2:] # Cut off the header
In [9]: to_send # This is what is sent out.
Out[9]: b"\x0bO\xb4\xbdr@4\xee}HFf\xb1\x02\x10%*\x94\xa4\x16\x97\xe8)\x04g\xe6%\xa7*x*$\xe6*\xe4\xe5\x97(\x14\x97\x16\xa5*\x94g$\x96(\x94d\xa4*\x14\xa5&\xe6(\xe4\xa6\x16\x17'\xa6\xa7*\x14g\xe4\x97\xe6\xa4($\xa5\xea\x01\x00<z\x1b\x8a"
In [10]: zlib.decompress(b'x\x9c' + to_send)
Out[10]: b'Wa=\xd4\xc0\x15^\xefThis is a test. Since I am not sure what the real message should be.'
In [11]: zlib.decompress(b'x\x9c' + to_send)[8:]
Out[11]: b'This is a test. Since I am not sure what the real message should be.'
As you can see, the message that is sent does not look like the original message!
Note that because of the pseudo-random salt, the compressed string changes a lot even when you send the same message multiple times.