- Open two Linux Terminals
- In Terminal 1: python3 BankingServer.py
- In Terminal 2: python3 ATM.py
After the SSL Handshake finishes, you will be able to communicate with BankingServer.
A Cryptography Project where we simulate the passing of Banking Operations from an ATM to a Bank.
We first use SSL Handshake Protocol to establish an authenticated and secure connection between ATM and Bank using:
- RSA Encryption Decryption Algorithm
- AES Encryption Decryption Algorithm
Then we us the AES Encryption Decryption Algorithm to pass encrypted Banking Operations between ATM and Bank to simulate Banking Queries that could theoretically be called in real world banking applications.
- w: 1000 -> withdraw $1000
- d: 1000 -> deposit $1000
- cb -> check balance
- e -> Exit
# Public Key = (e, n), Private Key = (d, n)
e, n, d, n = generateKeys()
# To Encrypt
cipher = encrypt(msg, e, n)
# To Decrypt
plainTxt = decrypt(cipher, d, n)
# This generates the IV in a format that works for the implementation.
IV = AES.genInitVec()
# To Encrypt
ciphertxt = AES.encryptMsg(plaintext, key, IV)
# To Decrypt
decrypted = AES.decryptMsg(ciphertxt, key, IV)