Physical security and cryptography can learn from each other, part 11367:

Hotels wisely don't put the room number on guest keycards so if someone finds your card, they'd have to exhaustively search the hotel to find the room it opens.

Some hotels now have elevators programmed to only let you call the floor for which your keycard is coded, preventing guests from wandering to other floors.

But it also means the elevator can be used as an efficient oracle to determine the floor of a found key.

@mattblaze I suspect there is a square-root law here, where optimum balance between the "wandering guest" threat and the "found keycard" threat is achieved by allowing elevator access to the square root of the total number of floors (your own, plus some randomly selected floors)
@mvaneerde @mattblaze
The maximal security approach is for the key card to only given access to a random floor (excluding the floor the room is on).
@mvaneerde @mattblaze not counting the reception floor, the wellness floor, the restaurant floor, and the garage floor, of course

@mvaneerde @mattblaze Is this the overengineering we sometimes hear about ? :)

On a more serious note, that would probably be immediately offset by half the staff being confused, and many guests both getting lost, and complaining to the front desk.
Guests have learned this feature. Some (many?) even rely on it to avoid remembering the floor - scan the card, smash some buttons, done.
Now they would end up on semi-random floors...

@richlv @mattblaze all valid concerns. In the "pro" column I will add guests would have more recourses if the ice machine on their floor breaks

@mvaneerde @mattblaze Do the random floors change every time guests use the lift? :)

In a way that "feature" makes me feel less safe. What do you mean, in your hotel it is dangerous and there are random burglaries or something?

Sidenote: "ice machine" seems like such an American thing. I recall my first visits to the USA many years ago, and