Skip to content

Instantly share code, notes, and snippets.

@DrI-T
Last active March 10, 2022 23:34
Show Gist options
  • Save DrI-T/91bb4010dd4523ea281a066fe147ceab to your computer and use it in GitHub Desktop.
Save DrI-T/91bb4010dd4523ea281a066fe147ceab to your computer and use it in GitHub Desktop.
GitChain: a eco-organic git based blockchain

decentralized pull-request

Any system with a publicly accessible inbound channel is subject to sybil attack (i.e. SPAM).

Indeed the price of "identity" being zero we can naturally assume

  • creating new block on the chain
  • appending of logs
  • pushing a git commit
  • sending an email

All these can be abuse to a point of a DDoSing risk.

It is then key to minimize any amplification before screening request for validity.

Mitigation :

  • Increasing the cost of "push" we can greatly diminish the returns of these DDoS attacks.
  • decreasing the time and effort to validate each query
  • option to divert an attack will prevent DoS
  • rate limiting of each inbound channel using build-in slowness (! PoTime )

see also

#
echo IPFS_PATH: ${IPFS_PATH:-$HOME/.ipfs}
pkr=${1:-QmcbBtgD511KiRzTdngGK2SkvC66gAHmnD7ZdRBCPA1ouS}
if ipfs key list | grep -q -w DPKI; then
key=$(ipfs key list -l --ipns-base b58mh | grep -w DPKI | cut -d' ' -f1)
else
key=$(ipfs key gen -t ed25519 --ipns-base b58mh DPKI)
fi
name=$(perl -S fullname.pl $key)
echo "key: $key ($name)"
if ! ipfs key export -o /dev/null DPKI 2>/dev/null; then
ipfs shutdown
fi
sku=$(ipfs key export -o /dev/stdout DPKI | base64 -w 0)
name=$(perl -S fullname.pl $pkr)
echo "pkr: $pkr ($name)"
echo sku: $sku
ipfs key rm dhkey 2>/dev/null
pkey=$(echo $sku | perl DHkeys.pl $pkr | grep privkey: | cut -d' ' -f2 )
dhkey=$(echo $pkey | xxd -r -p | ipfs key import --ipns-base b58mh -- dhkey -)
name=$(perl -S fullname.pl $dhkey)
echo "dhkey: $dhkey ($name)"
#!/usr/bin/perl
#BEGIN { if (-e $ENV{SITE}.'/lib') { use lib $ENV{SITE}.'/lib'; } }
# usage:
# ipfs key export -o /dev/stdout DPKI | perl DHkeys.pl $pku
# header: 08011240
# ipfs key list -l --ipns-base base16 | grep self
# pub-self: f01721220d4ca21fd67b197375c10392f392adc4cd33fbce4575d435e23a664f0cbac60f7
# ........ 1 2 3 4 5 6
# ........0123456789.123456789.123456789.123456789.123456789.123456789.123
# pub-self: f0172002408011220cb574dd68763332e5d19aaf7d229b1f0d1229f1a40cc5a350e66b114145367de
# priv-self: f080112407ee64c96a7746b2115f311f42d3de292ea5997ab84a0ba3d246caffb684f8290
# cb574dd68763332e5d19aaf7d229b1f0d1229f1a40cc5a350e66b114145367de
use MIME::Base64 qw(encode_base64 decode_base64);
use lib '.';
use botname qw(botname);
# ed25519 (2^255 - 19)
my $buf64 = <STDIN>;
my $buf = &decode_base64($buf64);
printf "buf: %s (%dc)\n",unpack('H*',$buf),length($buf);
my $sku = substr($buf,4,32);
my $pku = substr($buf,32+4);
printf "sku: f%s (%dc)\n",unpack('H*',$sku),length($sku);
printf "pku: f%s (%dc)\n",unpack('H*',$pku),length($pku);
my $pubkey = shift || '12D3KooWPW89HLc7Ft1UqZGFUfxqxnAKM6sr6rBNLKkGigLC1iFX';
my $pubkey_raw = substr(decode_mbase58($pubkey),-32);
printf "pubkey: f%s\n",unpack'H*',$pubkey_raw;
#my $ecdh = &ecsecret($sku,$pubkey_raw);
my $eddh = &edsecret($sku,$pubkey_raw);
my $key = &edkeygen($eddh);
printf "key: f%s\n",unpack'H*',$key;
my $key64 = &encode_base64(pack('H12','002408011240').$key,'');
printf "key64: %s\n",$key64;
printf "privkey: 08011240%s\n",unpack'H*',$key;
exit $?;
sub edsecret(@) {
use Crypt::Ed25519 qw(); # no symbols exported
#my $curve = 'ed25519';
my $recipient_public_raw = pop;
my $origin_private_raw = shift;
#printf "priv58: %s\n",encode_mbase58($private_raw);
#printf "pub58 : %s\n",encode_mbase58($public_raw);
my ($pko, $sko) = Crypt::Ed25519::generate_keypair $origin_private_raw;
#my $origin_public_raw = Crypt::Ed22519::eddsa_public_key($origin_private_raw);
printf "pko: f%s\n",unpack'H*',$pko;
# fc02c7b8a7d67b07e4d7f788e19f4af0f89631ac23c6641d88292f8769139fc4b270f9eb9d380ada9b507e3e3eb498e6e198e70b779985cc72cf153359ee1cd40
printf "sko: f%s (%uc)\n",unpack('H*',$sko),length($sko);
$shared_secret = Crypt::Ed25519::key_exchange($recipient_public_raw, $sko);
#printf "edsecret: f%s\n",unpack'H*',$shared_secret;
if (wantarray) {
my $secret58 = &encode_mbase58($shared_secret);
my $origin_public58 = &encode_mbase58($pko);
my $recipient_public58 = &encode_mbase58($recipient_public_raw);
printf "DH(%s,%s) = %s\n",&botname($origin_public58),&botname($recipient_public58),$secret58;;
return ($shared_secret,$public58,$pubkey58);
} else {
return $shared_secret;
}
return $shared_secret;
}
sub edkeygen($){
my $secret = shift;
my ($pko, $sko) = Crypt::Ed25519::generate_keypair $secret;
my $key = $secret . $pko;
return $key;
}
sub ecsecret(@) {
use Crypt::PK::ECC;
our $secrets;
my $curve = 'secp256k1';
my $public_raw = pop;
my $private_raw = shift;
#printf "priv58: %s\n",encode_mbase58($private_raw);
#printf "pub58 : %s\n",encode_mbase58($public_raw);
my $sk = Crypt::PK::ECC->new();
my $priv = $sk->import_key_raw($private_raw, $curve);
my $pk = Crypt::PK::ECC->new();
my $pub = $pk->import_key_raw($public_raw ,$curve);
my $shared_secret = $priv->shared_secret($pub);
if (wantarray) {
my $secret58 = &encode_mbase58($shared_secret);
my $origin_raw = $priv->export_key_raw('public_compressed');
my $public58 = &encode_mbase58($origin_raw);
my $pubkey58 = &encode_mbase58($public_raw);
printf "DH(%s,%s) = %s\n",&botname($public58),&botname($pubkey58),$secret58;;
return ($shared_secret,$public58,$pubkey58);
} else {
return $shared_secret;
}
}
sub encode_mbase58 {
my $mh = sprintf'z%s',&encode_base58(@_);
return $mh;
}
sub decode_mbase58 {
my $raw;
if ($_[0] =~ m/^z/) {
$raw = decode_base58(substr($_[0],1));
} else {
$raw = decode_base58($_[0]);
}
return $raw;
}
sub encode_base58 { # btc
use Math::BigInt;
use Encode::Base58::BigInt qw();
my $bin = join'',@_;
my $bint = Math::BigInt->from_bytes($bin);
my $h58 = Encode::Base58::BigInt::encode_base58($bint);
$h58 =~ tr/a-km-zA-HJ-NP-Z/A-HJ-NP-Za-km-z/; # btc
return $h58;
}
sub decode_base58 {
use Carp qw(cluck);
use Math::BigInt;
use Encode::Base58::BigInt qw();
my $s = $_[0];
$s =~ tr/A-HJ-NP-Za-km-zIO0l/a-km-zA-HJ-NP-ZiooL/; # btc
$s =~ tr/IO0l/iooL/; # forbidden chars
my $bint = Encode::Base58::BigInt::decode_base58($s);
cluck "error decoding $s!" unless $bint;
my $bin = Math::BigInt->new($bint)->as_bytes();
return $bin;
}
# ------------------------------------------------------------------
1; #
__DATA__
syntax = "proto2";
enum KeyType {
RSA = 0;
Ed25519 = 1;
Secp256k1 = 2;
ECDSA = 3;
}
message PublicKey {
required KeyType Type = 1;
required bytes Data = 2;
}
message PrivateKey {
required KeyType Type = 1;
required bytes Data = 2;
}
__END__
#
if ! ipfs swarm addrs local 2>/dev/null; then
ipfs daemon &
sleep 12
fi
tic=$(date +%s%N | cut -c-13)
echo repo: ${IPFS_PATH:-$HOME/.ipfs}
peerid=$(ipfs config Identity.PeerID)
gwport=$(ipfs config Addresses.Gateway | cut -d'/' -f 5)
apiport=$(ipfs config Addresses.API | cut -d'/' -f 5)
token=$(echo "$@" | openssl sha256 -r | cut -d' ' -f1)
qm=$(echo $token | xxd -r -p | ipfs add -Q --pin=true)
token=$(ipfs cat $qm | xxd -p -c 64)
echo "$tic: $qm $@" >> joined.log
echo token: $token
echo addr: $qm
peer=$(ipfs dht findprovs $qm -n 2 --timeout 2s 2>/dev/null | tail -1)
name=$(perl -S fullname.pl $peer)
echo "peer: $peer ($name)"
if [ "x$peer" = "x$peerid" ]; then
peer=12D3KooWFeHu75n14FDrSUDXbb7cXhRUJCYxsRCQLA8nZ9R7uJEg
fi
route=$(ipfs dht findpeer $peer | grep -v 127 | grep ip4| grep quic | tail -1)
if [ "no$route" != 'no' ]; then
echo ipfs swarm connect $route/p2p/$peer
fi
echo ipfs dag get /ipfs/$qm
time curl -s https://ipfs.safewatch.ml/ipfs/$qm | xxd
echo xdg-open https://gateway.ipfs.io/api/v0/dag/get?arg=$qm
echo curl -s -X POST http://127.0.0.1:$apiport/api/v0/dag/get?arg=$qm
#
tic=$(date +%s%N | cut -c-13)
echo repo: ${IPFS_PATH:-$HOME/.ipfs}
peerid=$(ipfs config Identity.PeerID)
gwport=$(ipfs config Addresses.Gateway | cut -d'/' -f 5)
apiport=$(ipfs config Addresses.API | cut -d'/' -f 5)
token=$(echo "$@" | openssl sha256 -r | cut -d' ' -f1)
qm=$(echo $token | xxd -r -p | ipfs add -n -Q)
token=$(ipfs cat $qm | xxd -p -c 64)
echo "$tic: $qm $@"
echo token: $token
echo addr: $qm
ipfs dht findprovs $qm -n 2 --timeout 2s 2>/dev/null | while read peer; do
name=$(perl -S fullname.pl $peer)
echo "peer: $peer ($name)"
if [ "x$peer" != "x$peerid" ]; then
route=$(ipfs dht findpeer $peer | grep -v 127 | grep ip4| grep quic | tail -1)
if [ "no$route" != 'no' ]; then
echo ipfs swarm connect $route/p2p/$peer
fi
fi
done
#
pku=${1:-12D3KooWSA6F2J56PtcEstXH9UQv3uvjyFBVFoxUR7gfLJ7uaUnt}
echo "Pull request for $pku" | ipfs add -q --hash sha1 --cid-base base58btc --pin=true
#
peerid=$(ipfs config Identity.PeerID)
token=$(echo "Pull request for $peerid" | ipfs add -Q -n --hash sha1 --cid-base base58btc --pin=true)
echo "token: $token"
if ! ipfs swarm addrs local >/dev/null 2>&1; then
ipfs daemon &
sleep 12
fi
ipfs dht findprovs $token
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" id="DotUML" width="817pt" height="496pt" version="1.1"><defs id="SvgjsDefs1401"/><style id="SvgjsStyle1402">text{white-space: pre;}</style><desc id="SvgjsDesc1403">SequenceDiagram%20%5Bframe%3Dtrue%20framecolor%3Dsteelblue%20label%3D%22GIT%20pullRequest%20Sequence%20Diagram%22%5D%20%7B%0A%20%20actor%20owner%0A%20%20lifeline%20%22GIT%20repository%22%20as%20git%0A%20%20lifeline%20%22ipfs%20repository%22%20as%20ipfs%0A%20%20actor%20user%0A%20%20%0A%20%20owner%20--%3E%20git%20%22publish%20public%20secret%22%0A%20%20activate%20git%0A%20%20%20%20user%20--%3E%20ipfs%20%22get%20public%20secret%22%0A%20%20git%20-r-%3E%20ipfs%0A%20%20%0A%0A%20%20user%20%3C-r-%20ipfs%20%22public%20secret%22%0A%20%20user%20--%3E%20user%20%22compute%20OT%20skPRi%22%0A%20%20user%20--%3E%20ipfs%20%22push%20commit%20to%20inboundPR%20branch%22%0A%20%20user%20--%3E%20owner%20%22notify%20w%2F%20token(pkPRi%20used)%22%0A%20%20owner%20--%3E%20git%20%22fetch%20inboundPR%20branch%22%0A%20%20ipfs%20-r-%3E%20git%20%22%22%0A%20%20git%20--%3E%20git%20%22test%20new%20branch%22%0A%20%20owner%20--%3E%20git%20%22merge%20branch%22%0A%7D</desc><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="817pt" height="496pt" viewBox="0 0 818 497" id="DotUML2" preserveAspectRatio="xMidYMid slice"><symbol id="SvgjsSymbol1685"><g id="SvgjsG1686"><line id="SvgjsLine1687" x1="0" y1="35" x2="10" y2="25" stroke="inherit" stroke-width="1"/><line id="SvgjsLine1688" x1="10" y1="25" x2="20" y2="35" stroke="inherit" stroke-width="1"/><line id="SvgjsLine1689" x1="10" y1="25" x2="10" y2="10" stroke="inherit" stroke-width="1"/><line id="SvgjsLine1690" x1="0" y1="15" x2="20" y2="15" stroke="inherit" stroke-width="1"/><circle id="SvgjsCircle1691" r="5" cx="10" cy="5.5" stroke="inherit" stroke-width="1" fill="inherit"/><polygon id="SvgjsPolygon1692" points="0,0 20,0 20,35 0,35 0,0" fill="white" opacity="0"/></g></symbol><g id="graph0" class="graph dotUmlFrame dotUmlFrameColorsteelblue" transform="scale(1 1) rotate(0) translate(8.64 487.64)"><polygon fill="#ffffff" stroke="transparent" points="-8.64,8.64 -8.64,-487.64 808.526,-487.64 808.526,8.64 -8.64,8.64"/><text text-anchor="middle" x="95.1823959350586" y="-476.984375" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">GIT pullRequest Sequence Diagram</text><g id="node15" class="" stroke="#000000" fill="none"><g id="a_node15"><a xlink:title=" "><text text-anchor="middle" x="32.9975" y="-414" font-family="monospace,monospace" font-size="10.00" fill="#000000" stroke="none" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">owner</text><use id="SvgjsUse1693" xlink:href="#SvgjsG1686" x="22.997500000000002" y="-455"/></a></g><line id="SvgjsLine1411" x1="32.9975" y1="-411" x2="32.9975" y2="-48" stroke="#000000" stroke-dasharray="5,5" stroke-width="1"/><line id="SvgjsLine1415" x1="196.973" y1="-420.5" x2="196.973" y2="-38.5" stroke="#000000" stroke-dasharray="5,5" stroke-width="1"/><line id="SvgjsLine1419" x1="451.9335" y1="-420.5" x2="451.9335" y2="-38.5" stroke="#000000" stroke-dasharray="5,5" stroke-width="1"/><line id="SvgjsLine1423" x1="672.402" y1="-411" x2="672.402" y2="-48" stroke="#000000" stroke-dasharray="5,5" stroke-width="1"/></g><g id="node28" class="" stroke="#000000" fill="none"><g id="a_node28"><a xlink:title=" "><text text-anchor="middle" x="32.9975" y="-3" font-family="monospace,monospace" font-size="10.00" fill="#000000" stroke="none" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">owner</text><use id="SvgjsUse1694" xlink:href="#SvgjsG1686" x="22.997500000000002" y="-44"/></a></g></g><g id="node29" class=""><g id="a_node29"><a xlink:title=" "><polygon fill="none" stroke="#000000" points="239.959,-449.5 153.987,-449.5 153.987,-420.5 239.959,-420.5 239.959,-449.5"/><text text-anchor="middle" x="196.973" y="-432" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">GIT repository</text></a></g></g><g id="node30" class=""><g id="a_node30"><a xlink:title=" "><polygon fill="none" stroke="#000000" points="197.473,-389.5 196.473,-389.5 196.473,-388.5 197.473,-388.5 197.473,-389.5"/></a></g><g id="node40" class=""><g id="a_node40"><a xlink:title=" "><polygon fill="none" stroke="#000000" points="197.473,-70.5 196.473,-70.5 196.473,-69.5 197.473,-69.5 197.473,-70.5"/></a></g></g><path id="SvgjsPath1493" d="M192.473 -393.5 H201.473 V-65.5 H192.473 z" stroke="#000000" stroke-width="1" fill="white"/></g><g id="edge38" class=""><g id="a_edge38"><a xlink:title=" "><path fill="none" stroke="#000000" d="M33.7286 -389 H182.1727"/><polygon fill="#000000" stroke="#000000" points="182.2973,-392.5001 192.2972,-389 182.2972,-385.5001 182.2973,-392.5001"/></a></g><text text-anchor="middle" x="109.95065" y="-392" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">publish public secret</text></g><g id="edge68" class=""><g id="a_edge68"><a xlink:title=" "><path fill="none" stroke="#000000" d="M43.7316,-215C125.6993,-215 649.9922,-215 671.7075,-215"/><polygon fill="#000000" stroke="#000000" points="43.7197,-211.5001 33.7197,-215 43.7197,-218.5001 43.7197,-211.5001"/></a></g><text text-anchor="middle" x="357.71954999999997" y="-218" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">notify w/ token(pkPRi used)</text></g><g id="edge71" class=""><g id="a_edge71"><a xlink:title=" "><path fill="none" stroke="#000000" d="M33.7286 -186 H182.1727"/><polygon fill="#000000" stroke="#000000" points="182.2973,-189.5001 192.2972,-186 182.2972,-182.5001 182.2973,-189.5001"/></a></g><text text-anchor="middle" x="109.95065" y="-189" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">fetch inboundPR branch</text></g><g id="edge86" class=""><g id="a_edge86"><a xlink:title=" "><path fill="none" stroke="#000000" d="M33.7286 -99 H182.1727"/><polygon fill="#000000" stroke="#000000" points="182.2973,-102.5001 192.2972,-99 182.2972,-95.5001 182.2973,-102.5001"/></a></g><text text-anchor="middle" x="109.95065" y="-102" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">merge branch</text></g><g id="node41" class=""><g id="a_node41"><a xlink:title=" "><polygon fill="none" stroke="#000000" points="239.959,-38.5 153.987,-38.5 153.987,-9.5 239.959,-9.5 239.959,-38.5"/><text text-anchor="middle" x="196.973" y="-21" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">GIT repository</text></a></g></g><g id="node42" class=""><g id="a_node42"><a xlink:title=" "><polygon fill="none" stroke="#000000" points="497.9185,-449.5 405.9485,-449.5 405.9485,-420.5 497.9185,-420.5 497.9185,-449.5"/><text text-anchor="middle" x="451.9335" y="-432" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">ipfs repository</text></a></g></g><g id="edge49" class=""><g id="a_edge49"><a xlink:title=" "><path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M201.7044 -331 H441.1857"/><polygon fill="#000000" stroke="#000000" points="451.2466,-331 441.2467,-335.5001 446.2466,-331 441.2466,-331.0001 441.2466,-331.0001 441.2466,-331.0001 446.2466,-331 441.2466,-326.5001 451.2466,-331 451.2466,-331"/></a></g><text text-anchor="middle" x="319.44505" y="-334" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}"/></g><g id="edge77" class=""><g id="a_edge77"><a xlink:title=" "><path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M211.8834 -157 H451.2466"/><polygon fill="#000000" stroke="#000000" points="201.7044,-157 211.7044,-152.5001 206.7044,-157 211.7044,-157.0001 211.7044,-157.0001 211.7044,-157.0001 206.7044,-157 211.7043,-161.5001 201.7044,-157 201.7044,-157"/></a></g><text text-anchor="middle" x="329.565" y="-160" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}"/></g><g id="edge82" class=""><g id="a_edge82"><a xlink:title=" "><polygon fill="#000000" stroke="#000000" points="207.7181,-122.5422 197.7044,-126.0029 207.6906,-129.5422 207.7181,-122.5422"/></a></g><text text-anchor="middle" x="322.9535" y="-129" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">test new branch</text><path id="SvgjsPath1462" d="M197.7044 -136.9973 H217.7044 V-126.9973 H197.7044" fill="none" stroke="#000000" stroke-width="1"/></g><g id="node54" class=""><g id="a_node54"><a xlink:title=" "><polygon fill="none" stroke="#000000" points="497.9185,-38.5 405.9485,-38.5 405.9485,-9.5 497.9185,-9.5 497.9185,-38.5"/><text text-anchor="middle" x="451.9335" y="-21" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">ipfs repository</text></a></g></g><g id="node55" class="" stroke="#000000" fill="none"><g id="a_node55"><a xlink:title=" "><text text-anchor="middle" x="672.402" y="-414" font-family="monospace,monospace" font-size="10.00" fill="#000000" stroke="none" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">user</text><use id="SvgjsUse1695" xlink:href="#SvgjsG1686" x="662.402" y="-455"/></a></g></g><g id="edge45" class=""><g id="a_edge45"><a xlink:title=" "><path fill="none" stroke="#000000" d="M462.7328,-360C505.4725,-360 660.9886,-360 671.8081,-360"/><polygon fill="#000000" stroke="#000000" points="462.566,-356.5001 452.5659,-360 462.5659,-363.5001 462.566,-356.5001"/></a></g><text text-anchor="middle" x="567.27045" y="-363" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">get public secret</text></g><g id="edge55" class=""><g id="a_edge55"><a xlink:title=" "><path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M452.5659,-302C463.7232,-302 619.2762,-302 661.7521,-302"/><polygon fill="#000000" stroke="#000000" points="671.8081,-302 661.8081,-306.5001 666.8081,-302 661.8081,-302.0001 661.8081,-302.0001 661.8081,-302.0001 666.8081,-302 661.808,-297.5001 671.8081,-302 671.8081,-302"/></a></g><text text-anchor="middle" x="557.159" y="-305" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">public secret</text></g><g id="edge65" class=""><g id="a_edge65"><a xlink:title=" "><path fill="none" stroke="#000000" d="M462.7328,-244C505.4725,-244 660.9886,-244 671.8081,-244"/><polygon fill="#000000" stroke="#000000" points="462.566,-240.5001 452.5659,-244 462.5659,-247.5001 462.566,-240.5001"/></a></g><text text-anchor="middle" x="567.27045" y="-247" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">push commit to inboundPR branch</text></g><g id="node68" class="" stroke="#000000" fill="none"><g id="a_node68"><a xlink:title=" "><text text-anchor="middle" x="672.402" y="-3" font-family="monospace,monospace" font-size="10.00" fill="#000000" stroke="none" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">user</text><use id="SvgjsUse1696" xlink:href="#SvgjsG1686" x="662.402" y="-44"/></a></g></g><g id="edge61" class=""><g id="a_edge61"><a xlink:title=" "><polygon fill="#000000" stroke="#000000" points="683.2129,-269.5001 673.2129,-273 683.2129,-276.5001 683.2129,-269.5001"/></a></g><text text-anchor="middle" x="742.894" y="-276" font-family="monospace,monospace" font-size="10.00" fill="#000000" svgjs:data="{&quot;leading&quot;:&quot;1.3&quot;}">compute OT skPRi</text><path id="SvgjsPath1467" d="M673.2129 -283 H693.2129 V-273 H673.2129" fill="none" stroke="#000000" stroke-width="1"/></g><rect id="SvgjsRect1664" width="816.526" height="495.64" x="-8" y="-487" fill="none" stroke="steelblue" stroke-width="1"/><path id="SvgjsPath1684" d="M-8 -487 H198.3647918701172 V-480 L191.3647918701172 -473 L-8 -473 z" fill="none" stroke="steelblue" stroke-width="1"/></g></svg><text x="807pt" y="494pt" text-anchor="end" fill="#555" font-size="6pt" font-family="Arial">Powered by DotUML</text><image x="808pt" y="487pt" width="8pt" height="8pt" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAL0AAAC9ABdzF0jwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAASASURBVFiFxZhbbBRVGMd/3+72YqVIgYpEGlzaAiVVgzcE7YW0Ubw8aDQYfdAUo8FEwYdabcTEB2O8FB9Qg4nRB4MCNhofMHgvpQ2IkngJ1BZKgaAx0kItimzb3fl8mJnd2d3OdNvu0H+y2fNdzpnfnOvMCD7qcHHtjBkj0RzbXjjUOeiWe3T2ipm5sZwgQDSQb5QOfjMEEMgCx7PAPWMF8jTaOprDWet32qsRCeS02bkajBy2/VMFbAReAM5OsR1XTQWwGXgdeBfYmx2cdE0WsBl4DtgGbASezBpRikKTrPc3sAbYD/wJbLH8b2UDyqmJAi4GKoHvgB7L12T9+wKZ6RAL8CrQDeyw/t8B8qx4E9ACvAaUTAfgU8BjwArgUuAJYJ0FZKsJuA44NR2Aa4H3gR+BUcze24QJXuzI684mHGQOGANKU3wfYw79oqwSmVK74AWYB+Rb5Z2Yp8V6R/x2zNV8yL0JGXEYoTZq3RelkOuw4vXcANcBA8A54DPgE8wh3gp0ALswV+164Lw7oEac1oLZFwrcU5npsIbtwlh31Iw5v5qA/4BXgB+AG4AvgXstqCrL7yE9Z84CU4YECjFveiwVJoryrxvg08DLwN3A55ZvjwWyBXgQc+5lJFX6JMFHgNBqzNMnST1zVl4JXJbg01OJOsn6FugHXgSKLN9xy74zU7D4dQLyU5ItuvlocfVyp6977i2FIQluTWGJ1xPSdbUFehK4DRgENgOrgJUTAWyjNlQyN9oFlDvcinBAVY4JOstqt8gRH44GAxVL/9p73A0wFXI78BJQg7kPTkh9c6puMkS/wjmE7lJENpb1d7xpO9wAASowz9wi4H7MlTsp9RatqpSgvK1ItUfaSRWeKe/vbHU6vQDB7MkrgK8nC+dU97zqcDBq3CrIfAkwC9VhQxlQOFh+Zv5BoTWWWkcAftuxaHEoptemBmOR3C+WPtrzT6q/d3tpiRrGzWmNxQLtZQ8fS3q0v6OqZZmiDYkL6q7dHU3tmd5UCCAUM+5SeCM1GMiP3Ad8muo3jOjjIJvS/IHResy5G5eKlKHaGLeR00DGgOOcxVI/MX/2Nd7DQhpI93tLCoHr/cFJlxugfViXd30YXugMBC8ZqQXsd91hfNZYgAoaP2NzMJJ6UVWd9gG/wGy59eAeu6AqdSmxukQskeeXxgRU1cSFhTpVczvq+yg8D1hmp4Hh2/uwJ2BBrrGPxPy6/Mi28DUAMTXqsfZOgUMGIc/PGb4Blqz9/QLieNYTcx4q4hheRy/7KPdtxgEQkDjY6nhc/J9/4AFoOAAUano/KK0ErrJdKnm+zz/wAMwbln2A/U5RYARjz8eDwq9LHjoy4DMb4AEYbjgRIXmfeyBeugjbiy3Po05JAhFHoc0voFR5fjwKou1G+iOjEY2Odk76isKCNTUtN3qmGJzf3dHYNT7giOw3comQeIEH+KXikT/OTBpQ2YDqBq8UQ/gZWA7jDHG44UQE4XunT5CLNryQwfdBVdoFauOOCe5/asRGRMT16/5YEmVoIvnTqv8BFEVR1CJiVZgAAAAASUVORK5CYII="/></svg>
SequenceDiagram [frame=true framecolor=steelblue label="GIT pullRequest Sequence Diagram"] {
actor owner
lifeline "GIT repository" as git
lifeline "ipfs repository" as ipfs
actor user
owner --> git "publish public secret"
activate git
user --> ipfs "get public secret"
git -r-> ipfs
user <-r- ipfs "public secret"
user --> user "compute OT skPRi"
user --> ipfs "push commit to inboundPR branch"
user --> owner "notify w/ token(pkPRi used)"
owner --> git "fetch inboundPR branch"
ipfs -r-> git ""
git --> git "test new branch"
owner --> git "merge branch"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment