Adaptive chosen plaintext and chosen ciphertext attack