Legitimate copies of Cub3D available online have had the APK file digitally signed by Google.

However, to validate your copy of Cub3D is an unmodified copy of the original, verify the checksum below:
 

3.4.2 (ARMv7a version)

SHA1: BDD5A80DCB9552E9456FDD5186F7962AA297AA99
SHA256: 649FAB195BE7E7F4AF9F87F66EB89891BB8C84983B7BD6FF826571DC1A80919B
 

3.4.3 (x86 version)

SHA1: F8F7F6EC2058C265409A19FED669F23A1AD755B5
SHA256: 8DA42135A8C8735D1120C1722DD29ABABEA52F3F47F9DFA3DB51AA7C84DC6ED8