Questions tagged [public-key]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

How to probe ownership of a MetaMask derived encryption public key?

If I were to store the messages targeted to a specific encryption public key generated by MetaMask (using x25519-xsalsa20-poly1305), how could I allow the recipient to authenticate and claim the ...
leonacostaok's user avatar
0 votes
0 answers
18 views

how to access to a public mapping from test script

i'm in hardhat i'v this public mapping mapping (address user => uint[] commentIds) public userComments; and i'm trying to call it inside my test Script console.log(`user1 comments: ${...
Yassine's user avatar
  • 11
0 votes
0 answers
50 views

ethereum-cryptography.js Problem recovering public-key from signature

Based on the following from ethereum-cryptography documentation: Upgrading from 1.0 to 2.0: secp256k1 module was changed massively: before, it was using noble-secp256k1 1.7; now it uses safer noble-...
Pedram Paravarpishe's user avatar
0 votes
1 answer
45 views

Extracting the Public Key from a transaction hash

I've seen a variety of questions and answers in this forum about extracting the public key from a signed transaction hash. I am able to get the correct answer from newer transactions, but unable to ...
ether_explorer11111's user avatar
0 votes
1 answer
88 views

How do you get the x and y coordinates of an uncompressed public key?

the question says it all. I want to get the x and y coordinates of an uncompressed public key such as this one but I'm not sure how: ...
xmrNoob69's user avatar
0 votes
0 answers
25 views

What happens to ECDSA public key if a constant is added to private key?

Consider I have a random number on curve Secp256k1 as the private key. I know if I calculate G multiplied by the private key in EC domain, I get the public key. I am wondering what happens to public ...
MJay's user avatar
  • 140
0 votes
2 answers
57 views

Sorting through HD wallets

I created a random HD address using my seed phrase a while back. lets call it 0x1....I then send funds to the wallet and continued using it normally. I have since lost the devise i had generated the ...
Kilonzo's user avatar
  • 11
0 votes
0 answers
38 views

Solidity code for BIP32 public keys

Does there exist reference solidity code somewhere to derive child public keys from a master public key, as in BIP32?
lash's user avatar
  • 685
0 votes
1 answer
31 views

how blockchain verify private keys, I am sure nodes does not store private key, so how private key is validated?

it's the doubts lie in the very core concept, but I wanna know how the nodes know that the private+public key is right.
aakash4dev's user avatar
1 vote
1 answer
70 views

Use private key to encode your own public address

Let's say I use a wallet's private key to encode/digitally sign it's own public address, meaning that upon using its public address to decrypt that encoded/signed data, the result would be the public ...
user2340939's user avatar
0 votes
0 answers
84 views

Can't derive an account from a mnemonic phrase like in metamask?

I wrote a script that derivate keys on a given derivate path. I tested it here, and the results are for the path m/44'/60'/0'/0/0 matched. My goal is to generate a mnemonic phrase, and then derive an ...
Mod diller's user avatar
1 vote
0 answers
141 views

Python | eth_utils | Public Ethereum Address derivation from Public key not working

I have the below, trying to derive the Ethereum Address from public key (working) using keccak and to_checksum_address on eth_util, but doesn't match up with derivation on iancoleman.io or miguelmota....
mull's user avatar
  • 21
3 votes
1 answer
467 views

How do you calculate a privatekey/public key from an xprv/pbub?

I am trying to understand how HD wallets work in Ethereum. Currently I have managed to generate a child extended private and public key (xpub and xpriv) from my BIP32 Root Key. However, I can't find ...
Jean Claude Dusse's user avatar
1 vote
3 answers
964 views

how to get public key by the transaction hash?

For example, this is the transaction hash in goerli: 0x60605c7e3fddd2be1fa63f4fa8ef12bfc5e5c69062c6a4788d1277e007e7de02. We know that the public key can be derived by ECDSA. And we can get v,r,s from ...
LEVI_104's user avatar
0 votes
1 answer
65 views

creating multiple eth keys from one private key [duplicate]

I want to create multiple Eth public Keys from one private Key like exchange hot wallet
Oswald's user avatar
  • 1
1 vote
0 answers
98 views

Public Key from Transactional Hash of Type 2 EIP-1559

Is it possible to derive the public key based solely on information provided from the transaction hash? It must be able to work on newer transactions (type 0x02 transactions EIP-1559).I want to get ...
ECZY's user avatar
  • 11
0 votes
1 answer
313 views

How to get Publickey of metamask by Public address?

I want to get Publickey of metamask by Public address
laravel Developer's user avatar
0 votes
2 answers
46 views

what is the best technique to encrypt any document before storing (uploading) on IPFS?

I want to encrypt document before uploading to IPFS and enable more than user to decrypt it and note that the number of users may increase or decrease in any time?
laravel Developer's user avatar
1 vote
0 answers
205 views

How to solve this error MetaMask - RPC Error: The requested account and/or method has not been authorized by the user?

I used below code from account 1 on metamask to encrypt certain text let encryptionPublicKey; await window.ethereum.request({ method: 'eth_getEncryptionPublicKey', params: [account1], // you must ...
laravel Developer's user avatar
0 votes
1 answer
231 views

Retrieve sender public key from ethereum transactions

I have tried using the eth_account library but it doesnt work on newer transactions (type 0x02 transactions). What is a method of retrieval that would work on those transactions? from eth_account....
ChuanC's user avatar
  • 1
0 votes
0 answers
53 views

Using eth-crypto npm module with lots of errors

I'm trying to use some of the functions in eth-crypto npm module (https://github.com/pubkey/eth-crypto) by @pubkey , I create an empty react project install it via npm install eth-crypto --save and ...
m0j1's user avatar
  • 167
1 vote
1 answer
566 views

Retrieve Ethereum public key from transaction data

I'm trying to get an Ethereum address public key from its previous transaction data. What I'm trying to achieve is to be able to get this data from a block explorer API like Etherscan API and then ...
m0j1's user avatar
  • 167
0 votes
0 answers
411 views

How to get signed transaction hash - In order to retrieve an Ethereum address's public key

I'm trying to find a way to get the public key of an Ethereum's address. I found out that if an address has an outgoing transaction it's possible. I used Etherscan's "txlist" to get the ...
m0j1's user avatar
  • 167
0 votes
2 answers
541 views

How to derive an ETH Address from a PublicKey?

I wrote a small contract that is supposed to generate an address from a given publicKey. pragma solidity ^0.8.0; contract GenerateAddress { bytes public publicKey = "...
Sky's user avatar
  • 2,204
3 votes
2 answers
604 views

Can one wallet address have multiple private keys?

On the forum there were some threads about people creating multiple public keys from one private key. I am wondering if the reverse is possible as well. Can 2 private keys create 1 public key. I am ...
IsmailK's user avatar
  • 31
0 votes
0 answers
21 views

Which COSE algorithms are compatible with EVM ecrecover

I want to verify a signature on chain via ecrecover. Which of the COSE algorithms (https://www.iana.org/assignments/cose/cose.xhtml#algorithms) can be used for signing off chain for the signature to ...
TommyF's user avatar
  • 152
0 votes
1 answer
92 views

Why i am getting different public key values from same private key?

I have been exploring ethereum-cryptography library to build HD wallet features for my demo application. I have used HDkey library to generate master private key from master seed. The code is below ...
Rohit's user avatar
  • 3
1 vote
3 answers
180 views

Is it possible to retrieve an EOA public key from its Ethereum address by Solidity?

Is there a solution to retrieve or calculate the public key of an EOA account from its Ethereum address in Solidity? Is it possible?
Alireza's user avatar
  • 533
1 vote
0 answers
25 views

what kind of pubkey is this? [duplicate]

i found a bunch of old pubkeys but i dont remember how i created them or even if they were mine. they seem to be a bit short and i cant convert them to a an actual address if anyone has any ideea ...
Testdev01's user avatar
1 vote
0 answers
97 views

Using Electrum, a Bitcoin wallet, generated ZPUB extended public key for Ethereum purposes?

I would like to set up a watch-only wallet, in which I could have Ethereum coins along with my Bitcoins. I have already generated an extended public key of type ZPUB using Bitcoin-only Electrum wallet....
yssup's user avatar
  • 11
0 votes
1 answer
25 views

Why are public keys not public and need to be requested from the wallet holder?

What are some potential problems with storing public keys of wallets once they are revealed? Otherwise, I would imagine the public key of most user wallets will be available in the future.
Nic Szerman's user avatar
0 votes
0 answers
45 views

Crypto Exchange Account Model (HD Wallet?)

There are some crypto networks such as Bitcoin, Ethereum, TRON, Solana, etc. To develop a crypto exchange, it is a good idea to have a private key for each network, and generate an address (for ...
raitech's user avatar
1 vote
0 answers
31 views

How to correctly get PubKey from PrivateKey in Python

I'm trying to master the basics of cryptography behind ethereum etc, mean very basics. trying to calculate the Pub Key via basic Pub = Priv * Generator Poing G in python, so basically from ecdsa....
user109280's user avatar
2 votes
0 answers
97 views

How to derive ethereum address from Elliptic Curve secp256k1 - SHA256 Digest

I am using google cloud key management service to generate and manage keys. I have generated the HSM key for Asymmetric signing using Elliptic Curve secp256k1 - SHA256 Digest. The public key is ...
DIGVJSS's user avatar
  • 200
1 vote
0 answers
594 views

How to correctly calculate the hash to sign of a transaction with Ethers? is "\x19Ethereum Signed Message:\n32" still necessary?

I am trying to get the public key of the sender from a signed transaction. I am getting the transaction information with the help of alchemy and quicknode. The response I get is a json object like ...
Oscar Serna's user avatar
0 votes
1 answer
473 views

How to recover sender's public key from a transaction json object with Ethers (Updated answers) [duplicate]

I have tried several ~2-4 year-old answers for this question, but none of them work right now. My question is simple: how can I get get the sender's public key from a signed transaction object such as ...
Oscar Serna's user avatar
1 vote
1 answer
102 views

ethersjs Non deterministic uncompressed key recovery from digest and signature

I'm trying to take the signed coinbase data produce a deterministic output for the same uncompressed key (starting with 04). I'm using the following example data from the api: { "messages&...
Nat's user avatar
  • 279
1 vote
0 answers
49 views

ethereumjs-tx is archived, what should I use for getSenderPublicKey()?

I'm playing Capture The Ether game: https://capturetheether.com/challenges/accounts/public-key/ Now I need to recover the public key from raw transaction. I found these online: const EthereumTx = ...
daisy's user avatar
  • 284
1 vote
0 answers
270 views

How are multiple account addresses derived from a single public key?

The following is an except from Mastering Ethereum, but how you can you have multiple accounts in a wallet like MetaMask that manages a single key pair? Private key k: k = ...
Matthew Cruz's user avatar
4 votes
2 answers
517 views

Convert EOA to contract account

EIP-2026 mentions several ways of creating a new account. One way is by: (...) converting a non-countract account into a contract account (...) Is this a hypothetical scenario or could this be done ...
Markus Schick's user avatar
0 votes
1 answer
295 views

What is the simplest way to obtain my ethereum public key, provided that i have the private key? [duplicate]

I have been looking for an easy way to get the public key of my ethereum wallet From reading a bit on how ethereum wallets work, I understand that a Wallet Address in ethereum is actually derived from ...
Muhammad Yasir's user avatar
0 votes
1 answer
71 views

How are we able to verify signatures using the public key?

I get that: private key --ECDSA--> public key private key + message --ECDSA-->signature But then how do we verify the signature with the public key? Wouldn't we have to reverse-ECDSA the public ...
AweSamarth's user avatar
2 votes
2 answers
713 views

How do the public key recovery methods like secp256k1.RecoverPubkey(msg, sig) recover public key from a transaction signature

For a signature done using a private key, we know that the corresponding public key is needed to verify. When the address is a one way hash function of the public key (which means from the address, it ...
thiru's user avatar
  • 21
0 votes
1 answer
781 views

What is the relationship between the seed phrase and the private key?

Using ethers, I can easily generate a public key (wallet address), private key, and seed phrase: function makeWallet(params) { const wallet = ethers.Wallet.createRandom(); return [wallet....
Atharva Shukla's user avatar
1 vote
1 answer
1k views

How to recover Ethereum Public Key from Transaction

How can I recover the Ethereum Public Key from a Transaction? web3.eth.accounts.recoverTransaction("...
user66732's user avatar
  • 435
1 vote
0 answers
51 views

How to encrypt a message with multiple public keys for multiple recipients

Is it possible to encrypt a message using multiple Ethereum public keys for multiple recipients of a message, e.g. using https://github.com/pubkey/eth-crypto#encryptwithpublickey , so that each ...
user66732's user avatar
  • 435
0 votes
1 answer
718 views

BIP32 Extended Public Key Generate Ethereum Address

BIP32 Extended Public Key How can I generate an address with node js? Is something like this possible
Bytrislasis's user avatar
0 votes
1 answer
401 views

What makes an Ethereum keypair valid?

As I understand Ethereum (and Bitcoin) use the ECDSA algorithm which relies on the secp256k1 curve. The secp256k1 curve is what generates the public keys given a private key. However, recently, I ...
vw1262's user avatar
  • 15
1 vote
1 answer
773 views

Got different Public keys from same Private key. `eth-crypto`'s `recoverPublicKey()` and MetaMask's `eth_getEncryptionPublicKey`

Update (2022.03.25) From @Ismael's comment and MetaMask github issue: The key from MetaMask's eth_getEncryptionPublicKey rpc is NOT the Public Key of my account, but a different key calculated from ...
BlueT's user avatar
  • 21
0 votes
1 answer
390 views

Why my private key is generating different public address?

I'm using that Javascript code to generate three things: private key, public key and public address (last 40 characters from public key): const EC = require('elliptic').ec; const ec = new EC('...
Márcio's user avatar
  • 23