To provide a communication apparatus such as a terminal or server for suppressing, to the minimum, the possibility of authentication failure especially due to the processing load of password generation or collation at a server side and the deviation of time between the terminal side and the server side.
The terminal 10 includes a connection time measuring part 111 for measuring its connection time with a server 20, a password generation part 112 for generating a password by using the measured connection time as the parameter of a password to be used in the case of its next connection with the server 20 and a password storage part 113 for storing the generated password. A server 20 includes a connection time measuring part 121 for measuring its connection time with the terminal 10, a password candidate generation part 122 for generating a password candidate by using the measured connection time as the parameter of a password candidate to be used in the case of its next connection with the terminal 10 and a password candidate storage part 123 for storing the generated password candidate.