Super modules-based active QR codes for smart trackability and IoT: a responsive-banknotes case study

The general use of smartphones assigns additional relevance to QR codes as a privileged tool to the Internet of Things (IoT). Crucial for QR codes is the evolution to IoT-connected smart tags with enhanced storage capacity and secure accesses. Using the concept of super-modules (s-modules) built from adjacent spatial multiplexed modules with regular geometrical shapes, assisted by colour multiplexing, we modelled and design a single QR code with, at least, the triple storage capacity of an analogous size black/white QR code, acting as a smart-tag ensuring restrict access and trackability. The s-modules are printed using luminescent low-cost and eco-friendly inks based on organic-inorganic hybrids modified by lanthanides with multiplexed colour emission in the orthogonal RGB space. The access to the restrict information is attained only under UV irradiation and encrypted for secure transmission. The concept of active QR codes for smart trackability and IoT was materialised through the development of a free friendly-user mobile app.


INTRODUCTION
Internet of Things (IoT) is expanding daily, reaching applications in the fields of industry 1 and smart cities 2 , bridging living entities, processes and devices with the Information and Communication Technologies (ICT), inspiring new concepts as "Internet of Nano-Things" 3 , "Internet of Food" 4 , "Internet of Biology" 5 or "Internet of Animals" 6 . Simultaneously, IoT promotes remotely data exchange for processing/management, leading to larger and more complex networks 7 . Thus, IoT can be considered as an ubiquitous network, which allows the communication between human-to-human (H2H), human-to-machine (H2M) and machine-to-machine (M2M), in which each element has a unique identity 8 . Therefore, tag elements for identification (people or objects) are of paramount relevance.
New smart labels able to real-time sensing and to establish H2H, H2M and M2M communication are a growing market busted by applications as Industry 4.0, Smart Cities, and Smart and Connected Communities 9 that is expected to worth 16.12 billion dollars by 2025 (https://www.grandviewresearch.com/industryanalysis/smart-label-market). In this framework, smart labels for authentication, trackability and counterfeiting detection, with controlled (public, restrict or encrypted) accesses to information are relevant [10][11][12] . From the user point of view, IoT smart labels should be reliable, ensuring the integrity, authenticity and preservation of information for objects in circulation or during transactions 13 .
QR codes are described as a gateway to IoT, as its remarkable evaluative process points out. From handwrite codes, the first major evolutive step was the arising of barcodes in 1952 14 that, in 1994 were develop into matrix structures, like QR Codes. The full potential and widespread of QR codes become a reality, in recent years, with the massive use of smartphones incorporating image acquisition modules and enhanced data processing capacities.
The well-known advantages of QR codes such as fast and easy readability independent from the orientation, the ability to endure physical damages recurring to error correction codes, place them as good candidates to be part of the next evaluative step of tag elements. Moreover, compared to electronic labels, QR codes optical elements provide extra advantages such as easy manufacturing (materials based ink printing) [15][16][17][18][19][20] and reading (smartphones) with lower production and operation costs (CAPEX and OPEX), strictly visual and tactile (appealing for societal applications), environmentally sustainable (easy recycling), among others.
Here, we propose a new approach to the design and implementation of an improved identification optical tag that meets the challenges of QR codes and covers the demanding features of smart labels. In particular, QR codes based on spatial and colour multiplexed super-modules (s-modules) able to increase the storage capacity of a single QR code up to, at least, three times, using the RGB colour orthogonal space [21][22][23] are modelled and fabricated. The s-modules printed with eco-friendly luminescent inks form distinct layers of information storage with the public, restrict and/or encrypted accesses, yielding a new generation of active QR codes materialised in the development of a free access mobile application for smartphones (mobile app).

RESULTS
Spectrally selective luminescent QR codes Spectrally selective colour multiplexed luminescent QR codes will be produced with the ability to store information at different layers of accessibility ( Fig. 1) allowing the control of the provided information for (i) public access and (ii) restricted access. The public access, available under ambient illumination (Fig. 1a) can be scanned with the user's mobile device and provides a link to an internet server containing static informational details (e.g., thematic topics, historical content) or dynamic information (e.g., currency exchange rate). The restricted access is granted with illumination from UV/blue light-emitting diodes (LEDs, Fig. 1b) and scanned recurring to dedicated applications. The encrypted messages stored in the restricted access layer, containing unique authentication tags, can be securely transmitted to a remote server, which enables the trackability and the triggering of security alerts or other additional security features.
The colour multiplexing is attained using luminescent materials in the visible spectral region, activated by UV radiation and displaying red (R), green (G) and blue (B) emission 24 , being each colour assigned to a selective s-module-based QR code and related with a layer of accessibility. The demultiplexing process is ensured by the RGB colour space orthogonality. To achieve spectral selectivity (selective excitation energy), luminescent QR codes will be manufactured using flexible and transparent organic-inorganic hybrids materials modified by lanthanide (Ln 3 + )-based complexes. The hybrids are processed at room temperature with the desired shape and thickness, combining the flexibility of the organic counterpart with the mechanical stability of the inorganic one [25][26][27] . Among the different organicinorganic hybrids, the emphasis is given to di-ureasils, whose siliceous-based skeleton provides compatibility with current microelectronics confers enhanced thermal stability with the onset of the decomposition temperature at ∼339°C compared with pure polymer-based host 28 . Di-ureasils are processed using environment-friendly green solvents with tuneable viscosity, which makes them ideal low-cost inks to be easily printed in virtually any substrate (paper, plastic, and textile) similarly to what occurred in printable electronic circuits, which will further promote the spread of the IoT applications. Moreover, the possibility of incorporating optically active centres with light emission properties tuned along the visible spectral range is of great advantage, as distinct multiplexing colours may be selected. Therefore, organic complexes of trivalent lanthanide ions (Ln 3+ , Ln = Eu, Tb) were selected as they are nearly pure red and green emitters, respectively 29 , permitting the hybrids to keep their transparency under daylight illumination.
The active QR codes concept will be assisted by the combination of colour multiplexing and spatial multiplexing through distinct colours coordinates and different module shapes (circle, square and hollow square, Fig. 1), respectively, with optimised dimensions yielding an s-module with the triple storage capacity of an individual one. The layers assigned to each module shape combines perfectly without overlapping avoiding extra misinterpretation (in the demultiplexing step) which is present when colours are mixed due to the modules (of distinct colour) superposition. In this case, the colour multiplexing is used apart from the spatial multiplexing here proposed, which is a clear advantage gained through the s-modules since the result is a single multiplexed QR code with the ability to store the triple capacity compared to conventional black/white ones. The s-modules innovative spatial multiplexing ensures itself colour separation that is not affected by the background emission, even when the red and green QR codes are simultaneously active. The red and green colours separation is ensured regardless of the emission intensity since these colours are the base functions (used to describe all the visible colours) for the RGB orthogonal colour space, thus linearly independent between them, never mixing, and being discerned one from another. We also note that other colour spaces establish red and green colours as complementary ones 30 , thus, also in this case, the easiest colour to be discerned   Fig. 1 Schematic of the proposed super-modules and multiplexing process. The QR codes are aggregated into a single one (spatial multiplexing) where the modules fit perfectly one inside the others (s-modules). The QR code contains 3 levels of information due to use of 3 independent inks (colour multiplexing) and shapes, allowing: a public access, read with ambient light, providing information to the user through the applications available at any mobile device and b restricted access with illumination UV/blue LED, read via dedicated applications/devices, that enable the monitoring and security, triggering alerts thought the establishing of an encrypted connection to a server.
from red is green and vice-versa. To unequivocally demonstrate the potential of luminescent QR codes as smart optical tag elements for security and real-time monitoring, we select, as an example, the banknotes trackability application.
To reveal the luminescent QR codes two distinct excitation wavelengths, UVC (254 nm) and UVA (365 nm), were selected. This methodology to activate colour in the banknotes is identical to that used nowadays to detect safety elements in the current money. Optically activated features are already used in banknotes, for instance, in the Euro banknotes (see the European Central Bank website for additional information, https://www.ecb.europa.eu/ euro/banknotes/security). For Euro banknotes, under standard UVA irradiation, small fibbers embedded in the paper present yellow, green and red colour emission, enlightening special areas of the banknote, and under UVC yellow and orange colours are displayed ( Supplementary Fig. 1). The use of UV-activated luminescent inks to print the s-modules instead of simple reflective-type ones guarantees the conventional notes aspect and its activation with such current standard procedures. This rationale behind the selection of inks that are luminescent under UV-standard radiation intended to render easier and cost-effective the implementation of these new s-modules QR codes, as it is in line with a well-established technology. Nonetheless, we note that the use of non-standard UV excitation may be tuned by the judicious choice of the ligands of the Ln 3+ -based organic complexes. Taking advantage of the Ln 3+ -based emission (intra-4f transitions), pure red (Eu 3+ ) and green (Tb 3+ ) colours will be attained, independently of the ligands' sensitization energy 31 , This work is in line with the idea of selecting identification elements, through optical illumination, in different regions of the UV spectrum, thus, it has a huge potential to be implemented in parallel with well-established technology and procedures employed nowadays.
Responsive QR codes Optimised luminescent QR codes based on s-modules were embossed on banknotes specimens for demonstration. The process used to multiplex the three levels of information combines the concept of s-modules and the RGB-based colour multiplexing 21,22 . Direct multiplexing can be achieved printing a black/white QR code and luminescent QR codes displaying emitting in the red (R) and green (G) and eventually blue (not implemented in this work) spectral regions, provided by the dU6Eu and dU6Tb inks (see methods material synthesis), respectively. Dot shaped black module (denoted as ↓) is used for the base black/white QR code, providing public access information visible under daylight illumination and readable with any smartphone. Surrounding this module, two other modules characterised by different shapes (denoted as ↑ and ≡) were built using two luminescent materials (as illustrated in the central column of Fig. 1), each one assign to a different accessibility level. The s-modules based methodology assisted by luminescent inks allow the construction of QR codes without superposition, avoiding colour mixture and assuring the separation and readability of the different levels.
To keep the QR code dimension analogous to that of a single black/white QR code, the s-module areas (A i ) were optimised, minimizing the overall reading error probability (R error , Supplementary Eq. 1) associated to the misinterpretation of the module binary information (active or inactive). The overall R error was minimised as a function of the modules exposed areas using an unconstrained numerical method (Nelder-Mead) and yielding to the ratio between the module's areas (↑/≡/↓) = 1.00/0.77/0.43 ( Supplementary Fig. 13 and Supplementary information). Other regular polygon geometrical patterns may also be envisaged to build s-modules if the current detection limits of CCD cameras are pushed forward in the near future. This would certainly enable larger storage capacity s-modules ( Supplementary Fig. 14 The optimised multiplexed QR codes were printed on banknote specimens, available from the European Central Bank, as an illustrative application example. The di-ureasil-based inks are amorphous and homogenous, resulting from the mixture at the molecular level of all the components (Supplementary Figs. 2-7 and Supplementary information). The number of printouts was optimised featuring luminescent QR codes with RGB pixel intensity values large enough to enable the colour demultiplexing using smartphones' CCD cameras. Although a single printout reveals remarkable intensity value, the saturation intensity of the R and G pixels occurs for a minimum number of printouts equal to 3 (dU6Eu) and 7 (dU6Tb), respectively, Fig. 2a. Hyperspectral microscopy shows that the emission colour is homogenous, at least, at the micrometre scale ( Supplementary Figs. 6 and 7).
The first level of information is embedded in the black QR code module (public access) containing data about the exchange rate of the specimen facial value to other currencies, obtained on realtime from official data (X-Rates.com website). The second level of information is added displaying the information of the author's research affiliation institutions, using the luminescent QR codes for restrict access (green-emitting QR code, only accessed under UV radiation). The third level for combined restrict access and secure data transmission (red emitting QR code, accessed under UV radiation) contains an authentication tag (obtained with an AES-CBC-MAC protocol) of the banknotes' serial number, which is a unique feature, allowing the individual identification of each specimen, Supplementary Table 3. This data is transmitted to a central server, via a secure connection, being used as a tag element employed to track the note transaction (see encrypting information for trackability section).
Under daylight illumination, the luminescent QR codes based on dU6Eu and dU6Tb inks are transparent enabling the typical use (public access, Fig. 1a) of the black/white QR code, Fig. 2b. Under UV, the emission is activated and the luminescent QR codes become visible, and a three-level multiplexed QR code is available, Fig. 2c, d, (restrict access, Fig. 1b). In particular, under UVA, the luminescent QR code reveals the R colour (Fig. 3b) from the dU6Eu that dominates over the G-based QR code (dU6Tb) that is, however, favoured under UVC irradiation, in whose scenario a bright green code is visible (Fig. 3c).
The transparency of the dU6Tb and dU6Eu inks guarantees the conventional notes aspect (Fig. 3a), as negligible absorption coefficient values, α < 10 −4 cm −1 ( Supplementary Fig. 11) in the vis ible spectral range, are detected. The absorption spectra in Fig. 2e are dominated by broad bands in the UV spectral region (240-390 nm), ascribed to the ligands singlet (S) excited states 32-34 with large molar extinction coefficients (ε) above ∼ 2 × 10 5 M −1 cm −1 (Fig. 2e), analogous to those found in UVabsorbing organic dyes 35 , and quite large for Ln 3+ -based materials, enabling the excitation of a thin layer with commercial UV-emitting LEDs, converting it from transparent to bright R or G luminescent QR codes. The overlap between the absorption spectra of dU6Tb and dU6Eu enables that a single UV illumination source may be used to activate both luminescent QR codes. Nevertheless, we noticed that the absorption maximum peak position for each material is tuned to allow the selective and relative intensity favouring of the luminescent QR codes with R and G emission. Whereas the R intensity is favoured under illumination at 275 and 350 nm, the G one is maximised around 240 and 300 nm.
The QR codes emission colour arises from the 5 D 4 → 7 F 6-3 (dU6Tb) and 5 D 0 → 7 F 0-4 (dU6Eu) transitions, Fig. 2f. The low fullwidth-at-half-maximum (fwhm < 10 nm) and the higher relative intensity of the 5 D 0 → 7 F 2 and 5 D 4 → 7 F 5 transitions peaking around 612 nm and 544 nm, respectively, render the emission colour close to pure G and R colours, as illustrated in the Commission Internationale d'Éclairage (CIE) colour diagram in Fig. 2g. The near-pure colour emission is advantageous in what concerns the multiplexing analysis, as above detailed. The activation range of the QR codes emission was inferred from the selective excitation spectra monitored within the 5 D 0 → 7 F 2 and 5 D 4 → 7 F 5 transitions for the dU6Eu and dU6Tb inks, respectively (Supplementary Figs. 8a and 9a). The excitation spectra resemble the absorption ones (Fig. 2e), pointing out that the main excitation mechanism is based on the ligands' sensitization process, rather than direct intra-4f excitation. The population of the Ln 3+ excited states mainly through ligands sensitization (low-lying triplet excited states, T 1 ) is advantageous because of the large ε values (Fig. 2e)  The emission properties were further quantified by the measurement of the absolute emission quantum yield, whose larger values (up to 0.40, Supplementary Table 2) permits to predict the activation of the QR codes even at lower-excitation powers typical of commercial LEDs. The light emission efficiency and light-harvesting ability can be further related by the molar brightness (B), given by B = ε × q 37 allowing both properties to be compared across distinct samples. The B values (5.8 × 10 4 and 3.3 × 10 4 M −1 cm −1 for dU6Eu at 365 nm and dU6Tb at 315 nm, respectively) are larger than the best values reported for other organic-dye molecules, with light emission in the 530-650 nm range [38][39][40] .
Aiming at studying the role of moisture, and temperature on the QR codes stability, the emission quantum yield was monitored after placing the dry inks in a climatic chamber. In particular, the absolute emission quantum yield was evaluated upon severe accelerated ageing tests performed under controlled relative humidity (RH) and temperature (Supplementary Table 2). After 2 consecutive cycles of 8 and 16 h each (40°C and RH = 50%), only minor changes in the quantum yield values were recorded for the dU6Eu, whereas no change was measurable for dU6Tb. No variation was further detected after keeping the samples under ambient conditions (T = 25°C, RH = 85%). The stability of emission colour was also studied after prolonged continuous solar irradiation (AM1.5G, 1000 Wm −2 ). Despite a negligible intensity decrease found only for the red-related coordinate of the dU6Eu ( Supplementary Fig. 12), the red and green colours remain detectable, using the smartphone CCD camera. Those results reinforce the active role of the di-ureasil organic-inorganic hybrids that enable the easy and tailored processing and simultaneously overcome the photodegradation 31,41,42 .
The black/white QR code can be decoded using a common application, therefore any further analysis or processing is avoided. For the luminescent QR codes, it is necessary to separate the different QR codes levels and proceed with decoding ( Supplementary Fig. 15). A 'maximum-likelihood' criterion (Supplementary Information), was used to split both luminescent QR codes, based on a pixel colour identification, using a separation threshold level (see methods Colour identification process). The probability density function (pdf) for the pixels' intensity distribution (defined in an 8-bit dimension) in the 3 colour space channels (R, G, B) was calculated from the photos of the embedded codes (Fig. 3b, c). The red and green channels combined with the blue one (Fig. 3d, e) were used to retrieve the luminescent QR codes Fig. 3 Multiplexed luminescent QR code based on s-modules printed on banknote specimens. a Black QR code printed directly on top of a 100 € banknote specimen under daylight illumination. The QR code is fully visible and ready to be accessed. b, c Images of the banknotes under 254 nm and 365 nm excitation, respectively, displaying the Tb 3+ based QR code (green) and Eu 3+ based QR code (red). d Blue and green coordinates histogram and e blue and red coordinates histogram for QR codes displayed in (b) and (c), respectively, with the decision level marked. The shaded areas are the modules colour coordinates of interest for identification. f Decoded QR codes obtained from the decision level of (d) and (e). The red square in (f) is one misinterpreted module. The images in a-c are not real images; they are digital montages; whose only purpose is to illustrate a possible application.
based on dU6Eu and dU6Tb, respectively. From this method, it is possible to extract the predicted probability error (P error ), obtained through the calculus of the pdf integral. For further comparison (Supplementary Table 4), it is also presented the experimental error (E error ) defined as the number of modules whose colour was misinterpreted, resulting in E error < 0.1%. As the embedded forward error correction code can handle (and correct) interpretation error rates up to 30%, this E error can be considered error-free. The red QR code, decoded using a dedicated free QR code reader application, contains encrypted data which must be transmitted to a central server, as described next.
Encrypting information for trackability A system that enforces security and trackability relies on two factors: (a) secure encoding of the information/serial number in the QR code and (b) secure transmission of the tag information to a server. Besides the security imposed by the UV excitation granted accessibility, additional security features can be explored. A new and relevant level of security is added with the inclusion of smodules QR code. Contrarily to the passive and static/immutable conventional security elements, those QR codes are active and dynamic tags. Taking advantage of the colour space orthogonality, assisted by spatial multiplexing, it is possible to increase the capacity of QR codes and encode (using one single colour) the note serial number using a secure block-cipher (Advanced Encryption Standard AES) with 128 bits. This procedure ensures that each note has a unique identification tag and that it is not possible to create new valid authentication tags for each serial number. Each time a transaction occurs, the encrypted identification information is transmitted, in a secure way to a central server, encrypted with RSA-4096 bits, allowing this way tracking the usage of the banknotes. In summary, the security is not achieved by the inability to read the QR code, but rather in its ability to prevent the creation of valid forged (new) tags and on the security of the ciphers used for the communication. With respect to long-term security, AES-128 and RSA-4096 are solutions resilient to classical attacks, and according to NIST recommended for usage beyond 2030 43 .
The ISO standard for QR codes allows the encoding of strings of length 25 over a 45-letter alphabet resulting in a maximum of 137 bits of information, log 2 (45 25 ). This size is large enough to contain a Message Authentication Code (MAC) produced with AES-128 (128 bits), resulting in the possibility of securely encoding any message with 128 bits into a QR code such as our example of banknotes, that only needs 42 bits (1 capital letter + 11 numbers, log 2 (26 × 10 11 )). The identifying serial number of each note was thus encrypted into a 128-bit string unique to each note. More precisely, we encode the serial number of each note in 42 bits, pad this message to 128 bits, apply CBC-MAC to it (AES-128), and encode the resulting cipher (also 128 bits) in a QR code of length 25 (string presented in Supplementary Table 1).
The cipher block chaining Message Authentication Code (CBC-MAC) construction is secure for fixed-length messages given the security of the underlying block-cipher (AES), under the standard security notion for MACs, resistance under existential forgery for adaptive chosen-message attacks 44,45 . This security notion states that an adversary cannot forge new valid pairs (message, authentication tag) for messages he has not seen before. In our case, it means that it is possible to clone a known QR code, but it is not possible to forge/create valid new QR codes.
After retrieving the string encoded in the QR code containing the encrypted note serial number, the client application establishes a secure connection with the server. In this communication, the client transmits to the server the QR code information, its geographic location and a timestamp to ensure freshness encrypted with RSA-4096 bits. On receiving this ciphertext the server decrypts it, validates the integrity of the received message, and checks if the elapsed time since the timestamp is less than a preconfigured value to avoid a replay of the same transaction. The server then stores information such as date of the note usage, the geographic location (e.g. based on the IP address) where the note was transacted, and (eventually) provides a transaction warning message to the client application, regarding the authentication of the note (or if it is on a blacklist), as illustrated in Fig. 4.
After establishing the concept of multiplexed QR codes based on s-modules as smart labels for trackability and IoT, a practical example for decoding was performed through the development of free access and user-friendly mobile app for smartphones ( Supplementary Fig. 16 and Supplementary Information). This app allows to decode the luminescent multiplexed QR code, presenting the public information to the user and when UV-excited retrieves the restrict access. Simultaneously, it establishes a secure connection to a server sending the encrypted information to be stored (more details in Supplementary Information). This app in conjugation with luminescent responsive banknote prototypes is unequivocally a new generation of stamps that combine authentication, security features and IoT. The app for IOS smartphones is free and available for download at https://tinyurl.com/QR-note.

DISCUSSION
We demonstrated a single multiplexed QR code based on supermodules (s-modules) with enhanced storage capacity (triple than that of a traditional black/white QR code with the same dimensions) printed with flexible luminescent inks based on organic-inorganic materials modified by Ln 3+ ions with tunable colour in the RGB colour space. The hybrid materials are prepared through a well-studied and optimised process near ambient temperature using low-cost precursors and non-toxic solvents being promising inks in a scale-up scenario for industrial applications. The multiplexed QR code size was optimised based on the use of s-modules formed by modules with distinct shapes (squares and circles) and different areas, baring the same location patterns, for considering a typical reading distance (0.20 m). The optimised dimensions yield a QR code with 4.5 × 4.5 cm 2 that fits most of the current applications and ensures detection and reading. Moreover, we also demonstrated a real application using banknotes combining IoT applications with restrict and encrypted access. The black/white QR code confers to the banknote societal IoT interaction and the luminescent part of the multiplexed QR code is devoted to restrict access. The green and red parts of the multiplexed QR code are UV-activated in analogous conditions to that used nowadays for banknote security track. The secure access was further demonstrated using the red-emitting modules QR code through encrypted information. The high-efficiency and pure colours emission from the Ln 3+ -based inks ensures the multiplexed QR code readability under the illumination of commercial LEDs and under natural daylight demonstrating that active QR codes, for smart trackability and IoT, could be realised using the concept of s-modules multiplexed in colour. Featuring the detection limits of CCD cameras in a near future, s-modules with storage capacity up to 8× may be envisaged by tuning the spatial multiplexing by simply adding to the circles and squares modules other regular polygon geometrical patterns.

Material synthesis
The di-ureasils' synthesis protocol is a well-studied and optimised process, so that materials replication can be easily attained 46,47 , despite processing by inkjet printing is a new aspect that potentiates other applications besides the traditional monolithic and film deposition processing. The diureasil d-U(600), formed by polyether chains (average molecular weight of 600 g·mol −1 ) covalently linked to a siliceous inorganic skeleton by urea bridges, was prepared according to the literature 46,47 . The di-ureasil hybrid was modified by Eu 3+ -and Tb 3+ -based complexes, as detailed in Supplementary Information. The structures of non-hydrolyzed organicinorganic hybrid precursor, and of the complexes are illustrated in Supplementary Fig. 1. Supplementary Information contains details of structural (X-ray diffraction, scanning electron microscopy with energydispersive X-ray, Fourier transform infrared (FT-IR) spectroscopy) and optical characterisation (photoluminescence and hyperspectral imaging) of the fabricated materials, Supplementary Figs. 2-11. To enable the materials processing as inks to be printed in a commercial inkjet printer, the viscosity was controlled and measured using a Brookfield DV-II+Pro viscometer using the Enhanced Brookfield UL Adapter. The viscosity values were set as 5.02 cP and 2.34 cP (at 20°C) for dU6Eu and dU6Tb, respectively.

Printing process
The multiplexed QR code was printed with dimensions 4.5 × 4.5 cm 2 in order to fit within the banknote and to ensure reading, considering an optimised distance between the CCD camera of the smartphone and the QR code (0.2 m, Supplementary Fig. 14 and more details in Supplementary  Information). The first access level modules, with a dot-shaped, was printed with black colour, using a commercial laser printer (Xerox Colour C60) over Ingres from Fabriano Inc. paper (worldwide producer of banknote paper). It is an uncoated laid paper made with elemental chlorine-free pulp with 90 ± 3% g/m 2 (ISO 536), opacity 90 ± 3% (ISO 2471) and roughness 1100 ± 300 mL/min (ISO 8791-2) according to the manufacturer. The luminescent QR codes were printed using the dU6Eu and dU6Tb inks in a commercial inkjet printer (Brother DCP -J562DW), with a resolution of 6000 × 1200 dots per inch, able to produce 12 black or 6 colour copies per minute (ISO/IEC 29183) with drop size ∼ 1.5 pL. All the QR codes were generated using online software (https://www.qrcode-monkey. comwebsite) and the printing followed the legislation for the use of specimens printed money.

Image processing
The images of the luminescent QR codes under daylight and UV illumination were captured with a smartphone camera with a resolution of 4160 × 3120 pixel 2 , aperture of f /1.9 and sensor dimension of 1/2.6". The photographs of the QR codes superimposed on banknotes specimens were taken using a Canon 5D MkII with a lens Super Macro-Takumar 50 mm F4 and an extension tube of 28 mm. The UV excitation sources were a portable lamp (Spectroline ENF-280C/FE and Shanghai Heqin Analytical Instruments Co. Ltd High-Intensity Ultraviolet Analyzer UV-3000) and UV-emitting LEDs (Ocean Optics MCLS LLS-365).
Optical properties UV/Visible spectroscopy: UV/visible absorption spectra were measured using a Lambda 950 dual-beam spectrometer (Perkin-Elmer). All measurements  Fig. 4 Transaction process diagram. The QR code is decoded and the encrypted information is sent to a server/cloud service that has the key to decrypt the received information. An alert can be trigged with the transaction information and transmitting to the client app.
were performed using a 1 cm optical path quartz cell. Using the Beer-Lambert law, the absorption coefficient (α, cm −1 ) and the molar extinction coefficient (ε, M −1 cm −1 ) were calculated.
Photoluminescence spectroscopy. The photoluminescence spectra were recorded at room temperature with a modular double-grating excitation spectrofluorimeter with a TRIAX 320 emission monochromator (Fluorolog-3, Horiba Scientific) coupled to an R928 Hamamatsu photomultiplier. The emission spectra of the luminescent QR codes were measured using a spectrometer OceanOptics Maya 2000 Pro coupled with an optical fibre, under UV excitation (365 nm).
Absolute emission quantum yield. The absolute emission quantum yield values (q) were measured at room temperature using a C9920-02 Hamamatsu system. The method is accurate within 10%.

Colour demultiplexing methodology
The multiplexed QR code photograph ( Supplementary Fig. 15a) is split into the three RGB colour space channels, Supplementary Fig. 15 Fig. 15c); being described by Gaussian distribution functions. The presence of more than one discriminated Gaussian distribution function in each channel indicates that the channel' information can be used to separate the modules by colours 22 . The optimal decision level was established by minimizing the error pdf (Supplementary Eqs. 4 and 5) and used as a threshold value to separate the different colour modules, Supplementary Fig. 15d. The image was split into 21 × 21 modules 2 where the contiguous regions were mapped and grouped according to size. Afterwards, the original QR codes ( Supplementary Fig.  15e) are ready to be decoded and the access to server/cloud established.