(backend)
| 139 | |
| 140 | |
| 141 | def test_derive_point_at_infinity(backend): |
| 142 | curve = ec.SECP256R1() |
| 143 | _skip_curve_unsupported(backend, curve) |
| 144 | # order of the curve |
| 145 | q = 0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551 |
| 146 | # BoringSSL rejects infinity points before it ever gets to us, so it |
| 147 | # uses a more generic error message. |
| 148 | match = ( |
| 149 | "infinity" |
| 150 | if not ( |
| 151 | rust_openssl.CRYPTOGRAPHY_IS_BORINGSSL |
| 152 | or rust_openssl.CRYPTOGRAPHY_IS_AWSLC |
| 153 | ) |
| 154 | else "Invalid" |
| 155 | ) |
| 156 | with pytest.raises(ValueError, match=match): |
| 157 | ec.derive_private_key(q, ec.SECP256R1()) |
| 158 | |
| 159 | |
| 160 | def test_derive_point_invalid_key(backend): |
nothing calls this directly
no test coverage detected