We now allow sending encrypted message payloads

This commit is contained in:
geeksville 2020-05-09 19:06:45 -07:00
parent f775ebe369
commit 5e2df6c998
2 changed files with 13 additions and 13 deletions

View file

@ -15,8 +15,8 @@
# note: this payload length is ONLY the bytes that are sent inside of the radiohead packet
*Data.payload max_size:251
# 128 bit psk key (we don't use 256 bit yet because we want to keep our QR code small)
*ChannelSettings.psk max_size:16 fixed_length:true
# 256 bit or 128 bit psk key
*ChannelSettings.psk max_size:32
*ChannelSettings.name max_size:12
# The device code doesn't use this legacy field - though the apps still might

View file

@ -229,21 +229,22 @@ message MeshPacket {
int32 to = 2;
/**
Internally to the mesh radios we will route SubPackets encrypted per
Internally to the mesh radios we will route SubPackets encrypted per
docs/software/crypto.md. However, when a particular node has the correct
key to decode a particular packet, it will decode the payload into a SubPacket
protobuf structure.
protobuf structure.
Software outside of the device nodes will never encounter a packet where "decoded"
is not populated (i.e. any encryption/decryption happens before reaching the applications)
Software outside of the device nodes will never encounter a packet where
"decoded" is not populated (i.e. any encryption/decryption happens before
reaching the applications)
The numeric IDs for these fields were selected to keep backwards compatibility with old
applications.
The numeric IDs for these fields were selected to keep backwards compatibility
with old applications.
*/
oneof payload {
oneof payload {
SubPacket decoded = 3;
bytes encrypted = 8;
}
}
/// The time this message was received by the esp32 (secs since 1970). Note:
/// this field is _never_ sent on the radio link itself (to save space) Times
@ -309,9 +310,8 @@ message ChannelSettings {
// int32 spread_factor = 6;
// int32 coding_rate = 7;
/// A simple preshared key for now for crypto. At first I'm using 128 bit (16
/// byte) block for the Speck crypto but for beta we'll want something more
/// carefully thought through. I want to keep the QR code small
/// A simple preshared key for now for crypto. Must be either 0 bytes (no
/// crypto), 16 bytes (AES128), or 32 bytes (AES256)
bytes psk = 4;
/// A SHORT name that will be packed into the URL. Less than 12 bytes.