Method and device for generating an image containing secret information
By segmenting and encoding secret information within images using generative neural networks, the method addresses forgery challenges in security documents, enabling undetectable information transmission and document authentication.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- BUNDESDRUCKEREI GMBH
- Filing Date
- 2025-12-15
- Publication Date
- 2026-06-25
AI Technical Summary
Current security documents face challenges in preventing forgery due to advancements in printing technology, necessitating improved methods for embedding and decoding secret information to enhance forgery-proofing.
A method involving dividing secret information into segments, assigning them to pattern categories, generating codewords, and using generative neural networks to embed these in images, combined with optional encryption and error correction, to create a steganographic image that can be decoded with a digital key.
The method enables undetectable transmission of secret information, providing a signature for security documents, enhancing their forgery-proof nature.
Smart Images

Figure EP2025087012_25062026_PF_FP_ABST
Abstract
Description
[0001] Method and apparatus for generating an image containing secret information
[0002] The present invention relates to a computer-implemented method and a data processing device for generating an image containing secret information. Furthermore, the present invention relates to methods and devices for reproducing and decoding the secret information from an image, as well as methods and devices for creating and training artificial networks for generating and decoding images containing secret information.
[0003] In the technical field of security documents, such as banknotes, official documents like passports, or other certificates, there is a need to make these documents as forgery-proof as possible. In the current state of the art, this is achieved, for example, by embedding watermarks, using different materials, or by using small print on the background images of the security documents.
[0004] However, the development of increasingly better printers, which are also accessible to forgers, creates a constant need for new methods to protect documents from forgery.
[0005] This invention is therefore based on the objective of developing a new method for embedding information in images and for creating image-based signatures. Furthermore, the invention also aims to develop devices on which the method can be carried out.
[0006] The problem is solved by the subject matter of the independent claims. Preferred embodiments of the invention result from the features mentioned in the dependent claims and also from the present disclosure as a whole.
[0007] A first aspect of the invention relates to a method for generating an image containing secret information.
[0008] The process involves receiving the secret information in one step. This secret information can consist of, for example, a bit sequence or string, or alternatively, be encoded as a bit sequence. In a subsequent step, the secret information is divided into numerous information segments. This division can be performed, for example, according to a predefined number of bits per segment. A pattern category is then assigned to each information segment, with the pattern categories being drawn from a predetermined set of pattern categories. Thus, for example, different groups of image categories, image elements, etc., can be predefined.
[0009] For example, handwritten letters or characters could be used as pattern categories. Alternatively, various patterns or flourishes that can be combined to form arabesques or other decorative designs could be used as pattern categories. Another alternative would be to use different objects within a landscape (tree, sky, bush, path, etc.) as pattern categories.
[0010] In a further processing step, a codeword is generated for each piece of information. This codeword can, for example, correspond to the bit sequence of the information piece, or it can include additional bits, such as repeating the bits of the respective information piece, adding further predefined bits, or encrypting the bit sequence. Repeating the bits of the information piece or adding padding can, for example, enable error correction and facilitate the embedding of the relevant bits of the information piece.
[0011] For each piece of information, a partial image of the respective assigned pattern category is created by entering the respective codeword into a pre-trained generative network, in which the respective piece of information is embedded.
[0012] Once all partial images have been generated, in a further step the image containing the secret information is generated from the multitude of created partial images.
[0013] The process thus creates an image in which the secret information is embedded, i.e., the secret information has been hidden in the image in a reproducible way, so that it is possible to decode the secret information from the image.
[0014] The described method can therefore also be considered a steganographic method. In steganographic methods, secret information is hidden within a carrier of information. Embedding decodable secret information in an image allows, firstly, the undetected transmission of secret information. Secondly, embedding the secret information also creates a signature on the image. If a recipient can decode, reconstruct, or read the secret information from the image, this indicates that the image was created with knowledge of the secret information and the method used to embed it. Thus, for example, a security feature for security documents can be implemented by embedding secret information in a background pattern.
[0015] Optionally, the described procedure can include encryption. For this purpose, a digital key can first be received, either from an external data source or by loading it from internal memory. In this case, the creation of the codeword associated with a piece of information can then include encryption using the digital key. It is possible to first encrypt the information and then create the codeword from the encrypted information, or to first create the codeword from the information and then encrypt the created codeword. Encryption increases the security of the described procedure. The digital key could, for example, consist of a random bit sequence of a predefined length.For example, the digital key can have the same length as the information to be encrypted and then use an XOR operation to change the bits of the information to be encrypted.
[0016] In one configuration, the digital key, the secret information, the multitude of information components, and / or the generated codewords can be bit strings or bit sequences. Alternatively, the aforementioned characteristics can be encoded in the form of a bit sequence.
[0017] Optionally, the sub-images can have one or more predefined grid sizes, and the generated image can be a rasterized image in which the sub-images are arranged in a grid. Predefined grid sizes allow for the efficient assembly of the sub-images into the generated overall image. Furthermore, this method facilitates the division of the overall image into sub-images for decoding purposes.
[0018] Optionally, the process can include, as a further step, obtaining a sequence of pattern category instances from the predetermined set of pattern categories. Furthermore, in this case, the process includes assigning the information segments to the pattern categories according to the sequence of the pattern category instances. Thus, a sequence of pattern categories to be used can be specified. This makes it possible, for example, to generate a predefined pattern or predefined handwritten text into which the secret information is then embedded.
[0019] Furthermore, each pattern category instance can optionally be assigned a capacity, where the capacity specifies the maximum size or length of information fragments that can be embedded in that pattern category. Thus, for example, the capacity of a first pattern category can be larger than the capacity of a second pattern category. The capacities of individual pattern categories can be determined experimentally or estimated through theoretical considerations. If there are different capacities for the various pattern categories, the secret information can be divided into information fragments such that the size or length of each fragment is chosen to match the capacity of the assigned pattern category; that is, the size or length of the information fragment is less than or equal to the capacity of the assigned pattern category.
[0020] In one implementation, the codeword for a piece of information can be generated by repeating the information until the codeword length is reached. The codeword length can be predetermined. Repeating the information increases error tolerance against transmission and / or coding errors.
[0021] It is also possible, in one implementation, to create an encrypted codeword by performing an XOR operation between the key and the codeword. This provides a simple way to conceal repetitions, which can also be reversed by another XOR operation with the key. Alternatively, other or more complex encryptions of the codeword are possible. The XOR operation can also be understood as error-transparent encoding, since any error in the original word also results in an error in the XOR-encrypted original word. Therefore, the XOR operation is well-suited for encrypting codewords.
[0022] The described method for image generation can, for example, be executed by a computer and thus be realized as a computer-implemented method.
[0023] Another aspect of the invention relates to a method for creating and training a generative network for a pattern category; that is, a generative network is created which can generate images of a given pattern category and embed a codeword. To create and train such a generative network for a first pattern category, a dataset is first obtained that contains partial images of a first pattern category. For example, such a dataset for a pattern category "handwritten A" could contain a large number of handwritten letters "A". The partial images in the dataset could, for example, all be the same size, or they could all be scaled to the same size.
[0024] A neural network is then initialized, with an input layer and output layer of the neural network each having a width corresponding to the size of the sub-images of the data set of the first pattern category, and an inner layer of the neural network having a width corresponding to the codeword length.
[0025] The neural network is then trained with the data set, and a generative network is created from the neural network by extracting a generative part of the trained neural network.
[0026] After training with the dataset, the neural network can be used to generate further images of the first pattern category from images of the first pattern category, whereby the input width, which includes, for example, all pixels of the respective sub-image, is reduced to the width of the inner layer and thus to the codeword length, and afterwards another image of the first pattern category is generated from it.
[0027] By extracting the generative part of the neural network, i.e., by extracting the network starting from the inner layer that has the width of the codeword length, images of the pattern category can be generated from any codewords of this length. In this form of image generation, the codewords are used to create images of the pattern category.
[0028] The codewords are reproducibly embedded in the generated image, so that the codewords can be reproduced from the generated images by a decoding network that needs to be trained accordingly. The use of the decoding network and the training of such a decoding network are described below.
[0029] The neural network can be implemented as an autoencoder or a Generative Adversarial Network (GAN). An autoencoder learns efficient representations of complex data by first compressing input data via an input layer onto an encoding layer. Then, data from the encoding layer is generated for an output layer that is as similar as possible to the input data. In a GAN, two neural networks are typically trained against each other: one network (the generator) attempts to generate data, and another network (the discriminator) classifies the generated data as belonging to or not belonging to the given dataset.
[0030] Further details on neural networks, autoencoders and GANs can be found, for example, here:
[0031] Bishop, CM: Neural Networks for Pattern Recognition, Oxford University Press (1995)
[0032] Berahmand, K., Daneshfar, F., Salehi, E.S. et al. Autoencoders and their applications in machine learning: a survey. Artif Intel / Rev 57, 28 (2024) https: / / doi.org / 10.1007 / s 10462-023- 10662-6
[0033] Thai HH, Hieu ND, Van Tho N, Do Hoang H, Duy PT, Pham V-H (2022) Adversarial autoencoder and generative adversarial networks for semi-supervised learning intrusion detection system. In : 2022 RIVF international conference on computing and communication technologies (RIVF), IEEE, pp 584-589
[0034] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. 2020. Generative adversarial networks. Com- mun. ACM 63, 11 (November 2020), 139-144. https: / / doi.org / 10.1145 / 3422622
[0035] Both concepts, autoencoders and GANs, are thus able to generate further instances based on a sufficiently large dataset, which are very similar to, or indistinguishable from, the data of the dataset.
[0036] The present invention further exploits the fact that parameters can be applied to generative neural networks, which slightly influence the output. In this way, it is possible to embed the applied parameters in the generated data.
[0037] Another aspect of this invention relates to a method for decoding secret information from an image generated according to the method described above.
[0038] For this purpose, a generated overall image is first broken down into a multitude of sub-images, with each sub-image being assigned a pattern category. The assignment of the pattern categories to the sub-images can be performed, for example, by a neural network for pattern recognition. A decoding codeword is then obtained for each sub-image by inputting the respective sub-image into a decoding network assigned to the corresponding pattern category. A portion of the secret information is then determined from the decoding codeword.
[0039] The secret information can then be determined from the multitude of pieces of secret information. Thus, decoding the embedded secret information is possible.
[0040] When determining the secret information from the decoding codeword, the following additional steps may optionally be included: The decoding codeword can be decrypted using a digital key, thereby creating a decrypted decoding codeword. The respective part of the secret information can then be determined from the decrypted decoding codeword.
[0041] Determining the secret information from the decoding codeword or from the decoded decoding codeword may involve error correction, for example through repetition coding, i.e., multiple repetitions of the respective part of the secret information in the decoding codeword.
[0042] In another aspect, the invention comprises a method for training a decoding network for a first pattern category. This method includes, in one step, generating a labeled dataset comprising a plurality of training pairs. Each training pair consists of an image generated by inputting a random codeword into the generative network of the first pattern category, labeled with the random codeword. Thus, the generative network of the pattern category is used, which was previously generated and trained, for example, as described above. As described above, a generative network of a pattern category can generate images of the pattern category from any codeword. Therefore, various data points, each consisting of a random codeword and the resulting image, can be generated. For training the decoding network, these data points are then used "in reverse," i.e.,The input of the generative network (the codeword) is used as the output or target value of the decoding network, while the output of the generative network (the image) is used as the input of the decoding network.
[0043] In a further step, a decoding network is initialized. This network has an input layer with a width corresponding to the size of images in the first pattern category and an output layer corresponding to a codeword length of the generative network for that pattern category. The decoding network for the first pattern category is then trained with the labeled dataset, which consists of data pairs (image, codeword).
[0044] Alternatively, it is also possible to train a single decoding network for multiple pattern categories.
[0045] In another aspect, the present invention disclosure includes, in addition to the described methods, corresponding devices for data processing, comprising means for carrying out the steps of one of the described methods.
[0046] In another aspect, the present invention comprises a computer program product comprising instructions which, when the program is executed by a computer, cause it to perform the steps of one of the methods described above.
[0047] In other words, the invention relates to a method for generating an image containing secret information, as well as a method for decoding the secret information from an image and associated devices. The method for generating the image comprises receiving the secret information, dividing the secret information into a plurality of information parts, assigning each information part to a pattern category from a predetermined set of pattern categories, creating, for each information part, a codeword associated with that information part, creating, for each information part by inputting the respective codeword into a pre-trained generative network, a sub-image of the respective assigned pattern category in which the respective information part is embedded, and generating an image comprising the plurality of created sub-images.
[0048] It is generally noted that all features disclosed in relation to specific aspects or embodiments of the invention can also be combined in a technically meaningful way with other aspects or embodiments of the invention. This also applies across different technical objects and categories of objects. In particular, this also applies to individual features disclosed in part, unless explicitly stated therein or it is obvious through a technical contradiction that an inseparable functional-technical relationship exists between certain features, which must be maintained for the implementation of the invention.
[0049] The invention is explained below with reference to exemplary embodiments and their sketched representations. Figure 1 shows a flowchart of the described method for embedding secret information in an image;
[0050] Figure 2 shows an example of parameters and results used in the procedure according to Figure 1;
[0051] Figure 3 shows a flowchart of the described procedure for generating a generative network for a first pattern category;
[0052] Figure 4 shows a flowchart of the described procedure for decoding secret information;
[0053] Figure 5 shows a flowchart of the described procedure for creating a decoding network;
[0054] Figure 6 shows a schematic representation of a device for carrying out the described procedures;
[0055] Figure 7 shows an example of a neural network from which a generative network can be extracted;
[0056] Figure 8 shows an example of a generative network according to some embodiments;
[0057] Figure 9 shows an example of a decoding network according to some embodiments;
[0058] Figure 10A shows an example of carrier information from which a sequence of pattern categories can be derived;
[0059] Figure 10B is an example of a generated image that contains secret information.
[0060] Figure 1 shows a schematic sequence of the described procedure and Figure 2 shows a concrete example of instances of the described procedure.
[0061] In step S101, a secret piece of information is first received. This can be, for example, a bit string or an ASCII character string. In Figure 2, this secret piece of information 201 is defined as I = 01100110. The secret piece of information 201 is then split into several pieces of information in step S103 and assigned to pattern categories 202 in step S105. Figure 2 shows an example of how a sequence of pattern categories 202 M = which is assigned to information parts of secret message 201 and how secret message 201 is divided into information parts The image is decomposed. First, the capacities 203 of the individual pattern categories 202 are determined. The capacities 203 indicate how many bits can be embedded in a subimage of the respective pattern category 202. Roughly speaking, the number of embeddable bits is often higher if the images of the respective pattern category exhibit a higher variance.
[0062] In the example of Figure 2, the capacities 203 of the pattern categories m1,m2,m3,m4 are determined as follows: capfjn^ = 2, cap(m2) = 3, cap(m3) = 1, cap(m4) = 2.
[0063] Thus, the secret information 201 can be divided into information parts based on the capacity of the pattern categories. As shown by way of example in Figure 2, i4 = 01, i2 = 100, i3 = 1, i4 = 10.
[0064] Codewords are then generated from these pieces of information by redundantly repeating the respective information pieces. In this example, a codeword length l = 6 is used. Thus, the following codewords are generated from the information pieces: c4 = 010101, c2 = 100100, c3 = 111111, c4 = 101010.
[0065] Figure 1 shows how a loop S107 is repeated to create a codeword for each piece of information in step S109 and then to generate a sub-image for this codeword in step Sill.
[0066] In the example shown in Figure 2, an additional encryption is used, serving both to insert another cryptographic layer and to make the codewords more diverse. In this example, the bit sequence k = 011010 is used as key 204. The codewords are then each encrypted with this bit sequence using an XOR operation. This results in the following encrypted codewords: e4 = 001111, e2 = 111110, e3 = 100101, e4 = 110000.
[0067] The encrypted codewords are then fed into the pre-trained generative networks of the pattern categories m1, m2, m3, m4, generating sub-images in which the respective pieces of information are embedded. These sub-images are then combined in step S113 to form a complete image P, into which all the secret information I is embedded.
[0068] Embedding, in this context, refers to the reversible concealment of the respective secret information within the overall picture P. This means that the secret information can be reconstructed using the right "tools," such as computer programs.
[0069] In addition to the method for embedding the secret information 201 into an image P, Figure 3 also shows a method with which a generative network can be trained for a given pattern category.
[0070] In a first step, S301 receives a dataset of partial images from a first pattern category. This dataset contains a large number of images, all assigned to the first pattern category. Preferably, the dataset comprises at least 100, preferably at least 1,000, or at least 10,000 images of the first pattern category. The received images of the first pattern category can be loaded, for example, from the internet or local storage. For example, the images of the first pattern category may all be the same size; alternatively, they may be of different sizes and / or the images may be scaled to the same size.
[0071] In a further step (S303), a neural network can then be initialized for subsequent training. This can be a neural network with at least one input layer and one output layer with a width corresponding to the size of the images (for example, the number of pixels), as well as an inner layer with a width corresponding to the number of bits in the codeword. The network is then trained to generate another image of the same pattern category when an image of the pattern category is input. Since the layers of the neural network are only linked to the layer immediately following them, the input information is compressed to the length of the codeword.
[0072] Once the network is fully trained, meaning the error value used to check the training is sufficiently small and, for example, below a predefined threshold, a generative part of the neural network is extracted in step S307 to be used as the generative network for this pattern category. This generative part of the neural network comprises the layers, starting with the innermost layer, whose width corresponds to the codeword length. Thus, the innermost layer of the trained neural network becomes the new input layer of the generative network.
[0073] In this generative network, an image of the first pattern category can be generated by applying parameters (bits) to the input layer. However, this image may still contain a kind of shadow of the input parameters and thus of the codeword, allowing the codeword to be extracted from the generated image, as described below.
[0074] Further details on the initialization and training of the neural network will also be revealed in the example described below with reference to Figures 7 to 10.
[0075] Figure 4 further shows a flowchart for a procedure for decoding secret information from an image, the image being generated by the procedure from Figure 3.
[0076] In step S401, the image is first divided into sub-images, for example, using a known grid. Step S403 then executes a loop for all sub-images. Within this loop, in step S405, a decoding word is determined from the current sub-image. For this, the pattern category to which the current sub-image belongs is first determined. This assignment can be made using another, classifying neural network. The current sub-image is then fed into the decoding network belonging to its pattern category, which then outputs a decoding word. The decoding network has an input layer whose width corresponds to the size of the respective sub-images and an output layer whose width corresponds to the length of the decoding word.
[0077] This may be decoded, and an information component is then determined from the (decoded) decoding word. If the information component is re-encoded using the originally used codeword, the information component from the decoding word can be determined by majority vote.
[0078] Once an information component has been determined for each sub-image, these information components can be combined in step S409 to form a decoded, secret piece of information.
[0079] Figure 5 shows a flowchart illustrating the creation of a decoding network for a first pattern category. In a loop, a desired number of training pairs are first created. Step S501 of the loop checks whether a sufficient number of training pairs have already been created. If not, step S503 generates a random number, for example, a bit string with the codeword length of the generative network for the first pattern category.
[0080] This randomly generated codeword is then used in step S505 to create an image, or partial image, using the generative mesh of the first pattern category. The random codeword is used as input to the generative mesh of the first pattern category. The resulting data pair, consisting of the generated image and the random codeword, is then added to the dataset as a data point. The generated image serves as the input value for the data point, and the random codeword is used as the label for the data point. This process is repeated until a large number of data points have been generated.
[0081] In step S509, a decoding network is initialized. This decoding network is a neural network with an input layer whose width corresponds to the size (number of pixels) of the input value images in the dataset, while the output layer of the decoding network has a width corresponding to the codeword length of the label codewords in the dataset. Furthermore, the decoding network can include one or more inner layers. The ideal number of inner layers and their connections can be determined experimentally, for example.
[0082] The decoding network is then trained with the data set so that the codewords can be predicted as reliably as possible from the respective images, thus creating a decoding network for the first pattern category.
[0083] The described procedures can be carried out by an electronic device 600, for example, a computer, as shown in Figure 6. Such an electronic device 600 has an internal memory 610 in which program instructions 611 and data 612 are stored, and a processor 620 that executes the described procedure steps. Furthermore, the electronic device 600 has an input interface 630 through which data can be entered and an output interface 640 through which data can be output. Data can be entered manually by a user or by loading data from an external data storage device. Data can be output visually to a user, for example, on a display. Alternatively, data can be output by storing the data in the internal memory or in an external data storage device.The following explains the functioning of the methods according to the invention using an example for embedding secret information in a computer-generated handwritten text.
[0084] A dataset containing handwritten letters of the respective grid size 28x28 pixels is included in the publicly available EMNIST dataset, which can be downloaded at the time of this filing from httDs: / / www.nist.cjov / itl / Droducts-andservices / emnist-dataset.
[0085] Figure 7 shows an autoencoder 700 for a selected letter (corresponding to a pattern category) from this EMNIST dataset, with an input layer 701 (“Input Layer”) of width 784 = 28x28, and an output layer 705 (“Output Layer”) of the same width 784 = 28x28. The autoencoder also includes three densely connected inner layers 702, 703, and 704, which are labeled in Figure 7 as “Encoder Layer” 702, “Bottleneck Layer” 703, and “Decoder Layer” 704. The inner layers “Encoder Layer” 702 and “Decoder Layer” 704” in Figure 7 also have a width of 784 = 28x28, while the “Bottleneck Layer” 703 has a width of 30.
[0086] During training, a binary cross entropy is used as the error function (loss function).
[0087] For example, the following code can be used to train the autoencoder: def build_autoencoder ( ) : input_layer = Input ( shape= ( 784 , ) ) encoded = Dense ( 784 , activation=' tanh' ) ( input_layer ) bottleneck = Dense ( 30 , activation=' sigmoid' ) ( encoded) hidden_gen_layer = Dense ( 784 , activation=' tanh' ) (bottleneck ) output_layer = Dense ( 784 , activation=' sigmoid' ) ( hidden_gen_layer ) optimizer = keras . optimizer . Adam ( learning_rate=0 . 0001 ) autoencoder = Model ( input_layer, output_layer ) autoencoder . compile ( optimizer=optimizer, loss=BinaryCrossentropy ( ) ) return autoencoder
[0088] Figure 8 shows the generative network extracted from the autoencoder. The generative network is obtained by extracting the generative subnetwork from the autoencoder network in Figure 7, starting with the inner layer, "Bottleneck Layer" 703. Bottleneck Layer 703 from Figure 7 thus corresponds to "Input Layer" 801 from Figure 8, Decoder Layer 704 from Figure 7 corresponds to the inner layer 802, "Generator Hidden Layer" from Figure 8, and Output Layer 705 from Figure 7 corresponds to "Output Layer" 803 from Figure 8. The weights of the autoencoder network achieved during training are retained during extraction.
[0089] Using the generative network, images can be generated that produce a handwritten version of the selected letter, into which the codeword specified during generation is embedded.
[0090] In order to decode the codeword, a corresponding decoding network must be created and trained for the selected letter of the EMNIST dataset.
[0091] The generative network can now be used to create or input a 30-bit vector at input layer 801 of the generative network using the following program code: `output = generator.redict(input_array)`
[0092] The decoding network is trained by using a large number of generator outputs with random 30-bit vectors as input. The decoding network is shown in Fig. 9 and comprises an input layer 901 with a width of 784, corresponding to the number of pixels in the sub-images of the pattern category. Furthermore, the decoding network shown in Fig. 9 includes three inner layers 902, 903, and 904, also known as hidden layers, each densely connected. Finally, the decoding network includes an output layer 905 with a width of 30, corresponding to the length of the codewords to be decoded.
[0093] Training the decoding network for a pattern category can be implemented as follows. `def build_model ( learning_rate ) : input_layer = Input ( shape= ( 784 , ) ) hidden_layer 1 = Dense ( 784 , activation=' tanh' ) ( input_layer ) hidden_layer2 = Dense ( 784 , activation=' tanh' ) ( hidden_layerl ) hidden_layer3 = Dense ( 784 , activation=' tanh' ) ( hidden_layer2 ) output_layer = Dense ( 30 , activation=' sigmoid' ) ( hidden_layer3 ) optimi zer = keras . optimi zers . Adam ( learning_rate=learning_rate ) model = Model ( inputs=input_layer, outputs=output_layer ) model .` compile ( optimi z=optimi z, los s=tf . keras . losses . BinaryCrossentropy ( ) ) return model
[0094] When a 30-bit vector is input into a generative network to create a partial image using the generator and successively decoded by the decoding network, errors can occur, which can also be interpreted as noise. These errors can be corrected by redundant, error-correcting encoding of the codewords. For this purpose, for example, only between 1 and 5 bits of information are encoded into the 30-bit codeword at a time, and these are then repeated accordingly. To extract the information from a decoded codeword, a majority vote is then used, for example. Thus, the respective information segment (which then comprises, for example, between 1 and 5 bits) is embedded in the partial image in a decodable manner by inputting an error-tolerant codeword of length 30 into the generative network.
[0095] Since the number of codewords used decreases drastically in the case of re-encoding, encryption is also employed. A 30-bit key is used for this purpose, which encrypts the codeword using XOR. This achieves a (weak) encryption and also increases the number of possible inputs to the generative network, which has a positive effect on training and embedding.
[0096] Figure 10A shows a text file, letter.txt, from which the handwritten-looking text in Figure 10B is generated. Embedded within this text is the secret message "This is a secret message!!" using a 30-bit key "000000000011111111110000000000". The secret message is first converted into a bit sequence, and each ASCII letter in letter.txt is assigned a portion of this sequence, based on the character's bit capacity. This portion is then repeated until 30 bits are reached and XORed with the key to create a codeword for that letter. Finally, using a generative network for that letter and the codeword, a bitmap file is generated. This file displays a handwritten letter, incorporating the respective portion of the secret message's bit sequence.The generated handwritten letters are then assembled into the image shown in Figure 10B. Knowing the key, the secret information can be decoded from the image.
[0097] Instead of handwritten letters as in the example described above, other patterns can also be used. For example, border decorations, arabesques, or even background patterns can be effectively broken down into raster images, on the basis of which a generative and corresponding decoding network can then be trained and used. Alternatively, other rasterized images, such as those used in the computer game Minecraft, could also be used as the basis for embedding information in a computer-generated image. In the case of background images, embedded information can be used in digital or printed security certificates to either transmit additional information or to enable a kind of signature of the image document or certificate.
[0098] Reference symbol list
[0099] S101 Receiving the secret information
[0100] S103 Dividing the secret information into information parts
[0101] S105 Assigning information pieces to pattern categories
[0102] S107 Check if further information pieces are available
[0103] Create S109 codeword
[0104] Sill generate partial image
[0105] S113 Assembling an image from partial images
[0106] 201 secret information
[0107] 202 sample categories
[0108] 203 capacities
[0109] 204 keys
[0110] Pi partial image
[0111] P2 partial image
[0112] P3 partial image
[0113] P4 partial image
[0114] P Overall picture
[0115] S301 Obtaining a data set of partial images of a first pattern category
[0116] S303 Initializing a neural network
[0117] S305 Training the neural network
[0118] S307 Extracting a generative part of the neural network
[0119] S401 Decomposing the image into sub-images
[0120] S403 Check if each sub-image has been decoded
[0121] S405 Determining a decoding word
[0122] S407 Determining an information part from the decoding word
[0123] S409 Determining the secret information from the information parts
[0124] S501 Check if the desired number has been reached
[0125] S503 Generating a random number
[0126] S505 Generating a partial image from a random number using a generative network
[0127] S507 Adding the generated sub-image labeled with the random number to the data set
[0128] S509 Initializing the decoding network
[0129] S511 Training the decoding network with the dataset
[0130] 600 electronic devices
[0131] 610 internal memory
[0132] 611 Program Instructions
[0133] 612 data
[0134] 620 processor input interface
[0135] Output interface Input layer Encoding layer Inner layer
[0136] Decoding layer
[0137] Output layer
[0138] Input layer Inner layer
[0139] Output layer
[0140] Input layer
[0141] Inner layer 1
[0142] Inner layer 2
[0143] Inner layer 3 Output layer
Claims
1. Patent claims 1. A method for generating an image containing secret information, the method comprising the following steps: Receiving the secret information, Dividing the secret information into a multitude of information parts; Assigning each piece of information to a pattern category from a predetermined set of pattern categories; Create, for each piece of information, a codeword assigned to that piece of information; Create, for each piece of information, by entering the respective codeword into a pre-trained generative network, a partial image of the respective assigned pattern category, into which the respective piece of information is embedded; Generating an image encompasses the multitude of created partial images.
2. Method according to claim 1, wherein a codeword is considered to be embedded in a partial image if the part of the information for which the codeword was created is decodable from the partial image.
3. A method according to one of claims 1 or 2, the method further comprising the following steps: Receiving a digital key; Creating a codeword associated with the information part still involves encryption with the digital key.
4. Method according to any of the preceding claims, wherein the digital key, the secret information, the plurality of information parts and / or the generated codewords are bit strings.
5. Method according to one of the preceding claims, wherein the partial images have one or more predefined raster sizes and the generated image is a rasterized image in which the partial images are arranged in a raster pattern.
6. A method according to any one of the preceding claims, further comprising: Retaining a sequence of pattern category instances from the predetermined set of pattern categories; Assigning the information pieces to the pattern categories corresponds to the sequence of the pattern category instances.
7. The method according to claim 6, wherein each pattern category is assigned a capacity, the capacity indicating a maximum size of information parts that can be embedded in that pattern category; and wherein the division of the secret information into the plurality of information parts is carried out such that the size of the respective information part is less than or equal to the capacity of the assigned pattern category instance.
8. Method according to any one of claims 3 to 7, wherein the codeword for an information part is created by repeating the information part until a predetermined codeword length is reached and / or wherein the encrypted codeword is created by an XOR operation between the key and the codeword.
9. A method according to one of the preceding claims, further comprising, for at least a first pattern category of the set of pattern categories: training a generative network to create sub-images of the first pattern category by Obtaining a data set of partial images from the first pattern category; Initializing a neural network, wherein an input layer and an output layer of the neural network have a width corresponding to the size of images in the data set, and an inner layer of the neural network has a width corresponding to the codeword length; Training the neural network with the dataset to create new sub-images that are similar to the sub-images in the dataset; Creating the generative network by extracting a generative part of the trained neural network.
10. A method for decoding secret information from an image generated according to claim 1, the method comprising the following steps: Decomposing the image into a multitude of sub-images, with each of the sub-images being assigned a pattern category from a predetermined set of pattern categories; For each sub-image: Obtaining a decoding codeword by entering the respective sub-image into a decoding network assigned to the respective pattern category and determining a part of the secret information from the decoding codeword; Determining the secret information from a multitude of pieces of secret information.
11. Method according to claim 10, wherein determining the secret information from the decoding codeword comprises: Generating a decoded decoding codeword by decoding the decoding codeword with the digital key; Determining the secret information from the decoded decoding codeword.
12. Method according to claim 11, wherein determining the secret information from the decrypted decoding codeword includes error correction.
13. Method according to one of claims 10-12, further comprising training a decoding network for a pattern category by: Generating a labeled dataset comprising a multitude of training pairs, each training pair consisting of an image generated by inputting a random codeword into the generating network for the pattern category, labeled with the random codeword; Initializing the decoding network, wherein the decoding network has an input layer with a width corresponding to the size of images of the pattern category and wherein the decoding network has an output layer with a width corresponding to a codeword length of the generating network of the pattern category; Training the decoding network with the labeled dataset.
14. Device for data processing comprising means for carrying out the steps of the method according to any one of claims 1-13.
15. Computer program product comprising instructions which, when the program is executed by a computer, cause it to perform the steps of the method according to any one of claims 1-13.