The Key to the Future (未来への鍵, Mirai e no Kagi) is chapter 406 of the Naruto manga.
Interrogating 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. Shikamaru reminds him that he lost a teacher too, but that they cannot waste time moping because they must become just as great as their latemasters.