A semiconductor device that functions as a key to control access to a computer or a software program resident in a computer or provides for secure communications is disclosed. The device executes an algorithm that combines a root and a seed to produce a password. The password is input to the computer. The computer uses an equivalent algorithm to produce a password within the computer. Comparison or other methods are employed to allow access to the computer or computer program or to allow for secure communications. The computer can be coded to produce on a video display thereof a time-space stimulus pattern which can be received by sensors of the key. Alternatively, a keypad can be employed to input the stimulus output from the computer into the access key. Further the present system allows for secure communication using algorithms between different computers and between distant locations.