Questions tagged [secp256k1]

Secp256k1 is the name of the elliptic curve used by Bitcoin to implement its public key cryptography.

60 questions
8
votes
0 answers

Browserify tiny-secp256k1

I am trying to use tiny-secp256k1 in a Javascript project. I would like the code to be compatible with Node.js and the browser, the require modules in the index file are: const createHmac = require('create-hmac') const ecc =…
5
votes
1 answer

Generate a public key from a private key with OpenCL for secp256k1

I'ld like to calculate a public key from a private key. It must work using OpenCL. It seems hashcat has a nice library but I'm not sure how to use…
Bernicc
  • 636
  • 6
  • 14
4
votes
0 answers

yubihsm2 signatures are invalid when signing ETH transactions

I am trying to figure out how to get this yubihsm2 to work with signing eth transactions. I have been using the python lib and so far i have had some basic setup. Below is an abbreviation of what i have web3_endpoint = '' web3 =…
user3554230
  • 283
  • 2
  • 11
4
votes
0 answers

TLS: "wrong curve" error during client authentication

I have an Apache server that was recently upgraded from Debian 9 to Debian 10: Apache : 2.4.25-3+deb9u13 => 2.4.52 Openssl: 1.1.0l-1~deb9u5 => 1.1.1n-0+deb10u1 Since this upgrade, connections from clients where client is authenticated…
2
votes
1 answer

Rust ECDH does not produce the same shared secret as NodeJS/Javascript and C implementations

I have ECDH shared secrets (sec1 and sec2, below) working in NodeJS/Javascript: let sk1 = crypto.createECDH('secp256k1') sk1.setPrivateKey(Buffer.from("71179b991d7693de813aeaa5bfa241a2ac9e0535867ebf8f6b1b0884472ef4a7", "hex")); let pk1 =…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
2
votes
1 answer

How do I sign a TransactionHex with SeedHex using secp256k1 in C# with Bouncy Castle?

I have this nodejs snippet which I want to implement in C#. The SignTransaction function takes in a seedHex string (length: 64) and a TransactionHex string, a signature is created using secp256k1 algorithm and appended to the end of the…
2
votes
0 answers

Signing data in JAVA with secp256k1 and verifying in c++

I want to sign data in Java and then veify it in c++. When I sign the data in c++ with bitcoin-core/secp256k1 library and then verify it in c++ it works flawlessly. But when I sign it in Java and then transfer it to c++ it does not work anymore. …
Wolfiwolf
  • 35
  • 1
  • 4
2
votes
1 answer

How to offline sign a Tron transaction in Ruby?

I'm trying to offline sign a Tron transaction in Ruby. TronGrid has an endpoint to sign transactions, but they require to send them the account private key in order to do it, which feels a potential risk, so I'd like to sign the transaction locally…
Eric121
  • 21
  • 3
1
vote
1 answer

Import method failure in secp256k1 in Rust

I am trying to use the function new_with_hash from secp256k1::ecdh::SharedSecret in Rust but I am getting this error no function or associated item named `new_with_hash` found for struct `SharedSecret` in the current scope It seems like the…
lolplanet
  • 23
  • 4
1
vote
1 answer

How to generate derive shared secret key from public key

I am reverse engineering an application. What I noticed is that in a part of this application, a request is made to the server and a key is received from the server in base64 format. Then it converts the same key into hex format and then derives…
1
vote
0 answers

Can't use tiny-secp256k1 module in expo

I'm trying to create a bitcoin wallet from a mnenomic phrase using bip32 in an expo app, for that I need to use the module tiny-secp256k1, but it has proven to be difficult due to the apparent incompatibility with the expo framework, I believe I…
1
vote
1 answer

secp256k1/schnorr libraries won't talk to each other

I'm currently generating a private key in the browser and deriving its public key using the noble-secp256k1 javascript library: const privKey = secp.utils.randomPrivateKey() const pubKey =…
jstaab
  • 3,449
  • 1
  • 27
  • 40
1
vote
0 answers

Errors when trying to use secp256k1 on Mac. 'clang: error: linker command failed with exit code 1 (use -v to see invocation)'

I'm starting learning C, but I seem to have failed in installing my first library. I'm using a Mac. I found a simple tutorial to get started: writing a program to generate cryptographic keys. It uses the secp256k1 library. I installed the library…
1
vote
1 answer

'libsecp256k1' is required but it could not be found

I've tried a seemingly endless amount of ways to stack build a library referencing secp256k1-haskell to no avail. Here's my .cabal file - cabal-version: >=1.10 name: testproj version: 0.1.0.0 license: …
1
vote
1 answer

How to convert an ECDSA secp256k1 PEM formatted private key to binary?

I am trying to import my secp256k1 private key into AWS KMS. My key is PEM formatted and AWS KMS says 'The key material must be in binary format' . How do I go about converting my ECDSA secp256k1 PEM formatted private key to binary?
1
2 3 4