This particular bug intertwines with a half-dozen interconnected issues. I did my best to summarize them here:
https://github.com/pyca/cryptography/issues/12080#issuecomment-2510243984 There are three or four proposed patches, and even more discussion. I think maybe one patch stood out as "best", not sure. -- linas