File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,33 +71,6 @@ def test_bidirectional_first_messages_roundtrip(suite):
7171 assert alice_session .decrypt (bob_packet ) == b"hello alice"
7272
7373
74- @pytest .mark .parametrize ("suite" , [AeadSuite .AES_GCM_SIV , AeadSuite .CHACHA20_POLY1305 ])
75- def test_public_factory_bidirectional_roundtrip (suite ):
76- alice = Identity .generate ("alice" )
77- bob = Identity .generate ("bob" )
78- alice_session = SessionFactory .initiator (
79- local_identity = alice ,
80- remote_name = bob .name ,
81- remote_x25519_public_key = bob .x25519_public_bytes (),
82- suite = suite ,
83- )
84- bob_session = SessionFactory .responder (
85- local_identity = bob ,
86- remote_name = alice .name ,
87- remote_x25519_public_key = alice .x25519_public_bytes (),
88- peer_ephemeral_public_key = alice_session .local_ephemeral_public_bytes ,
89- suite = suite ,
90- )
91-
92- assert alice_session .root_key == bob_session .root_key
93-
94- alice_packet = alice_session .encrypt (b"public hello bob" )
95- bob_packet = bob_session .encrypt (b"public hello alice" )
96-
97- assert bob_session .decrypt (alice_packet ) == b"public hello bob"
98- assert alice_session .decrypt (bob_packet ) == b"public hello alice"
99-
100-
10174@pytest .mark .parametrize ("suite" , [AeadSuite .AES_GCM_SIV , AeadSuite .CHACHA20_POLY1305 ])
10275def test_tampered_ciphertext_does_not_consume_sequence_number (suite ):
10376 alice = Identity .generate ("alice" )
You can’t perform that action at this time.
0 commit comments