#NEWLINE# def sigcheck( a_key , a_hash_for_sig , a_sig ) : #NEWLINE# #INDENT# '\n    Returns True if a_key was used to generate a_sig from a_hash_for_sig;\n    False otherwise.\n    ' #NEWLINE# ( r , s ) = sigdecode_der ( a_key ) #NEWLINE# return ecdsa_verify ( generator_secp256k1 , a_key . public_pair ( ) , a_hash_for_sig , ( r , s ) )