Questions tagged [public-key]

The tag has no usage guidance.

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

How can I obtain my public key (using web3)

I know my Ethereum address, my Metamask wallet will give it to me, and I can run : web3.eth.coinbase But I want to know what my public key is. Is there any way I can find that ? (the reason I want ...
0
votes
1answer
43 views

EthereumJS returning wrong public key

I'm using https://iancoleman.io/bip39/#english to generate a random 12 word mneumonic with the following settings. Mneumonic language: English Coin: Ethereum Derivation Path: BIP44 It generated the ...
1
vote
1answer
198 views

How can I provide an ethereum public address to each user registering on my website.?

is it possible to do using web3.js for a dapp that is going to be run on mainnet.? I have a requirement to assign valid ethereum address to each user who are registering on my website. I want this ...
0
votes
1answer
75 views

Can we decrypt a message by using private key through Metamask

Say I have a hash of a file which is stored on IPFS.I want to encrypt the hash with public keys of few people. How can I do the encryption of the hash (encrypted hash should be stored on smart ...
2
votes
1answer
759 views

Generate addresses using xpub

I have a cold storage where I installed BTC-Electrum and LTC-Electrum wallets. So I have took extended master public keys and have generating addresses in my online service. Now I want to generate ...
0
votes
1answer
223 views

Ethereum converting string & random string to private key

I am receiving as input a private key string and a random string. Goal is to get public key and address. When I am receiving the string I do: var hash = Crypto.util.hexToBytes(privStr); this.priv = ...
0
votes
0answers
22 views

how to get public key in ethereum

Error Says Method shh_getPublicKey not Supported. How can i solve this and get public key.
0
votes
2answers
183 views

How does transaction is encrypted and decrypted? Should all the peers hold the public key of every other peer?

Let's say Peer A sends a transaction to contract.How peer B and peer C will be able to see this.Does they require to do encryption.If so then how?Does each and every peers should have the public key ...
0
votes
1answer
423 views

I have my public key and seed phrase, but private key is lost (MetaMask)

I lost access to a specific address generated in MetaMask web wallet, I still have the public address and my seed phrase. Re-creating my account using the same seed in MetaMask isn't showing that ...
1
vote
1answer
779 views

How do you find the public key used to sign a transaction?

I'm trying to figure out how you find the public key used to sign a transaction from v, r, and s. Before someone says so, this isn't a duplicate of Get public key of any ethereum account. That ...
1
vote
1answer
594 views

web3.py manually derive address from public key string [for dummies]

Let's say I need to derive the address from a public key string. 0xbb8250cc01a0afa7dcaee987b2adda8d1b0a0bb2f7cc427bd942a98c7837364d62e6ea4728a99db39fd55a6f7474a159ca88a96b40279044a1349a2280c8cd43 ...
0
votes
0answers
39 views

Can a new deterministic address be generated with only an Ethereum public key?

BIP-32 defines a way to generate a new address with only knowledge of only the public key for that wallet Deterministic wallets ... permit schemes where one can calculate the public keys without ...
0
votes
1answer
20 views

Trezor - How to see the balance on a particular address?

Trezor uses MEW or MyCrypto to display the balance of my Ethereum accounts. However, I cannot enter a particular address and have the website search for that wallet in my HD derivation path. I know ...
41
votes
4answers
21k views

Get public key of any ethereum account

Can I somehow get the public key of an ethereum account knowing just the corresponding ethereum address (e.g. 0x54dbb737eac5007103e729e9ab7ce64a6850a310)?
6
votes
4answers
1k views

Get address from public key in Solidity

The address is the last 20 bytes of sha3(publicKey) In Solidity, using assembly if needed, how could I splice the first 12 bytes from sha3(publicKey) and get the address? What I came up with runs out ...
1
vote
1answer
107 views

Send Tokens To Address, or Public Key?

I had a look at this video https://www.youtube.com/watch?v=vhdDQXLCRpE I can send tokens to MyEtherWallet from my exchange. Do I have to withdraw to my public key? Or, can I send it to one of my ...
0
votes
1answer
296 views

Recover public key from transaction signature

I have this transaction: { "blockHash": "0x163ad564b32bf17db9262391c2c9a5f191e4fd0b098ae5ce9d2e3e7dcde4bd70", "blockNumber": "0x2", "from": "0x55d40a83b8445c004df5964ce4a0e261b599c01a", "gas":...
0
votes
1answer
47 views

Why HD wallet instance returns two xpub-xpriv key pairs inside Root and HDKey?

I have implemented address generation using HDWallet as shown in the snippet below: let Seed = generateMnemonic(); const wallet = EthHdWallet.fromMnemonic(Seed); console.log("Wallet" + JSON....
0
votes
1answer
65 views

Generate Public Key

I use the command: > eth.getTransaction("0xac844bd1107761fec3abe2f55bf739f0e7cc6dd1cd169a60176bfb22 9826b5a8") Where the brackets contain the hash of the successful transaction. This is what I ...
1
vote
1answer
192 views

ethers.js Recover public key from contract deployment via v,r,s values

I'm currently trying to get the public key of the user that deploys a contract. Unfortunately I can't make it work. I am trying to achieve this solely by using ethers.js as I don't want to bloat my ...
2
votes
2answers
164 views

Is there any difference between address that have Smart Contract and “normal” one? [duplicate]

Is there any difference between address that have smart contract on it, and "normal" address (address that You can create private and public key pair)? For more context, this is the problem I'm ...
1
vote
0answers
23 views

Recover public key from message and signature [duplicate]

I try to recover a public key (not an address) from a message and a signature. I have the following message: def offer_hash(msg, nonce): types = ['bytes', 'bytes', '...
1
vote
1answer
65 views

how do I create an ethereum valid key pair in nodeJS?

I need to generate a key pair that can be used to write the a besu (ethereum) private ledger. I wrote the following code but the architect says this will probably not work with ethereum. The ...
0
votes
1answer
104 views

Proper way to save a public key as bytes in a contract

I need to save public keys in many contracts. Despite that this choice costs, I store them as bytes (I know that the best way is to split the key and store it to different bytes32 constants, but that ...
3
votes
1answer
4k views

Is there a way to get public key using web3.js?

I know there are ways to get public key from private key using other then web3js tools (EthereumJS: How to get public key from private key and https://kobl.one/blog/create-full-ethereum-keypair-and-...
1
vote
1answer
113 views

secp256k1 library does not create correct public key

I am trying to get public key from private key using secp256k1 library. https://github.com/bitcoin-core/secp256k1 I set same private key(sk) in here. https://github.com/ethereumbook/ethereumbook/blob/...
0
votes
1answer
61 views

How to parse ecrecover parameters?

I am looking into getting the public key from ANY ethereum address (not owned by me) that has sent a transaction at least once. It seems that the most viable solution here would be to use ethereumjs-...
0
votes
1answer
179 views

How can I encrypt a file using an ethereum public address and decrypt it with the private address?

The expected outcome is very simple: Users will send their ERC20s to a smart contract. Depending on the amount, each user will get a file specifically created for them. I want to distribute that ...
1
vote
1answer
50 views

Are there identifiers for smart contracts?

Say I want to reference another smart contract in my smart contract. Do smart contracts have an identifier (like a number 0xjdjdjdjdjjddj etc.)? And if they don't, how would you reference a ...
65
votes
8answers
51k views

How can I check if an Ethereum address is valid?

I've read many times that you should never input an address by hand unless you want to accidentally send Ether into no-mans-land. I'd like to know what those checksums might be. Is there a way to tell ...
6
votes
2answers
9k views

The difference between contract address and wallet address

Disclaimer: this is a rather long question. To my understanding, contract address and wallet address are two profoundly different concepts, with the only thing in common being the fact that they are ...
3
votes
1answer
380 views

How to generate address from xpub in JS?

How to generate address from xpub in JS? Should i use BIP39 or 44? If yes, how exactly?
3
votes
1answer
514 views

Generate Ethereum address with private key

How can I generate ethereum account address and private key that works on ethereum main network using web3 in nodejs?
0
votes
1answer
71 views

In bitcoin it's bad to reuse addresses (less security, as public key has already been revealed), how about ethereum? [duplicate]

In bitcoin it's bad to reuse addresses (less security, as public key has already been revealed), how about ethereum? Is the public key revealed when the first transaction (first nonce) is used?
0
votes
1answer
250 views

how to send transaction from different account in metamask

I have two accounts in metamask, when I called the function, web3 always used my default account in the metamask, I want to send transaction to the smart contract I deployed with another account, so ...
1
vote
0answers
36 views

Why a buffer is required in the process of creating keys from the seed

This hdkey library is creating a Buffer in the process of creating keys as an example. var HDKey = require('hdkey') var seed = '...
3
votes
0answers
669 views

Verify Public Key from an RSA SHA256 signature

Given an RSA SHA256 signature (obtained from encrypting a hash using an RSA Private Key), I must assert whether a provided Public Key matches this signature or not. It is imperative that this ...
1
vote
1answer
265 views

Convert 64 byte public key to 20 byte address in Solidity

I am trying to convert a 128 characters hex encoded public key to an address in Solidity (0.5). For example the pubkey would be: ...
29
votes
2answers
11k views

How to encrypt a message with the public-key of an Ethereum address

I am writing some code in nodejs/browser. I have successfully created ethereum-addresses with the secp256k1-library. I was also able to sign and verify messages. Now I want to encrypt/decrypt a ...
4
votes
2answers
369 views

How to encrypt a file with multiple public address?

Can I encrypt a file with multiple public address such that each of them can decrypt the file using their private keys? Thus achieving a system to securely store file on IPFS which can be accessed by ...
0
votes
1answer
45 views

Assymetric encryption with only address

I would like to send an encrypted message to an address, without knowing their public key. If I understand ECIES correctly, in order to send an encrypted ECIES message to a party, say Bob, I need to ...
13
votes
4answers
20k views

Ethereum Address vs Public Key

I'm creating an ethereum wallet and I'm a bit confused with the concept of public key vs address. I understand that the Address is a hashed version of the public key, but when I'm generating a new ...
1
vote
0answers
84 views

How to know address belongs to current Ledger, way to get path ? (By using Ledger inside browser - JavaScript)

Ledger can generate many wallet addresses, Is there way how to find out that given public key address belongs to currently connected Ledger device ? (Using JavaScript API in web application) And ...
0
votes
0answers
55 views

Nano S Ethereum Public Key and Chain Code

I'm trying to figure out how to get this repository (https://www.npmjs.com/package/@ledgerhq/hw-app-eth) to interact with the Nano S ledger, the hardware wallet. I can't figure out what tools or ...
3
votes
0answers
294 views

How to export extended (master) public key from MetaMask

I want to export extended public key for watch-only access to all ethereum addresses in the MetaMask HD wallet at once. It's very usefull for tracking of all portfolio/wallets in one place, especially ...
1
vote
1answer
557 views

Retrieve public key and check the signature with web3

I create a transaction with signTransaction and I have an output like this: "signedTx": { "messageHash": "0x..", "v": "0x..", "r": "0x..", "s": "0x..", "rawTransaction": "0x....." ...
1
vote
5answers
513 views

Can I easily generate a public address which has no private key?

I might be wrong in some of the facts that I state here, so please correct me if necessary. My understanding: Private key - 256 bits Public key - 256 bits Public address - the last 160 bits of a ...
3
votes
3answers
3k views

How to encrypt a message using only the public key from web3.eth.sign?

I retrieve the public key of a users account using Web3 as follows: web3.eth.sign(web3.eth.accounts[0], web3.sha3('test'), function (err, signature) { var sigtest = signature ...
1
vote
2answers
339 views

Running 'parity account new' - is the generated account suitable for all networks (mainnet, ropsten, kovan, etc)?

From a command line, I run parity account new. I am then asked to enter a password (twice), and an account-address is printed. In addition to that, a JSON file is created. Finally, I use this ...
1
vote
1answer
101 views

Who approves my public key in Ethereum network?

In a PKI approach, a public key is approved by a Certificate Authority (CA) in a centralized manner. However, since Ethereum is a decentralized network, how is my public key validity is approved? Or, ...