Questions tagged [public-key]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
61
votes
8answers
45k 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 ...
38
votes
4answers
17k 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)?
28
votes
2answers
10k 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 ...
16
votes
1answer
9k 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 ...
14
votes
2answers
2k views

What the difference between Bitcoin and Ethereum private/public keys and address?

I am trying to find a library for creating Ethereum wallets in a web environment (PHP, JS). I found Keytheremjs lib, but if use it in a browser, this tool is very slow. But I found a lot of simple PHP ...
14
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 ...
12
votes
4answers
18k 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 ...
6
votes
1answer
2k views

Get public key of msg.sender in a smart contract

How can I get the public key of msg.sender from inside the smart contract? function getPublicKey() returns (string publicKey) {} From Solidity docs, ecrecover returns an address: ecrecover(bytes32 ...
6
votes
1answer
372 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 ...
6
votes
1answer
2k views

Does ethereum support something like bip32 extended public key?

Bitcoin and Litecoin have something called XPUB key or Extended Public Key that essentially allows to track all generated public addresses, so think monitor your total balance in one key. I was ...
6
votes
1answer
788 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) ...
5
votes
3answers
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 ...
5
votes
1answer
618 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 ...
4
votes
2answers
6k 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 ...
4
votes
1answer
340 views

Verifying Bicoin signed message in Ethereum smart contract

I'd like to explore the option to verify the messages that have been signed in Bitcoin wallets in Ethereum smart contracts. Ethereum smart contract is given a list of Bitcoin addresses Ethereum smart ...
4
votes
2answers
239 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 ...
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
2k views

What algorithm ethereum uses to generate wallets?

The wallet string is the public key, while the private key is used to unlock the account and should be kept in secret. What algorithm is used to generate this pair?
3
votes
3answers
1k views

How to recover public from tx signature(r,s) and verify signature?

My first question is how to verify signature using only r,s and elliptic curve paramete, and an address (which is hashed of public key, so cannot retrieve public key from the address)? Next question ...
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 ...
3
votes
1answer
733 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
3answers
499 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?
3
votes
1answer
2k views

How to generate address from an Extended Public key?

How can I generate a wallet address when given an Extended Public Key? For example, an xpub key from Electrum? I know this can be done with bitcoin and litecoin, is there a way to do it with ...
3
votes
1answer
293 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
2answers
248 views

Securely send symmetrically encrypted data to contract?

Hey there I was wondering what the best technique would be for sending encrypted data to a contract, which can later be decrypted, either by the initial user, or by the contract itself, but not anyone ...
3
votes
1answer
168 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 ...
3
votes
1answer
3k 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-...
3
votes
1answer
223 views

Hierarchial deterministic wallets on Android

Is there some implementation which lets me create Hierarchical Deterministic Wallets for Ethereum on Android ? I am looking for some library which lets me create the same.
3
votes
1answer
270 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

Why keep a private key in uPort?

Reading the uport whitepaper https://uport.me/library/pdf/whitepaper.pdf : The purpose of having a Proxy contract as the core identifier is defined as : The purpose of having a Proxy contract as ...
3
votes
1answer
349 views

Is it possible to self-define a public/private key pair for a wallet?

Specifically, if I had valid, secure keys stored in variables from somewhere else, could I use those to initialize a wallet? Or do keys have to be generated by the wallet software? Thank you for your ...
3
votes
0answers
616 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 ...
3
votes
0answers
253 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 ...
3
votes
0answers
3k views

How to get ethereum public key [closed]

I having the ethereum wallet, how can i generate the public key on that. Any one have idea about that please share it to me EDITED VERSION: I have a local Ethereum wallet, in some form. Given that I ...
3
votes
0answers
157 views

How to encrypt messages to an account owner with the Ethereum public key? [duplicate]

As I understand it, an Ethereum account is a public/private key pair. Is it possible to encrypt a message with the public key (how?) that only the account holder can decrypt it with his private key? ...
3
votes
2answers
986 views

How to get my 256bits Public Key on geth

I created an account on geth by geth account new, I can see the address by geth account list and this address is derived by using the public key. Is there a way I can check the public key of my ...
2
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. ...
2
votes
2answers
139 views

Why public keys are not used directly as account addresses? [duplicate]

I understand that addresses are hashes of the public keys. But why? What is the rationale behind this design decision? And why 160 bits? Why not just use the hash directly? Is 160-bit guaranteed ...
2
votes
2answers
81 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 ...
2
votes
1answer
849 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 ...
2
votes
1answer
4k views

How to generate private, public and ethereum addresses using web3.py?

I want to know the process of generating the keys for ethereum using web3.py. How to generate the keys if I install my ether node. from web3 import Web3, HTTPProvider, IPCProvider web3 = Web3(...
2
votes
1answer
1k views

Quorum: Generating Public Key for a Given Address

I stood up the 7nodes example. There is a public key: ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc= provided for the privateFor field in order to change a contract value while keeping it private. ...
2
votes
2answers
5k 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 ...
2
votes
3answers
1k views

Public keys of owner and sender of a smart contract

I am quite new to ethereum. I would like to know if its possible to write a contract in which, I can know the Owner's public key and 'Sender's public key ?
2
votes
1answer
164 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?
2
votes
2answers
1k views

How wallets and web3 find public key from private key? [duplicate]

How is it possible for wallets like MetaMask or libraries like web3js to find public key by only providing private key? AFAIK this is not possible generally in elliptic curve.
2
votes
1answer
739 views

How public key is recovered for signature verification?

I see address everywhere in ethereum but not public key, and I understood that address is Keccak-256 of pubkey, and I do not think it is possible to derive pubkey from address. So, my question is ...
2
votes
1answer
579 views

How to add a contact to Ethereum Wallet?

I'd like to add the addresses of my contacts to Ethereum Wallet, so I could send them eth and Dentacoin tokens, easily. I could also check their balances and check if they got the money. How to add a ...
2
votes
1answer
238 views

Is the address under the Ethbase account in mist a public address?

Is the address under the Ethbase account in mist a public address? If so, how do I find the related private key?
2
votes
1answer
438 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('...