Questions tagged [encryption]

Questions related to the encryption in Ethereum

Filter by
Sorted by
Tagged with
0
votes
1answer
10 views

storing encrypted data on ethereum and using encrypt decrypt offchain

All data stored on public blockchains like ethereum is available for public viewing. All there any libraries, frameworks or solutions, for storing encrypted data inside smart contract data structures. ...
0
votes
1answer
37 views

Minimum and Maximum Values Returned by keccak256

In the statement: uint256 x = uint256(keccak256(abi.encodePacked(valuesToEncode))); What’s the minimum and maximum possible values for x? When I looped random valuesToEncode the smallest resulting ...
0
votes
0answers
20 views

Malformed private key when attempting to sign transaction

I am attempting to sign a transaction but I get a malformed private key. The code below is example code that I have cobbled together. main.go package main import ( "bytes" "...
0
votes
0answers
26 views

Curious about the Math that makes Blockchain/Ethereum work ! Any good resources to learn it?

A bit of a background about me ; Computer Engineer but during my studies i didn't dive too deep into the maths , especially the crypto maths that makes the blockchain and cryptography work looking for ...
0
votes
1answer
32 views

Best practice to store private key for containerized apps in the cloud

I am a crypto investor. I am staking a coin but the smart contract requires the user to claim and restake the rewards by transacting a smart contract function every 24 hours. Currently I am doing it ...
0
votes
1answer
70 views

Restore from ethereum keystore file results in an unusable private key

I have a keystore file from an old ellipal wallet with some eth with it. The corresponding password is correct (I can use it to display the private key and keystore in it) and I can also run the ...
0
votes
0answers
33 views

Encrypt and decrypt a string in solidity

I would like to write a function to encrypt a string by decreasing it's length then it will be possible to reach the original one too ( two way encryption ). I don't care about the security. my ...
0
votes
1answer
16 views

Is there a way to hide parameters in a smart contract?

Imagine we have a very simple contract which pays 1%, 1.2% or 3%(very special fee) on an anniversary basis. But we don't want the different holders to know who are on what fee rate of others. ...
0
votes
1answer
77 views

Public/Private Key encryption/decryption with wallet

The following case: There is a dApp in place, connected with a wallet (e.g. Metamask). Wallets usually don't offer public/priate key encryption/decryption. I want to decrypt a message for the owner of ...
1
vote
1answer
44 views

How to securely decrypt game data inside smart contract

I have a problem I haven't been able to figure out, as follows: Suppose I have a game running on the blockchain (a solidity/smart contract game) where there are a limited number of plots of land that ...
0
votes
2answers
26 views

Is there a bruteforce uses random private keys to find spesific public key as a lottery?

I actually know how private key and public key works. But I don't know how to brute force private key. In calculation it is impposible. But with luck anything is possible. What I mean is this: If we ...
0
votes
1answer
60 views

Is it possible to intercept a message sent to a smart contract (i.e. a guess for a quiz) and send it as your own before the original reaches it?

I'm trying to write a smart contract that can be generated by an individual given ETH/ERC-20 value to lock and a secret passphrase (hashed). Then, given that another individual sends the passphrase in ...
0
votes
0answers
20 views

Is it possible to use ethereum smart contracts for cryptocurrency exchange

I know ether can easily be accepted by smart contracts, however, would it be possible to exchange ether sent to the contract for another cryptocurrency? Wouldn't a private key need to be stored in the ...
0
votes
1answer
64 views

How to securely send a message

I was wondering that can I encrypt a string, send it to a smart contract, for that to be decrypted only by some address's private key? e.g "Hello" to be encrypted in a way that it would be ...
1
vote
1answer
808 views

Can you get the seed phrase of a HD wallet from the private key of one of the wallets?

Let us say I have a HD wallet. Can I get it’s seed phrase from the private key of one of its wallets? Also are seed phrases just easy to remember private keys? If so does that mean that from the seed ...
0
votes
0answers
17 views

Hiding Function Call Arguments

I am trying to create a smart contract for public tenders. I have a condition: bidders cannot see others' offers before tender ends. The contract accepts bids via a function. I have two major problems:...
2
votes
1answer
279 views

ERC721 Metadata encrypted by owner's public/private key

Is there a good way to keep personal data (e.g. name, address , etc.) in the ERC721 metadata JSON, encrpyted with the public key of the owner, so that only the owner can decrypt it with his/her ...
3
votes
1answer
263 views

Why doesn't web3.js/metamask have a decrypt with private key function yet?

For smart-contracts and dApps it is in many cases important to put encrypted data on the blockchain, encrypted with the public key. I have been searching, but there doesn't seem to be a way to decrypt ...
0
votes
0answers
82 views

What is the best practice when storing a custodial wallet with node.js and mysql?

I'm using Adonis.js v4 (it's node.js) and mysql (on RDS) as my database. I need to create an ethereum wallet for each of my user's and I need to make transaction on their behalf with their wallet (...
1
vote
1answer
79 views

Verifying ETH Deposit Contract signatures using Chainsafe BLS library

I am attempting to verify BLS signatures using the Chainsafe BLS library. I am attempting to independently verify signatures associated with deposits to the ETH Deposit Contract. In order to test that ...
3
votes
0answers
74 views

Homomorphic encryption with Ethereum compatible chains

Are there any blockchains or even Ethereum mainnet contracts that would offer homomorphic encryption primitives and example code? A sample use case would be homomorphic secret sharing that is needed ...
1
vote
1answer
880 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 ...
1
vote
2answers
83 views

Store encrypted data on-chain VS on cloud

So, I am currently doing research for a project and an interesting question was born. If I have data that I want to store encrypted, why to choose blockchain instead of a cloud provider? Since the ...
4
votes
1answer
150 views

What is the v part of transaction signature?

If I understand correctly when we send a transaction, we send an unsigned part m and a signature consisting of v, r, s. Each node verifies the signature by checking: hash(m,r) * publicKey + r = s * ...
2
votes
0answers
54 views

Confidential data encryption on blockchain

I already built a supply chain that is able to collect product information on Ethereum. Now, that data can be confidential, but I still want to do Matrix calculations on it. I came across homomorphic ...
1
vote
1answer
61 views

Why is privateKey padded before secp256k1 signing?

I am checking how the Ethereum handles signing but I can't figure out why the math.PaddedBigBytes is necessary: func Sign(digestHash []byte, prv *ecdsa.PrivateKey) (sig []byte, err error) { if ...
1
vote
1answer
254 views

Is it possible to have multiple private keys for a single public address? [duplicate]

Since the ratio of all possible digits (please correct my math if I am wrong) of a public key versus private is: 1/79228162514264337593543950336 for public (40^16): 1 461 501 637 330 902 918 203 684 ...
0
votes
1answer
774 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 ...
0
votes
1answer
46 views

Data encryption

Since all data on the Blockchain is public. Presume I have multiple users submitting data which I want to hide, is there a way I can encrypt that data on the Blockchain ? Or do I have to encrypt off-...
2
votes
1answer
103 views

Algorithm used for symmetric key encryption by quorum

What are the symmetric key encryption techniques used by the enclave in quorum to encrypt the payload? The documentation of quorum mentions that the enclave uses a symmetric key to encrypt the payload ...
0
votes
1answer
145 views

Asymmetric encryption with master Key

Is there any way i can derive private and public keypairs from a Master Key? The Master Key should be able to decrypt every encryption made with the generated Keypairs. to explain a bit further i ...
1
vote
1answer
213 views

How to store and encrypt Keys?

I am developing chrome extension like metamask for the private Chain. I have generated the keys and using localStorage to store the Keys. But I am not sure whether I am going correct or not for ...
0
votes
1answer
285 views

Storing encrypted data and decrypt on-chain

The idea was to store the encrypted number of tokens,and when user was sending his private key, smart-contract would decrypt the data and perform an action of sending tokens to someone else. The catch ...
3
votes
1answer
846 views

Decrypt message on-chain

I want to store some data in smart contract and then decrypt it on chain. Pseudocode: contract EncryptedData { bytes data; string public decryptedData; constructor(bytes data_) public { ...
4
votes
2answers
622 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
49 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 ...
0
votes
2answers
110 views

Encryption and Decryption when transmitting data

If I was sending data to a smart contract, do I need to encrypt it before transmitting and decrypt it in the smart contract? Or is this done automatically?
0
votes
2answers
391 views

Blockchain Smart Contract EHR

I'm trying to do a miny EHR(Electronical Health Record) with Smart Contracts where I have a Pacient Contract. The problem is that in solidity everything is public, even the private variables, so I got ...
1
vote
1answer
252 views

How to get decrypted transaction data in quorum?

On Quorum_Node1 I am sending a transaction with privateFor: parameter as follows: eth.sendTransaction({from: eth.accounts[0], to: "0xca84356...9a3d0ccf92b8e", data: web3.toHex('sample message for ...
2
votes
2answers
569 views

Offchain encryption in Ethereum dapp

Im wrting a dapp which holds / manages sensitive data which might need to be encrypted and decrypted and push again into chain. I know it is not safe to encrypt data in smart contract,which is why Im ...
0
votes
2answers
85 views

Storing private data that will be decrypted by a smart contract

Another private data problem! I would like to store some data in a Smart Contract, encrypted so nobody can see it upon some specific condition (time, or whatever). For instance, after one year, this ...
1
vote
2answers
3k views

Encrypt data using public key

I have three data fields in a form which will return a string. I would like to hash the value of these three strings and store it in the blockchain. However the data in these three strings is ...
1
vote
1answer
2k views

How to encrypt a string with a smart-contract private-key and decrypt that offline

Say I want to make a smart contract that is able to save secret messages (strings). The messages should be stored only in encrypted form so no one can read them, but should be decrypt-able by a couple ...
0
votes
1answer
84 views

Is Data Stored on Ethereum encrypted or only RLP encoded?

Is Data Stored on Ethereum encrypted or only RLP encoded? If data is not encrypted, is there some way to secure and encrypt it using AES encryption algorithm in cipher block chaining (CBC) or XTS mode ...
3
votes
1answer
367 views

geth inter-node communication (devp2p/rlpx) encryption

I am currently analysing the encryption mechanisms used in geth. Currently I have gathered the following information from the source code (https://github.com/ethereum/go-ethereum/blob/master/p2p/rlpx....
0
votes
1answer
106 views

what encryption does myetherwallet use?

I am trying to use the encrypted ethereum private key created by myetherwallet within my application. Everytime I need to send money, I will input my password so that my application can decrypt it and ...
1
vote
1answer
459 views

Encryption with BIP39 specification secp256k1 keys?

We are making a system where users can share files with other people but nobody should be able to figure out that all these different files belongs to same user on blockchain. these are the steps we ...
4
votes
3answers
4k views

How to use mnemonic to recovery my ethereum wallet

I use web3j to create my ethereum wallet.the Code just like down import org.web3j.crypto.Bip39Wallet; import org.web3j.crypto.Credentials; import org.web3j.crypto.ECKeyPair; import org.web3j.crypto....
1
vote
1answer
253 views

Understanding the UJO Smart Contract

I have trouble understanding the underlying mechanism for the UJO Music Portal, that helped Imogen Heap sell her album online. There is a smart contract that enables people to pay using ETH with ...
0
votes
1answer
63 views

In ethereum if i submit any data is it stored in encrypted format? [closed]

Does Blockchain perform encryption/decryption of data?How and where is data stored in ethereum case.