Comments (6)
Glad that worked. Be sure to use secp256k1/v4
module though.
from dcrd.
The following code is not in production yet, but perhaps this is of help: https://github.com/decred/dcrdex/blob/0c75bd4ef78a0cde38eb558dd20b1ffe2a655683/client/asset/eth/eth.go#L828-L844
If SignCompact
was used to make the signature referencing the uncompressed public keys (the false bool), as would be done with ethereum's crypto.Sign
, I believe it should work.
from dcrd.
I'll take a look at this here in a bit. If you don't mind answering the following, it should be enough to get the ball rolling:
- Which version of the module are you using (e.g github.com/decred/dcrd/dcrec/[email protected], @v4.0.1, etc)?
- Would you provide a couple of sig/hash/pubkey triples that are not producing the expected results?
from dcrd.
@chappjc thank you, will look
@davecgh thank you, go get just picked it up as it, so in my .mod, .sum have
go.mod
github.com/decred/dcrd/dcrec/secp256k1 v1.0.3 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0 // indirect
go.sum
github.com/decred/dcrd/chaincfg/chainhash v1.0.2/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D9NuaFd+zGyNeIKgrhCXK60=
github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
github.com/decred/dcrd/dcrec/secp256k1 v1.0.3 h1:u4XpHqlscRolxPxt2YHrFBDVZYY1AK+KMV02H1r+HmU=
github.com/decred/dcrd/dcrec/secp256k1 v1.0.3/go.mod h1:eCL8H4MYYjRvsw2TuANvEOcVMFbmi9rt/6hJUWU5wlU=
github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0 h1:3GIJYXQDAKpLEFriGFN8SbSffak10UXHGdIcFaMPykY=
github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0/go.mod h1:3s92l0paYkZoIHuj4X93Teg/HB7eGM9x/zokGw+u4mY=
sure will collect some samples and post another comment with them
(thank you quick replies)
from dcrd.
Also, are you aware that go-ethereum/crypto
has a no-cgo version if you build with CGO_ENABLED=0
?
from dcrd.
Also, are you aware that
go-ethereum/crypto
has a no-cgo version if you build withCGO_ENABLED=0
?
No, wasn't aware thank you. Also, I tried your code sample and it works great. Thank you, can close issue
from dcrd.
Related Issues (20)
- Panic on notifying index subscribers (release 1.7.1) HOT 6
- testnet: Panic when running with address index on. HOT 4
- websocket: read limit exceeded HOT 11
- Is there an error in the secp256k1 example? HOT 12
- Remove planetdecred seeders from dcrd HOT 1
- dcrec/secp256k1: new release to fix boringcrypto issue HOT 2
- Add IPC (pipetx) events to report listening ports HOT 5
- The main dcrd module needs new tag with 1.8.0 release.
- Feature Request: Allow forcing a vote result in network parameters.
- Remove need for invalid choice index sentinal form threshold state tuple.
- Re-enable RPC integration tests one #3092 is merged.
- Serializing Signature not compatible with other lib HOT 10
- [rpcserver] getcoinsupply RPC is not reporting treasurybases
- Given a private key as a string, how will I generate a public key? HOT 1
- Unable to override home directory HOT 19
- DCR explorer and my dcr nodes do not produce new block from Aug 30th till now HOT 2
- Template generator includes tspend that overspends treasury
- Request to change r and s in secp256k1 ecdsa signature to exported variable R and S HOT 6
- Add GetMultipleCFiltersV2 P2P message HOT 1
- Panic during block sync HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dcrd.