All testimony, books, documents, or other writings, records or tangible objects obtained by the attorney general and reporter pursuant to §§ 8-6-401 and 8-6-402 shall be confidential and shall not be publicly divulged by the office of the attorney general and reporter except in the discharge of the duties of the office or in legal proceedings in which the state is a party.