smartdevicelink / protocol_spec

Describes the communication protocol between a smartdevicelink enabled head unit and mobile application
https://smartdevicelink.github.io/protocol_spec/
BSD 3-Clause "New" or "Revised" License
14 stars 13 forks source link

Encrypted payloads should not exceed 16384 bytes to match TLS record standard #8

Open mrapitis opened 7 years ago

mrapitis commented 7 years ago

To ensure compatibility with transport layer security, we should make note when using encrypted protocol messages, the payload should not exceed 16384 bytes to match the maximum available in a standard TLS record. Please see link below for details as well as a pertinent copy / pasted snippet.

https://hpbn.co/transport-layer-security-tls/

Maximum TLS record size is 16 KB Each record contains a 5-byte header, a MAC (up to 20 bytes for SSLv3, TLS 1.0, TLS 1.1, and up to 32 bytes for TLS 1.2), and padding if a block cipher is used. To decrypt and verify the record, the entire record must be available.