Questions tagged [public-key]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

key representation and format, conversion to string, JS

I'm new to blockchain programming. In my application I need to work with keys. I am writing tests in JS and the keys are presented in this form: Buffer.from('...
Artem Hvozdov's user avatar
2 votes
1 answer
32 views

Public key encryption using metamask on solidity smart contract

Questions: In Solidity, how can we fetch the encrypted public key for the wallet directly from the smart contract using solidity? I have managed to retrieve it using JavaScript, but I need to know ...
No One's user avatar
  • 21
0 votes
1 answer
29 views

getPublicKey is not a function

I'm trying to generate public key from private key using secp256k1, but I'm getting error saying: getPublicKey is not a function const { getPublicKey, ecdsaSign } = require("ethereum-cryptography/...
That Web3 Guy's user avatar
1 vote
0 answers
24 views

can a private key have 2 public keys? [duplicate]

The deployment script for a contract has the following logic. Take private key from database -> Create an account using Web3.eth.accounts.create() -> set the account as Admin in database -> ...
Valli Nayaki's user avatar
0 votes
0 answers
18 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
1 answer
62 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
1 vote
3 answers
191 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
115 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
205 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
31 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
71 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
57 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
36 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
140 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
163 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
168 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
830 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
2k 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
83 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
127 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
446 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
48 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
301 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
310 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
1 vote
1 answer
836 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
536 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
1 vote
2 answers
1k 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,282
3 votes
2 answers
867 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
1 answer
119 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
229 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
26 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
127 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
46 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
39 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
1 answer
116 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
705 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
595 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
116 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
52 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
298 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
636 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
344 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
76 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
881 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
913 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
  • 455
1 vote
0 answers
53 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
  • 455
0 votes
1 answer
859 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
483 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