Integers encoded with PKCS#8 binary DER should have sign bit
Copy of widevine change: https://widevine-internal-review.googlesource.com/#/c/10910/ This CL adds a leading 0 to integers in the RSA test key in oemcrypt_test.cpp. Before this CL, versions of OEMCrypto that correctly interpret the encoding were treating some large integers as negative. bug: 16876126 Change-Id: I1990fdb09509c15566d12d4cfcd055e9d200e08a
This commit is contained in:
@@ -3080,6 +3080,7 @@ class DISABLED_AlternateRSAKey : public DISABLED_TestKeybox {
|
|||||||
void BuildRSAKey() {
|
void BuildRSAKey() {
|
||||||
vector<uint8_t> field_n =
|
vector<uint8_t> field_n =
|
||||||
encode(0x02, wvcdm::a2b_hex(
|
encode(0x02, wvcdm::a2b_hex(
|
||||||
|
"00"
|
||||||
"df271fd25f8644496b0c81be4bd50297"
|
"df271fd25f8644496b0c81be4bd50297"
|
||||||
"ef099b002a6fd67727eb449cea566ed6"
|
"ef099b002a6fd67727eb449cea566ed6"
|
||||||
"a3981a71312a141cabc9815c1209e320"
|
"a3981a71312a141cabc9815c1209e320"
|
||||||
@@ -3099,6 +3100,7 @@ class DISABLED_AlternateRSAKey : public DISABLED_TestKeybox {
|
|||||||
vector<uint8_t> field_e = encode(0x02, wvcdm::a2b_hex("010001"));
|
vector<uint8_t> field_e = encode(0x02, wvcdm::a2b_hex("010001"));
|
||||||
vector<uint8_t> field_d =
|
vector<uint8_t> field_d =
|
||||||
encode(0x02, wvcdm::a2b_hex(
|
encode(0x02, wvcdm::a2b_hex(
|
||||||
|
"00"
|
||||||
"5bd910257830dce17520b03441a51a8c"
|
"5bd910257830dce17520b03441a51a8c"
|
||||||
"ab94020ac6ecc252c808f3743c95b7c8"
|
"ab94020ac6ecc252c808f3743c95b7c8"
|
||||||
"3b8c8af1a5014346ebc4242cdfb5d718"
|
"3b8c8af1a5014346ebc4242cdfb5d718"
|
||||||
@@ -3117,6 +3119,7 @@ class DISABLED_AlternateRSAKey : public DISABLED_TestKeybox {
|
|||||||
"d4c6591c807defd71ab06866bb5e7745"));
|
"d4c6591c807defd71ab06866bb5e7745"));
|
||||||
vector<uint8_t> field_p =
|
vector<uint8_t> field_p =
|
||||||
encode(0x02, wvcdm::a2b_hex(
|
encode(0x02, wvcdm::a2b_hex(
|
||||||
|
"00"
|
||||||
"f44f5e4246391f482b2f5296e3602eb3"
|
"f44f5e4246391f482b2f5296e3602eb3"
|
||||||
"4aa136427710f7c0416d403fd69d4b29"
|
"4aa136427710f7c0416d403fd69d4b29"
|
||||||
"130cfebef34e885abdb1a8a0a5f0e9b5"
|
"130cfebef34e885abdb1a8a0a5f0e9b5"
|
||||||
@@ -3127,6 +3130,7 @@ class DISABLED_AlternateRSAKey : public DISABLED_TestKeybox {
|
|||||||
"bd9efc123d9c54b6705590d006cfcf3f"));
|
"bd9efc123d9c54b6705590d006cfcf3f"));
|
||||||
vector<uint8_t> field_q =
|
vector<uint8_t> field_q =
|
||||||
encode(0x02, wvcdm::a2b_hex(
|
encode(0x02, wvcdm::a2b_hex(
|
||||||
|
"00"
|
||||||
"e9d49841e0e0a6ad0d517857133e36dc"
|
"e9d49841e0e0a6ad0d517857133e36dc"
|
||||||
"72c1bdd90f9174b52e26570f373640f1"
|
"72c1bdd90f9174b52e26570f373640f1"
|
||||||
"c185e7ea8e2ed7f1e4ebb951f70a5802"
|
"c185e7ea8e2ed7f1e4ebb951f70a5802"
|
||||||
@@ -3137,6 +3141,7 @@ class DISABLED_AlternateRSAKey : public DISABLED_TestKeybox {
|
|||||||
"9eec1cf85e80aba079b2e6106b97bced"));
|
"9eec1cf85e80aba079b2e6106b97bced"));
|
||||||
vector<uint8_t> field_exp1 =
|
vector<uint8_t> field_exp1 =
|
||||||
encode(0x02, wvcdm::a2b_hex(
|
encode(0x02, wvcdm::a2b_hex(
|
||||||
|
"00"
|
||||||
"ed102acdb26871534d1c414ecad9a4d7"
|
"ed102acdb26871534d1c414ecad9a4d7"
|
||||||
"32fe95b10eea370da62f05de2c393b1a"
|
"32fe95b10eea370da62f05de2c393b1a"
|
||||||
"633303ea741b6b3269c97f704b352702"
|
"633303ea741b6b3269c97f704b352702"
|
||||||
@@ -3147,6 +3152,7 @@ class DISABLED_AlternateRSAKey : public DISABLED_TestKeybox {
|
|||||||
"0dcbbc9b528f64a01706e05b0b91106f"));
|
"0dcbbc9b528f64a01706e05b0b91106f"));
|
||||||
vector<uint8_t> field_exp2 =
|
vector<uint8_t> field_exp2 =
|
||||||
encode(0x02, wvcdm::a2b_hex(
|
encode(0x02, wvcdm::a2b_hex(
|
||||||
|
"00"
|
||||||
"6827924a85e88b55ba00f8219128bd37"
|
"6827924a85e88b55ba00f8219128bd37"
|
||||||
"24c6b7d1dfe5629ef197925fecaff5ed"
|
"24c6b7d1dfe5629ef197925fecaff5ed"
|
||||||
"b9cdf3a7befd8ea2e8dd3707138b3ff8"
|
"b9cdf3a7befd8ea2e8dd3707138b3ff8"
|
||||||
@@ -3157,6 +3163,7 @@ class DISABLED_AlternateRSAKey : public DISABLED_TestKeybox {
|
|||||||
"eec82d7f5458ec19e71b90eeef7dff61"));
|
"eec82d7f5458ec19e71b90eeef7dff61"));
|
||||||
vector<uint8_t> field_invq =
|
vector<uint8_t> field_invq =
|
||||||
encode(0x02, wvcdm::a2b_hex(
|
encode(0x02, wvcdm::a2b_hex(
|
||||||
|
"00"
|
||||||
"57b73888d183a99a6307422277551a3d"
|
"57b73888d183a99a6307422277551a3d"
|
||||||
"9e18adf06a91e8b55ceffef9077c8496"
|
"9e18adf06a91e8b55ceffef9077c8496"
|
||||||
"948ecb3b16b78155cb2a3a57c119d379"
|
"948ecb3b16b78155cb2a3a57c119d379"
|
||||||
|
|||||||
Reference in New Issue
Block a user