These were then tested against multiple locks and within minutes the device was able to generate a master key that could open any door in the building.
The researchers said that even an expired key from a stay five years ago will work, along with cards that are used to access utility spaces such as garages or closets.
Although F-Secure stressed that during the research no hotel rooms were actually broken into and that the attack tools were not made available, Tomi Tuominen, the practice leader at F-Secure, said: "You can imagine what a malicious person could do with the power to enter any hotel room with a master key created basically out of thin air."
He added, however, that he didn't know of any group performing this attack in the world right now.
The researchers' interest in hacking hotel locks was sparked a decade ago when a colleague's laptop was stolen from a hotel room during a security conference.
When the researchers reported the theft, hotel staff dismissed their complaint given that there was not a single sign of forced entry, and no evidence of unauthorised access in the room entry logs.
The researchers decided to investigate the issue further, and chose to target a brand of lock known for quality and security.
It took a thorough understanding of the whole system's design to identify small flaws that, when combined, produced the attack.
The research took several thousand hours and was done on an on-and-off basis, and involved considerable amounts of trial and error.