However, Gina Haspel did tell members of the Senate Intelligence Committee she does not believe that torture works.
The 61-year-old added that she would not carry out any presidential order she considered immoral.
Her potential appointment is controversial because she headed a covert detention centre in Thailand, Detention Site Green, where it is claimed suspects were waterboarded – a practice that simulates drowning.
More than 100 former US ambassadors have sent a letter to the Senate opposing Ms Haspel’s appointment.
They claim that, were she given the job, authoritarian leaders around the world would be able to say America’s behaviour is “no different from ours”.
Ms Haspel, who is currently acting CIA director, was asked by junior senator Kamala Harris, from California, whether previous interrogation techniques including waterboarding were immoral.
Ms Haspel said the CIA had worked to “prevent another attack on this country given the legal tools that we were authorised to use”.
Ms Harris asked her: “Please answer the question.”
When Ms Hapsel said she had answered, Ms Harris said “no you’ve not”, adding that she needed to say “yes or no”.
“The president has asserted that torture works. Do you agree with that statement?” Ms Kamala asked.
“Senator, I don’t believe that torture works,” Ms Haspel replied.
When she added that “valuable information was obtained from senior al Qaeda operatives that allowed us to defend this country and prevent another attack”, Ms Lamala asked whether that was a yes.
Ms Haspel said: “No, it’s not a yes. We got valuable information from debriefing of al Qaeda detainees, and I don’t think it’s knowable whether interrogation techniques played a role in that.”
A top Democrat on the committee, senator Dianne Feinstein from California, said she had been “disappointed in certain answers”.
Ms Haspel, who has spent more than 30 years working undercover, both domestically and abroad, describes herself as a “typical middle-class American” with a “strong sense of right and wrong”.
Mr Trump wants her to take over from Mike Pompeo, who has become his secretary of state.
More from United States
Quick-thinking granddad’s fancy footwork foils armed suspect in Ohio
US officials in China talks amid trade war fears
Trump renews criticism of new US London embassy, calling area ‘horrible… lousy’
Almost 100 ill as lettuce-linked E. coli outbreak hits 22 US states
NFL star Colin Kaepernick gets Amnesty award for kneeling protest
Russia: We told US where in Syria they could not bomb
After joining the agency in 1985, she quickly discovered she had a “knack for the nuts and bolts” of the profession.
If confirmed, she will be the first female head of the CIA.