#NEWLINE# def test_sign_verify( self ) : #NEWLINE# #INDENT# def do_test( secret_exponent , val_list ) : #NEWLINE# #INDENT# public_point = public_pair_for_secret_exponent ( generator_secp256k1 , secret_exponent ) #NEWLINE# for v in val_list : #NEWLINE# #INDENT# signature = sign ( generator_secp256k1 , secret_exponent , v ) #NEWLINE# r = verify ( generator_secp256k1 , public_point , v , signature ) #NEWLINE# assert ( r == True ) #NEWLINE# signature = ( signature [ 0 ] , ( signature [ 1 ] + 1 ) ) #NEWLINE# r = verify ( generator_secp256k1 , public_point , v , signature ) #NEWLINE# assert ( r == False ) #NEWLINE# #UNINDENT# #UNINDENT# val_list = [ 100 , 20000 , 30000000 , 400000000000 , 50000000000000000 , 60000000000000000000000 ] #NEWLINE# do_test ( 7719472615821079694904732333912527190217998977709370935963838933860875309329 , val_list ) #NEWLINE# do_test ( 100353144005674036033761520340862853472833986710221822167529906140191379021277 , val_list ) #NEWLINE# do_test ( 32551295926986517154262758427068158833116078882158551683963448855105617834002 , val_list )