Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
docs
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blockchain
docs
Wiki
ether redistribution
Changes
Page history
New page
Templates
Clone repository
Update ether redistribution
authored
6 years ago
by
Robert Martin-Legene
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ether-redistribution.md
+26
-7
26 additions, 7 deletions
ether-redistribution.md
with
26 additions
and
7 deletions
ether-redistribution.md
View page @
0ad332f3
...
...
@@ -27,6 +27,7 @@ Todo el ether se distribuye asi:
3100 cuentas en total. Cada cuenta tiene una clave distinta. Vamos a usar 768 bits (binario) claves en base 64 (1024 caracteres):
```
bash
#!/bin/bash
dir
=
bfavault
function
genacct
...
...
@@ -44,6 +45,28 @@ function genacct
rmdir
new
||
exit
1
}
function
dist
{
threshold
=
$1
for
i
in
$(
seq
1
$threshold
)
;
do
mkdir
accounts/share.
$i
for
file
in
accounts/
*
do
account
=
${
file
#.*--
}
i
=
$(
wc
-l
accounts/
${
account
}
.shares
)
while
[
$i
-gt
0
]
do
from
=
accounts/
${
account
}
.shares
to
=
accounts/share.
${
i
}
/
${
account
}
.passshare
grep
--
-
${
i
}
-
$from
>
$to
test
$(
wc
-l
$to
)
-eq
1
# Each share holder gets a copy of the protected key file
cp
-p
${
file
}
accounts/share.
${
i
}
/
let
i--
done
rm
${
file
}
$from
done
}
trap
"echo Argh;exit 1"
ERR
set
-o
errtrace
swapoff
-a
...
...
@@ -55,10 +78,6 @@ do
genacct 2 5
let
i--
done
```
Falta compartir los shares y accounts
dist 5
echo
A copiar a USB cada una de las carpetas account.share.
*
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.