it is so horrible, i have literally spent 8 hours cleaning this shit up because it's so goddamned complicated and back and forwards and hard coded and bullshit
i'm commenting out all of the wrong test vectors in my version of it and shifting the actual common functionality to the central implementation i have built for doing signing, verification and ECDH in one place to eliminate this kind of bullshit error