Bitcoin Forum
May 09, 2024, 05:47:58 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: ECDSA Encrypt/Decrypt/Sign tool with GUI?  (Read 74 times)
epsi1on (OP)
Jr. Member
*
Offline Offline

Activity: 45
Merit: 18


View Profile
May 14, 2023, 10:07:26 AM
Last edit: May 14, 2023, 05:17:06 PM by epsi1on
 #1

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
1715276878
Hero Member
*
Offline Offline

Posts: 1715276878

View Profile Personal Message (Offline)

Ignore
1715276878
Reply with quote  #2

1715276878
Report to moderator
1715276878
Hero Member
*
Offline Offline

Posts: 1715276878

View Profile Personal Message (Offline)

Ignore
1715276878
Reply with quote  #2

1715276878
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715276878
Hero Member
*
Offline Offline

Posts: 1715276878

View Profile Personal Message (Offline)

Ignore
1715276878
Reply with quote  #2

1715276878
Report to moderator
1715276878
Hero Member
*
Offline Offline

Posts: 1715276878

View Profile Personal Message (Offline)

Ignore
1715276878
Reply with quote  #2

1715276878
Report to moderator
digaran
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
May 15, 2023, 01:26:27 AM
 #2

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.

🖤😏
odolvlobo
Legendary
*
Offline Offline

Activity: 4298
Merit: 3214



View Profile
May 15, 2023, 01:38:52 AM
 #3

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

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10558



View Profile
May 15, 2023, 03:25:59 AM
Last edit: May 15, 2023, 03:36:09 AM by pooya87
 #4

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"

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
epsi1on (OP)
Jr. Member
*
Offline Offline

Activity: 45
Merit: 18


View Profile
May 16, 2023, 07: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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!