A method of producing at least one security element in a data carrier comprising the steps of: - Providing a source of radiation that is configured to emit electromagnetic radiation; - Providing a data carrier that comprises at least one guiding layer and at least one processing layer, wherein the at least one processing layer is arranged after the at least one guiding layer with respect to an extension direction, wherein the at least one guiding layer is configured to guide impinging electromagnetic radiation into the at least one processing layer, and wherein the at least one processing layer is curable upon an interaction with electromagnetic radiation; - Providing at least one masking layer comprising at least one masking element, the at least one masking layer being arranged before the at least one guiding layer with respect to the extension direction; and - Irradiating electromagnetic radiation from the source of radiation through the masking layer and onto the data carrier, wherein electromagnetic radiation that impinges on a region of the masking layer having no masking element impinges on the at least one processing layer as electromagnetic radiation having a first radiation property (Ra), whereby the at least one processing layer is cured in said region of impingement into a first curing state, the method being characterised in that electromagnetic radiation that impinges on a region of the masking layer comprising the at least one masking element impinges on the at least one processing layer as electromagnetic radiation having a second radiation property (Rb) being different from the first radiation property (Ra), whereby the at least one processing layer is cured in said region of impingement into a second curing state, and in that the second curing state of the processing layer constitutes the security element. - Providing a source of radiation that is configured to emit electromagnetic radiation; - Providing a data carrier that comprises at least one guiding layer and at least one processing layer, wherein the at least one processing layer is arranged after the at least one guiding layer with respect to an extension direction, wherein the at least one guiding layer is configured to guide impinging electromagnetic radiation into the at least one processing layer, and wherein the at least one processing layer is curable upon an interaction with electromagnetic radiation; - Providing at least one masking layer comprising at least one masking element, the at least one masking layer being arranged before the at least one guiding layer with respect to the extension direction; and - Irradiating electromagnetic radiation from the source of radiation through the masking layer and onto the data carrier, wherein electromagnetic radiation that impinges on a region of the masking layer having no masking element impinges on the at least one processing layer as electromagnetic radiation having a first radiation property (Ra), whereby the at least one processing layer is cured in said region of impingement into a first curing state, the method being characterised in that electromagnetic radiation that impinges on a region of the masking layer comprising the at least one masking element impinges on the at least one processing layer as electromagnetic radiation having a second radiation property (Rb) being different from the first radiation property (Ra), whereby the at least one processing layer is cured in said region of impingement into a second curing state, and in that the second curing state of the processing layer constitutes the security element. wherein electromagnetic radiation that impinges on a region of the masking layer having no masking element impinges on the at least one processing layer as electromagnetic radiation having a first radiation property (Ra), whereby the at least one processing layer is cured in said region of impingement into a first curing state, the method being characterised in that electromagnetic radiation that impinges on a region of the masking layer comprising the at least one masking element impinges on the at least one processing layer as electromagnetic radiation having a second radiation property (Rb) being different from the first radiation property (Ra), whereby the at least one processing layer is cured in said region of impingement into a second curing state, and in that the second curing state of the processing layer constitutes the security element.