I don't think they are the same swords personally... Because in LttP the prequel to LOZ it's put back in the lost woods, and you find the Magic Sword in the graveyard... I know LttP comes before LOZ because it says in LOZ "Ganon has escaped from the DARK WORLD"