From e93fda860bf3b798f6a02ee806da6693a725dd2f Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Sun, 2 Apr 2017 13:23:19 +0900 Subject: sign is constant time ; signCT is removed --- go/blscgo/bls.go | 10 +--------- go/main_test.go | 4 ---- 2 files changed, 1 insertion(+), 13 deletions(-) (limited to 'go') diff --git a/go/blscgo/bls.go b/go/blscgo/bls.go index 170146c..5873f38 100644 --- a/go/blscgo/bls.go +++ b/go/blscgo/bls.go @@ -251,7 +251,7 @@ func (sec *SecretKey) GetPublicKey() (pub *PublicKey) { return pub } -// Sign -- +// Constant Time Sign -- func (sec *SecretKey) Sign(m string) (sign *Sign) { sign = new(Sign) buf := []byte(m) @@ -259,14 +259,6 @@ func (sec *SecretKey) Sign(m string) (sign *Sign) { C.blsSecretKeySign(sec.getPointer(), sign.getPointer(), (*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf))) return sign } -// Constant Time Sign -- -func (sec *SecretKey) SignCT(m string) (sign *Sign) { - sign = new(Sign) - buf := []byte(m) - // #nosec - C.blsSecretKeySignCT(sec.getPointer(), sign.getPointer(), (*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf))) - return sign -} // Add -- func (sign *Sign) Add(rhs *Sign) { diff --git a/go/main_test.go b/go/main_test.go index 091a75b..a103ba2 100644 --- a/go/main_test.go +++ b/go/main_test.go @@ -72,10 +72,6 @@ func testSign(t *testing.T) { } signVec[i] = *secVec[i].Sign(m) - s := *secVec[i].SignCT(m) - if signVec[i].String() != s.String() { - t.Fatal("SingCT %d", i) - } if !signVec[i].Verify(&pubVec[i], m) { t.Fatal("singVec %d", i) } -- cgit v1.2.3