President Trump's nominee to lead the Department of Homeland Security, Kirstjen Nielsen, testified Wednesday that cyberattacks are the greatest threat to U.S. national security, and would be the organization's primary focus if she were confirmed to lead the department.

"Each aspect of the department's mission is important and as has been mentioned, there are many," Nielsen told the Senate Homeland Security Committee Wednesday morning. "I believe one of the most significant for our nation's future is cybersecurity and the overall security and resilience of our nation's critical infrastructure."

Nielsen, who worked under former DHS Secretary John Kelly before he moved to the White House, said the "scope and pace" of cyberattacks against the U.S. government is increasing both in the number and complexity of the incidents. But she told the senators her background in national security, defense, cyberissues has prepared her to deal with the 21st Century challenge.

"My cybersecurity experience in both the public and the private sector has prepared me for the multifaceted challenge that is increasing our resilience to cyberattacks," Nielsen added.

Nielsen confirmed DHS has established a council to monitor state, local, and national elections, and promised to reach out to all states and territories to ensure they have necessary resources as they head into the 2018 election season.

Sen. Maggie Hassan, D-N.H., asked if Nielsen was "comfortable" with states' ability to defend themselves from foreign or domestic interference in the upcoming election.

"I would like to be in a place where I can answer that in the affirmative," Nielsen said.

Hassan gasped, prompting Nielsen to explain she could not answer the question because she has not worked at DHS for several months now.

One committee member asked Nielsen to name her most serious mistakes in life. Nielsen said she has learned to "speak clearly and repetitively" when she disagrees with someone's proposal.

"I also have learned repeatedly through a variety of experiences that policy cannot be made in a vacuum. It must be informed by those operators and by operational environments. There's many times where we've all had great ideas with policy hats on, but they're just not going to be implemented in a way that reaches the original intent," she said.

Nielsen reiterated Kelly's position that a southern border wall stretching from the Atlantic to the Pacific Ocean, one of President Trump's campaign promises, was not necessary, and said a combination of infrastructure and technology can do the job.

"The president has stated as have my predecessors at DHS, certainly something that I share: there is no need for a wall from sea to shining sea," she said. "Should I be confirmed, I would look forward to speaking with state and local officials, those on the ground, both law enforcement and federal law enforcement, to include CBP [Customs and Border Protection] to understand where we need some kind of physical barrier because technology, as you know, plays a key part and we can't forget it."

Nielsen, 45, worked as second-in-command under former DHS Secretary John Kelly. In July, Kelly was picked to serve as White House chief of staff. He moved to the White House and took Nielsen with him, and she has worked as principal deputy chief of staff since the summer.

If confirmed, Nielsen would be the first former DHS employee to be promoted to chief of the 15-year-old department. She also worked at DHS's Transportation Security Administration and served on the White House Homeland Security Council under former President George W. Bush.

Nielsen guided Kelly through his Senate confirmation process, where the two developed a close working relationship.