33

thx @Edmunx Edgar, i tried to use ECIES, but it failed to install because of a subdepencency. I now used the bitcore-lib together with bitcore-ecies. This works like expected. EDIT: I created a npm-module which does exactly theses things and also has some performance optimisations and tutorials: github:eth-crypto. Here is my code for anyone with the same ...


20

Yes and no. No - a Bitcoin address cannot be directly used in Ethereum, and vice versa. Yes - underneath, a bitcoin private key is essentially a random 256-bit number (in a certain range, see bitcoin wiki). And the private key's corresponding public key is essentially the x and y coordinates of a point on an elliptic curve. Bitcoin and Ethereum both use ...


19

Since all transactions and data on the blockchain are public, you need to encrypt the data outside of Ethereum and insert the already encrypted data. Similarly you need to pull the encrypted data and decrypt it locally. I'm sure there are a lot of crypto libraries for javascript that will allow you to do this, web3 I doubt contains such functionality as it's ...


16

v, r, and s are parameters that can be parsed from the signature. Here's a good example from the ethereumjs utils library: var sig = secp256k1.sign(msgHash, privateKey) var ret = {} ret.r = sig.signature.slice(0, 32) ret.s = sig.signature.slice(32, 64) ret.v = sig.recovery + 27 Note how you can parse each value from a given signature. Even ...


12

geth-compatible keystore file can be created in Node using ethereumjs-wallet library: > var Wallet = require('ethereumjs-wallet'); > var key = Buffer.from('efca4cdd31923b50f4214af5d2ae10e7ac45a5019e9431cc195482d707485378', 'hex'); > var wallet = Wallet.fromPrivateKey(key); > wallet.toV3String('password'); '{"version":3,"id":"467233bf-45ec-423b-...


12

If I understand your question correctly, what you are referring to is called secure multi-party computation which is not a current capability of smart contracts. In fact, it's a challenging problem that is probably best done off the blockchain as it can be computationally intensive. I'd recommend looking at MIT's enigma and openPDS projects for starters. ...


11

Just to add to the very good accepted answer: Coin | Address size | Address encoding | Address creation ---------+---------------------+------------------+------------------ Bitcoin | 160 bits (20 bytes) | Base58Check | RIPEMD160(SHA256(<public_key>) Ethereum | 160 bits (20 bytes) | HEX* | KECCAK256(<public_key>)** ...


10

Assuming you have the public key of the person you want to send a message to (if they've already signed a transaction you can recover it from the signature) it should be possible to encrypt and decrypt using ECIES. Apparently there's a JavaScript library for this, I assume you can use it in a browser: https://bitcointalk.org/index.php?topic=627927.0 I have ...


9

The short answer is no. There's a term for computing on encrypted data: homomorphic encryption. This is currently not usable for regular applications. If it were possible it would have huge positive implications for security. The idea of homomorphic encryption is the ability to carry out computation on ciphertext, so that the result when decrypted would be ...


9

You can't make an Ethereum contract start with plaintext and meaningfully encrypt a message, because all contract execution has to be verifiable by all the nodes in the network, so as you say everybody would also have to be able to see your plaintext. If you want to send a message from one user of a contract to another user of the contract, the obvious ...


9

Since the smart contract is replicated on all the nodes across the network, will every one be able to see all the contents of the smart contract? Short answer: yes. If the contract does the decryption, it needs to store the private key. If the private key is stored in the contract, it is replicated to every node, and yes, as a result every node will do the ...


7

The key is encrypted with 128-bit AES in Counter (CTR) mode.


7

Check out the Use Cases section in the Ethereum Whisper protocol at https://github.com/ethereum/wiki/wiki/Whisper-Overview : shh.post({ "topic": t, "payload": p }); No signature, no encryption: Anonymous broadcast; a bit like an anonymous subject-filtered twitter feed. shh.post({ "from": myIdentity, "topic": t, "payload": p }); Open signature, no encryption:...


7

I think this is a Bitgo privatekey backup format. I've created already a bitcoin account with Bitcold i've got after backuping my key a similar file: {"iv":"0fSuBvpAJG36OEGHC59VEg==","v":1,"iter":10000,"ks":256,"ts":64,"mode" :"ccm","adata":"","cipher":"aes","salt":"hE44Rh**fBI=","ct":"XPU**7nMb/rW 4jDeUAstbutIJxKKleh3XZ+ThTMnIj52ilQYMza3D3DNS6YnngplUl3/**...


6

You cannot prevent anyone with access to the blockchain from reading state and executing code in any way they wish. You can encrypt data, but that doesn't prevent people from seeing it, just interpreting it. Assuming you're happy with people who have stopped subscribing being able to access the data that was already available to them - something you ...


6

Ethereum uses DevP2P, which is a general protocol of discovery and connection of nodes, with an ethereum subprotocol defined on top of it (as opposed to the subprotocol of swarm, whisper, etc). You can read the following links to get a deeper view: https://github.com/ethereum/devp2p/blob/master/rlpx.md https://github.com/ethereum/wiki/wiki/%C3%90%CE%9EVp2p-...


6

It's a block cipher that uses a cryptographic hash function that encrypts or decrypts your private key of your Ethereum account. This is done after you generate a private key to encrypt the private key (aka make it so you must provide the password AND this file, not just the private key). Generating a Private Key I am going to skip over private key / ...


5

No, they cannot trace your IP from the data stored in ethereum network. Your wallet, if it is Mist, it is actually writing the transaction data to your wn private Ethereum node and then only publishes to the live ethereum network. So, it is traceable back to you if and only if they are logging all the requests or you have published your wallet address ...


5

No. Passwords cannot be derived from transactions. Passwords encrypt your private keys. Two different keystore files have 2 different private keys and their encryption by the same password results in 2 very different encrypted keys.


5

The knowledge of a public key (such as Ethereum addresses) should never be used as method of authentication. Public keys are meant to be shared, for instance to receive a payment in a cryptocurrency. If a client can just provide that address to autenticate, then everybody who knows the public address could impersonate the client. The following JavaScript ...


5

When using public key cryptography (asymmetric cryptography) you have to differentiate between signing and encrypting. A signature is a proof of the data being signed by the owner of a certain public key. Clear text can also be signed while remaining clear (not encypted). Encryption ensures that only who has access to the private key corresponding to a ...


5

You can extract an address and public key from a signature - see ecrecover. There are several approaches you could take to do what you want to accomplish. One would be to store public keys in a contract. When I want to send someone an encrypted message I grab their public key through a contract, encrypt the data and send it. They will be able to decrypt ...


5

In the case where it is acceptable to perform the encryption and decryption off-chain, follow these four steps: Off-chain, use an encryption library to encrypt the message using the recipient's public key associated with their Ethereum address. An example of how to this: How to encrypt a message with the public-key of an Ethereum address Submit an Ethereum ...


5

ECIES is the Elliptic Curve Integrated Encryption Scheme. You should not wrap your head around the terminology too much, this is basically the crypto behind all Ethereum keypairs. To generate a new keypair you can use ethkey. $ ethkey generate random secret: f302ecc87edbd4575bbe9bd8cbdaad3470191dad232c6df47cc294af084c15b7 public: ...


4

The short answer is no, this is not currently possible. There are technologies that would allow anonymous transactions, such as zkSNARKs, ring signatures, and homomorphic encryption, many of which are described in the blog post you reference. Unfortunately, these systems are not quite ready for prime-time; for the most part they are too inefficient to work ...


4

The network is public, messages across it aren't encrypted and your ISP can see the transactions you're sending. Edit: I'm wrong, see @dbryson's comment.


4

Mist is actually not directly connected to the blockchain or your account. It's just a UI over top of the actual Ethereum client. If you look on your mac you should see the folder ~/Library/Ethereum. It actually contains the blockchain and your account keys in the keystore sub-directory. DO NOT DELETE THE FILES IN THE KEYSTORE DIRECTORY they are the keys ...


4

Note that no matter if you are using an internal or external call, in order to decrypt something on-chain, you have to give the miners the private key, which is obviously not so private anymore. That is the reason why encryption is hardly implementable in open blockchains like Ethereum.


4

An address is simply the last 20 bytes of the keccak256 hash of the public key. For ecdsa algorithms (and RSA), each private key has exactly one public key. However, when this public key is hashed to create the address, it results in a loss of information as the resulting trimmed hash is smaller than the input public key. This means, by the pigeonhole ...


3

I did some research and all the information I can find is due to a bug in how Windows handles zip files created on a Mac as well. The initial files most likely had their NTFS encryption set which throws this error when you attempt to unzip it. I also found this answer about the same issue: Encrypted files might need to be decrypted before the files can ...


Only top voted, non community-wiki answers of a minimum length are eligible