A locking and unlocking system comprising: a portable terminal; a key unit arranged inside a vehicle or facilities; and a locking and unlocking device installed in the vehicle or the facilities, wherein the portable terminal includes a first sending unit configured to send a first request to the key unit, the first request including first authentication information associated with the key unit, the key unit includes: a first receiving unit configured to receive the first request from the portable terminal; a first storage unit configured to store encrypted second authentication information, the second authentication information being associated with the vehicle or the facilities; a first authentication unit configured to perform authentication based on the first authentication information included in the first request when the first receiving unit receives the first request; a decryption unit configured to decrypt the second authentication information when the authentication by the first authentication unit is successful; and a second sending unit configured to send a second request to the locking and unlocking device, the second request including the second authentication information decrypted by the decryption unit, and the locking and unlocking device includes: a second receiving unit configured to receive the second request from the key unit; a second authentication unit configured to perform authentication based on the second authentication information included in the second request, when the second receiving unit receives the second request; and a locking and unlocking unit configured to lock or unlock the vehicle or the facilities when the authentication by the second authentication unit is successful. a portable terminal; a key unit arranged inside a vehicle or facilities; and a locking and unlocking device installed in the vehicle or the facilities, wherein the portable terminal includes a first sending unit configured to send a first request to the key unit, the first request including first authentication information associated with the key unit, the key unit includes: a first receiving unit configured to receive the first request from the portable terminal; a first storage unit configured to store encrypted second authentication information, the second authentication information being associated with the vehicle or the facilities; a first authentication unit configured to perform authentication based on the first authentication information included in the first request when the first receiving unit receives the first request; a decryption unit configured to decrypt the second authentication information when the authentication by the first authentication unit is successful; and a second sending unit configured to send a second request to the locking and unlocking device, the second request including the second authentication information decrypted by the decryption unit, and a first receiving unit configured to receive the first request from the portable terminal; a first storage unit configured to store encrypted second authentication information, the second authentication information being associated with the vehicle or the facilities; a first authentication unit configured to perform authentication based on the first authentication information included in the first request when the first receiving unit receives the first request; a decryption unit configured to decrypt the second authentication information when the authentication by the first authentication unit is successful; and a second sending unit configured to send a second request to the locking and unlocking device, the second request including the second authentication information decrypted by the decryption unit, and the locking and unlocking device includes: a second receiving unit configured to receive the second request from the key unit; a second authentication unit configured to perform authentication based on the second authentication information included in the second request, when the second receiving unit receives the second request; and a locking and unlocking unit configured to lock or unlock the vehicle or the facilities when the authentication by the second authentication unit is successful. a second receiving unit configured to receive the second request from the key unit; a second authentication unit configured to perform authentication based on the second authentication information included in the second request, when the second receiving unit receives the second request; and a locking and unlocking unit configured to lock or unlock the vehicle or the facilities when the authentication by the second authentication unit is successful.