#NEWLINE# def test_dh_public_key( ) : #NEWLINE# #INDENT# ( p1 , g1 , a ) = dh_private_key ( digit = 100 ) #NEWLINE# ( p2 , g2 , ga ) = dh_public_key ( ( p1 , g1 , a ) ) #NEWLINE# assert ( p1 == p2 ) #NEWLINE# assert ( g1 == g2 ) #NEWLINE# assert ( ga == pow ( g1 , a , p1 ) )