()
| 144 | |
| 145 | |
| 146 | def test_ec_private_key(): |
| 147 | # https://tools.ietf.org/html/rfc7520#section-3.2 |
| 148 | obj = read_file_path("secp521r1-private.json") |
| 149 | key = ECKey.import_key(obj) |
| 150 | new_obj = key.as_dict(is_private=True) |
| 151 | assert new_obj["crv"] == obj["crv"] |
| 152 | assert base64_to_int(new_obj["x"]) == base64_to_int(obj["x"]) |
| 153 | assert base64_to_int(new_obj["y"]) == base64_to_int(obj["y"]) |
| 154 | assert base64_to_int(new_obj["d"]) == base64_to_int(obj["d"]) |
| 155 | |
| 156 | |
| 157 | def test_invalid_ec(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…