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 address itself. Until the others don't know what that public address is, is the message safe?

I would use then another wallet and put this signed data in the transaction, and at some later time I would reveal to people that public address, which would prove that I used that particular wallet to do certain operations/transactions.

Use case: What I want to do is commit myself to using a specific wallet in advance, and later on this wallet will be used to generate Chainlink VRF random number, which will then be used in determining NFT metadata mapping (i.e. assigning actual NFT metadata to the NFTs in a random order).


You can actually sign the public address of some wallet by the same wallet which puts the signed data in the transaction. This way you don't need to rely/use the wallet whose public address got encrypted for the encryption and decryption, which is also more practical in case you do this for more wallets later on, because you can encrypt and reveal/decrypt all of them (separately) with this same wallet.

1 Answer 1


Until the others don't know what that public address is, is the message safe?

Yes. If you encrypt a message and post it on-chain, you can create what is called a commit and reveal scheme.

Note that any of the popular Ethereum wallets do not support encrypting messages. You would need to build a custom software for this where you import the private key.

  • My main concern is if using the public address as the content makes the encryption any less safe, since the same content (i.e. public address) is used to decrypt that same content? Just want to be clear here. Apr 24 at 12:37
  • I added use case to my question. Instead of the commit and reveal scheme, we could also just simply make a transaction to ourselves and put the encrypted data into the TX? Apr 24 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.