Concept of hashing a group of data and validating if a value exists within the group When learning about cryptography and hashing, I remember seeing a concept where you could hash a number of values (ID's for example) and then validate against the hash, not storing the original IDs. Upon researching this further, I cannot find any concrete examples. 

I am wondering if I misunderstood the concept when originally learning about hashing. Please review the following scenario and let me know if I misunderstood or the concept exists:

Concept

A university is running a contest for students. The university staff chose ten random student IDs as winners. Students can visit a website and enter their student ID to see if they won. 

The winning student ID's are not stored in a database but rather are hashed. When a student enters an ID on the website, the ID entered is validated against this "winning hash." 

Questions


Is this type of "group of values" hashing and validation a concept that exists or did I misunderstand something in my research?
If this does not exist, would the correct method be to hash each winning student ID, then when a student enters the ID to hash it and validate it against the individual stored hashes?


Thank you!
It sounds like you're describing a Bloom filter.

Note that they're designed to allow false positives (but not false negatives). They can be good to quickly check whether a value might be in a certain set worthy of a more computationally-expensive check. Imagine that you are scanning a large body of text word by word, there is a set of key words you're looking for, and there are more key words than fit in RAM. You can create a bloom filter out of all of the key words that fits in RAM. Whenever you find a word that passes the bloom filter, that means the word might be a key word, so you can then double-check the word against your list of key words on disk. This saves you from having to access the disk for every word you scan.