Question: can ditto breed with legendaries?
Answer: No. Because all Legendary Pokemon are in the Undiscovered Egg Group, no Pokemon can breed with them. The only exception (sort of), is Manaphy. If you breed a Manaphy with a Ditto, you will get Phione.