Skip to content
Snippets Groups Projects
Commit f4958c7d authored by Michael Eischer's avatar Michael Eischer
Browse files

Fix minimum number of steward keys

The minimum is necessary for generating the keys not when
loading them
parent 64cf9427
No related branches found
No related tags found
No related merge requests found
...@@ -121,7 +121,7 @@ public class REFITKeyManager { ...@@ -121,7 +121,7 @@ public class REFITKeyManager {
System.exit(1); System.exit(1);
} }
int maxGroupId = Math.max(4, REFITStewardGroups.stewardOrderGroupCount()); int maxGroupId = REFITStewardGroups.stewardOrderGroupCount();
ThresholdKeyPair[] keyPairs = new ThresholdKeyPair[maxGroupId]; ThresholdKeyPair[] keyPairs = new ThresholdKeyPair[maxGroupId];
for (int i = 0; i < maxGroupId; i++) { for (int i = 0; i < maxGroupId; i++) {
...@@ -203,7 +203,8 @@ public class REFITKeyManager { ...@@ -203,7 +203,8 @@ public class REFITKeyManager {
String filename = getKeyPath(KeyType.THRESHOLD, 3 * REFITConfig.FAULTS_TO_TOLERATE + 1); String filename = getKeyPath(KeyType.THRESHOLD, 3 * REFITConfig.FAULTS_TO_TOLERATE + 1);
DataOutputStream dat = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(filename))); DataOutputStream dat = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(filename)));
for (int i = 0; i < REFITStewardGroups.stewardOrderGroupCount(); i++) { int maxGroupId = Math.max(4, REFITStewardGroups.stewardOrderGroupCount());
for (int i = 0; i < maxGroupId; i++) {
Dealer dealer = generateThresholdKey(); Dealer dealer = generateThresholdKey();
GroupKey groupKey = dealer.getGroupKey(); GroupKey groupKey = dealer.getGroupKey();
KeyShare[] shares = dealer.getShares(); KeyShare[] shares = dealer.getShares();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment