Coder Social home page Coder Social logo

cryptogm's People

Contributors

triplewz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cryptogm's Issues

结果验证

请问 本项目涉及的算法,例如sm9 是否有官方的数据来对比验证计算结果是否正确呢?

3q

Generating new constants

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.

关于sm9曲线参数设置

sm9curve包里更改了原bn256包中的多个参数,请问这些参数是怎么计算出来的?
我去比对了sm9的文档中指定的参数,只对上了order和p,那么其余参数是怎么得出的,能否提供些学习资料,谢谢!

About g^r

image
这个函数是做乘法吗,如果是的话为什么能表示g的r次方?

duplicate symbol p256IsZero when run sm2.GenerateKey

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.