I am trying to do some benchmark test between cryptogm with tjfoc/gmsm, But encounter an error 2020/07/23 15:40:32 duplicate symbol p256IsZero (types 1 and 1) in github.com/xlcetc/cryptogm/sm2curve and /usr/local/go/pkg/linux_amd64/crypto/elliptic.a(p256_asm_amd64.o) when I run test code below:
import (
"crypto/rand"
"testing"
csm "github.com/xlcetc/cryptogm/sm/sm2"
)
func BenchmarkSM2_cryptogm_GenerateKey(b *testing.B) {
for i := 0; i < b.N; i++ {
csm.GenerateKey(rand.Reader)
}
}
But It does succeed in a new clean mod and your test files. So I think it may cause by mod dependency, But I am not sure it's correct or not. Here's mod file.
I am trying to do some benchmark test between cryptogm with tjfoc/gmsm, But encounter an error
2020/07/23 15:40:32 duplicate symbol p256IsZero (types 1 and 1) in github.com/xlcetc/cryptogm/sm2curve and /usr/local/go/pkg/linux_amd64/crypto/elliptic.a(p256_asm_amd64.o)
when I run test code below:But It does succeed in a new clean mod and your test files. So I think it may cause by mod dependency, But I am not sure it's correct or not. Here's mod file.
OS: ubuntu 16.04 Go version: go version go1.13.5 linux/amd64
Do you know how to fix this or to avoid this problem?
Besides, the sm2 in tjfoc/gmsm works fine.