Difference between revisions of "PyBitmessage Help"

From Bitmessage Wiki
Jump to navigation Jump to search
Line 26: Line 26:
  
 
===== If Bob is offline =====
 
===== If Bob is offline =====
As long as Bob connects to the network within 2 days, he will receive the public key request or message and will respond to it.
+
As long as Bob connects to the network within 2 days, he will receive the public key request or message.
  
 
If Alice's client sees that Bob's client has not responded, it will resend the message or public key request after 4 days, then again after 8 days... then 16 days.. etc.
 
If Alice's client sees that Bob's client has not responded, it will resend the message or public key request after 4 days, then again after 8 days... then 16 days.. etc.
 
 
  
 
== Using the program ==
 
== Using the program ==

Revision as of 20:47, 23 January 2013

Welcome to the help page for PyBitmessage. It is called PyBitmessage because it is a Bitmessage client implemented in Python.

How the program works and what it is doing

Introduction

Sending a message is a several-step process. Public key cryptography is used to encrypt and sign messages. Each address has an associated public and private key-pair. In a nutshell, public key cryptography allows you to use someone else's public key to encrypt a message so that only they can read it, and to use your own private key to sign a message to prove that you are the one who wrote it. Bitmessage uses these two properties when sending a message from one person to another to prove that the message was written by the first person and can only be read by the second person.

Example

Suppose Alice wants to send a message to Bob

  1. Bob gives Alice his address through a trusted medium, like in person or over the phone
  2. Alice uses Bitmessage to send a message. The clients take care of the rest:
  3. Alice's client assembles a request to get the public key that is associated with Bob's address.
  4. Alice's client does the required work which is difficult to do but easy for others to verify that it was done.
  5. After this work is complete, Alice's client attaches the work to the beginning of the public key request then sends the request
  6. Alice's client's peers each verify that the work was done properly and forwards it on. Eventually the public key request makes its way to Bob.
  7. Bob's client sees the request for his public key and starts doing the same type of work necessary to send his public key
  8. When he finishes the work he sends the key which makes its way back to Alice's client
  9. Alice's client sees that the key is one for which she is waiting
  10. It takes the message that Alice wants to send and attaches her public key and also some random data to be used for an acknowledgement
  11. It then takes this assembled message and signs it with Alice's private key and attaches the signature to bottom of the message.
  12. It then takes this assembled message and encrypts it with Bob's public key which it has just received
  13. It then does the necessary work
  14. It then broadcasts it to all of its peers. Each peer tries to decrypt the message with each of their private keys. Only Bob's client will be successful.
  15. Bob's client checks the signature to verify that it was properly signed by Alice's client.
  16. Bob's client broadcasts out the acknowledgement data which eventually makes its way back to Alice's client.
  17. Alice's client sees this and updates the user interface.
If Bob is offline

As long as Bob connects to the network within 2 days, he will receive the public key request or message.

If Alice's client sees that Bob's client has not responded, it will resend the message or public key request after 4 days, then again after 8 days... then 16 days.. etc.

Using the program

Time

On an average computer, different processes take different amounts of time.

Action Time required
Sender generate a public key request 2 minutes
public key request propagate through the network to the receiver 10 seconds
Receiver reply to the first public key request they receive 2 minutes
Receiver reply to subsequent public key requests they receive 5 seconds
Sender do work necessary to send message 4 minutes
message (or acknowledgement data) propagate through the network 10 seconds