BigInteger[] secretKeys = engine.generateSecretKeys();
BigInteger[] publicKeys = new BigInteger[N];
for (int i = 0; i < N; i++) {
publicKeys[i] = engine.generatePublicKey(secretKeys[i]);
}
PublishedShares publishedShares = engine.generalPublishShares(
secretkey, publicKeys, 1);//generate shares
Share[] shares = new Share[N];
for (int i = 0; i < N; i++) {
shares[i] = publishedShares.getShare(i, secretKeys[i], info, publicKeys);
}
return shares;
}