mirror of
https://github.com/CPunch/Laika.git
synced 2024-11-21 20:40:05 +00:00
Created Keypairs (markdown)
parent
df29f610db
commit
1c0b3ce01e
32
Keypairs.md
Normal file
32
Keypairs.md
Normal file
@ -0,0 +1,32 @@
|
||||
Each build of Laika (cnc, bot && shell) is tied to a 'central keypair.' This keypair is used by the cnc server to authenticate themselves with each bot. The keypair is defined as a macro in `lib/include/lconfig.h.in`.
|
||||
|
||||
## Generating keypairs
|
||||
|
||||
[After compiling the target](Compiling), an output binary called `genKey` will be produced. This is a simple wrapper for libsodium to generate [keypairs](https://doc.libsodium.org/key_exchange/).
|
||||
|
||||
```sh
|
||||
$ ./bin/genKey
|
||||
```
|
||||
> Note: on windows, genKey will be located in `winbin`
|
||||
|
||||
You should receive output that looks like:
|
||||
|
||||
```
|
||||
[~] Generated keypair!
|
||||
[~] public key: 40d5534aca77d1f5ec2bbe79dd9d0f52a78148918f95814404cefe97c34c5c27
|
||||
[~] private key: 90305aa77023d1c1e03265c3b6af046eb58d6ec8ba650b0dffed01379feab8cc
|
||||
```
|
||||
|
||||
## Passing keypairs back to Laika
|
||||
|
||||
Now that you have your central keypair, delete the build and output directories.
|
||||
|
||||
```sh
|
||||
$ rm -rf bin build
|
||||
```
|
||||
|
||||
Now re-build Laika, but passing your keypair
|
||||
|
||||
```sh
|
||||
$ cmake -B build -DLAIKA_PUBKEY="40d5534aca77d1f5ec2bbe79dd9d0f52a78148918f95814404cefe97c34c5c27" -DLAIKA_PRIVKEY="90305aa77023d1c1e03265c3b6af046eb58d6ec8ba650b0dffed01379feab8cc" && cmake --build build
|
||||
```
|
Loading…
Reference in New Issue
Block a user