NCS: Get Public Keys during OOB pairing procedure

Hello,

We've been currently working on securely connecting a peripheral with no display and no keyboard, to a central with a display and keyboard.
We need to make sure that there can be no MITM.

We've decided that we want to implement authentication through OOB-Pairing, as passkey entry with a fixed key is unsecure.
One implementation, with legacy OOB, works already. But we wanted to use LE Secure Connection for the pairing process (I've seen that it's possible to raise the security level after connecting, but we want to make our devices as secure as feasible)

Now, to make that work, we need to resolve this Formula to get the Commitment value from the peripheral:

Cb=f1(PKbx,PKbx,rb,0)

rb will be a fixed value.
So the only missing factor is the public key from the peripheral side.

Going through the source code, at least the public key from the central side is being used inside zephyr/subsys/bluetooth/host/smp.c
We need to get the public key from the peripheral side to the central side though.

Are the public keys from peers saved anywhere, where they're accessible through the SDK?

Are the public keys from the local device saved anywhere, where they're accesible through the SDK?

Is it possible to extract them during the connection procedure?

Related