Skip to content

Cannot combine share with -prime4096 or -prime192 (also with -m <modulus> option not working) #6

@hearues-zueke-github

Description

@hearues-zueke-github

I have following arguments:
combine -k 3 -s1 3108316288457210380 -s2 6146131656784792888 -s3 10425214572446537844 -prime4096

The parameter n was 10, also the secret was 0x123456789ABCDEF0.

Now if I try it with -prime4096 or -prime192 (does not matter), I get the following error (for -prime4096):
com.tiemens.secretshare.exceptions.SecretShareException: Public Info [0 ] mismatch on modulus, should be = 16710222102610440107068043371465990121279427984758140486147735732543262527544919309581228990959960933454241707431028205407801175010972697716211777405621844447135311624699359973445785442150139493030849120189695139622021101430363403930757354949513385879948926539292859265140544779841897745831487644537568464106991023630108604575150490083044175049593271254925175508848427143088944400255558397883427448667101368958164663781091806630951947745404989962231943601603024661584134672986801498693341608816527553412312812319737861910590928243420749213395009469338508019541095885541890008803615972806597516557801530791875113872380904094611929773211709366081401737953645348323163171237010704282848106803127761278746182709924566001996544238514546167359724648214393784828708337709298145449348366148476664877596527269176552273043572304982318495803088033967414331004526063175049856118607130798717168809146278034477061142090096734446658190827333485703051687166399550428503452215571581604276048958396735937452791507228393997083495197879290548002853265127569910930648812921091549545147941972750158605112325079312039054825870573986374161254590876872367709717423642369650017374448020838615475035626771463864178105646732507808534977443900875333446450467047221 but was = 83085671664126938805092614721037843700776366159998897420433674117190444262260240009907206384693584652377753448639527
at com.tiemens.secretshare.engine.SecretShare.sanityCheckShareInfo(SecretShare.java:644)
at com.tiemens.secretshare.engine.SecretShare.sanityCheckPublicInfos(SecretShare.java:610)
at com.tiemens.secretshare.engine.SecretShare.combine(SecretShare.java:459)
at com.tiemens.secretshare.main.cli.MainCombine$CombineInput.output(MainCombine.java:443)
at com.tiemens.secretshare.main.cli.MainCombine.main(MainCombine.java:65)
at com.tiemens.secretshare.main.cli.Main.main(Main.java:86)
at com.tiemens.secretshare.main.cli.Main.main(Main.java:55)

But when in the file SecretShare.java at line 641 you add a false to this line:
if (! matches(outer.primeModulus, share.getPublicInfo().primeModulus) && false)
then the combine will work.

Maybe this is a bug or something else.

As a result there should come out: secret.number = '1311768467463790320' (or in hex 0x123456789ABCDEF0).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions