Mr. Elwood, citing a 1980s precedent, said there was nothing new or unusual about such a view.

Senator Sheldon Whitehouse, Democrat of Rhode Island, challenged Mr. Elwood, saying the administration’s legal stance would let it secretly operate programs that are at odds with public executive orders that to all appearance remain in force.

The hearing, of a subcommittee of the Senate Judiciary Committee, was called by Senator Russ Feingold, Democrat of Wisconsin. Mr. Feingold accused the administration of a “sinister trend” of promoting “secret law.”

He referred to the refusal by the Justice Department to release opinions on interrogation and domestic surveillance from the Office of Legal Counsel, whose interpretations are binding on the executive branch.

“It is a basic tenet of democracy that the people have a right to know the law,” Mr. Feingold said.

Mr. Elwood, deputy assistant attorney general for the Office of Legal Counsel, disputed that declining to make legal opinions public created improper “secret law.” He said some legal opinions had to be kept from public release, at least for a time, because they deal with classified programs or to ensure that government lawyers can give confidential legal advice.

J. William Leonard, the top official overseeing document classification from 2002 until January, challenged the classifying of legal analyses. Referring to a Justice Department opinion in March 2003 on interrogation that was released this year, Mr. Leonard said that it should not have been classified and that marking it “secret” showed “either profound ignorance of or deep contempt for” classification rules. Even with the release of the memorandum, several major legal opinions on interrogation remain secret. Though the Justice Department is offering to show those opinions to the Intelligence Committees, officials gave no indication that any of the opinions would be made public.