summaryrefslogtreecommitdiff
path: root/keymaster/4.0/vts/functional/KeymasterHidlTest.cpp
AgeCommit message (Collapse)Author
2022-03-14Key{Mint,Master} VTS: fix incremental AES tagsDavid Drysdale
Change Id62fdce65131ee00c88e5849955a937f1c171748 split up the AES incremental encryption tests into individual tests for each encryption mode. This meant that each generated key is only valid for a single mode, which in turn means that for non-GCM mode keys it is not valid to specify MIN_MAC_LENGTH. Bug: 223934835 Test: VtsAidlKeyMintTargetTest Change-Id: I38f34f60116bde3d23f203365d62e5b25d7b254b
2022-03-03Split AESincremental VTS test into 4 Tests(For blockmodes-ECB,CBC,GCM,CTR)anil.hiranniah
Change mentioned above is done in VTS for Keymaster4.0 and Keymint Test: VTS tests with tradefed Change-Id: Id62fdce65131ee00c88e5849955a937f1c171748
2021-08-20Revert "AesInvalidKeySize skip 192 on SB devices"Max Bires
This reverts commit eb8b0577e87ac19fce7c307b542fa9406857d48a. Reason for revert: Broke a different TEE implementation Bug: 196922051 Change-Id: I9f136d237bd06bfe2a1cc29d11bb1fbe0b8ace5e Merged-In: I9f136d237bd06bfe2a1cc29d11bb1fbe0b8ace5e
2021-08-09AesInvalidKeySize skip 192 on SB devicesMax Bires
This change clarifies the language to specify that StrongBox devices must only support key sizes of 128 and 256. Additionally, it changes the new AesInvalidKeySize test to only enforce against StrongBox instances on devices that launch on S or later, not previously launched devices. Ignore-AOSP-First: CP to AOSP Bug: 191736606 Test: Test passes on a StrongBox enabled device Change-Id: I1a27a0d61e5247ad90c8f5b1423f2a1567016bac
2020-02-11Keymaster 4.1 VTS testsShawn Willden
Bug: 140193672 Bug: 140192237 Test: VtsHalKeymasterV4_1TargetTest Change-Id: I488402079ebb3940e021ac1558aeee15c4b133c9 Merged-In: I488402079ebb3940e021ac1558aeee15c4b133c9
2020-02-11Update KM4 VTS tests to allow s/w implementation to pass.Shawn Willden
Although no real devices should have a software implementation, emulator and cloud devices do, and it's useful to be able to use them as a development platform, which is facilitated by having useful VTS tests. This is in preparation for Keymaster 4.1 implementation and VTS work. Bug: 140193672 Bug: 140192237 Bug: 140824829 Test: VtsHalKeymaster4.0TargetTest Change-Id: Idc5de13c342ef1ac62d3131a1a2185d5e78a0d45 Merged-In: Idc5de13c342ef1ac62d3131a1a2185d5e78a0d45
2020-02-11Update Keymaster 4.0 VTS to use parameterized tests.Shawn Willden
Bug: 139437880 Test: VtsHalKeyamsterV4_0TargetTest Change-Id: I487000cc19fe355fdef88f1561a38b2cbfd3c3c3 Merged-In: I487000cc19fe355fdef88f1561a38b2cbfd3c3c3
2020-02-11Remove dependency on libsoftkeymaster.Shawn Willden
This is part of a refactor to facilitate reuse in Keymaster 4.1 VTS tests. Bug: 140193672 Bug: 140192237 Test: VtsHalKeymasterV4_0TargetTest Change-Id: I9310a851648c028850f9795d303419c6a7e29a11 Merged-In: I9310a851648c028850f9795d303419c6a7e29a11
2019-12-29Remove creation time checks.Shawn Willden
We should not be relying on the HAL service to add CREATION_TIME to keys. It was always intended to be an optional tag that could be added by keystore, or maybe the caller of keystore. One widespread Keymaster implementation started adding it (somewhat erroneously) if it wasn't provided, and it appears that this implementation's behavior became assumed to be the required behavior. Test: VtsHalKeymasterV4_0TargetTest Change-Id: I34267c4e1f59fd8ee5f898f8c746a7b49f4d74a5
2019-12-11Convert VtsHalKeymasterV*_0TargetTest to be parameterized testDan Shi
Bug: 142397658 Test: atest VtsHalKeymasterV3_0TargetTest \ VtsHalKeymasterV4_0TargetTest Change-Id: I0fbda4d9ab810a4ef616f8741919c522d5d58cc0
2019-10-02Merge "Add Keymaster VTS tests for some AES cases:"Treehugger Robot
2019-10-01Merge "Added VTS tests for clearing operation slots after service death."Rob Barnes
2019-09-19Add Keymaster VTS tests for some AES cases:Rob Barnes
1. AES operation attempted with unauthorized purpose. 2. AES-GCM encryption performed with different nonces, should generate different ciphertexts. 3. AES-GCM encryption decryption round trip with delays between begin and update and finish. Bug: 133258003 Test: VtsHalKeymasterV4_0TargetTest Change-Id: Ia8b4b4b317ecff51b18e64dfa3b84bf77475812d
2019-09-10Added VTS tests for clearing operation slots after service death.Rob Barnes
BUG: b/139689895 TEST: Added VTS tests to keymaster_hidl_hal_test.cpp TEST: Ran on emulator against soft keymaster::v4_0::ng Change-Id: I6c682cafee65cf7ea426bd03865bf868586efc62
2019-06-24Increase leniency of attestation record timestampsGarret Kelly
The TEE keymaster has been seen to be almost a minute out of sync with the host clock during attestation. Increase the leniency window to two minutes. Bug: 134408892 Bug: 134408367 Test: VtsHalKeymasterV4_0TargetTest Change-Id: Ic256a939dcd7e7b108099cfcf237cacde8dde059
2019-04-11Expanding VTS test coverageMax Bires
Keymaster VTS test coverage on 4.0 was incomplete. This significantly expands the coverage of the spec. The bugs listed are errors found that these tests will cover, but are not indicative of the complete set of things tested. Test: atest VtsHalKeymasterV4_0TargetTest Bug: 79953279 Bug: 119553313 Bug: 119541233 Bug: 119396995 Bug: 119542230 Bug: 119549128 Bug: 119549677 Bug: 122184852 Bug: 122261372 Change-Id: I42d78091b48398597bbebe1d9c91b806494ddf4c (cherry picked from commit 8c0edf6c84253afb4500a386b83c858e94331d32)
2018-09-21Don't use initializer_list as return typeYi Kong
The underlying array may be cleaned up once its lifetime has ended, the initializer_list would become ill-formed. Return as std::vector instead. This fixes "-Wreturn-stack-address" (clang) / "-Winit-list-lifetime" (gcc) warning. Test: mma Bug: 111998531 Change-Id: Ie5bb6bc3d0d7689744fd573c5683b22e6fb6b178
2018-08-28Fix KM VTS tests for Strongbox implementationsBaranidharan Muthukumaran
Modify RSA keysize used in various tests to ensure both TEE and Strongbox implementations can be validated. Skip invalid keysizes that Strongbox does not support. Test: Patches the strongbox tests Bug: 112189538 Change-Id: I46ab01ce9b8224403e2a334a894967761d6799c9 Signed-off-by: Max Bires <jbires@google.com>
2018-08-10Respect limited requirements for Strongbox KM implementationsnagendra modadugu
With this patch the KM VTS test apply the restricted requirements on supported key sizes, EC curves, and Digests to Strongbox keymaster implementations. Also amend tests to use Update(). Test: Yes it is Bug: 74519020 Merged-In: Ibec9c3398671f81dbc0ecf78e554726276160579 Change-Id: Ibec9c3398671f81dbc0ecf78e554726276160579 (cherry picked from commit 3a7e2cade3305d59f861c21206b5862de9d05d5c)
2018-04-04Correct TripleDes tests.Shawn Willden
The TripleDes tests failed to set TAG_NO_AUTH_REQUIRED, which causes operations to be rejected by strictly compliant implementations. Bug: 77588764 Test: VtsHalKeymasterV4_0TargetTest Change-Id: I25cd5ec0ccede2b148f5da4566b8e1e20e8edbde
2018-01-19Add additional parameters to importWrappedKeyShawn Willden
Bug: 31675676 Test: VtsHalKeymasterV4_0TargetTest Change-Id: I31166d0c562d92bbdcf3357782ac2a076a1bc2d9
2018-01-18Refactor VTS tests a bit, to enable adding tests in separate files.Shawn Willden
Bug: 70409878 Test: VtsHalKeymasterV4_0TargetTest Change-Id: Idd147d20761e7123005b468841a2ddb46cc19576