; and (B) submit a written certification to the court, under penalty of perjury, that the entity or person has sealed each paper and electronic copy of the record; (3) seal each paper and electronic copy of the record in the possession of the court; and (4) after receiving a written certification from each entity or person under paragraph (2)(B), notify the petitioner that each entity or person described in paragraph (1) has sealed each paper and electronic copy of the record. (c) Protection from perjury laws Except as provided in subsection (f)(3)(A), a petitioner with respect to whom a sealing order has been entered for a qualifying offense shall not be subject to prosecution under any civil or criminal provision of Federal or State law relating to perjury, false swearing, or making a false statement, including section 1001, 1621, 1622, or 1623, for failing to recite or acknowledge any protected information with respect to the offense or respond to any inquiry made of the petitioner, relating to the protected information, for any purpose. (d) Attorney General nonpublic records The Attorney General— (1) shall maintain a nonpublic record of all protected information that has been sealed under this subchapter; and (2) may access or utilize protected information only— (A) for legitimate investigative purposes; (B) in defense of any civil suit arising out of the facts of the arrest or subsequent proceedings; or (C) if the Attorney General determines that disclosure is necessary to serve the interests of justice, public safety, or national security. (e) Law enforcement access A Federal or State law enforcement agency may access a record that is sealed under this subchapter solely— (1) to determine whether the individual to whom the record relates is eligible for a first-time-offender diversion program; (2) for investigatory, prosecutorial, or Federal supervision purposes