SAN FRANCISCO—Defense Secretary Ashton Carter on Tuesday sought to assure Silicon Valley that the Defense Department remains an eager partner on encryption technology despite an ongoing legal battle over whether the courts can compel Apple [AAPL] to give the…