(self)
| 397 | ) |
| 398 | |
| 399 | def test_info_mismatch_fails(self): |
| 400 | suite = Suite(KEM.X25519, KDF.HKDF_SHA256, AEAD.AES_128_GCM) |
| 401 | |
| 402 | sk_r = x25519.X25519PrivateKey.generate() |
| 403 | pk_r = sk_r.public_key() |
| 404 | |
| 405 | ciphertext = suite.encrypt(b"Secret", pk_r, info=b"sender info") |
| 406 | |
| 407 | with pytest.raises(InvalidTag): |
| 408 | suite.decrypt(ciphertext, sk_r, info=b"different info") |
| 409 | |
| 410 | def test_ciphertext_format(self): |
| 411 | suite = Suite(KEM.X25519, KDF.HKDF_SHA256, AEAD.AES_128_GCM) |
nothing calls this directly
no test coverage detected