To help us understand what Jesus is saying to Peter in Matthew 16 we need to put ourselves back into their times and understand it as Jesus disciples would have understood it.
The rock:
At the time of Jesus and his disciples the Ark of the Covenant was not in the Holy of Holies. The Ark of the Covenant was captured years early and never returned. So on the Day of Atonement when the high priest would enter the Holy of Holies with the blood he wasn't able to sprinkle/placed it on the Ark of the Covenant so sprinkle/placed it on the rock that was inside the temple. That rock was called the even shetiyah, the Foundation Stone. The Holy of Holies stood right above that rock. And other Jewish sources mention the rock as the place from which the creation of the world began; the axis mundi - the center of the world and the place where the physical and spiritual words connected.
The keys:
The keys of the kingdom were a sign of royal authority and were given to the prime minister during the time of David and Solomon. But the keys were not a sign of just royal authority but also priestly authority. During the time of Jesus and his disciples it was the priest who had the Temple keys. The priest was the captain of the temple, the high priest, who kept the keys to the Temple. The keys to the Temple that was kept in/under a rock, a slab of marble, in the Temple. The high priest would take the keys from the marble rock locked the gates from the inside of the Temple but the keys back in/under the marble slab, but his "mattress" over the it and sleep on the slab inside the Temple. The priest authority came to an end when the keys were given to the next priest. So the keys were understood by the Jesus, his disciples and the Jewish people of the time to be a sign of both royal authority and priestly authority.
So when Jesus said to Peter in Matthew 16, "And I tell you, you are Peter, and on this rock I will build my church, and the gates of Hades will not prevail against it. I will give you the keys of the kingdom of heaven, and whatever you bind on earth will be bound in heaven, and whatever you loose on earth will be loosed in heaven", Peter and the other disciples know exactly what Jesus was saying. Jesus was giving Peter both royal authority and priestly authority for his kingdom.