enocean icon indicating copy to clipboard operation
enocean copied to clipboard

Add secure teach-in

Open zuckschwerdt opened this issue 5 years ago • 3 comments

The lib is working great and well written, so here is my addition of secure teach-in and secure PTM.

This adds

  • RORG constants for the secure modes
  • the D2-03-00 VLD EEP
  • a SEC_TI pseudo-EEP
  • SecureDevice with MAC verification and VAES decryption
  • Application translation from SECD to matching VLD D2-03-00 for application type PTM
  • Profile translation from VLD D2-03-00 to RPS F6-02-01
  • SecureStore for paired devices with teach-in and decryption
  • Basic tests for teach-in, verification and decryption
  • A commented example to get started

Well tested with PTM215 DB (implicit RLC mode) only, I couldn't acquire the new PTM215 DC :/ The explicit RLC isn't fully implemented, I hope this good enough to get support for secure mode going!

zuckschwerdt avatar Jan 10 '21 07:01 zuckschwerdt

Added pycryptodome to the actions to complete the tests. I didn't add pycryptodome to the requirements to keep the secure mode optional.

zuckschwerdt avatar Jan 10 '21 07:01 zuckschwerdt

Coverage Status

Coverage increased (+0.6%) to 91.959% when pulling 8b6a272c8e8724636af21f0823e07c12a48a68d9 on zuckschwerdt:feat-secure into 12da815b58646216550810013ec2380455dc7aee on kipe:master.

coveralls avatar Jan 10 '21 07:01 coveralls

Let me know if this PR is interesting to you and if I should enhance the tests to cover the fail cases!

zuckschwerdt avatar Jan 10 '21 07:01 zuckschwerdt