Welcome, Guest. Please login or register.

Author Topic: Bitseal - a Bitmessage client for Android  (Read 53483 times)

JonathanCoe

  • Full Member
  • ***
  • Posts: 178
  • Karma: +26/-0
    • View Profile
Bitseal - a Bitmessage client for Android
« on: September 29, 2014, 12:39:28 PM »
I'm pleased to announce that the beta code of Bitseal, an Android client for Bitmessage, is now available.

      

Github:      
https://github.com/JonathanCoe/bitseal
https://github.com/JonathanCoe/bitseal-tests
https://github.com/JonathanCoe/bitseal-server

Screenshots:   
https://imgur.com/a/utC00

Working features:
   - Sending messages
   - Receiving messages
   - QR codes for addresses
   - Address Book
   - Import addresses
   - Export addresses
   - Choose which servers to use (including your own)


Roadmap for development (subject to change):
   - Update for Bitmessage Protocol Version 3
   - Lite client message retrieval using prefix filters (credit to Peter Todd for suggesting this)
   - Local encryption of the database, using SQLCipher
   - SSL for connections between clients and servers
   - POW implemented in C or C++ via the Android NDK
   - Support for broadcasts
   - Refresh the UI


Notes:

- Bitseal is not ready for widespread use yet. A full release is planned once lite client message retrieval is implemented. The app will be available on the Google Play store once this is done.

- Bitseal is free, open source software, released under the Gnu General Public License Version 3.

- Some parts of Bitseal include, are based on, or are reliant upon software written by others, including Jonathan Warren, Sebastian Schmidt, Tim Roes, Roberto Tyley, the bitcoinj developers, and the Bouncy Castle developers. This is noted in the source code where applicable.

- I have set up a few default servers which can be used for testing purposes. Anyone is free to set up and use their own. The server application is simply a slightly modified copy of PyBitmessage.

- The development of Bitseal has been a large project, taking many months of work. I'm doing it on a purely non-profit basis. Bitcoin donations are very gratefully received: 1ALTrxJ3Yn3Rc85Uf467u3ZcpHCzx4jDAT

« Last Edit: January 05, 2015, 07:18:01 AM by JonathanCoe »
My address: BM-NBdhY8vpWJVL2YocA2Gfjf7eVoZAgbEs

Thomas

  • Sr. Member
  • ****
  • Posts: 253
  • Karma: +28/-0
    • View Profile
    • bitmessaged is a bitmessage daemon (node) with an open plugin interface written in C++
Re: Bitseal - a Bitmessage client for Android
« Reply #1 on: September 29, 2014, 02:34:46 PM »
Great job!
What protocol do you use between the server and the app?
I've a C++ implemented bitmessage daemon with a plugin interface. Maybe I could make a plugin to support your android app.

JonathanCoe

  • Full Member
  • ***
  • Posts: 178
  • Karma: +26/-0
    • View Profile
Re: Bitseal - a Bitmessage client for Android
« Reply #2 on: September 29, 2014, 05:02:31 PM »
Thanks Thomas  :)

The communication between the server and the app is done over XMLRPC, using Android code written by Tim Roes (https://github.com/timroes/aXMLRPC). The standard PyBitmessage API uses XMLRPC, so it's basically been inherited from that.

If you'd be interested in creating a plugin for your bitmessage daemon that would be brilliant. I'd be happy to work on any adjustments that might be required to do so.

My address: BM-NBdhY8vpWJVL2YocA2Gfjf7eVoZAgbEs

Thomas

  • Sr. Member
  • ****
  • Posts: 253
  • Karma: +28/-0
    • View Profile
    • bitmessaged is a bitmessage daemon (node) with an open plugin interface written in C++
Re: Bitseal - a Bitmessage client for Android
« Reply #3 on: September 30, 2014, 02:14:45 AM »
The communication between the server and the app is done over XMLRPC ...

XMLRPC is mainly the method how procedure calls are transported. This does not specify, which calls have to be supported.
I don't know PyBitmessage API in detail. But as far as I know, PyBitmesage does all the encryption and the POW for you. In case of your APP you need an interface, where you can post already encrypted objects, otherwise the gateway can read the messages. Do you have something like a specification of your procedure calls?

If you'd be interested in creating a plugin for your bitmessage daemon that would be brilliant. I'd be happy to work on any adjustments that might be required to do so.

I definitely am. I already made a plug in (a very first version of it) like I would design it. It's done in http (which can easily configured to be https)  you can look at it on http://bitmessage.mobi
You can download and upload objects, so it's already suitable for sending and receiving messages. There might be some improvements necessary, of course. Especially a methode to pick only the messages, which are for you.
here https://bitmessage.org/forum/index.php?topic=3931.msg8347#msg8347 you can read a proposal, how this could be done.

Convertor

  • Global Moderator
  • Full Member
  • *****
  • Posts: 223
  • Karma: +13/-0
    • View Profile
Re: Bitseal - a Bitmessage client for Android
« Reply #4 on: September 30, 2014, 05:47:50 AM »
@JonathanCoe good work !

How does the server app works?, I do correctly have your modified version running on my server, but not yet installed the android APP.

Will I be able to set wish server and such when I install it?

What are the modified specs from the normal Bitmessage version?


Edit: If I'm able to compile it into a .apk file tho, never tried that before.
« Last Edit: September 30, 2014, 05:53:27 AM by Convertor »

JonathanCoe

  • Full Member
  • ***
  • Posts: 178
  • Karma: +26/-0
    • View Profile
Re: Bitseal - a Bitmessage client for Android
« Reply #5 on: September 30, 2014, 08:43:03 AM »
I don't know PyBitmessage API in detail. But as far as I know, PyBitmesage does all the encryption and the POW for you. In case of your APP you need an interface, where you can post already encrypted objects, otherwise the gateway can read the messages. Do you have something like a specification of your procedure calls?

Ok I see what you mean. For Bitseal, I wrote a new set of API commands which replace the old commands from the PyBitmessage API. They are as follow:

disseminateMsg - Send a msg out to the rest of the Bitmessage network
disseminatePubkey - Send a pubkey out to the rest of the Bitmessage network
disseminateGetpubkey - Send a getpubkey out to the rest of the Bitmessage network
requestPubkey - Request a pubkey from the server
checkForNewMsgs  - Request any msgs received in a given stream between two points in time (usually the time we last successfully checked for msgs and the current time)

You can see the code for the new API commands here: https://github.com/JonathanCoe/bitseal-server/blob/master/src/api.py

The client-side code which forms the API requests is here: https://github.com/JonathanCoe/bitseal/blob/master/src/org/bitseal/network/ServerCommunicator.java

Messages sent by Bitseal are always signed and encrypted before being sent to a server. Currently POW is also done locally on the Android device, although that may change in the future.

There might be some improvements necessary, of course. Especially a methode to pick only the messages, which are for you. here https://bitmessage.org/forum/index.php?topic=3931.msg8347#msg8347 you can read a proposal, how this could be done.

You're right that we definitely need some way for lite clients to retrieve their messages without downloading a whole stream's worth of data. Thankfully I think we now have a good method to do this. I met Peter Todd recently and he suggested using prefix filters, a technique used in Bitcoin stealth addresses. I still need to create a proof of concept implementation and work out how it should best be implemented, but basically it allows the owner of an address to specify the level of obfuscation they want when retrieving their messages. If they want maximum anonymity, they can retrieve the full set of messages (e.g. all msgs in a stream). If they do not care about anonymity at all, they can specify that messages sent to them are tagged in such a way that their lite client can retrieve only those messages. Or they can specify some level in between those two extremes, so you get a user-configurable trade off between bandwidth + processing and anonymity. You can read a brief description of the concept here: https://mail-archive.com/bitcoin-development@lists.sourceforge.net/msg03612.html
My address: BM-NBdhY8vpWJVL2YocA2Gfjf7eVoZAgbEs

JonathanCoe

  • Full Member
  • ***
  • Posts: 178
  • Karma: +26/-0
    • View Profile
Re: Bitseal - a Bitmessage client for Android
« Reply #6 on: September 30, 2014, 08:57:47 AM »
@JonathanCoe good work !
How does the server app works?, I do correctly have your modified version running on my server, but not yet installed the android APP.
Will I be able to set wish server and such when I install it?
What are the modified specs from the normal Bitmessage version?
Edit: If I'm able to compile it into a .apk file tho, never tried that before.

Thanks! To answer your questions:
- Running the server program (modified PyBitmessage) should be very simple. You basically just need to run the program and open a port for the API traffic to pass through. I'll write a proper set of instructions in the README of the bitseal-server Github page very soon.
- You can choose which servers you use at any time. It's in the 'Settings' section of the app.
- The only major change to the modified version of PyBitmessage is a new set of API commands. Other than that there were some very minor tweaks.
- You should be able to compile the code into a .apk file. If not then you can use this one, which is the same version of the code as that on Github: https://drive.google.com/file/d/0BxlXwA7zWmiTSUpjdXU2WDRzVFE/edit?usp=sharing
My address: BM-NBdhY8vpWJVL2YocA2Gfjf7eVoZAgbEs

Convertor

  • Global Moderator
  • Full Member
  • *****
  • Posts: 223
  • Karma: +13/-0
    • View Profile
Re: Bitseal - a Bitmessage client for Android
« Reply #7 on: September 30, 2014, 09:06:21 AM »
@JonathanCoe

Perfect. I've started one on my server, so I can connect from the phone.
- Are you in of public servers people can connect to?.. like in Electrum wallet? if so, I'll happily make my node public

Thanks for the .apk .. haven't been able to compile yet. so will try that one.

Thomas

  • Sr. Member
  • ****
  • Posts: 253
  • Karma: +28/-0
    • View Profile
    • bitmessaged is a bitmessage daemon (node) with an open plugin interface written in C++
Re: Bitseal - a Bitmessage client for Android
« Reply #8 on: September 30, 2014, 09:08:10 AM »
disseminateMsg - Send a msg out to the rest of the Bitmessage network
disseminatePubkey - Send a pubkey out to the rest of the Bitmessage network
disseminateGetpubkey - Send a getpubkey out to the rest of the Bitmessage network
requestPubkey - Request a pubkey from the server
checkForNewMsgs  - Request any msgs received in a given stream between two points in time (usually the time we last successfully checked for msgs and the current time)

Than it should be easy to use my http interface, isn't it?
Using a http interface has lots of advantages: it can be tested from any browser and it has a well defined methode to encrypt everything (https).
Accessing a http site should be supported from Android, as well.

You're right that we definitely need some way for lite clients to retrieve their messages without downloading a whole stream's worth of data. Thankfully I think we now have a good method to do this.

But this would need a protocol change. What about the method I proposed? It works with the current protocol!

JonathanCoe

  • Full Member
  • ***
  • Posts: 178
  • Karma: +26/-0
    • View Profile
Re: Bitseal - a Bitmessage client for Android
« Reply #9 on: September 30, 2014, 09:23:51 AM »
Than it should be easy to use my http interface, isn't it?
Using a http interface has lots of advantages: it can be tested from any browser and it has a well defined methode to encrypt everything (https).
Accessing a http site should be supported from Android, as well.

Yes it should certainly be possible to use your http interface. The XMLRPC connection is done over http anyway, so it should not be difficult to implement.

But this would need a protocol change. What about the method I proposed? It works with the current protocol!

Yes, I think that implementing prefix filters probably would require a protocol change. The problem I see with the method you proposed is that the client ends up telling the server which messages are addressed to it, which is something we want to avoid if at all possible. You could try to break the identifying link between the client and the server by only having clients connect over Tor (or something along those lines), but that introduces its own set of problems. Prefix filters should allow a lite client to retireve messages sent to them while also obfuscating that request, so that the client doesn't give away which messages are destined for them. It seems like a cleaner solution to me.
My address: BM-NBdhY8vpWJVL2YocA2Gfjf7eVoZAgbEs

Merlin9251

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Bitseal - a Bitmessage client for Android
« Reply #10 on: September 30, 2014, 09:33:55 AM »
Consider my mesh network proposal: https://bitmessage.org/forum/index.php?topic=4156.0

Thomas

  • Sr. Member
  • ****
  • Posts: 253
  • Karma: +28/-0
    • View Profile
    • bitmessaged is a bitmessage daemon (node) with an open plugin interface written in C++
Re: Bitseal - a Bitmessage client for Android
« Reply #11 on: September 30, 2014, 09:34:25 AM »
The problem I see with the method you proposed is that the client ends up telling the server which messages are addressed to it, which is something we want to avoid if at all possible. Prefix filters should allow a lite client to retireve messages sent to them while also obfuscating that request, so that the client doesn't give away which messages are destined for them. It seems like a cleaner solution to me.

I didn't see that and, yes, I totally agree!

What do we with the interface? I would prefer the http interface, because of the mentioned reasons. In addition to that, there is another one (technical): I can use apache to manage the encryption stuff  :D 

Convertor

  • Global Moderator
  • Full Member
  • *****
  • Posts: 223
  • Karma: +13/-0
    • View Profile
Re: Bitseal - a Bitmessage client for Android
« Reply #12 on: September 30, 2014, 09:47:21 AM »
@JonathanCoe

I'm trying to connect to my own server, but not able to.. does DNS names work, or only direct IP?

edit: Was a bit to fast, forgot to allow remote access to API.
« Last Edit: September 30, 2014, 10:03:28 AM by Convertor »

Convertor

  • Global Moderator
  • Full Member
  • *****
  • Posts: 223
  • Karma: +13/-0
    • View Profile
Re: Bitseal - a Bitmessage client for Android
« Reply #13 on: September 30, 2014, 10:21:57 AM »
Got the APP installed and tested, works like a charm. connected to own server.


@JonathanCoe
Isn't https enabled when connecting to server?

JonathanCoe

  • Full Member
  • ***
  • Posts: 178
  • Karma: +26/-0
    • View Profile
Re: Bitseal - a Bitmessage client for Android
« Reply #14 on: September 30, 2014, 10:45:14 AM »
Got the APP installed and tested, works like a charm. connected to own server.

Excellent! I'm glad to hear it's working for you.

Isn't https enabled when connecting to server?

Not at the moment. I definitely want to add it, but I haven't had time so far. It's high on the to-do list.
My address: BM-NBdhY8vpWJVL2YocA2Gfjf7eVoZAgbEs