#NEWLINE# def decrypt_message( public_key , encrypted_message ) : #NEWLINE# #INDENT# 'Decrypts the message given a public key and an encrypted message.\n    User needs to control the private key via bitcoind.\n    ' #NEWLINE# wif = get_private_key_from_address ( public_key ) #NEWLINE# secret_exponent = wif_to_secret_exponent ( wif ) #NEWLINE# private_key = PrivKey ( secret_exponent ) #NEWLINE# return private_key . decrypt ( b64decode ( encrypted_message ) )