A method for producing a security document , comprising: - providing a substrate for a security document ; and - producing an optically readable security code feature, in which security-relevant information consisting of first and second information is encoded, on the substrate, wherein in this case - the first information is encoded in a code generator into a first code, in which the first information is encoded by means of binary symbols; - the second information is encoded in the code generator into a second code, which is different from the first code and in which the second information is encoded by means of binary symbols; - the first code is applied on the substrate by means of a machining device as a first optical 1D, 2D, or 3D code in a first reading region in such a manner that the applied first code can be optically read at a first viewing angle relative to the surface of the substrate; and - the second code is applied on the substrate by means of the machining device as a second optical 1D, 2D, or 3D code in a second reading region in such a manner that the applied second code can be optically read at a second viewing angle relative to the surface of the substrate, which viewing angle is different from the first viewing angle; characterized in that the first information comprises a cryptographic key, which can be used to decrypt electronic data of the second information. - providing a substrate for a security document ; and - producing an optically readable security code feature, in which security-relevant information consisting of first and second information is encoded, on the substrate, wherein in this case - the first information is encoded in a code generator into a first code, in which the first information is encoded by means of binary symbols; - the second information is encoded in the code generator into a second code, which is different from the first code and in which the second information is encoded by means of binary symbols; - the first code is applied on the substrate by means of a machining device as a first optical 1D, 2D, or 3D code in a first reading region in such a manner that the applied first code can be optically read at a first viewing angle relative to the surface of the substrate; and - the second code is applied on the substrate by means of the machining device as a second optical 1D, 2D, or 3D code in a second reading region in such a manner that the applied second code can be optically read at a second viewing angle relative to the surface of the substrate, which viewing angle is different from the first viewing angle; - the first information is encoded in a code generator into a first code, in which the first information is encoded by means of binary symbols; - the second information is encoded in the code generator into a second code, which is different from the first code and in which the second information is encoded by means of binary symbols; - the first code is applied on the substrate by means of a machining device as a first optical 1D, 2D, or 3D code in a first reading region in such a manner that the applied first code can be optically read at a first viewing angle relative to the surface of the substrate; and - the second code is applied on the substrate by means of the machining device as a second optical 1D, 2D, or 3D code in a second reading region in such a manner that the applied second code can be optically read at a second viewing angle relative to the surface of the substrate, which viewing angle is different from the first viewing angle; <EOS>