Questions tagged [private-key]

in assymetric cryptography, the private key is used to unlock, sign or decrypt

Filter by
Sorted by
Tagged with
58
votes
7answers
200k views

How to import a plain private key into geth or Mist?

This is such a basic question, but I can not figure out how to import a plain, unencrypted private key into geth or mist? I tried geth account import 7[......]bla but it seems this command is always ...
23
votes
2answers
6k views

Is each Ethereum address shared by (theoretically) 2 ** 96 private keys?

Summary This is an extended question to How are ethereum addresses generated?. In Ethereum, a private key is 256-bit long, but an address is only 160-bit long. By "Pigeonhole Principle", it ...
28
votes
9answers
43k views

How do I get the raw private key from my Mist keystore file?

I use the Mist wallet. I would like to know: How I can get the private key of my account. How I can use this private key to sign messages.
24
votes
4answers
15k views

workflow on signing a string with private key, followed by signature verification with public key

I know this question has been asked and answered, but while trying to get everything to work, I've come across some problems. This is what I'm trying to do: 1. take a target string 'Schoolbus' 2. ...
34
votes
1answer
5k views

Where is the private key for a contract stored?

This is a question that I am asked often by developers who assume that a contract has a private key of its own to sign any transactions that it makes.
19
votes
1answer
2k views

What if I had the private key that had the public address of a contract?

Could I spend the money a contract owns if I had the private key that goes to the public address that a contract resides at? (I realize that I'd have a better chance of being struck by lightning ...
13
votes
3answers
22k views

How to properly create a raw transaction and sign it using web3 in browser

I want to create and sign a transaction in browser using web3. In order to create a raw transaction, I think I have to do something like this (hopefully you can fill the gaps of my knowledge) var pk =...
4
votes
1answer
7k views

What is the difference between a private key, password, brain wallet, recovery passphrase, and wallet?

What is the difference between a private key, password, brain wallet, recovery passphrase, and wallet, if any? Is there any connection between these?
3
votes
1answer
682 views

I need help with signatures

So, for my studies, I am supposed to interact with a contract function that has the following built in condition: if (ecrecover(_h, _v, _r, _s) == msg.sender && _h == sha3(this)) I am ...
15
votes
3answers
8k views

How to validate a private key?

I could not find any library that, given an hex value, returns true if the given string is a valid ether private key. Any hints?
16
votes
3answers
18k views

How can I get my accounts into metamask or vice versa?

I need my accounts in Metamask to match my local machine so I can deploy from the machine (using truffle), and test in a browser. How can I either: Upload my local geth accounts to Metamask Bring ...
1
vote
2answers
176 views

How (without libraries) can I get the public address from a private key?

I want to know a way to know the public address used for funds transfer from the private key. (As myetherwallet do when you get your wallet info by entering your private key) I don't care with wich ...
5
votes
1answer
940 views

Is it possible to regenerate the private key file?

I have created an account in testnet which I know the address and the password of, but I did not backup the private key file. Can I somehow create the key file again using the password? Or is my ...
3
votes
2answers
17k views

I accidentally lost the key to my wallet

So I recently formatted my drives again and wiped my hard drives. I mistakenly did not copy my Account key but I copied my password. Is there anyway to gain back my account?
16
votes
1answer
6k views

Location of public and private keys of Ethereum account

I want to know the details about key generation and handling in Parity. The questions listed are all related, so I put them all in this one question post. When a new Ethereum account is created on ...
17
votes
1answer
11k views

EthereumJS: How to get public key from private key

I am trying to create a private key and its corresponding public key using EthereumJS library. So far so good I've been able to create private keys using keythereum.create() method. Nevertheless I ...
19
votes
2answers
6k views

Can I use the same private key for Ethereum and Bitcoin?

Both Bitcoin and Ethereum private keys are usually a 256-bit number, isn't it possible to use the same private key for both Bitcoin wallets and Ethereum accounts? For instance, the Bitcoin wiki states:...
12
votes
1answer
8k views

How to generate a keystore (UTC) file from the raw private key?

If I have the plaintext private key, -how- can I generate a geth-compatible keystore file using Node.js? I think I need to encrypt it using the scrypt algorithm by supplying a password, but I don't ...
18
votes
1answer
15k views

Getting private keys of geth accounts

Just the opposite of this question How to import a plain private key into geth or Mist? I would like to know how can I obtain the private keys of the accounts created with geth in this way: $ geth --...
4
votes
2answers
3k views

Generating Ethereum Private Key,Public Key On Mobile (Android/Java)

I'm looking for a way to generate Ethereum private keys and public keys inside an Android app. I've scavenged the web and ultimately decided to tear apart the code to myetherwallet and import the same ...
4
votes
1answer
5k views

How can I import geth accounts into eth?

I had two accounts under ~/.ethereum/keystore when I used geth a while ago. I got a new PC, recompiled only the C++ version and I can't see my two accounts in eth. web3.admin.eth.allAccounts() ...
11
votes
2answers
6k views

Do I need to encrypt the keystore file(s)?

When I run cat on one of the files in the keystore directory I see things like id, mac, etc. but I do not see private key. Is it safe to send the keystore file unencrypted over the internet? If the ...
9
votes
2answers
18k views

How can I get a mnemonic phrase from a private key?

I have a private key for my wallet and also a keystore for it. I want to use it in MEWConnect. Is there a way to get a mnemonic phrase from a private key?
7
votes
1answer
3k views

How to get address from private key in java

I use generate a private key in java code HashUtil.sha3("cow".getBytes()) Write to a new private key file: c85ef7d79691fe79573b1a7064c19c1a9819ebdbd1faaab1a8ec92344438aaf4 Then, I use geth account ...
3
votes
1answer
5k views

Is there a way to manually import a private key into Mist?

I want to move Ether between different wallets. I have a private key and want to move it to the Mist wallet. Any way I can do that?
2
votes
1answer
89 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 ...
1
vote
2answers
417 views

Recovering private key from keystore file

Recently I came across my old keystore file from the original Ethereum Wallet that I used back in 2017. Unfortunately I cannot find the private key or password for that wallet anymore, big problem of ...
13
votes
2answers
14k views

What is the Private Key?

I am trying to understand what is the private key in Ethereum. Help please. Private key = the address? Private key = the password/passphrase? Private key = the text seen when we open the file in the ...
7
votes
3answers
4k views

How to import a plain private key into Parity?

Basically the parity version of this. Can Parity import raw private keys or Geth keystore files?
1
vote
2answers
608 views

Do private keys work across chains and networks?

If I generate a private key on mainnet now, would I be able to use it at the same address on Ethereum Classic? What about testnets? In what cases would the keys not give the same address on different ...
0
votes
2answers
7k views

Lost my private keys and Json or keystore file

I made an account on Ether wallet and I lost my private keys and Json or keystore file. I only have Public keys. Is there any ways to recover my account?
9
votes
1answer
2k views

How should I secure a private key in my dapp?

We are currently building an app that interacts with the blockchain. It needs to be able to make transactions on the blockchain on it's own - for instance to add addresses to a whitelist. This means ...
5
votes
2answers
2k views

Deriving Ethereum address from Bitcoin address

As far as I know Ethereum private keys are compatible with Bitcoin private keys, as described in Can I use the same private key for Ethereum and Bitcoin? . HOWEVER Can I derive an Ethereum public ...
4
votes
1answer
4k views

How to get private keys on Truffle from Ganache accounts

Doing some ERC-735 tests on truffle+ganache I got stuck when creating claim signatures. They need to be signed from my ganache account, but I don't know its private key. The code to be used is this: ...
12
votes
1answer
840 views

Ethereum signature verification not matching

What I want to achieve is sign a message and then verify the signature whether verified by same address or not. Contract to Invoke ecrecover method to verify the address contract MyAuth { ...
6
votes
2answers
2k views

Generating ethereum address from private key on Ubuntu 32 bit

I have a securely generated private key that I want to use to generate an ethereum address on an offline PC (Ubuntu 32 bit). My preferred way would be to use geth, but there's no geth binary for linux ...
6
votes
1answer
900 views

Why doesn't my private key's public key generate the correct public address?

Private Key: 9ccbcabf23e271183dbed503b43277f4c6eee9ac918cd6cda75ebb73ceb35c7d Corresponding Public Address: 0xa73Fb234B1773ed7b115D18A1f0a15579bA2C1e1 (check for yourself on MyCrypto, for example) ...
2
votes
2answers
14k views

what is a private key in an ethereum wallet like metamask? and how do I find it?

my question is about what a private key is? and where would I find it on an ewallet like metamask?
2
votes
2answers
7k views

How to derive address from private key? [duplicate]

I want to give users a private key so they can Easily get address.. Why? So a single series of digits enables them to have both public address and private key. Of course this is for temporary use ...
7
votes
3answers
4k views

Migration from Geth to Parity: Is there anything to copy/export?

So, I want to migrate to gain disk space thanks to blockchain pruning (it seems that it goes from ~11.4 GiB to ~3.3 GiB) and try the difference of sync speed. Is this already documented somewhere? (...
5
votes
2answers
475 views

Is it safe to generate an account with 256 coin flips?

Suppose one generates an account with the following procedure: Flip a coin 256 times; On a paper, write each heads as 1 and each tails as 0; Convert the 256-bit string to hex by mapping each 4-bit ...
4
votes
2answers
481 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 ...
3
votes
0answers
921 views

How to access and import presale ether without the json wallet file

I purchased ether presale. I have the public key, which shows the amount, and I have a text password I created at the time of purchase. I do not have a json drop file. How do I import my wallet? I ...
3
votes
1answer
3k views

Ethereum private keys

When I go to the key store folder via Mist I find a .json-file (doesn't have a .json extension, but I believe this is still a .json file) that corresponds with my ether address (UTC blablabla). If I'm ...
3
votes
2answers
2k views

Parity - export private key for cold storage

I'm trying to store some Eth I have in Parity into cold storage. Since I have no guarantee that Parity will continue being supported several years/decades in the future, or that the seed passphrase ...
3
votes
1answer
611 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?
3
votes
3answers
4k 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. ...
2
votes
1answer
237 views

Is it possible that Ganache can handle a private key without an “0x” prefix, but Parity cannot?

I am trying to sign and send a transaction as follows: let signedTx = await web3.eth.accounts.signTransaction(options, PRIVATE_KEY); let txReceipt = await web3.eth.sendSignedTransaction(signedTx....
2
votes
1answer
3k views

How can I get a private key from a mnemonic phrase?

I want to convert a 24 words length seed phrase into a private key using web3.
2
votes
2answers
304 views

While using myetherwallet to generate offline transaction hash, can developer steal my private key?

To be very clear, I have used myetherwallet offline to send eth many times in the past. I went through the code for the version I saved and found no Maliciously code. Hypothetical for future ...