from cryptography.fernet import Fernet def encrypt_message(public_key, message): # Get the public key in bytes public_key_bytes = bytes.fromhex(public_key) # Generate a symmetric key symmetric_key = Fernet.generate_key() # Encrypt the message using the symmetric key f = Fernet(symmetric_key) encrypted_message = f.encrypt(message.encode()) # Encrypt the symmetric key using the public key rsa_key = RSA.import_key(public_key_bytes) cipher_rsa = PKCS1_OAEP.new(rsa_key) encrypted_key = cipher_rsa.encrypt(symmetric_key) return encrypted_key, encrypted_message

import ecdsa # Generate a private key private_key = ecdsa.SigningKey.generate(curve=ecdsa.SECP256k1) # Get the public key public_key = private_key.get_verifying_key() # Encode the keys to hexadecimal format private_key_hex = private_key.to_string().hex() public_key_hex = public_key.to_string().hex() print(f'Private key: {private_key_hex}') print(f'Public key: {public_key_hex}') from cryptography.fernet import Fernet def encrypt_message(public_key, message): # Get the public key in bytes public_key_bytes = bytes.fromhex(public_key) # Generate a symmetric key symmetric_key = Fernet.generate_key() # Encrypt the message using the symmetric key f = Fernet(symmetric_key) encrypted_message = f.encrypt(message.encode()) # Encrypt the symmetric key using the public key rsa_key = RSA.import_key(public_key_bytes) cipher_rsa = PKCS1_OAEP.new(rsa_key) encrypted_key = cipher_rsa.encrypt(symmetric_key) return encrypted_key, encrypted_message from cryptography.fernet import Fernet def encrypt_message(public_key, message): # Get the public key in bytes public_key_bytes = bytes.fromhex(public_key) # Generate a symmetric key symmetric_key = Fernet.generate_key() # Encrypt the message using the symmetric key f = Fernet(symmetric_key) encrypted_message = f.encrypt(message.encode()) # Encrypt the symmetric key using the public key rsa_key = RSA.import_key(public_key_bytes) cipher_rsa = PKCS1_OAEP.new(rsa_key) encrypted_key = cipher_rsa.encrypt(symmetric_key) return encrypted_key, encrypted_message

“Mysql” is a blockchain?

Mysql is data base that records, inputs as a data base on your own personal Blockchain? Did you hear me? The QR Code below address is that fact!’ The words that followe this thought is reflected in the sha256 statement below this statement of fact……… The Qr Code below reflects That fact and that sha2566 signiture below as a crypto graphic hash on a “MYSQL data base as follow: :-)CKB

SHA256 Hash: 55539df0f43fbc93789ae5e2900ccda3fb5beca86b6c86daeaaf1d9f22fa7a8d

Leave a Reply

Your email address will not be published. Required fields are marked *