Skip to content

Commit

Permalink
naive time measurement
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <[email protected]>
  • Loading branch information
jsign committed Sep 12, 2023
1 parent 45e69f7 commit 0965c1e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions samescalarargument/samescalarargument_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package samescalarargument

import (
"fmt"
"testing"
"time"

"github.com/jsign/curdleproofs/common"
"github.com/jsign/curdleproofs/group"
Expand Down Expand Up @@ -73,6 +75,7 @@ func TestProveVerify(t *testing.T) {
T := group.NewGroupCommitment(config.group, crs.Gt, crs.H, tmp.ScalarMultiplication(R, &k), &r_t)
U := group.NewGroupCommitment(config.group, crs.Gu, crs.H, tmp.ScalarMultiplication(S, &k), &r_u)

now := time.Now()
proof, err := Prove(
config.group,
crs,
Expand All @@ -87,9 +90,11 @@ func TestProveVerify(t *testing.T) {
rand,
)
require.NoError(t, err)
fmt.Printf("Prove: %s\n", time.Since(now))

t.Run("completeness", func(t *testing.T) {
transcriptVerifier := transcript.New([]byte("same_scalar"))
now := time.Now()
require.True(t, Verify(
config.group,
proof,
Expand All @@ -100,6 +105,7 @@ func TestProveVerify(t *testing.T) {
U,
transcriptVerifier,
))
fmt.Printf("Verify: %s\n", time.Since(now))
})
})
}
Expand Down

0 comments on commit 0965c1e

Please sign in to comment.