README.md 5.94 KB
Newer Older
Thibaut Sardan's avatar
Thibaut Sardan committed
1
![Parity Signer](https://wiki.parity.io/images/logo-parity-signer.jpg)
Marek Kotewicz's avatar
Marek Kotewicz committed
2

3
4
5
[<img src="./res/github-badge.png" width="250"/>](https://github.com/paritytech/parity-signer/releases/)
[<img src="./res/google-play-badge.png" width="250"/>](https://play.google.com/store/apps/details?id=io.parity.signer)
[<img src="./res/app-store-badge.png" width="250"/>](https://itunes.apple.com/us/app/parity-signer/id1218174838)
Thibaut Sardan's avatar
Thibaut Sardan committed
6
7
8

# Parity Signer - Turn your smartphone into a hardware wallet

Thibaut Sardan's avatar
Thibaut Sardan committed
9
Parity Signer is a mobile application that turns a smartphone into a secure air-gapped wallet also called cold storage. It means that, once the app has been installed, users can create Ethereum accounts, sign transactions and transfer funds from and to these accounts without any sort of connectivity enabled on the device. Wifi, Mobile Network, Bluetooth can be shut down and even removed physically to ensure that the mobile phone containing these accounts will not be exposed to any online threat. Have a look at the tutorial on our wiki to learn how to use [Parity Signer together with Fether](https://wiki.parity.io/Parity-Signer-Mobile-App-Fether-tutorial) or [MyCrypto app](https://wiki.parity.io/Parity-Signer-Mobile-App-MyCrypto-tutorial).
Thibaut Sardan's avatar
Thibaut Sardan committed
10

Thibaut Sardan's avatar
Thibaut Sardan committed
11
Any data transfer from or to the app will happen using QR code scanning. By doing so, the most sensitive piece of information, the private keys, will never leave the phone. The Parity Signer mobile app can be used to store any Ethereum account, this includes ETH, ETC as well as Ether from various testnets (Kovan, Ropsten...).
Thibaut Sardan's avatar
Thibaut Sardan committed
12

Thibaut Sardan's avatar
Thibaut Sardan committed
13
## Device security
Thibaut Sardan's avatar
Thibaut Sardan committed
14

Thibaut Sardan's avatar
Thibaut Sardan committed
15
Parity Signer was built to be used offline. The mobile device used to run the app will hold valuable information that needs to be kept securely stored. It is therefore advised to:
Thibaut Sardan's avatar
Thibaut Sardan committed
16
17
18
19
- Get a separate mobile device.
- Make a factory reset.
- Enable full-disk encryption on the device, with a reasonable password (might not be on by default, for example for older Android devices).
- Do not use any kind of biometrics such as fingerprint or face recognition for device decryption/unlocking, as those may be less secure than regular passwords.
Thibaut Sardan's avatar
Thibaut Sardan committed
20
- Once the app has been installed, enable airplane mode and make sure to switch off Wifi, Bluetooth or any connection ability of the device.
Thibaut Sardan's avatar
Thibaut Sardan committed
21
22
23
24
25
26
27
- Only charge the phone on a power outlet that is never connected to the internet. Only charge the phone with the manufacturer's charging adapter. Do not charge the phone on public USB chargers.

## Screenshots

![Parity Signer Screenshots](https://i.imgur.com/HHnwyAp.jpg)

## Build it
28
29
### Requirements

30
- `node.js` (tested on `v8.4.0`)
Marek Kotewicz's avatar
Marek Kotewicz committed
31
- `yarn` (tested on `1.6.0`)
32
33
34
- `rustup` (tested on `rustup 1.16.0`)
- `rustc` (tested on `rustc 1.32.0 (9fda7c223 2019-01-16)`)
- `cargo` (tested on `cargo 1.32.0 (8610973aa 2019-01-02)`)
35
- `android_ndk` (tested on `r13b`)
36
37
- `Android Studio` (only for Android, tested on `Version 3.3`)
- `Xcode` (only for iOS, tested on `Version 9.4.1 (9F2000)`)
38
- `$NDK_HOME` envarionment variable set to ndk home directory (eg. `/usr/local/opt/android-ndk`)
Marek Kotewicz's avatar
Marek Kotewicz committed
39
- `$JAVA_HOME` envarionment variable set to java home directory (eg. `/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home`)
40
41
42
- `$ANDROID_HOME` environment variable set to Android SDK directory (eg. `/home/your_username/Android/Sdk`)*.

\* It's recommended to install **Android Studio** and use that to install the necessary build tools and SDKs for the Android version you want to test on. It's also the best way to test in the emulator. **DO NOT INSTALL NDK VIA ANDROID STUDIO** as that will install the latest version instead of `r13b`.
43

Thibaut Sardan's avatar
Thibaut Sardan committed
44
### Setup
45
46
47
48
49

- macOS

    ```
    ./setup_macos.sh
50
51
52

    echo "ndk.dir=$NDK_HOME" > android/local.properties
    echo "sdk.dir=$ANDROID_HOME" >> android/local.properties
53
54
55
56
57
58
    ```

- linux

    ```
    ./setup_linux.sh
59
60
61

    echo "ndk.dir=$NDK_HOME" > android/local.properties
    echo "sdk.dir=$ANDROID_HOME" >> android/local.properties
62
    ```
Marek Kotewicz's avatar
Marek Kotewicz committed
63

Thibaut Sardan's avatar
Thibaut Sardan committed
64
### Usage
Marek Kotewicz's avatar
Marek Kotewicz committed
65

66
67
68
- iOS

    ```
69
    npm run ios
70
71
72
73
74
    ```

- Android

    ```
75
    npm run android
76
77
    ```

Marek Kotewicz's avatar
Marek Kotewicz committed
78

Thibaut Sardan's avatar
Thibaut Sardan committed
79
### Test Parity Signer
80

Thibaut Sardan's avatar
Thibaut Sardan committed
81
For a quick test and to avoid the hurdle of creating an account, sending funds to it and finally create a transaction as described in the [Parity Fether Tutorial](https://wiki.parity.io/Parity-Signer-Mobile-App-Fether-tutorial), you can use a pre-funded account on Kovan Network. To get access to this account, you need to:
Thibaut Sardan's avatar
Thibaut Sardan committed
82
83
84
85
86

- Recover an account
- Select `Kovan` network and choose a name
- Use the recovery phrase: `this is sparta` you'll get the account address: `006E27B6A72E1f34C626762F3C4761547Aff1421`
- Validate and accept the warning message
Thibaut Sardan's avatar
Thibaut Sardan committed
87
88
- Chose a pin code
- Scan this QR code to sign a transaction sending some Kovan Eth to the same account.
Marek Kotewicz's avatar
Marek Kotewicz committed
89

Thibaut Sardan's avatar
Thibaut Sardan committed
90
![qr code parity signer](docs/tx_qr.png)
Marek Kotewicz's avatar
Marek Kotewicz committed
91

Thibaut Sardan's avatar
Thibaut Sardan committed
92
Corresponding data:
Marek Kotewicz's avatar
Marek Kotewicz committed
93
94
95

```json
{
Thibaut Sardan's avatar
Thibaut Sardan committed
96
97
98
99
100
    "action": "signTransaction",
    "data": {
        "account": "006e27b6a72e1f34c626762f3c4761547aff1421",
        "rlp": "ea1584ee6b280082520894006e27b6a72e1f34c626762f3c4761547aff1421872386f26fc10000802a8080"
    }
Marek Kotewicz's avatar
Marek Kotewicz committed
101
102
}
```
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117

### Troubleshooting

#### `No dimension set for key window` on Andrid < 5.0

This error should be accompanied with `error: closed` in terminal when deploying the debug version of the signer on a device that runs Android older than 5.0. It happens because the Android API does not support the reverse proxy that would allow the phone to communicate with the debug server on your computer.

A suitable workaround is to run both devices on the same WiFi and use your local WiFi IP address. Check your WiFi settings for your local IP address (eg. `192.168.1.42`), then, while having the app open on the phone (either on error page or blank screen) run a command in terminal:

```
adb shell input keyevent 82
```

(You can find `adb` binary in your local Android SDK folder under `platform-tools`, eg. `/home/your_username/Android/Sdk/platform-tools`)

Thibaut Sardan's avatar
Thibaut Sardan committed
118
This should open a menu on the device. In that menu go to `Dev Settings` > `Debug server host & port for device`, and enter your local IP address with port 8081 (eg. `192.168.1.42:8081`). Restart the app, the error should disappear.