xlcetc / cryptogm Goto Github PK
View Code? Open in Web Editor NEWAn implement of china crypto standards, including sm2,sm3 ,sm4 and sm9 algorithms.
License: Other
An implement of china crypto standards, including sm2,sm3 ,sm4 and sm9 algorithms.
License: Other
请问 本项目涉及的算法,例如sm9 是否有官方的数据来对比验证计算结果是否正确呢?
3q
Hello,
I'm trying to use another curve so I calculate new constants with genconsts.go but the code for calculating s and sMinus1Over2 is missing. How can I calculate those constants?
Thanks.
sm9curve包里更改了原bn256包中的多个参数,请问这些参数是怎么计算出来的?
我去比对了sm9的文档中指定的参数,只对上了order和p,那么其余参数是怎么得出的,能否提供些学习资料,谢谢!
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.
module sample
go 1.13
require (
github.com/arnaucube/go-snark v0.0.4
github.com/google/go-cmp v0.5.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/stretchr/testify v1.6.1
github.com/tjfoc/gmsm v1.3.2
github.com/xlcetc/cryptogm v0.0.0-20200714063742-a399bbd3158e
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899
gotest.tools v2.2.0+incompatible // indirect
)
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.