How to set up a proof of knowledge between two peers

Hey everyone,

I am playing around with this amazing library but I cannot figure out how to do the following. I have two nodes and I would like to allow data exchange only after the user of node B sends back a proof of knowledge that was shared in a different way. Basically what happens when you pair a new Bluetooth device or similar.

I think I need to create a new Behaviour right ? But I am a bit confused on how to put everything together. For example how do I chain behaviors and to a ping pong behaviour only after both nodes have checked the shared secret?

Any pointer would be very appreciated