(e) for the purposes of legal proceedings (whether civil or criminal), or  (f) for the purposes of—  (i) preventing serious physical harm to a person;  (ii) preventing loss of human life;  (iii) safeguarding vulnerable adults or children;  (iv) responding to an emergency, or  (v) protecting national security.  (3) Paragraph (2) does not apply to HMRC information or social security information, but such  information may be used by the Board for purposes other than those for which it was disclosed  with the consent of the relevant authority (which may be general or specific).  (4) In this regulation—  “HMRC information” means information disclosed to the Board under paragraph (1) by the  Revenue and Customs;  “the Revenue and Customs” has the meaning given by section 17(3) of the Commissioners for  Revenue and Customs Act 2005( a );  “social security information” means information which, when disclosed to the Board under  paragraph (1), was information held for the purposes of any of the following functions of the  Secretary of State or a Northern Ireland Department—  (a) functions relating to social security, including functions relating to—  (i) statutory payments as defined in section 4C(11) of the Social Security Contributions  and Benefits Act 1992( b );  (ii) maternity allowance under section 35 of that Act;  (iii) statutory payments as defined in section 4C(11) of the Social Security Contributions  and Benefits (Northern Ireland) Act 1992( c );  (iv) maternity allowance under section 35 of that Act;  (v) schemes and arrangements under section 2 of the Employment and Training Act  1973( d );  (c) the Secretary of State (in the case of a disclosure of social security information held,  when disclosed to the Board under paragraph (1), for the purposes of the functions of the  Secretary of State);  (b) functions relating to the investigation and prosecution of offences relating to tax credits;  (d) the Department for Communities in Northern Ireland (in the case of a disclosure of social  security information held, when disclosed to the Board under paragraph (1), for the  purposes of the functions of a Northern Ireland department);  (e) the Commissioners or an officer of Revenue and Customs (in the case of a disclosure or  further disclosure of HMRC information).  “the relevant authority” means—  31. —(1) Personal data provided to the Board by an applicant, or disclosed pursuant to a notice  under regulation 29, may not be disclosed—  (a) by the Board, or  (b) by any other person who has received it directly or indirectly from the Board.  Confidentiality of personal data  ( a ) 2005 c. 11.  ( b ) 1992 c. 4.  ( d ) 1973 c. 50.  ( c ) 1992 c. 7.  20