-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Bisq users with an open trade need to keep Bisq running on their computer, but might be afk. This Bisq proposal aims at providing a iOS and Android App that can receive notifications from the Bisq desktop app. The mobile Apps are not designed to ever evolve into a full Bisq node, but should rather serve as a remote control to the user's one Bisq node, which runs on his own computer.
Note: Version 1 only supports iOS and the Apple Push Notification Service. The architecture needs to be revised for version 2 for Android and non-Apple push notifications. Figure 1: Data flow for the Bisq remote App In phase 1, using the iOS notification service. The notifications are sent from the Bisq desktop app to a Bisq notification node that acts as proxy to the Apple Push Notification Service.(modify)
*Figure 2: signal from during setup and first use ([modify](https://docs.google.com/document/d/1sjTf_mmy9xm25ATLRe5wajAOY4d0n-OpqzQvdviyO8o))*Steps:
- The App registers registers with the Apple notification service and receives in Apple token. This happens in the background without user interaction.
- The App instructs the user to start the Bisq desktop app and open the the menu item “Bisq remote” (This page is currently not implemented).
- Bisq shows all currently connected remote smartphones and allows to
- Remove smartphones so that these will no longer receive Bisq notifications.
- Add a new smartphone that should receive Bisq notifications. In this case the Bisq desktop app generates a new cryptographic key for symmetric encryption (e.g., 256 bits). This key is displayed as QR code. A version 4 or version 5 QR code can easily hold these bits.
- The user scans the QR code with the camera of the smartphone.
- The user needs to transfer the Apple token to the Bisq desktop App. He has three options a. Manually copy the Apple token from his phone to the Bisq App a. Produce the Apple token as QR code on his phone and scan it with the camera of his computer a. Use his phone to send an email to himself with the Apple token, receive the email on his computer and copy/paste it into Bisq
Steps:
- The Bisq desktop app sends a notification to the Bisq notification node. The notification consists of the Apple token and the encrypted message. (Tor)
- The Bisq notification node forwards the encrypted message to the Apple Push Notification service using the Apple token. The message is encrypted (a) with the symmetric key provided by the Bisq desktop App and (b) with an encryption key provided by Apple. (HTTP)
- The Apple Apple Push Notification service sends the encrypted message to the iOS device. (HTTP)
- iOS notifies the user of a new Bisq message - with or without displaying the content of the message (this part is not finalised yet and might depend on the encryption used).
- When the user opens the mobile Bisq remote App, it displays the decrypted message.
The Apple Push Notification Service has the advantage that the notifications reach the iOS device even if the Bisq remote App is not currently running. This convenience comes at the price that Apple knows when Bisq related notification are sent to the Bisq user. However, since the notifications are encrypted, Apple does not know the content of the message. The maximum notification payload size is 4 kilobytes (HTTP/2 API). In version 2, alternative notification mechanisms are planned, which do not involve Apple services.
The Bisq notification node acts as a proxy. This has the benefit that the Apple certificate that is required to forward notifications to the Apple Push Notification Service is not public. This makes it difficult to spam the Bisq notification node with the aim to have Apple block Bisq notifications.
The Bisq notification node will be based on two components
- A provider server for the Apple Push Notification service (APNs)
- P2P network layer that allows to communicate to the Bisq nodes over Tor.
- Depending on the implementation details, a Apple APNs authentication token signing key or a provider certificate from Apple. Both are linked to the paid iOS developer account that is used to upload the Bisq remote App into the Apple App store.
I will use the 128 bit AES/CBC/PKCS5Padding symmetric encryption algorithm. A 16-character Initialization Vector will be create new for each message and attached to the message that is sent to the phone. A 32-character key will be created once per phone. This key is exchanged with the phone via QR code and persistently stored in the Bisq desktop app and in the Bisq remote mobile app.
Proposal:
{
"aps" : {
"alert" : "Bisq Notification",
"sound" : "default",
"bisqNotification" : {
"comment" : "no comment",
"notificationType" : "TRADE_ACCEPTED",
"timestampEvent" : "2018-06-13 11:50:06",
"version" : 1
}
}
}
List of valid Message objects:
Namer | Text displayed in the Bisq remote App |
---|---|
OFFER_ACCEPTED | Your offer has been accepted on May 27 at 18:32 |
Amount: 300 Euro | |
TRADE_COMPLETE | Your trade has been completed on May 27 at 18:32 |
TRADE_ACCEPTED | ... |
The code can be found here.
Screenshots and current design
The mobile App and the Bisq notification node are open source, preferably using AGPL. A user that wants to compile and run the mobile Bisq remote App himself and receive notifications, would also need to set up a new Bisq notification node that uses his Apple certificate. He can then point the Bisq desktop App to his own Bisq notification node and receive iOS notifications on his Bisq remote app.
- simple Notifications using the iOS notification service
- Optional passcode protection of the mobile App
- Iterations on User Experience and Graphic Design
- Testing
- Android App with the same functionality
- Optional notification without Apple Servers (requires the app to run in background). The user can select iOS notification (better user experience, but less privacy) or a proprietary notification mechanism (WebSockets, WhatsApp 3rd party, data pull, ???)
- Additional notifications from Bisq to the mobile App
- Notifications from the mobile App to Bisq (“the fiat money has arrived on my account, the trade can be finalised”)
- Price alerts for attractive offers