12000 SLOC for full TCG TPM 2.0 protocol spefication in three weeks (with about 1000 SLOC of initial code I made year ago).
This includes also tpm2sh. The protocol crate is only ~7000 SLOC.
Now that tpm2_protocol is "complete", I'd believe that it will also slim down over time because first version always the fattest.
I think tpm2_protocol would be the right basis for Linux Rust support for TPM2 but it definitely must mature some time so that low-hanging bugs etc are fixed.
tpm2sh is still quite immature but it is just a test program :-) It has quite a lot of crypto code but use that your own responsibility. I've added that to help with testing now meant for use in production.
#linux #kernel #tpm #rust