Bluetooth: Mesh: split crypto on seclib dependent and independent parts

Commit splits mesh crypto module on security library dependent
and independent parts.
Independent part includes security toolbox implementation.
Dependent part includes security algorithms usage based on
API third party security library.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
This commit is contained in:
Aleksandr Khromykh 2023-03-29 11:24:36 +02:00 committed by Carles Cufí
commit 3f08bd335f
8 changed files with 266 additions and 192 deletions

View file

@ -497,7 +497,7 @@ static int enc_id_adv(struct bt_mesh_subnet *sub, uint8_t type,
};
int err;
err = bt_encrypt_be(sub->keys[SUBNET_KEY_TX_IDX(sub)].identity, hash, hash);
err = bt_mesh_encrypt(sub->keys[SUBNET_KEY_TX_IDX(sub)].identity, hash, hash);
if (err) {
return err;
}