In the era of hyperconnected contemporary society, hardware and information security become more dependent on advanced cryptographic primitives. A physically unclonable function (PUF), originally implemented by an algorithmic means as software-based security, is considered as an immediate security solution. Nanomaterial-based PUFs have recently received considerable attention but have often limitations on unclonability and scalability for practical applications. Here, we report that heteronanostructures of vertically orientated molybdenum disulfide (MoS 2 ) nanoflakes and titanium dioxide (TiO 2 ) aggregates can be used for a versatile PUF. The band alignment of heteronanostructured MoS 2 /TiO 2 results in photogenerated electron transfer and turns off the bright state of emitters, offering an entropy source. After von Neumann debiasing, extracted cryptographic keys show a large encoding capacity and reliable PUF performance, including randomness, uniqueness, reproducibility, low false rates, and long-term stability. The unique hybridization of the most common semiconductor nanomaterials could not only offer inherent asymmetry not to be cloned for a PUF but also guarantee scalable nanomanufacturing strategies to augment cryptosystems.