"The Key to the Future" (未来への鍵, Mirai e no Kagi) is chapter 406 of the original Naruto manga.
Interrogation of the Amegakure prisoner Jiraiya captured is left to Ibiki, while study of the Pain he captured is left to Shizune. Shikamaru visits the Konoha Cryptanalysis Team to try and decipher Jiraiya's dying message, but they conclude that they cannot do so without figuring out the key, something only someone close to Jiraiya would be able to figure out. Shikamaru asks around, but it becomes apparent that Naruto would be the only one who could help. Naruto, still sad about Jiraiya's death, has difficulty focusing. Through a visit to a pregnant Kurenai, Shikamaru inspired Naruto by reminding him that he lost a teacher too, but that they cannot waste time moping because they must eventually become just as great as their late masters.