A registration apparatus comprising: a random number generation unit to generate a data random number tuple R that is a tuple of random numbers whose quantity is the same as a level quantity L of a hierarchy that a user attribute forms, and that is also a tuple of uniformly random numbers, and a tag random number tuple R' that is a tuple of random numbers whose quantity is the same as the level quantity L, and that is also a tuple of uniformly random numbers; an acceptance unit to accept a plaintext M and attribute information B that indicates an attribute value by level of a user who is allowed to refer to the plaintext M; an encrypted data generation unit to execute a function F_2 by taking as input a concatenated value of an attribute value of each level j in the attribute information B and a number of each level j, to execute a function F_3 by taking as input a function value of the function F_2, to calculate an attribute element C_{j, 0, 0} that is an exclusive-or of a function value of the function F_3 and a jth random number of the data random number tuple R, to execute a function F_4 by taking as input the plaintext M and an exclusive-or of the data random number tuple R, and to generate encrypted data C that includes the attribute element C_{j, 0, 0} and a ciphertext C_{L + 1} which is a function value of the function F_4; an encrypted tag generation unit to execute the function F_2 by taking as input a concatenated value of an attribute value of each level j in the attribute information B and a number of each level j, to execute a function F_5 by taking as input a function value of the function F_2 and a registered keyword, to execute a function F_6 by taking as input a function value of the function F_5, to calculate an attribute element CT_{j, 0, 0} that is an exclusive-or of a function value of the function F_6 and a jth random number of the tag random number tuple R', to execute a function F_7 by taking as input an exclusive-or of the tag random number tuple R', and to generate an encrypted tag CT_{W_n} that includes the attribute element CT_{j, 0, 0} and a determination element CT_{L + 1} which is a function value of the function F_7; and a registration unit to register a tuple of the encrypted data C and the encrypted tag CT_{W_n} in a data management apparatus. a random number generation unit to generate a data random number tuple R that is a tuple of random numbers whose quantity is the same as a level quantity L of a hierarchy that a user attribute forms, and that is also a tuple of uniformly random numbers, and a tag random number tuple R' that is a tuple of random numbers whose quantity is the same as the level quantity L, and that is also a tuple of uniformly random numbers; an acceptance unit to accept a plaintext M and attribute information B that indicates an attribute value by level of a user who is allowed to refer to the plaintext M; an encrypted data generation unit to execute a function F_2 by taking as input a concatenated value of an attribute value of each level j in the attribute information B and a number of each level j, to execute a function F_3 by taking as input a function value of the function F_2, to calculate an attribute element C_{j, 0, 0} that is an exclusive-or of a function value of the function F_3 and a jth random number of the data random number tuple R, to execute a function F_4 by taking as input the plaintext M and an exclusive-or of the data random number tuple R, and to generate encrypted data C that includes the attribute element C_{j, 0, 0} and a ciphertext C_{L + 1} which is a function value of the function F_4; an encrypted tag generation unit to execute the function F_2 by taking as input a concatenated value of an attribute value of each level j in the attribute information B and a number of each level j, to execute a function F_5 by taking as input a function value of the function F_2 and a registered keyword, to execute a function F_6 by taking as input a function value of the function F_5, to calculate an attribute element CT_{j, 0, 0} that is an exclusive-or of a function value of the function F_6 and a jth random number of the tag random number tuple R', to execute a function F_7 by taking as input an exclusive-or of the tag random number tuple R', and to generate an encrypted tag CT_{W_n} that includes the attribute element CT_{j, 0, 0} and a determination element CT_{L + 1} which is a function value of the function F_7; and a registration unit to register a tuple of the encrypted data C and the encrypted tag CT_{W_n} in a data management apparatus.