IMO, the layer creating the plaintext shouldn't have to pad it for security that's the job of the TLS layer. the TLS library should be parameterized by a size range and any plaintext larger than the range would get chunked up to smaller pieces while anything smaller would be padded. The actual value of the range could then be left to be chosen by the caller since this has an impact not only in security but also in performance. IIRC this how things are done in MiTLS (https://mitls.org/)
-- Alexandre Anzala-Yamajako
_______________________________________________ TLS mailing list TLS@ietf.org https://www.ietf.org/mailman/listinfo/tls