(backend)
| 82 | skip_message="Requires a backend without ML-DSA support", |
| 83 | ) |
| 84 | def test_mldsa_unsupported(backend): |
| 85 | with raises_unsupported_algorithm( |
| 86 | _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM |
| 87 | ): |
| 88 | MLDSA44PublicKey.from_public_bytes(b"0" * 1312) |
| 89 | |
| 90 | with raises_unsupported_algorithm( |
| 91 | _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM |
| 92 | ): |
| 93 | MLDSA44PrivateKey.from_seed_bytes(b"0" * 32) |
| 94 | |
| 95 | with raises_unsupported_algorithm( |
| 96 | _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM |
| 97 | ): |
| 98 | MLDSA44PrivateKey.generate() |
| 99 | |
| 100 | with raises_unsupported_algorithm( |
| 101 | _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM |
| 102 | ): |
| 103 | MLDSA65PublicKey.from_public_bytes(b"0" * 1952) |
| 104 | |
| 105 | with raises_unsupported_algorithm( |
| 106 | _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM |
| 107 | ): |
| 108 | MLDSA65PrivateKey.from_seed_bytes(b"0" * 32) |
| 109 | |
| 110 | with raises_unsupported_algorithm( |
| 111 | _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM |
| 112 | ): |
| 113 | MLDSA65PrivateKey.generate() |
| 114 | |
| 115 | with raises_unsupported_algorithm( |
| 116 | _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM |
| 117 | ): |
| 118 | MLDSA87PublicKey.from_public_bytes(b"0" * 2592) |
| 119 | |
| 120 | with raises_unsupported_algorithm( |
| 121 | _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM |
| 122 | ): |
| 123 | MLDSA87PrivateKey.from_seed_bytes(b"0" * 32) |
| 124 | |
| 125 | with raises_unsupported_algorithm( |
| 126 | _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM |
| 127 | ): |
| 128 | MLDSA87PrivateKey.generate() |
| 129 | |
| 130 | |
| 131 | @pytest.mark.supported( |
nothing calls this directly
no test coverage detected