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

You may use the following simple function to encrypt/decrypt arbitrary data on-chain: function encryptDecrypt (bytes memory data, bytes memory key) public pure returns (bytes memory result) { // Store data length on stack for later use uint256 length = data.length; assembly { // Set result to free memory pointer result := mload (0x40) //...


2

No, it is not possible to perform public key encryption with a party where only ethereum address is known. But, if you somehow can get signed transaction from that particular ethereum address, you can get its public key. Answer to this question will be of help Get public key of any ethereum account


2

so as pointed out in comments, when you read the transaction on any node, you receive the encrypted hash of the transaction and not the actual payload. To access the payload, you would run this api on node 2.


2

This information is documented in several places and in the source code directly. Here is a link to an expanded explanation of what happens in the Tessera enclave: http://docs.goquorum.com/en/latest/Security/Framework/Quorum%20Network%20Security/Nodes/Permissioning/Network%20Permissioning/#enclave-encryption-technique. Tessera and c11n use NaCl and Argon2.


1

store the encrypted number of tokens, and when user was sending his private key ... smart-contract would ... sending tokens to someone else. I'm going to set "private key" aside and call it simply "secret" to reflect that this is a password and not a wallet private key. You'll have a contract that contains virtual "Drop Boxes" each of which contains a ...


1

You should create a symmetric key for encryption and encrypt IPFS file with it, and then encrypt this symmetric key with different public keys so that each recipient can decrypt the symmetric key and in turn decrypt IPFS file.


1

This script lets you generate a PGP KeyPair from an Ethereum Private Key using npm install openpgp: const openpgp = require('openpgp'); const ethereumPrivateKey = 'e9ee206196eb26b92b937b83b7a44974b1c3d995b9e61ca65d2c5760a97250af'; const buffKey = Buffer.from(ethereumPrivateKey); const privateKey = openpgp.util.Uint8Array_to_str(buffKey); const options = {...


1

web3.eth.sign is deprecated in Metamask instead of sign use sendAsync: const signature = await new Promise((resolve, reject) => { web3.currentProvider.sendAsync({ method: 'personal_sign', params: [web3.utils.utf8ToHex(message), address], from: address, }, (err, response) => { if(err) return reject(err); resolve(...


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