METHOD FOR ENCRYPTING AND DECORDING USER DATA
Patent Information
- Application Number
- DE502022006832
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-12-20
- Filing Date
- 2022-12-19
- Publication Date
- 2026-02-12
- Estimated Expiration
- 2042-12-19
AI Technical Summary
Existing encryption methods for audio, images, or video are insecure due to insufficient encryption of user data, leading to inefficiency and limited reproducibility, especially when faced with transmission disturbances.
A method using a neural network with a key, such as an image, to encrypt user data by training the network on the key, generating cipher information from node weights, and transmitting only these weights, ensuring high security and efficiency.
The method provides secure and efficient encryption with tolerance to transmission disturbances, achieving fast encryption and decryption of large data volumes without transmitting user data itself, using a large network with redundancy to reduce errors.
Description
[0001] The present invention relates to a method for encrypting user data, wherein the user data is, in particular, images. Furthermore, the present invention relates to a method for decrypting such encrypted user data and a method for transmitting such encrypted user data.
[0002] Due to the rapid development of digital communication and information transmission, encryption methods play a fundamental role in ensuring the security and usability of digital technologies and in transmitting user data between a sender and a receiver. Intensive research is being conducted on innovative encryption methods to enable the efficient encoding of the increasingly common forms of information, such as audio, images, and video.
[0003] However, (known) encryption methods for audio, images, or video are sometimes insecure because a portion of the user data is transmitted from sender to receiver in insufficiently encrypted form as cipher information. If a sufficiently high level of encryption is chosen for the user data, efficiency often decreases, meaning the encryption speed is insufficient to provide usable encryption capable of handling the ever-increasing amount of user data to be encrypted. Furthermore, the reproducibility of the user data by the receiver can often be limited, so that if the transmitted cipher information is disrupted, the user data cannot be reconstructed or decrypted, or only insufficiently.
[0004] The object of the present invention is to create an encryption method which efficiently and securely encrypts user data and exhibits tolerance to disturbances during the transmission process.
[0005] The problem is solved by a method for encrypting user data according to claim 1, a method for decrypting user data according to claim 10, and a method for encrypted transmission of user data according to claim 12.
[0006] The inventive method for encrypting user data comprises the following steps: Providing a key, in particular where the key is a vector or a matrix; providing a network with N nodes; providing payload data; training the network on the payload data by inputting the key; and creating cipher information from the weights of the nodes and in particular the weights of the nodes of the output layer of the network.
[0007] The network in question is, for example, a neural network, specifically a recurrent network with N nodes. It has an input layer and an output layer. The key is applied to the network via the input layer. The network is trained on the user data using the key input, so that the key is mapped to the user data by the network. The weights of the network's nodes are adjusted to ensure correct reproduction of the user data. Cipher information is generated from the network's node weights and then transmitted to the receiver. For neural networks, the network's own weights constitute the cipher information, or are derived from them.In reservoir computing, the learned mapping—that is, the weights of the output layer—of the column-wise fixed weights of the network on the user data constitutes the cipher information, or is generated from it. It is evident that while the cipher information is formed based on the user data, it contains no information about the user data or parts of the user data itself. This significantly increases the security of the encryption.
[0008] Preferably, the key is a vector or a matrix, such as an image or a frame from an image stream or video. The pixel values of the image are used as the key. The method exhibits strong sensitivity to changes in the image used as the key.
[0009] In particular, the input layer of the network is a matrix or vector with a row dimension corresponding to the number N of nodes in the network and a column dimension corresponding to the row dimension of the key. Preferably, the weights of the input layer are chosen randomly and remain fixed. Alternatively, the dimensional change of the row dimension of the key can be generated by a list of functions.
[0010] Because an image / matrix is used as the key, the key length corresponds to the number of pixels in the image. If the image used as the key has a size of 512x512 pixels, this results in a key length of 512. Additionally, the row dimension of the key is extended accordingly by the input layer of the network with N nodes, resulting in an effective key length of N*512. The resulting key space makes brute-force attacks impossible. To guess the key, the corresponding network weights as bits must be guessed in the correct order. This results in 2^bits(512*N) = 2^(32*512*N) possibilities.
[0011] The division into key and network allows the key, or the image or matrix, to be arbitrarily smaller in row dimension (and thus also in data volume) than the dimension of the network. Ultimately, applying the key to the input layer of the network always results in a key space of (number of network nodes N x number of columns of user data). This has practical and user-friendly properties, such as the ability to easily change the key without transferring large amounts of data.
[0012] In particular, the key's column vectors are extended by the input layer to the network's dimension and then applied to the network, transforming them into reservoir states using an update rule. The reservoir states generated column by column in this way each represent the new network weights. These are then trained on the user data, for example, using ridge regression. All reservoir states that are subsequently mapped to the user data have the dimension (number of network nodes N x number of columns in the user data).
[0013] Without knowledge of the key and / or the network, decryption or reproduction of the user data is not possible.
[0014] Due to the use of a fast learning algorithm such as Ridge Regression and a network for encrypting the user data, efficient and secure encryption is achieved, which encrypts the user data quickly and reliably.
[0015] Preferably, the payload is an image or one or more frames of an image stream, a video, or an audio file. In particular, the payload is a color channel of an image. This allows for separate encryption of the individual color channels. This payload is distinct from and independent of the key. Specifically, when an image is used as the key, the payload, which is itself an image or frame of an image stream, is encrypted using the image. However, the present invention is not limited to a specific type of payload. Therefore, any type of payload can be encrypted using the present invention, provided the payload is in vector or matrix form or arranged accordingly.
[0016] Preferably, the network has more than 30 and, in particular, more than 500 nodes. In particular, the use of a large network increases security, as more than 500 states can be transmitted.
[0017] Preferably, the number N of nodes in the network is greater than the line size. The resulting redundancy reduces errors during the encryption and decryption of the user data.
[0018] Preferably, the network is trained using Ridge Regression.
[0019] Preferably, the network is trained column-wise. The key is preferably applied column-wise to the network to train the output layer of the network on a corresponding column of the payload. In particular, ∥ W out r i -m i ∥ 2< + λ ∥ W out ∥ 2< minimized, where r i the weights of the network nodes after applying the i -th column of the key, W out the weights of the network's output layer, m i the columns of the user data and λ This is a regularization factor. The key is then applied column-wise to the network to generate the weights. r i the node of the network, which, after training the output layer of the network using the optimized weights W out on the i -th column of the user data m i can be mapped. The weightings W out The nodes of the output layer represent the cipher information, which is then transmitted to the receiver.
[0020] Thus, the cipher information has a dimension corresponding to (number of columns in the user data) x N.
[0021] In particular, the key has the same number of columns as the user data.
[0022] Preferably, the network is initialized for encryption using random weights.
[0023] In particular, before each column-wise training, the network weights are updated using an update rule that preferably incorporates previous network weights. During the network weight update, the network topology preferably remains identical. Specifically, the same update rule is used for both the sender and the receiver. The update rule can be implemented as a function that provides a functional relationship between the key and the respective network weights. Alternatively, the update rule can be implemented as a mapping that, upon input of the key, maps the respective weight to a value in a target space of the mapping. The values in the target space can preferably be statistically distributed or represent noise.This increases the security of the procedure, as it is not possible to determine the update requirement without knowledge of the assignment used.
[0024] Furthermore, the present invention relates to a method for decoding user data, in particular images, comprising the following steps: Providing cipher information encrypted according to the procedure described above; providing the same key; providing the same network; and applying the key to the network, taking into account the cipher information, to decrypt the user data.
[0025] Thus, the recipient is provided with the cipher information. Using the same key that was already used for encryption and the same network, the payload can then be decrypted from the cipher information by applying the key to the network and taking the cipher information into account. The "same network" refers to a network with an identical topology and number of nodes.
[0026] Preferably, the key is applied to the network taking into account the cipher information for decrypting the user data by matrix multiplication of the network weights with the cipher information.
[0027] Preferably, the network is initialized for decryption using random weights, which are in particular identical to the weights used for the initialization of the encryption.
[0028] In particular, the network weights and topology are updated column by column, identical to the process used to generate the cipher information during encryption. Thus, the network weights in the receiver's network are updated according to the same update rules applied by the sender during encryption.
[0029] Furthermore, the present invention relates to a method for the encrypted transmission of user data comprising the following steps: Generating cipher information which is encrypted according to the procedure described above; transmitting the cipher information to a receiver via a transmission channel; decrypting the user data according to the procedure for decrypting user data described above.
[0030] Preferably, the transmission channel is a wired transmission channel, such as LAN, or a wireless transmission channel, such as 3G, 4G, 5G, WiFi, WLAN, Bluetooth or the like.
[0031] Furthermore, the present invention relates to a device for encrypting user data. The device is configured to carry out the method for encrypting user data as described above.
[0032] Preferably, the device comprises a processor and a memory for storing instructions which, when executed by the processor, perform the above-described method for encrypting user data.
[0033] Preferably, the device includes a hardware implementation of the network, and in particular the reservoir network. Preferably, the hardware implementation also includes the input layer.
[0034] Furthermore, the present invention relates to a device for decrypting user data. The device is configured to carry out the method for decrypting user data as described above.
[0035] Preferably, the device comprises a processor and a memory for storing instructions which, when executed by the processor, perform the above-described method for decrypting user data.
[0036] Preferably, the device includes a hardware implementation of the network, and in particular the reservoir network. Preferably, the hardware implementation also includes the input layer. The hardware implementation of the network for decryption in the device is identical to the hardware implementation of the network for encryption in the device.
[0037] Furthermore, the present invention relates to a system for transmitting encrypted user data. The system comprises the above-described device for encrypting user data and the device for decryption, which are connected to each other by a transmission channel for transmitting the cipher information.
[0038] The invention will now be explained in more detail with reference to preferred embodiments and the accompanying drawings.
[0039] They show: Figure 1 a flowchart of the method for encrypting user data, Figure 2 a flowchart for decrypting user data, Figure 3 a schematic representation of the encryption method, Figures 4A-4C examples of user data and their respective cipher information, Figure 5 simulation results of the method according to the present invention and Figure 6 an example of decryption with mismatched keys.
[0040] The present invention provides a method for encrypting and decrypting user data. The method for encrypting user data comprises the following steps: In step S01, a key is provided, specifically an image. In step S02, a network with N nodes and the input layer are provided. In step S03, user data is provided. In step S04, the network is trained on the user data using the key as input. In step S05, cipher information is generated from the weights of the network nodes.
[0041] The key is, in particular, an image, a frame from an image stream, or a key object whose representation can itself be used as a key. Generally, the key is a vector or matrix that is known and used for both encryption and decryption. The network expands the key in a chaotic and non-linear manner.
[0042] In particular, the cipher information, which is generated from the weights assigned to the network nodes, is transmitted to a receiver. Thus, no information about the user data itself is transmitted, thereby increasing the security of the encryption. Without knowledge of the key and the network or its topology, it is impossible to determine the user data from the cipher information. Specifically, both the sender (for encrypting the user data) and the receiver (for decrypting the data) use the same weights chosen for network initialization and the same update protocol for these network weights.
[0043] The user data in question is, in particular, an image or one or more frames of an image stream. Specifically, the user data is a color channel of an image or frame.
[0044] The cipher information is transmitted to a receiver for decryption. The decryption process for the user data comprises the following steps: In step S11, cipher information is provided, which is processed according to the procedure described below. Figur 1 The key was generated. In step S12, the same key used for encryption is provided. In step S13, the same network used for encryption is provided. In step S14, the key is applied to the network, taking into account the cipher information, to decrypt the user data.
[0045] Thus, the sender and receiver of the cipher information share an identical key, an identical network, and its input layer, enabling the decryption of the user data from the cipher information. The identical network can refer only to the network topology. Additionally, the weights used to initialize the encryption network can be transferred to the receiver and used there to initialize the decryption network as well. Alternatively, the identical network can include the initialization weights in addition to the topology. Furthermore, both the sender (for encrypting the user data) and the receiver (for decrypting the user data) use the same update rule to adjust the weights of the network nodes when the key is applied to the input layer.
[0046] Figur 3 Figure 1 shows a schematic representation of the inventive method for encrypting and decrypting user data. The user data 18 is an image with column vectors. m i Similarly, key 10 is also an image with column vectors. The columns of key 10 are applied to a network 12 with a plurality of N nodes. For this purpose, network 12 is first initialized with random weights. Network 12 has an output W out .. Furthermore, the weights of the nodes of network 12 are represented as a column vector. r i In summary, the length of the column vector is... r i exactly the number N of Knoten des Network 12. Network 12 is a neural network, a recurrent network, or something similar.
[0047] The following is the output of network 12. W out trained on the columns m i The user data 18, for example, can be analyzed using reservoir computing or ridge regression. For example, the expression ∥ can be used. W out ri-m i ∥ 2< + λ ∥ W out ∥ 2< are minimized, where λ A regularization factor, which can be chosen in particular between 10⁻¹ and 10⁻⁸, whereby the quality of the decrypted user data increases with a smaller value. λ .
[0048] If the payload 18 is an image with a resolution of 512x512 pixels and the network 12 has 600 nodes, then the cipher information 22 has a dimension of 512x600. For this purpose, the network 12 is trained column-wise for each column of the key 10 on the respective column of the image in the payload 18. The weights 16 of the trained network are then combined to form the cipher information 22. Thus, the corresponding column vectors of the image can be determined from the reservoir states of the column vectors of the key by appropriately training the weights of the network 12 for the respective columns.
[0049] The cipher information 22 is then transmitted to a receiver via a transmission channel 24. The transmission channel can be any transmission channel, such as a wired transmission via the Internet, LAN, or a wireless transmission via WiFi, 3G, 4G, 5G, or the like.
[0050] To decrypt the payload, the receiver requires an identical key 10' and an identical network and its input layer 12', wherein the identical network 12' has an identical topology and number of nodes, and in particular, identical initial weighting to the sender's network 12. Furthermore, the sender and receiver use the same update protocol. To decrypt the payload, the columns of the key 10' are applied to the network 12', and the resulting reservoir states are transferred to the transmitted cipher information 22' by matrix multiplication 26. This allows the image of the transmitted payload 18' to be decrypted from the transmitted cipher information 22' by simple matrix multiplication 26.
[0051] Fig. 6 This shows an example where the key 10" used for decryption differs slightly from the key 10 used for encryption. As can be seen from the Fig. 6 As can be seen, the payload 18 cannot be decrypted, and image 18 does not represent the original payload 18. The same applies if the network 12 is changed. Therefore, if a different network is used that has a different topology, a different number of nodes, and / or a different initialization than the network used for encryption, the payload cannot be decrypted either.
[0052] Figuren 4A-4C show different examples of user data 18, the transmitted cipher information 22, and user data 18 decrypted from the transmitted cipher information. From the examples of Figuren 4A-4C It is evident that a precise reconstruction of the payload is possible, whereas no information about the payload can be extracted from the cipher information 22.
[0053] For example, the Figur 4A shows the Figur 5A An error analysis with an increasing number of nodes in network 12 or 12'. Curves 30, 32, and 34 show the error evolution of the image. Figur 4A For different resolutions of 128x128, 256x256, and 512x512, the markers 30', 32', and 34' indicate that a significant reduction in user data transmission errors can be achieved if the network size is larger than the user data resolution. For example, a significant error reduction is observed with a user data resolution of 128x128 and a network size of approximately 150 nodes. The same applies to a user data resolution of 256x256 with a network size of approximately 300 nodes, and to a user data resolution of 512x512 with a network size of approximately 550 nodes or more.
[0054] Figure 5B This serves as an example of the Figur 4A The encryption time is represented for different network sizes. For example, curve 36 shows the time required to encrypt the user data at a resolution of 512x512. For a network size of 550 nodes, which corresponds precisely to the size of the significant error reduction according to the Figur 5A corresponds (marked in the Figur 5B The marking 36') results in an encryption time of 0.073 seconds. This is 10 to 132 times faster than previous encryption methods based on recurrent neural networks and up to 280 times faster than the chaos-based hyperchaotic map encryption method.
[0055] Curve 38 shows the encryption time for different network sizes for a user data resolution of 256x256, where for a network size of 300 nodes according to marker 38', corresponding to the network size at marker 33'. Figur 5A This results in an encryption time of 0.019 seconds. Curve 40 shows the encryption time for a user data resolution of 128x128, where the marker 40' corresponds to the network size as indicated by the marker 30'. Figur 5A , resulting in an encryption time of 0.007 seconds.
[0056] This creates a fast and efficient encryption method that can securely encrypt even large amounts of user data. At the same time, no user data is transmitted from the sender to the receiver, as only the weights of the individual nodes in the network's output layer, or the corresponding values, are used. W out The data is transmitted securely. Therefore, the present method is secure. At the same time, the use of an image / matrix as a key ensures a sufficiently large key, which further increases security.
Claims
1. A method for encrypting user data, in particular images, comprising the steps of: providing a key, wherein the key is in particular a vector or a matrix; providing a network having N nodes and initial weightings; providing user data; characterized by training the network with respect to the user data with the key being inputted; and producing cipher information from the weightings of the nodes of the network.
2. The method according to claim 1, wherein the key is an image or a frame of an image stream or a key object.
3. The method according to claim 1 or 2, wherein the user data are an image or one or a plurality of frames of an image stream or audio data.
4. The method according to any one of claims 1 to 3, wherein the network comprises more than 30, in particular more than 500 nodes.
5. The method according to any one of claims 1 to 4, wherein the number N of nodes of the network is larger than a line size / column size of the key.
6. The method according to any one of claims 1 to 5, wherein the network is trained by means of a ridge regression.
7. The method according to any one of claims 1 to 6, wherein the network is column-wise trained.
8. The method according to claim 7, wherein the key is column-wise applied to the network for training the network with respect to a corresponding column of the user data, wherein in particular W out r i − m i 2 + λ W out 2 is minimized, wherein ri designates the weightings of the nodes of the network for the ith column of the user data, Wout designates the column-wise output of the network, mi designates the columns of the user data and λ designates a regulation factor.
9. The method according to any one of claims 1 to 8, wherein the weightings of the nodes of the network are adapted on the basis of an update specification, wherein the update specification is a function or an assignment.
10. A method for decrypting user data, in particular images, comprising the steps of: providing cipher information generated according to any one of claims 1 to 9; providing the same key; providing the same network; and applying the key to the network taking into consideration the cipher information for decrypting the user data.
11. The method according to claim 10, wherein the application of the key to the network taking into consideration the cipher information for decrypting the user data is performed by means a matrix multiplication of the key by the cipher information.
12. A method for encrypted transmission of user data, comprising the steps of: generating cipher information according to any one of claims 1 to 9; transmitting the cipher information to a receiver; decrypting the user data according to any one of claims 10 or 11.
13. An apparatus for encrypting user data, wherein the apparatus is configured for performing the method according to any one of claims 1 to 9.
14. An apparatus for decrypting user data, wherein the apparatus is configured for performing the method according to any one of claims 10 or 11.