[python]Hand made cryptography with XOR method.

ord function is to convert a character to its equivalent integer representation. chr function is to convert the integer to its character representation. random.choice() method randomly picks a character from a series of characters to form a string of N length, this is the key for encryption and decryption. A message is taken from user's … Continue reading [python]Hand made cryptography with XOR method.

[python]RSA mathematics learning tool

I wrote this script to teach myself on how to do RSA key generation (public key e and private key d), and how to encrypt and decrypt message mathematically. This tool will also be used as a refresher if I have forgotten how to calculate the RSA mathematics. This learning tool presents how the Euclidean … Continue reading [python]RSA mathematics learning tool

[python]Multiprocessing with Netmiko

Network diagram What I want to achieve There are three vIOS routers which I need to configure with some portion of harden configuration derived from Cisco's hardening guide. The configuration portion I chose is static, hence no dynamic information like the post I did last time. The purpose is to record how multiprocessing can be … Continue reading [python]Multiprocessing with Netmiko

[python]Sample encrypting and decrypting the dictionary

I am preparing for a credential in dictionary data type to be used in later projects, the entire credential has to be encrypted including username. First I generate the key for the Fernet cipher, then I get the credential if the creds.enc file is not present. The obtained credential is updated in the credential dictionary. … Continue reading [python]Sample encrypting and decrypting the dictionary