A method of authorizing a key or lock device comprises the following
steps: a first user device and a first system device used in a first
level of a lock system, such as at a manufacturer, are created. A first
encryption key is stored in the first user device and the first system
device. When the user device is to be shipped to a second level of the
lock system, such as a locksmith, an authentication process is carried
out between the first user device and the first system device using the
first encryption key stored therein. In case the authentication process
was successful, a software operation is carried out by the first system
device, by which the first encryption key stored in the first user device
is replaced by a second encryption key. This second encryption key is
stored in second system and user devices used in the second level of the
lock system, thereby making the first user device operable with the
second system and user devices. This prevents unauthorized use of keys
and locks.