project-chip / rs-matter

Rust implementation of the Matter protocol. Status: Experimental
Apache License 2.0
310 stars 43 forks source link

Lower the CERT TLV size to the max specified in the spec #134

Closed ivmarkov closed 6 months ago

ivmarkov commented 6 months ago

We have been overly pessimistic in terms of expected certificates TLV size. The spec is clear the certs should be smaller than 400 bytes, so I think this is safe (and Matter provisioning with Google passes fine).

This saves in total ~ 16K, as certs are everywhere (fabrics and sessions' nocs).

=============================

The next change to shortly follow is also a relatively low hanging fruit (stuff in the QR code generation).

The changes that will follow afterwards though are much more obtrusive (as in making the exchanges to share a single TX/RX buffer whenever possible). But exchange cleanup is due anyway (and a bit necessary so as to address retransmissions and to make sure we are behaving when the user drops an unfinished exchange in the middle of the transmission due to errors).