feat: add batch verify to Android benchmark + expose in Secp256k1InstanceOurs
Add verifySchnorrBatch to Secp256k1InstanceOurs wrapper and add Android benchmark tests for batch(8) and batch(16). To get per-event cost: ns/op ÷ batchSize. JVM benchmark showed 4-7× speedup over individual verify. Android results TBD. https://claude.ai/code/session_01EMY5RnXb9rnsyU2KbXrSaY
This commit is contained in:
@@ -72,6 +72,16 @@ object Secp256k1InstanceOurs {
|
||||
pubKey: ByteArray,
|
||||
): Boolean = Secp256k1.verifySchnorrFast(signature, hash, pubKey)
|
||||
|
||||
/**
|
||||
* Batch-verify multiple signatures from the same pubkey.
|
||||
* Uses scalar+point summation — one mulDoubleG for the whole batch.
|
||||
*/
|
||||
fun verifySchnorrBatch(
|
||||
pubKey: ByteArray,
|
||||
signatures: List<ByteArray>,
|
||||
messages: List<ByteArray>,
|
||||
): Boolean = Secp256k1.verifySchnorrBatch(pubKey, signatures, messages)
|
||||
|
||||
fun privateKeyAdd(
|
||||
first: ByteArray,
|
||||
second: ByteArray,
|
||||
|
||||
Reference in New Issue
Block a user