A week after also beating Riske in straight sets in Rome, Keys' serve was constantly under pressure but she saved nine of 11 break point chances and went on to a 6-4, 6-4 triumph.
"We were taking bets on when we think we're going to play each other again," Keys said. "I'm thinking Eastbourne. She thinks Birmingham. So we'll see. Hopefully it's not next week. It's always tough to play your friend and doubles partner. You never really want to see that match-up, but it happens.
"She definitely played a lot better than last time. She was really going after her shots and moving me around and playing aggressively. In key moments my serve definitely helped me out. It was a couple points here and there."
Keys' opponent in Thursday's quarterfinals will be former World No.15 Julia Goerges.
"She's been in the Top 20 before," Keys said. "She has won a couple of titles, so she's obviously a great player. I'll figure out a game plan and hopefully execute it well."
No.4 seed Andrea Petkovic, playing this event for the first time since capturing the title in 2011, won five straight games from 3-1 down in the first set and five straight from 2-1 down in the second for a 6-3, 6-2 defeat of Vania King. The only seed still alive here next plays Puerto Rican No.1 Monica Puig.
"I played better than yesterday, which is good because that shows progress," Petkovic said. "The first round is always difficult, but I was much more in rhythm today, and it was ideal conditions for tennis."
Camila Giorgi rallied from a 7-5, 4-1 deficit for a 5-7, 7-5, 7-6(2) victory over Claire Feuerstein that lasted two hours and 46 minutes. Her quarterfinal foe will be Spanish qualifier Sílvia Soler-Espinosa, who was a 6-4, 4-6, 6-2 winner over seventh-seeded Peng Shuai.