A public key is used to exchange secret keys which encrypt messages in a secret chatroom.
There are three types of keys—a public key, a private key and a secret key.
A secret key is used to encrypt messages in a secret chatroom. Secret keys of the participants will be exchanged once the secret chatroom is created. Public keys are used to encrypt secret keys and private keys are used to decrypt secret keys.
Unlike the private key and the secret key, the public key is open to public and is used to determine whether the chat with other party is secured.
You can check the public key image in the secret chatroom by going into the chatroom menu > Settings > Public Key. If the public key image is identical to your friend's, that means your chat is secured.