Update README
This commit is contained in:
parent
78924bdcf3
commit
86bbb13611
31
README.md
31
README.md
|
@ -1,20 +1,37 @@
|
|||
|
||||
### Step 1: Generating an X25519 key pair for your open group server
|
||||
## Requirements
|
||||
|
||||
To generate an X25519 key pair, simply run:
|
||||
| Dependency | Version |
|
||||
| ------------- |:-------------:|
|
||||
| rustup | 1.50.0 |
|
||||
| openssl | 1.1.1 |
|
||||
|
||||
## Setup
|
||||
|
||||
### Step 1: Generate an X25519 key pair
|
||||
|
||||
```
|
||||
openssl genpkey -algorithm x25519 -out x25519_private_key.pem
|
||||
openssl pkey -in x25519_private_key.pem -pubout -out x25519_public_key.pem
|
||||
```
|
||||
|
||||
Make sure you have openssl installed, and make sure you're pointing to the right openssl installation as well (e.g. macOS provides an old default implementation that doesn't have the X25519 algorithm).
|
||||
Make sure you're pointing to the right openssl installation (e.g. macOS provides an old default implementation that doesn't have the X25519 algorithm).
|
||||
|
||||
### Step 2: Building the project:
|
||||
|
||||
To build and run the project, do:
|
||||
### Step 2: Build the project
|
||||
|
||||
```
|
||||
cargo build
|
||||
cargo run
|
||||
```
|
||||
|
||||
The Linux Rust installer assumes that you already have a C linker installed. If this is not the case you'll see `error: linker `cc` not found`. To fix this, run:
|
||||
|
||||
```
|
||||
apt update
|
||||
sudo apt install build-essential
|
||||
```
|
||||
|
||||
### Step 3: Run it
|
||||
|
||||
```
|
||||
cargo run --release
|
||||
```
|
||||
|
|
21
build.sh
21
build.sh
|
@ -1,21 +0,0 @@
|
|||
#!/bin/bash
|
||||
$ echo checking that rust, git and openssl are installed...
|
||||
|
||||
# Check that rustup, git and openssl are installed
|
||||
$ type rustup >/dev/null 2>&1 || { echo >&2 "rustup not found; make sure it's installed."; exit 1; }
|
||||
$ type git >/dev/null 2>&1 || { echo >&2 "git not found; make sure it's installed."; exit 1; }
|
||||
$ type openssl >/dev/null 2>&1 || { echo >&2 "openssl not found; make sure it's installed."; exit 1; }
|
||||
|
||||
# TODO: Check openssl version
|
||||
|
||||
# Clone the repo
|
||||
git clone git@github.com:nielsandriesse/session-open-group-server.git
|
||||
|
||||
# Generate a key pair
|
||||
openssl genpkey -algorithm x25519 -out session-open-group-server/x25519_private_key.pem
|
||||
openssl pkey -in session-open-group-server/x25519_private_key.pem -pubout -out session-open-group-server/x25519_public_key.pem
|
||||
|
||||
# Build
|
||||
cargo build
|
||||
|
||||
# TODO: linking with `cc` failed
|
Loading…
Reference in New Issue