Questions tagged [encryption]
Questions related to the encryption in Ethereum
155
questions
0
votes
0
answers
6
views
How to probe ownership of a MetaMask derived encryption public key?
If I were to store the messages targeted to a specific encryption public key generated by MetaMask (using x25519-xsalsa20-poly1305), how could I allow the recipient to authenticate and claim the ...
1
vote
0
answers
15
views
Given a public key, is it possible to create a challenge that would produce a known signature, if signed by the corresponding private key?
Noob alert!
Since hardware wallets don't support decryptWithPrivateKey function, I would like to make a workaround using signatures
If it's possible to create the challenge, that would produce a pre-...
0
votes
1
answer
34
views
encrypt address and save into smart contract
Is there any way I can encrypt my MetaMask wallet address and save this encrypted address in a Solidity smart contract? For example, encrypt the address off-chain and store it in the smart contract. ...
1
vote
0
answers
22
views
Secure and deterministic browser symmetric key generation?
I would like to know, what are the best practices to solve the following problem:
Imagine there's an Alice with browser and Ethereum account (connected with Metamask / Wallet connect / etc). She needs ...
0
votes
0
answers
11
views
Treshold signature computing
I have two questions:
Can someone point me to some solution providing multi-party {t,n}-threshold ECDSA?
I imagine that such scehemes works first by creating an ECDSA private key then sharding it to ...
0
votes
0
answers
13
views
Signing a message which includes another signature
I'm trying to implement a commit-reveal scheme, where I also want to sign the input parameters to the Solidity function which commits the encrypted message. The signature verification of the input ...
1
vote
1
answer
70
views
Use private key to encode your own public address
Let's say I use a wallet's private key to encode/digitally sign it's own public address, meaning that upon using its public address to decrypt that encoded/signed data, the result would be the public ...
3
votes
1
answer
215
views
Now that eth_decrypt and eth_getEncryptionPublicKey are deprecated, is there a good way to encrypt and decrypt data via a user's private key?
The project I'm trying to make has this flow:
User inputs some data
It gets encrypted using their private key
It gets stored to a place which is accessible to anyone but only the person in possession ...
1
vote
1
answer
36
views
Can an encrypted message be safely revealed
In this demo Alice is using Bob's public key to sign a message that only the Bob can decrypt. Is it safe for Bob to reveal this decrypted message, or would that allow an attacker to determine his ...
0
votes
0
answers
37
views
How to encrypt an non encrypted message using the same method as metamask?
I've been playing around with the decryption API MetaMask provides here: https://metamask.github.io/vault-decryptor/
I'm wondering if anyone know if there's a way to re-encrypt the same seed phase to ...
0
votes
1
answer
309
views
How to get Publickey of metamask by Public address?
I want to get Publickey of metamask by Public address
0
votes
2
answers
45
views
what is the best technique to encrypt any document before storing (uploading) on IPFS?
I want to encrypt document before uploading to IPFS and enable more than user to decrypt it and note that the number of users may increase or decrease in any time?
1
vote
0
answers
203
views
How to solve this error MetaMask - RPC Error: The requested account and/or method has not been authorized by the user?
I used below code from account 1 on metamask to encrypt certain text
let encryptionPublicKey;
await window.ethereum.request({
method: 'eth_getEncryptionPublicKey',
params: [account1], // you must ...
0
votes
0
answers
52
views
Using eth-crypto npm module with lots of errors
I'm trying to use some of the functions in eth-crypto npm module (https://github.com/pubkey/eth-crypto) by @pubkey , I create an empty react project install it via npm install eth-crypto --save and ...
0
votes
1
answer
200
views
What is the best way to store the private key to sign transactions on web3js
So I have a web3js script(bot), something along these lines:
let walletAddress = ""
let pvtKey = ""
signed = await web3.eth.accounts.signTransaction(txObject, pvtKey);
What is ...
0
votes
1
answer
89
views
Is it possible to decrypt data on-chain so that others do not see it
I was wondering if it was possible to do secure encryption/decryption or signature and verification entirely on-chain?
To my understanding, this is impossible because in order to sign a message we ...
2
votes
0
answers
51
views
Decrypting a message using smart contract
Is this possible to send a message from address A to address B on Ethereum (or another type of blockchain), and it is so that address B can't open the message, unless a smart contract permits it ...
2
votes
1
answer
300
views
Does a hardware wallet always generate the same seed phrase?
If I buy a new Ledger out of the box (untampered by the seller) and generate its seed phrase (Attempt #1), but then format the device to factory settings in order to once again re-generate a seed ...
1
vote
1
answer
478
views
Can two Ledgers generate the same seed phrase?
There’s millions of hardware wallets in existence right now generating 24 word seed phrases offline. Surely somewhere in the world there must be two or more devices that have generated the same seed ...
2
votes
3
answers
898
views
Is there any example of obfuscation or mechanism for Ethereum smart contract
I am trying to create an 'obfuscator' for Ethereum smart contracts, it can either obfuscate solidity code or the 'bytecode'.
Is there any encryption techniques which can help in protecting 'sensitive ...
4
votes
1
answer
201
views
Why does Tornado Cash can not be attack by "front running attack"?
If a miner sees the transaction with the "Tornado Cash withdraw" in the mempool and decides to create another transaction of his own, how the Tornado Cash defeat this?
3
votes
2
answers
401
views
if I put a message's sha256() hash on smart contract, can anyone recoverd the message?
If no one can recover the message, can I use this message as a "password" to some functions in the smart contract? like:
contract Test {
bytes32 hash;
constructor(bytes32 _hash) {
...
0
votes
0
answers
26
views
Allow decryption key to be known only after a certain time
We have a smart contract containing encrypted data that should remain encrypted till a specified timeLimit.
Then, the decryption key would be made public, for everyone to read that data.
We want to ...
1
vote
1
answer
443
views
How to store an encrypted variable for each owner of an NFT that only they can decrypt?
Let's say, for example, we want to store a URL on-chain for a specific NFT, but we do not want anyone else to be able to see the URL.
We can have a function in the contract that asks for an ID and ...
0
votes
1
answer
556
views
Encrypt and decrypt string inside contract using contracts private|public key
I need to write down methods to encrypt and decrypt string messages using contract private | public keys in a smart contract. However you may think it's dangerous or anything else, the question is: Is ...
0
votes
1
answer
88
views
How encrypted and not encrypted data look like on Etherscan?
I would like to understand the importance of encrypting sensitive data before sending them to an Ethereum smart contract and its significant benefit compared to the case where we don't encrypt them.
...
0
votes
1
answer
20
views
missing encodePacket / .abi + keccak256
I'm not 100% sure how to describe my issue, total noob following the BlindAuction solidity tutorial and stuck unable to compile. any help is much appreciated.
function generateBlindedBidBytes32(uint ...
0
votes
1
answer
16
views
Library for a local encrypted wallet
Is there any wallet/library that restricts access to a private key through encryption, but also allows certain actions to be performed by default, such as signing messages?
I would like to have code ...
0
votes
2
answers
30
views
Encryption or hashing with data
The data which we send via Ethereum blockchain , is it ecrypted and sent to sender only & never stored on blockchain OR is it hashed ?
Hashing is a one way process . It means that the data once ...
1
vote
0
answers
51
views
How to encrypt a message with multiple public keys for multiple recipients
Is it possible to encrypt a message using multiple Ethereum public keys for multiple recipients of a message, e.g. using
https://github.com/pubkey/eth-crypto#encryptwithpublickey
, so that each ...
1
vote
1
answer
555
views
Data decryption in a smart contract
I have an address named 'verifier' set in a smart contract.
A user has a message which is encrypted from verifier's private key. The user send this message in a transaction to contract.
How can we ...
1
vote
1
answer
770
views
Got different Public keys from same Private key. `eth-crypto`'s `recoverPublicKey()` and MetaMask's `eth_getEncryptionPublicKey`
Update (2022.03.25)
From @Ismael's comment and MetaMask github issue:
The key from MetaMask's eth_getEncryptionPublicKey rpc is NOT the Public Key of my account, but a different key calculated from ...
4
votes
1
answer
3k
views
Encrypting/Decrypting data on IPFS using Ethereum Public/Private key?
I would like my app to connect to a Web3 wallet, store encrypted data on IPFS, then retrieve that data and decrypt it (without the user exposing their private key to my app).
Is this possible? If not, ...
2
votes
1
answer
1k
views
Encryption using public key from eth_getEncryptionPublicKey metamask function
I'm trying to encrypt data/files before uploading them to IPFS and I want to do this using metamask provided public and private keys. For this, I have tried using eth_getEncryptionPublicKey but this ...
1
vote
0
answers
207
views
Decrypting data on chain and verifying the decryption is correct
I already know decrypting data on chain will reveal the key and the plaintext to everyone and for my use case that is exactly what I want.
I want to be able to build a contract that has a pre-...
0
votes
1
answer
388
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
1
answer
215
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
1
answer
784
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
1
answer
576
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
0
answers
217
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
1
answer
90
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
1
answer
1k
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
1
answer
236
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
2
answers
732
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
1
answer
252
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
1
answer
214
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
1
answer
2k
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 ...
2
votes
2
answers
480
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
1
answer
435
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 ...
2
votes
1
answer
273
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 ...