# Mutual authentication with Public Key and session Key

I am trying to understand two protocols for mutual authentication and if they are secure or not.

$K$ is the session key, and it's calculated $k=H(TimeStamp)$.

Are the following both cases secure? Could they provide mutual authentication?

1. $Alice \rightarrow \{[TimeStamp]alice\}bob,K \rightarrow BOB\\ Alice \leftarrow [TimeStamp + 1]bob \leftarrow Bob$

2. $Alice \rightarrow \{[TimeStamp,K]alice\}bob \rightarrow BOB\\ Alice \leftarrow [TimeStamp + 1]bob \leftarrow Bob$

EDIT

I think both processes are secure, because only Bob can open the timestamp and compare.

In the 1st case, even if an attacker could do a forward search in the hash, Bob will find out that happened because he will compare with his hash of the timestamp that is signed and encrypted with his public key.

In the 2nd case, everything is signed and encrypted so, only Bob and Alice can open the message.

Is that correct?

-