He is also a professor at the Department of Computer Science and Engineering at the Indian Institute of Technology, Kanpur.
He has been honoured with Padma Shri, India's 4th highest civilian award, in 2013.
The test is the first unconditional deterministic algorithm to test an n-digit number for primality in a time that has been proven to be polynomial in n.[5] In September 2008, Agrawal was chosen for the first Infosys Mathematics Prize for outstanding contributions in the broad field of mathematics.
[6] He also served on the Mathematical Sciences jury for the Infosys Prize in 2014 and 2015.
[7] Agarwal served as the Deputy Director of IIT Kanpur from 2017 to 2021.