N-of-N (XOR) seed splitting: user-level support
This patch introduces the commands `mmgen-seedsplit` and `mmgen-seedjoin`.
The first creates shares one at a time, while the second joins them to
recover the original seed. By default, the default wallet is operated upon.
Shares are ordinary MMGen wallets and as such may be saved in any MMGen wallet
format, with one minor limitation: only one share in a given split may be in
hidden incognito format, and it must be the master share in the case of a
master share split.
For usage information and examples, see:
mmgen-seedsplit --help
mmgen-seedjoin --help
Relevant tests:
test/test.py -e seedsplit
ls -lrt test/tmp23/* # list the created files
test/objtest.py SeedSplitSpecifier
Related commits:
7311f474 - seed splitting: seed-level infrastructure
237567bc - master shares
This commit is contained in:
parent
4d07d53ff6
commit
c7ca0c3d62
14 changed files with 665 additions and 8 deletions
|
|
@ -13,6 +13,8 @@ from mmgen.obj import *
|
|||
from mmgen.seed import *
|
||||
from .ot_common import *
|
||||
|
||||
ssm = str(SeedShareCount.max_val)
|
||||
|
||||
tests = OrderedDict([
|
||||
('AddrIdx', {
|
||||
'bad': ('s',1.1,10000000,-1,0),
|
||||
|
|
@ -202,4 +204,10 @@ tests = OrderedDict([
|
|||
{'s':'P','ret':'P'},
|
||||
)
|
||||
}),
|
||||
('SeedSplitSpecifier', {
|
||||
'bad': ('M','αβ:2',1,'0:1','1:1','2:1','3:2','1:2000','abc:0:2'),
|
||||
'good': (
|
||||
('1:2','2:2','alice:2:2','αβ:2:2','1:'+ssm,ssm+':'+ssm)
|
||||
)
|
||||
}),
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue