The Art of key derivation

This commit is contained in:
fred 2023-05-08 14:45:01 +02:00
parent bf956f35ba
commit b5e78178eb
3 changed files with 36 additions and 16 deletions

View File

@ -309,6 +309,22 @@ redirect to pure "tag=" result json
* decode with PASS and make operation (same functions as SALT API are available)
## The Art of key derivation
In order to make (a little) clear how we use cryptography,
We choose to use "NaCl" (secret1 / secret) 2 key generation.
Thus
* If PLAYER key is (SECRET1/SECRET2) and G1PUB and EMAIL
* wishes keys are (SECRET2 / G1WishName)
* sub-wishes are (EMAIL / G1WishName G1PUB)
* wish-billets are (EMAIL_dice_words / G1WishName G1PUB)
This way PLAYER never loose its data.
It is writen into IPFS... So recreate the key anywhere makes you get your data from friends you shared it with
### LOW RESSOURCE STATION CAN ACTIVATE LOW MODE (disable ipfs daemon)
```
~/.zen/Astroport.ONE/tools/cron_VRFY.sh LOW

View File

@ -7,14 +7,13 @@ MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
. "$MY_PATH/my.sh"
PLAYER_=$1
PLAYER_=$1 # ${PLAYER}(_dice_words) for sub-subkey
PLAYER=$(echo "${PLAYER_}" | cut -d '_' -f 1 | cut -d ' ' -f 1) ## EMAIL_dice_words kinds
VoeuName=$2
MOATS=$3
G1PUB=$4
UPASS=$(date '+%Y%m') # YYYYMM
[[ ${PLAYER} == "" ]] && PLAYER=$(cat ~/.zen/game/players/.current/.player 2>/dev/null)
[[ ${PLAYER} == "" ]] && echo "PLAYER manquant" && exit 1
@ -22,6 +21,10 @@ UPASS=$(date '+%Y%m') # YYYYMM
[[ ${G1PUB} == "" ]] && G1PUB=$(cat ~/.zen/game/players/${PLAYER}/.g1pub 2>/dev/null)
[[ ${G1PUB} == "" ]] && echo "G1PUB manquant" && exit 1
PASS=$(echo "${RANDOM}${RANDOM}${RANDOM}${RANDOM}" | tail -c-7)
UPASS=$(date '+%Y%m') # YYYYMM
PPASS=$(cat ~/.zen/game/players/.current/.pass 2>/dev/null)
############################################################ G1Voeu.sh use
############################################################ PRINT G1Milgram (once a month)
if [[ ${G1PUB} != "" && ${VoeuName} != "" && ${MOATS} != "" ]]; then
@ -29,7 +32,7 @@ UPASS=$(date '+%Y%m') # YYYYMM
mkdir -p ~/.zen/tmp/${MOATS}
#################################################################
## MAKING SPECIAL amrzqr => G1Milgram TICKET = G1Missive
## LE QRCODE CORRESPOND A LA CLEF DERIVE "${PLAYER} :: G1${VoeuName} ${G1PUB}" avec PASS=YYYYMM
## LE QRCODE CORRESPOND A LA CLEF DERIVE "${PLAYER_} :: G1${VoeuName} ${G1PUB}" avec PASS=YYYYMM
# LINK TO G1BILLET with MAKE_G1BILLET.sh :: ${PLAYER}_dice_words :: G1${VoeuName} ${G1PUB}"
# PLAYER G1Voeu G1BILLET+ (derivated key)
@ -52,7 +55,7 @@ UPASS=$(date '+%Y%m') # YYYYMM
## EXTRA @PASS G1BILLET IPFS KEY
[[ ${extra1} != "" && ${extra2} != "" ]] \
&& echo "G1BILLET+ EXTRA" \
&& ${MY_PATH}/keygen -t ipfs -o ~/.zen/tmp/${MOATS}/${VoeuName}.BILL.ipfskey "${extra1}" "${extra2}"
&& ${MY_PATH}/keygen -t ipfs -o ~/.zen/tmp/${MOATS}/${VoeuName}.EXTRA.ipfskey "${extra1}" "${extra2}"
USALT=$(echo "${PLAYER_}" | jq -Rr @uri)
UPEPPER=$(echo "${SECRET2}" | jq -Rr @uri)

View File

@ -4,9 +4,9 @@
<head>
<meta charset="utf-8">
<title>Friend of Friend Planet</title>
<title>Astroport</title>
<meta name="description" content="ScuttleButt like Protocol in a Public Key Infrasctructure">
<meta name="description" content="Ouvrez votre agence Monnaie Libre profitez de notre architecture à clef publique multi-niveau">
<meta name="author" content="Fred">
<meta name="apple-mobile-web-app-capable" content="yes">
@ -30,22 +30,22 @@
<div class="slides">
<section>
<a href="https://astroport.com">
<img src="http://127.0.0.1:8080/ipfs/QmYW1TnjLktxYDDt8vL5okGpbMTmSBfccbVgoTuoKbLzD6/astroport.svg" alt="astroport logo" style="height: 180px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo">
<img src="http://127.0.0.1:8080/ipfs/Qmc1FuWFQwy7pvg9cRPLWZB5u2bf2seKd4Ua2xR6YXCsWu" alt="astroport logo" style="height: 245px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo">
</a>
<h3>Libre Planet</h3>
<h3>Un Monde Libre<br> Comment?</h3>
<p>
<small><a href="https://madeinzion.org">MadeInZion</a> Foundation
present <br><a href="https://github.com/papiche/Astroport.ONE">Astroport.ONE</a>
& La<a href="https://opencollective.com/monnaie-libre/projects/coeurbox">♥BOX Network</a> PKI engine
<br>collectively funded through La <a href="https://opencollective.com/monnaie-libre/projects/stiits">STI</a></small>
& La<a href="https://opencollective.com/monnaie-libre/projects/coeurbox">♥BOX Network</a> PKI/DAO engine
<br>collectively funded and run by La <a href="https://opencollective.com/monnaie-libre/projects/stiits">STI</a></small>
</p>
</section>
<section>
<h2>Reveal</h2>
<h2>La Monnaie Libre</h2>
<p>
Reveal the commons.
<br>Enhance the World with good ideas.
<br>Un Découvrez la souveraineté monétaire...
</p>
</section>
@ -53,9 +53,10 @@
<!-- Example of nested vertical slides -->
<section>
<section>
<h2>GChange Ŋ1</h2>
<p>A mobile application<br> to find and fund the commons</p>
<p>Press <em>Space</em> to know how.</p>
<h2>Astroport</h2>
un système plus juste, plus inclusif et plus durable
<p>Cheminez vers l'abondance<br> découvrez la voie en commun</p>
<p>Pressez <em>Espace</em> pour découvrir comment.</p>
<br>
<a href="#/2/1" class="navigate-down">
<img class="r-frame" style="background: rgba(255,255,255,0.1);" width="178" height="238" data-src="https://static.slid.es/reveal/arrow.png" alt="Down arrow">