Four suspected attackers also died in Wednesday's assault on Bacha Khan University in Charsadda.
Military spokesman Lt Gen Asim Bajwa told reporters that major breakthroughs had been made in identifying the attackers but did not name them.
One Pakistani Taliban commander claimed responsibility for the assault, but its main spokesman denied this.
The group killed 130 students at a school in Peshawar in 2014.
Early on Wednesday, gunmen entered Bacha Khan University in Charsadda, 50km (30 miles) from Peshawar, and opened fire on students and faculty as they gathered for a poetry event.
Those killed were a professor, two gardeners, one caretaker and 17 students, according to Pir Shahab, superintendent of investigations, who spoke to AFP news agency. Most of the victims were shot dead at a hostel for male students.
The attack sparked widespread outrage in the country and candlelight vigils were held for the victims in the southwestern city of Quetta. Dozens of people protested in Karachi. Read more on bbc.