Questions tagged [encryption]
Questions related to the encryption in Ethereum
155 questions
0 votes
3 answers
76 views
Encrypt data in solidity smart contract
I want to emit an event in Solidity that includes a bytes32 field. My frontend will listen for this event, but since events are publicly accessible on-chain, I want to ensure that only my frontend can ...
2 votes
2 answers
79 views
How to decrypt data on-chain (with Solidity) that was previously encrypted with a public (asymmetric) key?
Simple voting use-case, with the following characteristics: An "election admin" publishes a public key; Voters can use the public key to encrypt their vote (off-chain) and post the ...
0 votes
0 answers
47 views
The method eth_getEncryptionPublicKey does not exist / is not available
import { useState, useEffect } from "react"; const Security = () => { const [recipientAddress, setRecipientAddress] = useState(""); const [message, setMessage] = useState(&...
0 votes
0 answers
40 views
Which wallet providers have already implemented erc-5630?
My only knowledge of metamask has been deprecating the eth_decrypt rpc. Then came erc-5630 to be a solution about encryption/decryption and the problem is metamask still doesn't seem to implement it. ...
2 votes
1 answer
91 views
Public key encryption using metamask on solidity smart contract
Questions: In Solidity, how can we fetch the encrypted public key for the wallet directly from the smart contract using solidity? I have managed to retrieve it using JavaScript, but I need to know ...
1 vote
0 answers
20 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
84 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
55 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 ...
1 vote
1 answer
331 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 ...
5 votes
2 answers
848 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
71 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
1 answer
629 views
How to get Publickey of metamask by Public address?
I want to get Publickey of metamask by Public address
0 votes
2 answers
90 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
474 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
1 answer
530 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 ...