Skip to content

Commit 5d8a131

Browse files
author
Martin Müllenhaupt
committed
provide an example key for the server
1 parent df2bdf0 commit 5d8a131

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ endif()
4949
if(NOT DEFINED UID_PUBKEY_BYTES)
5050
message(WARNING "You need to set UID_PUBKEY_BYTES to the output of int_to_bytes.py. Using test public key.")
5151
set(UID_PUBKEY_BYTES
52-
"130,99,238,192,232,47,187,99,222,116,140,101,233,231,57,188,204,204,187,241,173,147,88,60,217,7,80,217"
52+
"142,150,36,100,67,65,165,144,151,44,243,27,134,236,69,135,50,41,123,232,54,232,135,3,245,185,95,31"
5353
CACHE STRING
5454
"the public key used for encryption"
5555
)

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ You need:
1616
You need the _real_ Public Key component `n` (aka modulus). It is fed to the compiler via a byte list as CMake variable `UID_PUBKEY_BYTES`.
1717
This list can be generated from an integer string using the `int_to_bytes.py` script:
1818
```
19-
int_to_bytes.py 13731707816857396218511477189051880183926672022487649441793167544537
20-
130,99,238,192,232,47,187,99,222,116,140,101,233,231,57,188,204,204,187,241,173,147,88,60,217,7,80,217
19+
int_to_bytes.py 15016110316963555528094624349113466362595255853754721542742065372959
20+
142,150,36,100,67,65,165,144,151,44,243,27,134,236,69,135,50,41,123,232,54,232,135,3,245,185,95,31
2121
```
2222

2323
Example build commandline script:
@@ -34,3 +34,12 @@ cmake \
3434
..
3535
make
3636
```
37+
38+
## Example key for the server
39+
40+
An example key for the server is provided in the file `faf-server.example.pem`.
41+
The public key modulus `n` is `15016110316963555528094624349113466362595255853754721542742065372959`,
42+
which translates to the pre-set bytes `142,150,36,100,67,65,165,144,151,44,243,27,134,236,69,135,50,41,123,232,54,232,135,3,245,185,95,31`.
43+
44+
The Base64-DER-encoded private key for the server, you need to provide is
45+
`FAF_PRIVATE_KEY=MIGXAgEAAh0AjpYkZENBpZCXLPMbhuxFhzIpe+g26IcD9blfHwIDAQABAhwU8oHOKQNP63oKJHz6t5KY7jYsm3ZZubrLm4WBAg95Qr5XGWuT6fCZbnpFS88CDgEtBaEPHalBGWOQxPuxAg82LXTfc3MWLiKaWrr0dQ8CDSZLDgcPPeXDJhBXjrECDy6B4n8UrVVOIX/DC+Aakg==`.

faf-server.example.pem

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-----BEGIN RSA PRIVATE KEY-----
2+
MIGXAgEAAh0AjpYkZENBpZCXLPMbhuxFhzIpe+g26IcD9blfHwIDAQABAhwU8oHO
3+
KQNP63oKJHz6t5KY7jYsm3ZZubrLm4WBAg95Qr5XGWuT6fCZbnpFS88CDgEtBaEP
4+
HalBGWOQxPuxAg82LXTfc3MWLiKaWrr0dQ8CDSZLDgcPPeXDJhBXjrECDy6B4n8U
5+
rVVOIX/DC+Aakg==
6+
-----END RSA PRIVATE KEY-----
7+

0 commit comments

Comments
 (0)