Students at La Sapienza University of Rome knew him as Professor Freddi.
What they didn't know until recently was that their maths teacher was previously known as Carlos Masi, a popular gay porn star.
Ruggero Freddi's X-rated past resurfaced after he posted a video of himself flexing his muscles on Facebook and someone recognised him and contacted a local reporter.
He told Republica that he isn't upset that his past life has been uncovered, saying he wasn't hiding it.
"Some students reposted the photo in a few sites and from there my former life as a porn actor emerged," he explained. "To be honest, it wasn't exactly a secret."
Freddi said he initially wanted to work in engineering in Italy but a lack of opportunity meant he had to look elsewhere for work.
"I was offered to do a film in the USA. I thought, 'Why not?' A job that helps me earn more and is a more entertaining career," he said.
He signed to Colt Studios but quit in 2013 to return to Italy and get his Masters degree in maths. That is in addition to the Masters he already has in computer engineering.
He lives with his partner of 11 years, Gustavo Alejandro Leguizamon, also a former gay male porn star who went under the name Adam Champ, and is pursuing his PhD.
"I knew sooner or later something was going to happen, but I didn't expect something so big to happen," he says. "I thought someone would publish something and my students would talk about it for a while, but I wasn't expecting the entire country to actually speak about it."
He adds that he hasn't had any issues at the university.
"I'm happy and proud of both my careers," he says. "They both reflect part of my personality. I was happy I was a good-looking guy and the world recognised this. I am very happy the world recognises I'm a smart guy."