' This program deploys a polyalphabetic cipher. 'import stringALPHABET = chain. AsciilowercaseCHARACTERSTHATMUSTREMAINTHESAME = thread. Numbers + chain. Punctuation + thread.
Import mathimport sysdef routéencrypt( plaintext = ', stepsize = 4):'Takes plain text message as insight and generates encrypted text as outputImplements the path cipher technique'idx = 0matrixrepresentation = encryptedtext = '# create a matrix from simple text message with width = stépsizefor i in variety( math. Ceil( len( pIaintext) / stepsize)):matrixrow = fór m in range( stepsize):if i actually. stepsize + l.