This paper focuses on the recognition of cipher encryption keys via machine learning, specifically Vigen & egrave;re and Advanced Encryption Standard (AES) ciphers. It does this by analyzing pairs of plaintexts with their associated ciphertexts. It is a study that attempts to achieve a classification model for the task of predicting the encryption key between pairs of plaintexts and ciphertext without knowledge of the encryption key. A set of different plaintexts, ciphertext, and keys have been used to train the model. The results had proved the success of machine learning over existing encryption techniques, also illuminating their potential weaknesses and further giving impetus to the field of cryptanalysis.