Proto-Indo-European *kar-/*ker- "hard" in the o-grade suffixed form *kor-tu- became Old High German hard "hard, bold, stern". Combined with rīhhi "rule" (from *h₃reǵ-) we get Rīcohard "strong in rule", and Richard.
*kar- was possibly extended to refer to things with hard shells, like crabs, as in Greek καρκίνος (from *kar-k-ino-) and the Latin cancer (dissimilated from the reduplicated form *kar-kr-o-) - both meaning "crab, sign of the Zodiac, cancer".
How do we get from "crab" to "tumour"? According to medieval writers, it was because the swollen veins around a tumour resembled the legs of a crab.