OSDN Git Service

Add more crypto toolbox tests, plus minor fix in smp_keys.cc
authorJakub Pawlowski <jpawlowski@google.com>
Mon, 18 Jun 2018 20:33:26 +0000 (13:33 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Thu, 21 Jun 2018 18:53:20 +0000 (18:53 +0000)
commit4ccf14a29efc5e1de0c6c58731b2011386f2cca9
tree4f09467f2edf1f4a066cc877d2989411318e4f25
parent9c8006666966606832102c5db9b060c57e14b1a6
Add more crypto toolbox tests, plus minor fix in smp_keys.cc

This code extracts two new functions, smp_calculate_ltk_to_link_key
and smp_calculate_link_key_to_ltk, in order to test them.
Also use modulo operator to compute modulo in smp_calculate_g2.
Plus remove unused function definitions in smp_int.h, that were probably
previously used for testing.

Test: added and updated CryptoToolboxTest
Change-Id: Ia84f72af666fc8e34f887b65b07208bc786bf2e0
stack/Android.bp
stack/smp/smp_int.h
stack/smp/smp_keys.cc
stack/test/crypto_toolbox_test.cc [new file with mode: 0644]
stack/test/stack_smp_aes_cmac_test.cc [deleted file]