Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto/elliptic: miscalculating points along secp256k1 curve #6782

Closed
gopherbot opened this issue Nov 17, 2013 · 2 comments
Closed

crypto/elliptic: miscalculating points along secp256k1 curve #6782

gopherbot opened this issue Nov 17, 2013 · 2 comments

Comments

@gopherbot
Copy link
Contributor

by masterscriptmaker595:

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. Use crypto/elliptic with a user-defined curve and use ScalarBaseMult
Example: http://play.golang.org/p/4T0dfjoVnm

What is the expected output?
x: 23960696573610029253367988531088137163395307586261939660421638862381187549638
y: 5176714262835066281222529495396963740342889891785920566957581938958806065714

What do you see instead?
x: 42280923352545849137126817920755343570165861033690210017553292968955371063312
y: 103482896390716835059169134495585006412497735694669345518593957036165264496525

Which compiler are you using (5g, 6g, 8g, gccgo)?
go run

Which operating system are you using?
Win 8

Which version are you using?  (run 'go version')
go version go1.2rc4 windows/amd64

Please provide any additional information below.
The library here seems to get the correct answer:
https://github.com/ThePiachu/Golang-Koblitz-elliptic-curve-DSA-library/blob/master/bitelliptic/bitelliptic.go
@robpike
Copy link
Contributor

robpike commented Nov 18, 2013

Comment 1:

Labels changed: added priority-later, removed priority-triage.

Owner changed to @agl.

Status changed to Accepted.

@agl
Copy link
Contributor

agl commented Nov 18, 2013

Comment 2:

Please note: http://golang.org/pkg/crypto/elliptic/#Curve, "A Curve represents a
short-form Weierstrass curve with a=-3".
secp256k1 does not meet that requirement.

Status changed to Invalid.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants