G
G
genek_orlov2018-12-06 21:52:41
Python
genek_orlov, 2018-12-06 21:52:41

How to send an encrypted message?

I am using the RSA library. An example program from the Internet:

import rsa

(pubkey, privkey) = rsa.newkeys(512)

message = b'Hello Blablacode.ru!'

# шифруем
crypto = rsa.encrypt(message, pubkey)
print(crypto)
print(type(crypto))
# расшифровываем
message = rsa.decrypt(crypto, privkey)
print(message)

How to transfer crypto to another user? If you translate it into string then again into bytes there will be a decryption error

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question