SAN FRANCISCO — As Congress holds hearings on the ongoing encryption fight between the FBI and Apple, Defense Secretary of Defense Ash Carter used a speech in San Francisco to assuage concerns from the tech industry about Washington outreach.

While declining to go into details of the particular Apple/FBI case, Carter did signal to the community here that he would not like to see a new set of laws come out of this particular case, which involves the FBI seeking access to an Apple iPhone owned by the shooter in the December San Bernadino, California, attack.

"It's important to take a step back here, because future policy shouldn't be driven by any one particular case," Carter said, according to prepared remarks. He added that the DC and Silicon Valley communities need to work together to find solutions for similar problems in the future.

"The right way is partnership. It is easy to see wrong ways to do this. One would be a law hastily written in anger or grief. Another would be to have the rules be written by Russia or China," Carter said. "That's why the Department of Defense will continue seeking to work with Bay Area companies — because we're living in the same world, with the same basic trends and the same basic threats. And we must innovate the way forward together."

Those comments are in stark contrast to those made by FBI director James Comey on the Hill Tuesday, who asked the House Judiciary Committee, "are we comfortable with technical design decisions that result in barriers to obtaining evidence of a crime?"

Before the speech, a senior defense official acknowledged that the encryption issue could be a potential friction point between DoD and the Valley, and said Carter expects to address it throughout the week.

"He knows coming in here to Silicon Valley, at this particular moment in time, that this is a very hot topic and a sensitive issue, both for the government and for companies. His goal here is to look beyond this particular legal fight. He is not a litigant in it. The Department of Defense does not have an equity in this particular fight."

But while DoD does not have a stake in the fight directly, the official did note that the department has an interest in making sure encryption remains strong across technologies.

"The Department of Defense is the largest user of encryption. So we believe very, very strongly in needing to have encryption," the official said. "We need it to protect our people, we need it to protect our ability to operate in contested environments, so we have a strong interest at play here. On the issue of encryption he's looking to partner there too with this community."

On that note, Carter said, "encryption is a necessary part of data security, and strong encryption is a good thing … we need our data security and encryption to be as strong as possible."

Later, Carter added that "I know enough to recognize that there will not be some simple, overall technical solution — a so-called 'back door' that does it all."

Carter's comments come against a backdrop of a House Judiciary Committee hearing on an FBI request to force Apple to create new software to access the cell phone of Syed Farook, who was killed along with his wife in a shootout with police following the Dec. 2 attacks.

A federal magistrate ordered Apple earlier this month to cooperate with the FBI. Federal agents believe the phone could contain answers about whether Farook and his wife worked with others to plot their attack.

Apple filed a motion last Thursday to dismiss the government's request, charging that it is in conflict with Americans' constitutional rights to free speech and to avoid self-incrimination. Google, Facebook, Twitter and Microsoft are among the tech companies supporting Apple's position.

As the dispute plays out in court, members of Congress are trying to decide what — if anything — they should do legislatively to try to resolve the encryption debate.

"Americans have a right to strong privacy protections and Congress should fully examine the issue to be sure those are in place while finding ways to help law enforcement fight crime and keep us safe," Judiciary Committee Chairman Bob Goodlatte, R-Va., and Rep. John Conyers of Michigan, the panel's senior Democrat, said in a joint statement.

Erin Kelly for USA Today contributed to this report.

Twitter: @AaronMehta