These implementations are for demonstration purposes. They are less efficient than the implementations in the Python standard library.
Turns out TPM wasn't Microsoft being difficult.