Improve arguments

This commit is contained in:
kngako 2024-08-06 02:11:57 +02:00
parent b064c0bcf0
commit eb71fd5ff4
2 changed files with 4 additions and 2 deletions

View File

@ -109,9 +109,9 @@ public class Secp256k1CFunctions {
public static native byte[][][] secp256k1_frost_shares_gen(long ctx, byte[] pok64, byte[] seed32, int threshold, int total_signers, byte[][] ids33); public static native byte[][][] secp256k1_frost_shares_gen(long ctx, byte[] pok64, byte[] seed32, int threshold, int total_signers, byte[][] ids33);
public static native byte[][] secp256k1_frost_share_agg(long ctx, byte[][][] vss_commitments, int totalShareCount, int threshold, byte[] id33); public static native byte[][] secp256k1_frost_share_agg(long ctx, byte[][] shares, byte[][][] vss_commitments, int totalShareCount, int threshold, byte[] id33);
public static native int secp256k1_frost_share_verify(long ctx, byte[] id33, byte[] share, byte[][] vss_commitment); public static native int secp256k1_frost_share_verify(long ctx, int threshold, byte[] id33, byte[] share, byte[][] vss_commitment);
public static native byte[] secp256k1_frost_compute_pubshare(long ctx, int threshold, byte[] id33, byte[][][] vss_commitments, int totalSignersCount); public static native byte[] secp256k1_frost_compute_pubshare(long ctx, int threshold, byte[] id33, byte[][][] vss_commitments, int totalSignersCount);

View File

@ -160,6 +160,7 @@ public object NativeSecp256k1 : Secp256k1 {
): Pair<ByteArray, ByteArray> { ): Pair<ByteArray, ByteArray> {
val result = Secp256k1CFunctions.secp256k1_frost_share_agg( val result = Secp256k1CFunctions.secp256k1_frost_share_agg(
Secp256k1Context.getContext(), Secp256k1Context.getContext(),
totalShares,
vssCommitments, vssCommitments,
totalShareCount, totalShareCount,
threshold, threshold,
@ -179,6 +180,7 @@ public object NativeSecp256k1 : Secp256k1 {
): Int { ): Int {
return Secp256k1CFunctions.secp256k1_frost_share_verify( return Secp256k1CFunctions.secp256k1_frost_share_verify(
Secp256k1Context.getContext(), Secp256k1Context.getContext(),
threshold,
id33, id33,
share, share,
vssCommitment vssCommitment