`isOnCurve` doesn't seem to be used anywhere, but you should make sure that `p` is actually `p256` in this change