0

I have a question if anyone can help me! so I want to encrypt a message with my private key sign it and then send it to a person, the thing i see that it is not advisable to veil the private key of the metamask in the code for the encryption. I am looking for a solution to do it without using the key directly, anyone have an idea that can help me solve this stain! Thanks in advance :)

1 Answer 1

0

You can connect your metamask to https://www.myetherwallet.com/wallet/sign and sign any message you wish through it.

Myetherwallet has generally been the go to afaik

enter image description here

Select browser extension on the access page and connect with your wallet

6
  • Thank you brianleect for your answer, but I haven't understood yet, shouldn't I have used the private key directly in this way? I was wondering if you have a tutorial that will explain me more and thank you Mar 16, 2022 at 10:03
  • In this way you would have used your private key, but it wouldn't be "veil" directly which was the concern you stated I believe. The interaction would be contained within your metamask extension. If we "directly used" the private key I was under the impression it meant revealing the key, and loading it inside a python/js script to sign a message.
    – Brianleect
    Mar 16, 2022 at 10:06
  • This could be seen as the same level of risk levels as normal interactions using metamask. Revealing the key and signing through other means could open you up to other attack vectors such as malicious programs possibly reading your clipboard etc
    – Brianleect
    Mar 16, 2022 at 10:08
  • Yes I agree with you, it is not a good practice to use the private key of the metamask directly in the code The point of Metamask as a product is to never expose the private key to the web applications that the user browses to. I will try to do what you told me :) Mar 16, 2022 at 10:13
  • I wanted to vote your answer but I have less than 15 points thank you very much Mar 16, 2022 at 10:13

Your Answer

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

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