Improve JNI handling of frost share gen
This commit is contained in:
@@ -145,18 +145,22 @@ public object NativeSecp256k1 : Secp256k1 {
|
||||
totalSigners,
|
||||
ids33
|
||||
)
|
||||
println(Hex.encode(result))
|
||||
|
||||
val shares = Array(totalSigners) { index ->
|
||||
val startIndex = 0 + (index*32);
|
||||
val endIndex = 32 + (index*32);
|
||||
val endIndex = 31 + (index*32);
|
||||
|
||||
result.sliceArray(
|
||||
startIndex..endIndex
|
||||
)
|
||||
}
|
||||
|
||||
val vssCommitment = Array(totalSigners) { index ->
|
||||
val startIndex = 0 + (index*65);
|
||||
val endIndex = 65 + (index*65);
|
||||
val sharesOffset = totalSigners*32;
|
||||
|
||||
val vssCommitment = Array(threshold) { index ->
|
||||
val startIndex = sharesOffset + (index*65);
|
||||
val endIndex = sharesOffset + 64 + (index*65);
|
||||
|
||||
result.sliceArray(
|
||||
startIndex..endIndex
|
||||
|
||||
Reference in New Issue
Block a user