From 9601a31395bc3fcf64267cc59bbb8c6512797e37 Mon Sep 17 00:00:00 2001
From: Florian Sesser <florian@privatestorage.io>
Date: Tue, 4 May 2021 13:43:58 +0000
Subject: [PATCH] Add docs: how to generate keys

---
 morph/grid/local/README.rst | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/morph/grid/local/README.rst b/morph/grid/local/README.rst
index c2f48cfa..76304499 100644
--- a/morph/grid/local/README.rst
+++ b/morph/grid/local/README.rst
@@ -39,6 +39,31 @@ Retrieve and use the latest Vagrant development version locally::
   export PATH=`pwd`:$PATH
 
 
+Generating and deploying keys
+`````````````````````````````
+
+Here is a Ristretto key you can use, randomly generated just now::
+
+  SILOWzbnkBjxC1hGde9d5Q3Ir/4yLosCLEnEQGAxEQE=
+
+Generate your own like this::
+
+  [nix-shell:~/PrivateStorageio]$ nix-shell -p zkapissuer.components.exes.PaymentServer-generate-key
+  [nix-shell:~/PrivateStorageio]$ PaymentServer-generate-key
+  SILOWzbnkBjxC1hGde9d5Q3Ir/4yLosCLEnEQGAxEQE=
+
+For the Stripe key any random bytes with a little light formatting "work" - at least to make our software happy - but if you want to be able to interact with Stripe and have payments (even pretend payments) move all the way through the system you should get a Stripe account and generate a key w/ them.
+Lauri can get you added to our "dev" Stripe account, too, though I forget how important that is for ad hoc dev/testing.
+
+I think this will work for generating random Stripe secret keys (that our software will load, I think, but Stripe will reject)::
+
+  >>> import base64, os
+  >>> print((b"sk_test_" + base64.b64encode(os.urandom(25)).strip(b"=")).decode("ascii"))
+  sk_test_Dr+XLVjkC0oO3Zw8Ws0yWtDLqR1sM+/fmw
+
+Public keys are the same but "pk_test" instead of "sk_test" ("test" is for "test mode" key that can only process pretend txns; for real txns there are keys with "live" embedded).
+
+
 Use the local development environment
 `````````````````````````````````````
 
-- 
GitLab