Is it possible to do a known-plaintext attack with this set up of AES CTR mode?

Is it possible to perform a known-plaintext attack to extract the key from AES byte encryption?

The encryption is setup with the following two lines:

ctr = Counter.new(128)
crypt = AES.new(key, AES.MODE_CTR, counter=ctr)


And we have both the plaintext and the ciphertext

• No mode of operation should ever leak the AES key as it is protected by the block cipher itself. If it is leaked then it is because of a faulty protocol or a side channel attack on the block cipher implementation. – Maarten Bodewes Nov 16 '18 at 22:48

The known-plaintext attack on AES-CTR mode will reveal the encrypted output of the AES $$c_i = p_i \oplus E_k(ctr+i)$$ $$c_i \oplus p_i = E_k(ctr+i)$$
• What do you mean? The linked answer says no, but i don't know what $E_k$ is. – Silvia Inden Nov 16 '18 at 21:15
• usually, we writte $AES(key, etc.)$ as $E_k(plaintext)$. Yes, the answer is no. Your writing is coding style. – kelalaka Nov 16 '18 at 21:17