Questions tagged [public-key]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
20 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
1answer
51 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 ...
0
votes
1answer
225 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 ...
0
votes
0answers
37 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
17 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 ...
0
votes
1answer
40 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 ...
0
votes
1answer
35 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....
1
vote
1answer
170 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
154 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
64 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
88 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 ...
1
vote
1answer
104 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
57 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
158 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
49 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 ...
3
votes
1answer
487 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
69 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
238 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 = '...
1
vote
1answer
257 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: ...
4
votes
2answers
351 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
44 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 ...
1
vote
0answers
74 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
54 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 ...
0
votes
1answer
283 views

Recover public key from transaction signature

I have this transaction: { "blockHash": "0x163ad564b32bf17db9262391c2c9a5f191e4fd0b098ae5ce9d2e3e7dcde4bd70", "blockNumber": "0x2", "from": "0x55d40a83b8445c004df5964ce4a0e261b599c01a", "gas":...
1
vote
1answer
535 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
508 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 ...
1
vote
2answers
328 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
98 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, ...
3
votes
1answer
364 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?
2
votes
1answer
662 views

Extended private key vs private key

I am trying to make an hd wallet based on nodejs. So to have a secure wallet I have created wallet in my offline machine const hdkey = require('ethereumjs-wallet/hdkey'); const bip39 = require('...
1
vote
1answer
70 views

Cannot send transactions

I have a online shop where users can recieve ETH and do shopping. So to have a secure wallet, I have created an offline service which generates xpub and xpriv which I use to generate addresses in my ...
1
vote
1answer
291 views

web3py: get public key from transaction

I'm trying to retrieve the public key of an address from a transaction. I'm getting the transaction via tx = web3.eth.getTransaction('xxx') According to the docs the public key should be retrievable ...
2
votes
1answer
734 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 ...
1
vote
1answer
559 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 ...
1
vote
1answer
41 views

How to use web3js to put it in json?

I have used web3js by using it in the form of node(npm). But I don't know how to extract some data generated from nodes. Does anyone know this web3js so the results can be changed to json form? ...
3
votes
1answer
992 views

web3py: get public key from private key (without prior transaction)

Is there a way to get the public key from a private key with web3.py? I know I could get it by checking a transaction signed by that key but that's not working for me in this example. It should be ...
3
votes
0answers
665 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
2answers
202 views

Can the same keypair be used for holding ETH and different ERC20 tokens?

I have an ETH keypair. Can I hold ERC20 tokens with this ETH keypair also? Can I hold several ERC20 tokens with one key pair?
0
votes
1answer
38 views

discover if a binary data contains Ethereum address in it?

Is there a way to guess, with some level of probability , that a 20 byte array is an Ethereum address, besides doing a query against the current StateDB and its history ? I want to discover hidden ...
2
votes
1answer
192 views

Is it possible to tell that two addresses were derived from the same private key?

As we know, a single private key or seed phrase generates many addresses. Is it possible for someone to determine that two addresses were derived from the same private key?
6
votes
1answer
436 views

Why are the last 20 bytes of the public key used as the address?

According to this post regarding how to derive the Ethereum address from a public key: Take the last 40 characters / 20 bytes of this public key (Keccak-256). Or, in other words, drop the first ...
3
votes
1answer
231 views

Is there any lifespan of data on Rinkeby testnet?

I read that there are pre-autorized nodes which creates blocks on rinkeby testnet. If developers keep publishing smart contract and do transactions for testing purpose isn't the size of testnet will ...
-1
votes
1answer
52 views

Which node server for creating Ethereum keypairs and sending transaction programatically?

I need to create Key Pairs, and send transactions from my server program (probably node.js.) The code part is clear -- at least in terms of available examples -- and I know where to go with it. My ...
5
votes
1answer
797 views

Extracting Public key from signed Ethereum message or transaction in JavaScript

I'm trying to find out how to derive a public key (not the address) of an Ethereum account by using ethereumjs-util's ecrecover method. Basically I get a transaction by hash using Web3, convert r, s ...
2
votes
1answer
1k views

Get the public address & key associated with one of the Ganache accounts using Web3.js?

How do I get the public address & key (not address or account) for one of the accounts that Ganache displays on startup using Web3.js? I need it for a unit test I'm creating that tests transaction ...
3
votes
3answers
3k views

How to generate multiple eth-addresses from one private key? [duplicate]

Is it possible to generate different multiple eth-addresses from one private key? The goal is to implement a JavaScript service that will allow a user to buy a subscription using cryptocurrency. ...
3
votes
3answers
590 views

RE-Encrypt file in IPFS

If I have an encrypted file in IPFS with a symmetric key that I share, can I after that decrypt and re-encrypt that file with a different key in order to revoke access?
1
vote
1answer
189 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 ...