keyplus icon indicating copy to clipboard operation
keyplus copied to clipboard

NRF51 Port

Open bezmi opened this issue 5 years ago • 0 comments

Putting this here as I work on integrating the nrf51 chips via the ESB protocol for the following use cases.

  • Mitosis receiver with atmega32u4 and nrf51 communicating via uart. Encryption to be done by the nrf51 built in hardware (see discussion below)

    • Should work with any keyplus compatible transmitter.
  • Mitosis/chimera/orthrus wireless split keyboards, where each half contains an nrf51 board that transmits to the receiver above.

    • Should work with any keyplus compatible receiver.

The only challenge I foresee is the crypto hardware of the nrf51/nrf52 series. These chips can only do encryption via AES and are designed to be used with CTR based modes of operation which only rely on encryption operations. They all have BLE compliant AES-CCM hardware that can perform authenticated encryption/decryption, where each packet is a 27 byte payload + 1 byte length field + 4 byte message integrity check. The nrf52840 is an exception here, as it has ARM CryptoCell which should be able to do decryption of AES ciphertext.

I will just implement software based decryption using cifra, the nrf51 chips should be able to do this fast enough for a keyboard.

~Using the built in AES-CCM hardware has the benefit of being able to encrypt/decrypt packets on the fly as they are being transmitted/received and is also the most straightforward implementation in the nrf5 series. However, it also means either a rewrite of the existing security code for the AVR, or having two different security protocols coexist. Not sure how to proceed here. I don't believe CCM is optimal for the small (1 block) stream that keyplus.~

bezmi avatar Apr 04 '19 12:04 bezmi