A Framework for AI-based Side-channel Attacks Featuring a New AI Method