diff --git a/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp b/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp index b7ec72ed87..b32298ec4c 100644 --- a/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp +++ b/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp @@ -136,48 +136,53 @@ string bin2hex(const hidl_vec& data) { return retval; } -string rsa_2048_key = - hex2str("308204a50201000282010100caa620db7bbadfd351153a804e05a3115a0" - "eea067316c7d6ae010086cc4d636edcc50b725c495027e79d7c6d65ec50" - "5ab84107b0ca9f8389d0d812d42df3af0c1c50f1083b1eedd18921283e3" - "9ebe95bd56795c9ba129afc63d60fb020b300c44861a73845508a992c54" - "7cf4ce7694955c684bc130fe9a0478285d686da954989a7be3cd970de7e" - "5eca8574c0617fed74717f7035655f65af7b5f9b982feca8eed643b96d8" - "f1c4e6dcd96a9ccfcca3366d8f1c95f83a83ab785f997b78918ceca567d" - "91cf2ea85c340c0d4462f31f8a31e648cd26e1116a97d17dcfec51e4336" - "fa0725ff49216005911966748f94789c055795da023362091c977bdc0bd" - "8e31902030100010282010100ca562da0785e1275d013be21b5c5731834" - "2f8803808e52624bc2bc5fdb45b9ee4b8882f160abe2d8b52e4dba7d760" - "295523bbc0e0d824fb81f4a5f2273ef47ec73a96dc0a6272f9573b22398" - "5e04eb2fc25876fac04b2b6cadd2623f9da69d315e84028ef0c6865c822" - "2a9d15504993eb8d17a321f55573af72e76757a690408c36909eb44a555" - "4b571007edde150b47952287d942559e7f8cbcb2c47086aa291515f55c4" - "deba6d1ebde0cca5ee899b3b0c4c21123bbf92feac53db515fe02d03b83" - "2154e31122abcbb6fc80b49e1c8fc5528605935f8f6ead1237b16e83d23" - "ad73e82ee008c3ff7b4666f4c137c20f52ae6fea5b54ed104c1c1bf75fc" - "3c020102818100efa6b29bb0f6b81c8fecf3e73c3e5a59b71ffd31075c4" - "0282269ee245367c2e54f0244301dad0b90dcce73f25c1caca2f4ef1774" - "42a5d9e98a354bcd5ddae129bea2c0771d1ad51341f44ddf0c5c0f22252" - "414e2de7af6c67754dba610ee2743f21789a89829ad91efc02c7c5588fe" - "84b64df12dc5cee90df2e7dd4a1ca2886902818100d87937f039df50054" - "7c7d5435ec8e89789b36a0e5c4004d4612a6ef2dce39ee4f24fb5d2da38" - "dbf5f3d639681a11fc416618554b1ff51a8215446b676363f6a5e91ea6c" - "957483e0a47ae36582bde9fba45c00e6e3fadc651cc87c170171d7fef6d" - "0dc1f0ddb6eca2674064925b78542b32f2821605c29b6d0b65485081f5a" - "f3102818100ee21453ee153f6d422cb7ffc586758dde6d239835b5df63e" - "2b1bf94f4d35407b1ccc12b780f56f15ade2d36192d7c74f5174b66886c" - "5484800563f113cde7e783d7e7922a2e003b3d4088ecc40fac4ead7df07" - "85fb2e524219574fbeaefa063844b9d0c69f1462ed2d3f56b4e145742aa" - "8ffbfd40cc731daf37023fa3d83df6902818055dc2e8dbfc68d2caafddd" - "deacd7af397bca87c44e5eae0bb6c667df3831a83252d1bee274df9c8ef" - "f39f6e70d8018b7afd0f2f3ab27426e5a151b2c94c56f6cfafbc75790a0" - "fcca8307dc5238844282556c09cd3cc0a62a879f48e036aae2b58a61ac8" - "ce6c3c933d914374fbdac0a665ffcc4100c14d624f82221fe9cad5fe102" - "818100964193ee55581c9a82fe03f8eb018cdce8965f30745cc6e68154c" - "b6618ef3cc57ae4798ff2a509306a135f7cf705ceb215fda6939c7a6353" - "0c86a5ba02f491a64f6079e62b1b00b86859899febf3ed300edcc0b8b35" - "1855a90d9d39a279be963f0972a256084a3c46575f796ad27dc801f67a3" - "7a59e62e076b996f025a9c9042"); +/* + * DER-encoded PKCS#8 format RSA key. Generated using: + * + * openssl genrsa 2048 | openssl pkcs8 -topk8 -nocrypt -outform der | hexdump -e '30/1 "%02X" "\n"' + */ +string rsa_2048_key = hex2str( + "308204BD020100300D06092A864886F70D0101010500048204A7308204A3" + "0201000282010100BEBC342B56D443B1299F9A6A7056E80A897E318476A5" + "A18029E63B2ED739A61791D339F58DC763D9D14911F2EDEC383DEE11F631" + "9B44510E7A3ECD9B79B97382E49500ACF8117DC89CAF0E621F77756554A2" + "FD4664BFE7AB8B59AB48340DBFA27B93B5A81F6ECDEB02D0759307128DF3" + "E3BAD4055C8B840216DFAA5700670E6C5126F0962FCB70FF308F25049164" + "CCF76CC2DA66A7DD9A81A714C2809D69186133D29D84568E892B6FFBF319" + "9BDB14383EE224407F190358F111A949552ABA6714227D1BD7F6B20DD0CB" + "88F9467B719339F33BFF35B3870B3F62204E4286B0948EA348B524544B5F" + "9838F29EE643B079EEF8A713B220D7806924CDF7295070C5020301000102" + "82010069F377F35F2F584EF075353CCD1CA99738DB3DBC7C7FF35F9366CE" + "176DFD1B135AB10030344ABF5FBECF1D4659FDEF1C0FC430834BE1BE3911" + "951377BB3D563A2EA9CA8F4AD9C48A8CE6FD516A735C662686C7B4B3C09A" + "7B8354133E6F93F790D59EAEB92E84C9A4339302CCE28FDF04CCCAFA7DE3" + "F3A827D4F6F7D38E68B0EC6AB706645BF074A4E4090D06FB163124365FD5" + "EE7A20D350E9958CC30D91326E1B292E9EF5DB408EC42DAF737D20149704" + "D0A678A0FB5B5446863B099228A352D604BA8091A164D01D5AB05397C71E" + "AD20BE2A08FC528FE442817809C787FEE4AB97F97B9130D022153EDC6EB6" + "CBE7B0F8E3473F2E901209B5DB10F93604DB0102818100E83C0998214941" + "EA4F9293F1B77E2E99E6CF305FAF358238E126124FEAF2EB9724B2EA7B78" + "E6032343821A80E55D1D88FB12D220C3F41A56142FEC85796D1917F1E8C7" + "74F142B67D3D6E7B7E6B4383E94DB5929089DBB346D5BDAB40CC2D96EE04" + "09475E175C63BF78CFD744136740838127EA723FF3FE7FA368C1311B4A4E" + "0502818100D240FCC0F5D7715CDE21CB2DC86EA146132EA3B06F61FF2AF5" + "4BF38473F59DADCCE32B5F4CC32DD0BA6F509347B4B5B1B58C39F95E4798" + "CCBB43E83D0119ACF532F359CA743C85199F0286610E200997D731291717" + "9AC9B67558773212EC961E8BCE7A3CC809BC5486A96E4B0E6AF394D94E06" + "6A0900B7B70E82A44FB30053C102818100AD15DA1CBD6A492B66851BA8C3" + "16D38AB700E2CFDDD926A658003513C54BAA152B30021D667D20078F500F" + "8AD3E7F3945D74A891ED1A28EAD0FEEAEC8C14A8E834CF46A13D1378C99D" + "18940823CFDD27EC5810D59339E0C34198AC638E09C87CBB1B634A9864AE" + "9F4D5EB2D53514F67B4CAEC048C8AB849A02E397618F3271350281801FA2" + "C1A5331880A92D8F3E281C617108BF38244F16E352E69ED417C7153F9EC3" + "18F211839C643DCF8B4DD67CE2AC312E95178D5D952F06B1BF779F491692" + "4B70F582A23F11304E02A5E7565AE22A35E74FECC8B6FDC93F92A1A37703" + "E4CF0E63783BD02EB716A7ECBBFA606B10B74D01579522E7EF84D91FC522" + "292108D902C1028180796FE3825F9DCC85DF22D58690065D93898ACD65C0" + "87BEA8DA3A63BF4549B795E2CD0E3BE08CDEBD9FCF1720D9CDC5070D74F4" + "0DED8E1102C52152A31B6165F83A6722AECFCC35A493D7634664B888A08D" + "3EB034F12EA28BFEE346E205D334827F778B16ED40872BD29FCB36536B6E" + "93FFB06778696B4A9D81BB0A9423E63DE5"); string rsa_key = hex2str( "30820275020100300d06092a864886f70d01010105000482025f3082025b"