Author

Topic: ECDSA Encrypt/Decrypt/Sign tool with GUI? (Read 74 times)

jr. member
Activity: 45
Merit: 18
May 16, 2023, 03:51:59 PM
#5
Yeah, about that, I have bad news for Bob and Alice should remain a test subject model as she was before, 😂.

If Alice encrypts a message with her own p, nobody other than Alice could decrypt the message.

But you could ask Alice to encrypt a message using Bob's public key so that Bob could decrypt it using his private key.
You should first understand how these things work and then try to use such tools, though to understand how they work you need to use the standard tools which already exist, GPG, PGP, are 2 useful tools.

Encrypting messages with bitcoin keys is possible but not a good practice. Let secp256k1 be used to store coins.

I think encrypting message with private key is fundamental operation of signing files.


Anyways as I searched, the Kleopatra (https://www.openpgp.org/software/kleopatra/) is good GUI tool for asymmetric encryption, also supports ECDSA NIST P-256 (not sure if it is secp256). but still it do not support encrypting with private key.
legendary
Activity: 3444
Merit: 10558
Files are usually signed using GPG not ECDSA but you can still encrypt/decrypt messages (as in plain text) using Electrum. It has a GUI and the option is available under "Tools > Encrypt/decrypt message" option. It uses ECIES (ECDSA combined with AES) to encrypt/decrypt messages. The code can also be found here:
https://github.com/spesmilo/electrum/blob/17a89efd3c19cbff1fbf76d24e5c246d6e0ed935/electrum/ecc.py#L344

Code:
message: foobar
pubkey: 0395EEF24C89CEE0312E6DD7585B6FF566499466642F92FF0160CDB3155563B9B5
encrypted: QklFMQMlRbTppQ0eCl3mFqDlQ5ibPfXStdfgeAxzwtCjKiHv2/b9ivpc/ibfbVt6+6sI7auz2mnAehhIS26VhHiKKZw1HK2BeMtk5qfycuneFFfthA==
Throw away private key I used:
Code:
Ky8CKVUHyAuPGFy8r2UCpiUEnNoQo8eBj7B8t2vYPhPEtu8cvXTA

Keep in mind that you can only decrypt messages with the keys that are part of your wallet. Don't import this key since it is publicly known or use a TestNet Electrum wallet and import the above key so that you don't accidentally forget and lose money by sending funds to this key.

A preview:


P.S. You can obviously sign and verify messages using ECDSA too. The option is available under the same path: "Tools > Sign/verify message"
legendary
Activity: 4298
Merit: 3209
Is there any secure GUI tool which i can use to Encrypt/Decrypt and sign message or files with my ECDSA Secp256k1 private key?
GUI could be binary file, or local HTML file.

I use Gpg4Win on Windows
copper member
Activity: 1330
Merit: 899
🖤😏
Yeah, about that, I have bad news for Bob and Alice should remain a test subject model as she was before, 😂.

If Alice encrypts a message with her own p, nobody other than Alice could decrypt the message.

But you could ask Alice to encrypt a message using Bob's public key so that Bob could decrypt it using his private key.
You should first understand how these things work and then try to use such tools, though to understand how they work you need to use the standard tools which already exist, GPG, PGP, are 2 useful tools.

Encrypting messages with bitcoin keys is possible but not a good practice. Let secp256k1 be used to store coins.
jr. member
Activity: 45
Merit: 18
Is there any secure GUI tool which i can use to Encrypt/Decrypt and sign message or files with my ECDSA Secp256k1 private key?
GUI could be binary file, or local HTML file.

Think of Alice had become a cyberpunk Smiley . She has a private key:

Code:
-----BEGIN EC PRIVATE KEY-----
MHQCAQEEIEYgBlyQVsH7SpHUH7x4RErcckhu7ary/JjhP72Nk19EoAcGBSuBBAAK
oUQDQgAE1MtHIxlGP5TARqBccrddNm1FnYH1Fp+onETz5KbXPSeG5FGwKMUXGfAm
SZJq2gENULFewwymt+9bTXkjBZhh8A==
-----END EC PRIVATE KEY-----

and public key

Code:
-----BEGIN PUBLIC KEY-----
MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAE1MtHIxlGP5TARqBccrddNm1FnYH1Fp+o
nETz5KbXPSeG5FGwKMUXGfAmSZJq2gENULFewwymt+9bTXkjBZhh8A==
-----END PUBLIC KEY-----

she gives her public key to Bob, is there any simple GUI tool for Alice to sign a file and sen then signature to Bob by email?
Bob also needs same tool to simply verify the file signature with Alice pub key.

or maybe she want to simply encrypt a plane text message with her private key and send it to bob by email, than bob decrypt it with Alice pub key.

is there any simple GUI (binary or better HTML) tool for this? Also encrypt, decrypt capability would be appreciated.
Thanks
Jump to: