So as I recall, Ben leaves Luke and company to go shut down the tractor beam. The next time Luke sees Ben, and the first time he sees Vader, Vader is killing Ben. When, in Legends or EU, does he make the connection between "Darth Vader" and "guy in black suit that killed Ben?" Does he already know what Vader looks like before this point? Does Leia explain two minutes later on the Falcon?
According to the film's new (and canon) novelisation, Luke worked it out for himself from context. He only knows of one Jedi-killing Sith warrior and simply assumes that it's Vader that he just saw. Note that this takes place before he speaks to Leia.
“I CAN’T BELIEVE HE’S GONE.”
Those were the only words running through Luke’s head, caught in some horrible loop, as the ship lurched into space. I can’t believe he’s gone. He slumped onto the bench by the game board on the Millennium Falcon, his legs finally giving out under him. Luke couldn’t bring himself to move. He couldn’t close his eyes, either, not without seeing the way Ben had looked just before…
He’s dead, Luke thought. Why can’t I say it?
Why did he have to keep seeing the way Ben had deactivated his lightsaber and hadn’t tried to stop him—Darth Vader. The name hissed through Luke’s mind like smoke, making the hairs on the backs of his arms rise. Just seeing the man…the thing had been enough to make Luke feel as if he were drenched in ice. The shock had left Luke useless as a droid with its circuits fried.