Bitcoin Forum
May 27, 2024, 12:34:37 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [ANN] hecs.py: Encrypt text with bitcoin addresses  (Read 767 times)
ktofu (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
May 10, 2014, 06:32:36 PM
 #1

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
bitsmichel
Sr. Member
****
Offline Offline

Activity: 518
Merit: 250



View Profile
May 11, 2014, 07:32:16 AM
 #2

Interesting idea, I may hack a little with it today

bitsmichel
Sr. Member
****
Offline Offline

Activity: 518
Merit: 250



View Profile
May 11, 2014, 11:41:15 PM
 #3

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


ktofu (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
May 12, 2014, 06:21:43 AM
 #4

Using the pycoin library for ecdsa and address stuff.
bitsmichel
Sr. Member
****
Offline Offline

Activity: 518
Merit: 250



View Profile
May 13, 2014, 12:21:02 AM
 #5

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
 

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!