This is more usual than ‘Diamond cuts diamond’.
Diamond is the hardest substance known; a diamond can be cut only by another diamond. The phrase refers to opponents who are an equal match in wit, cunning, or strong-mindedness. Any conclusion reached is not without mutual injury.