Tuning pegs are conical, please do not measure the pegs at the upper square but at the point where the tuning peg goes into the respective instrument (approximately in the middle).
The matching tuning keys and tuning mallets are also conical inside; in addition, the 4 interior walls in the middle are grooved, explaining the seemingly confusing dimensions. The indicated measurement e.g. 5.2mm, is measured at the extreme end, excluding the grooves inside. Of course, the lowest opening of the tuning key/tuning hammer is wider than the middle area.