World number one will face either Gilles Müller or wildcard Tommy Robredo following first-round bye.
Federer has already won the 2017 Australian Open, where he defeated Nadal in the final.
Murray has returned to action after recovering from an elbow injury.
Federer has risen from world number 17 to world number four in less than three months.
World number one lost 3-6, 6-7 to 18-time Grand Slam champion at Zurich's Hallenstadion.
Federer has made his best start to a season since 2006 capturing three titles thus far.
World number one targets French Open return but still unable to serve properly.
Federer "would not stand a chance" against 2016 version of Djokovic, says Janko Tipsarevic.
World number one forced out of Davis Cup tie against France but could play Match for Africa 24 hours later.
GB captain Leon Smith names the same side that beat Canada in the previous round.
Elbow tear means world number one is expected to miss quarter-final clash in Rouen.
Nadal thinks he will be ready for the ATP tour without his uncle and longtime coach.
Leon Smith tells Andy Murray not to rush back from the right elbow injury.
Federer has had his best start to a season since 2004 and is currently on a 13-1 run.
The competition will also feature Rafael Nadal, Stan Wawrinka and Grigor Dimitrov.
Djokovic, like Murray, withdrew due to an elbow injury.
The world number one was recently knocked out in the second round at Indian Wells.
Federer will play Wawrinka in the final at the BNP Paribas Masters on Sunday (19 March).
Sharapova will make her return from a 15-month ban at the Porsche Grand Prix in April.
World number one defeated 6-4 7-6 in round two in California.
Murray lost 6-4, 7-6 (7-5) to Pospisil in the second round of the BNP Paribas Open.
Federer is currently ranked number 10 in the world.