(EN) Disclosed are an encryption method and apparatus for generating keys on the basis of attributes of information, and a device, relating to blockchain technology and drug administration technology. The method comprises: acquiring a target function used to describe information, and attribute information of each piece of sub-information in target information to be processed; according to the attribute information of each piece of sub-information, generating a key corresponding to each piece of sub-information; according to the target function, acquiring coordinate information corresponding to each piece of sub-information in at least two pieces of sub-information; encrypting the coordinate information of corresponding sub-information from among the at least two pieces of sub-information by using the key corresponding to each piece of sub-information, so as to obtain ciphertext of the coordinate information corresponding to each piece of sub-information; and determining the ciphertext of the coordinate information corresponding to each piece of sub-information to be ciphertext of the target information, and storing the ciphertext of the target information in a blockchain network. By using the present application, the security of target information can be improved.
(FR) Sont divulgués un procédé et un appareil de chiffrement pour générer des clés sur la base d'attributs d'informations, et un dispositif, se rapportant à la technologie de chaînes de blocs et à la technologie d'administration de médicament. Le procédé consiste à : acquérir une fonction cible utilisée pour décrire des informations, et des informations d'attribut de chaque élément de sous-informations dans des informations cibles à traiter ; selon les informations d'attribut de chaque élément de sous-informations, générer une clé correspondant à chaque élément de sous-informations ; selon la fonction cible, acquérir des informations de coordonnées correspondant à chaque élément de sous-informations dans au moins deux éléments de sous-informations ; chiffrer les informations de coordonnées des sous-informations correspondantes parmi les au moins deux éléments de sous-informations en utilisant la clé correspondant à chaque élément de sous-informations, de manière à obtenir un cryptogramme des informations de coordonnées correspondant à chaque élément de sous-informations ; et déterminer le cryptogramme des informations de coordonnées correspondant à chaque élément de sous-informations à chiffrer des informations cibles, et stocker le cryptogramme des informations cibles dans un réseau de chaînes de blocs. En utilisant la présente demande, la sécurité des informations cibles peut être améliorée.
(ZH) 本申请实施例公开了一种基于信息的属性生成密钥的加密方法、装置及设备,涉及区块链技术以及药品管理技术。其中,该方法包括:获取用于描述信息的目标函数,以及待处理的目标信息中每条子信息的属性信息;根据所述每条子信息的属性信息生成所述每条子信息对应的密钥;根据所述目标函数获取所述至少两条子信息中每条子信息对应的坐标信息;采用所述每条子信息对应的密钥,对所述至少两条子信息中的对应子信息的坐标信息进行加密,得到所述每条子信息对应的坐标信息的密文;将所述每条子信息对应的坐标信息的密文确定为所述目标信息的密文,将所述目标信息的密文存储至区块链网络中。采用本申请,可以提高目标信息的安全性。