Vigenère cipher: Issues in current implementation #3
Labels
bug
Something isn't working
documentation
Improvements or additions to documentation
enhancement
New feature or request
good first issue
Good for newcomers
prepare_string
function is not called within theencrypt
anddecrypt
functions. As such, these functions will not handle non-alphabetic characters and mixed case inputs correctly. This could potentially be used to introduce invalid characters into the encrypted text or to cause errors in decryption.unwrap_or_default()
andunwrap_or()
could potentially mask errors that occur during encryption and decryption, making the implementation less robust against malformed inputs or other unexpected conditions.extend_key
function simply repeats the key to match the length of the plaintext, a short key might make the cipher more susceptible to attacks as it effectively reduces the cipher to a set of repeatedCaesar
ciphers.To make the implementation more secure and robust, we must introduce additional input validation, custom error handling, and possibly rate-limiting to prevent abuse. We must also explore ways to make the key generation more secure and to prevent potential timing attacks.
The text was updated successfully, but these errors were encountered: