A method for an information processing system including a first device, the first device including a processor and a memory, the method comprising the steps of: the memory storing a plurality of second encrypted feature values generated by encrypting each of a plurality of reference feature values calculated from a plurality of pieces of privacy data acquired in advance by using inner product encryption, each of the plurality of reference feature values being represented as an n-dimensional vector, and n being an integer equal to or larger than 1; the processor receiving, from a second device connected to the first device, a query including a first encrypted feature value provided with confidential information unique to a user, the first encrypted feature value being generated by encrypting a first feature value calculated from privacy data of the user by using inner product encryption and the first feature value being represented as an n-dimensional vector; the processor acquiring a plurality of inner product values by computing an inner product of the first encrypted feature value and each of the plurality of second encrypted feature values; the processor transmitting, to the second device, privacy data of the plurality of pieces of privacy data having an inner product value of the first encrypted feature value and a second encrypted feature value with an encrypted reference feature value calculated from the privacy data, the inner product value being equal to or smaller than a predetermined threshold; the processor identifying a secret key of the user by using the confidential information included in the query when an unauthorized access to the first device is detected; and the processor outputting identification information for identifying the secret key of the user to the second device. the memory storing a plurality of second encrypted feature values generated by encrypting each of a plurality of reference feature values calculated from a plurality of pieces of privacy data acquired in advance by using inner product encryption, each of the plurality of reference feature values being represented as an n-dimensional vector, and n being an integer equal to or larger than 1; the processor receiving, from a second device connected to the first device, a query including a first encrypted feature value provided with confidential information unique to a user, the first encrypted feature value being generated by encrypting a first feature value calculated from privacy data of the user by using inner product encryption and the first feature value being represented as an n-dimensional vector; the processor acquiring a plurality of inner product values by computing an inner product of the first encrypted feature value and each of the plurality of second encrypted feature values; the processor transmitting, to the second device, privacy data of the plurality of pieces of privacy data having an inner product value of the first encrypted feature value and a second encrypted feature value with an encrypted reference feature value calculated from the privacy data, the inner product value being equal to or smaller than a predetermined threshold; the processor identifying a secret key of the user by using the confidential information included in the query when an unauthorized access to the first device is detected; and the processor outputting identification information for identifying the secret key of the user to the second device.