this is much more straightforward to read: https://github.com/arianvp/webauthn-minimal/blob/main/webauthn/crypto.go