Hi Michael
I haven't heard about NTRU before, but this looks like an interest idea. Some comments.
Using BLE encryption is an optional feature, so a first approach could be to only encrypt the ACL packets sent between hosts. For BTstack, this could be hacked into hci.c, or a virtual HCI transport layer could deal with encryption/decryption of ACL packets. Such a transport encryption would need to keep track of what connections exists and what keys to use for that but would be portable and run on all supported platforms.
The AES-CCM in BLE uses a 16-byte Long-Term Key. This key is exchanged/created using the BLE Security Manager Protocol. If NTRU also uses a (less than) 16 byte key, the BLE Security Manager could be left in place. If not, depending on how NTRU creates symmetric keys, it might need some patching. For asymmetric keys, this would require new SM PDUs as well, I guess
All Bluetooth Controllers implement AES-CCM as part of their link layer. Usually, you don't have access to these. However, open-source link layers exist. If you want to actually replace AES-CCM, I would suggest to pick one of them that run on nRF5x silicon. The most known example for this is the Zephyr OS that includes a full BLE link layer. Another one is MyNewt. For this, timing will become a critical part as most LE Controllers provide at least AES128 if not full AES-CCM in hardware.
Best
Matthias
> --
> You received this message because you are subscribed to the Google Groups "btstack-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
btstack-dev...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/btstack-dev/cc840626-98d6-4be4-a5ad-0b94d57f79e2n%40googlegroups.com.