Author

Topic: [ANN] hecs.py: Encrypt text with bitcoin addresses (Read 801 times)

sr. member
Activity: 518
Merit: 250
I was thinking about it today, is it not a higher security risk?   I mean if someone has a lot of your encrypted messages and finds the key, he/she would also be able to access your money  Huh
 
newbie
Activity: 6
Merit: 0
Using the pycoin library for ecdsa and address stuff.
sr. member
Activity: 518
Merit: 250
Which wallet software you using?

To get the pubkey works well:

Quote
#!/usr/bin/env python

import binascii
import os
import re
import sys
import requests

def search_for_pubkey(address):

    response = requests.get('https://blockchain.info/q/pubkeyaddr/' + address)

    pubkey_hex = response.text
    if len(pubkey_hex) < 16:
        raise Exception("Pubkey not found")

    return pubkey_hex

sr. member
Activity: 518
Merit: 250
Interesting idea, I may hack a little with it today
newbie
Activity: 6
Merit: 0
Hi all,

I made a GUI for encrypting messages with bitcoin addresses.

 - Source at https://github.com/eudemonia-research/hec
 - Screenshots at http://imgur.com/a/iOpyP
 - Uses the blockchain.info API to get the public key. Note that they don't have keys from early transactions for some reason
 - the session key is encrypted with the public key using the EC group operation
 - the message is encrypted with aes in counter mode
 - sha256 for the hmac
 - tested with python3 only

Plans:

 - custom encryption options
 - cxfreeze an exe, so my friends who don't wanna learn to use linux can play along

Installation:

It's on pypi. It depends on PyQt5, pycoin, and pycrypto. For some reason I had to install pycoin manually (no idea why).
Install with:
Code:
pip install hec
run with
Code:
hecs.py

Screenshot:

https://i.imgur.com/QpGuODl.png

feedback and suggestions welcome

- ktofu
Jump to: