Removed pycrypto code and used the functions in bitcoinlib.