summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-05-12 19:09:47 -0700
committerAdam Langley <agl@google.com>2015-05-12 19:11:05 -0700
commit430091c556d1086167da3320cbb60aa0079486e7 (patch)
tree6c319a1d4273c8272838548f773b9201cdb0a522
parent62d05888d1cf178d900b54e7e035928abea512b1 (diff)
downloadexternal_boringssl-430091c556d1086167da3320cbb60aa0079486e7.zip
external_boringssl-430091c556d1086167da3320cbb60aa0079486e7.tar.gz
external_boringssl-430091c556d1086167da3320cbb60aa0079486e7.tar.bz2
external/boringssl: support arbitrary elliptic curve groups.
This change exposes the functions needed to support arbitrary elliptic curve groups for Android. Change-Id: I66a3662d393deadd718e43d91420fecf050502c2
-rw-r--r--err_data.c998
-rw-r--r--src/crypto/ec/ec.c40
-rw-r--r--src/crypto/err/ec.errordata2
-rw-r--r--src/include/openssl/ec.h16
4 files changed, 555 insertions, 501 deletions
diff --git a/err_data.c b/err_data.c
index 68397e4..f09b1c2 100644
--- a/err_data.c
+++ b/err_data.c
@@ -79,202 +79,202 @@ const uint32_t kOpenSSLFunctionValues[] = {
0xc3d0679,
0xc3d8681,
0xc3e068c,
- 0x103218ee,
- 0x10329905,
- 0x1033191e,
- 0x10339934,
- 0x10341944,
- 0x10349957,
- 0x10351965,
- 0x10359974,
- 0x10361994,
- 0x103699b3,
- 0x103719d0,
- 0x103799ed,
- 0x10381a02,
- 0x10389a24,
- 0x10391a43,
- 0x10399a62,
- 0x103a1a79,
- 0x103a9a90,
- 0x103b1a99,
- 0x103b9aa4,
- 0x103c1abe,
- 0x103c9ac6,
- 0x103d1ace,
- 0x103d9ad5,
- 0x103e1ae8,
- 0x103e9afa,
- 0x103f1b0d,
- 0x103f9b16,
+ 0x1032191e,
+ 0x10329935,
+ 0x1033194e,
+ 0x10339964,
+ 0x10341974,
+ 0x10349987,
+ 0x10351995,
+ 0x103599a4,
+ 0x103619c4,
+ 0x103699e3,
+ 0x10371a00,
+ 0x10379a1d,
+ 0x10381a32,
+ 0x10389a54,
+ 0x10391a73,
+ 0x10399a92,
+ 0x103a1aa9,
+ 0x103a9ac0,
+ 0x103b1ac9,
+ 0x103b9ad4,
+ 0x103c1aee,
+ 0x103c9af6,
+ 0x103d1afe,
+ 0x103d9b05,
+ 0x103e1b18,
+ 0x103e9b2a,
+ 0x103f1b3d,
+ 0x103f9b46,
0x14320a2f,
0x14328a3d,
0x14330a49,
0x14338a56,
- 0x183611d5,
- 0x18371203,
- 0x18379214,
- 0x1838122a,
- 0x1839124d,
- 0x18399262,
- 0x183a1274,
- 0x183c12b8,
- 0x183c92c6,
- 0x183d12d9,
- 0x183d92e9,
- 0x183e930f,
- 0x183f1322,
- 0x183f9331,
- 0x1840935b,
- 0x184113c7,
- 0x184193d8,
- 0x184213eb,
- 0x184293fd,
- 0x1843140f,
- 0x18439420,
- 0x18441431,
- 0x18449442,
- 0x18451453,
- 0x18459460,
- 0x18461482,
- 0x18469495,
- 0x184714a9,
- 0x184794b6,
- 0x184814c5,
- 0x184894d4,
- 0x184914e5,
- 0x18499501,
- 0x184a150f,
- 0x184a9520,
- 0x184b1531,
- 0x184b953f,
- 0x184c154f,
- 0x184c9575,
- 0x184d1584,
- 0x184d9594,
- 0x184e15a4,
- 0x184e95b3,
- 0x184f14f2,
- 0x184f9164,
- 0x18501107,
- 0x1850911f,
- 0x18511141,
- 0x18519153,
- 0x18521185,
- 0x1852919e,
- 0x185311af,
- 0x185391c5,
- 0x185411ea,
- 0x1854923b,
- 0x18551284,
- 0x18559299,
- 0x185612a6,
- 0x185692fe,
- 0x18571341,
- 0x1857934e,
- 0x1858136a,
- 0x1858937b,
- 0x1859138b,
- 0x1859939b,
- 0x185a13aa,
- 0x185a93b9,
- 0x185b146e,
+ 0x18361205,
+ 0x18371233,
+ 0x18379244,
+ 0x1838125a,
+ 0x1839127d,
+ 0x18399292,
+ 0x183a12a4,
+ 0x183c12e8,
+ 0x183c92f6,
+ 0x183d1309,
+ 0x183d9319,
+ 0x183e933f,
+ 0x183f1352,
+ 0x183f9361,
+ 0x1840938b,
+ 0x184113f7,
+ 0x18419408,
+ 0x1842141b,
+ 0x1842942d,
+ 0x1843143f,
+ 0x18439450,
+ 0x18441461,
+ 0x18449472,
+ 0x18451483,
+ 0x18459490,
+ 0x184614b2,
+ 0x184694c5,
+ 0x184714d9,
+ 0x184794e6,
+ 0x184814f5,
+ 0x18489504,
+ 0x18491515,
+ 0x18499531,
+ 0x184a153f,
+ 0x184a9550,
+ 0x184b1561,
+ 0x184b956f,
+ 0x184c157f,
+ 0x184c95a5,
+ 0x184d15b4,
+ 0x184d95c4,
+ 0x184e15d4,
+ 0x184e95e3,
+ 0x184f1522,
+ 0x184f9194,
+ 0x18501137,
+ 0x1850914f,
+ 0x18511171,
+ 0x18519183,
+ 0x185211b5,
+ 0x185291ce,
+ 0x185311df,
+ 0x185391f5,
+ 0x1854121a,
+ 0x1854926b,
+ 0x185512b4,
+ 0x185592c9,
+ 0x185612d6,
+ 0x1856932e,
+ 0x18571371,
+ 0x1857937e,
+ 0x1858139a,
+ 0x185893ab,
+ 0x185913bb,
+ 0x185993cb,
+ 0x185a13da,
+ 0x185a93e9,
+ 0x185b149e,
0x1c320699,
0x1c3286a5,
0x1c3306b0,
0x1c3386bc,
- 0x203215c7,
- 0x203295d2,
- 0x203315da,
- 0x203395e6,
- 0x243215f2,
- 0x24329600,
- 0x24331612,
- 0x24339621,
- 0x24341634,
- 0x24349647,
- 0x2435165e,
- 0x24359676,
- 0x24361684,
- 0x2436969c,
- 0x243716a5,
- 0x243796b7,
- 0x243816cb,
- 0x243896d8,
- 0x243916ee,
- 0x24399706,
- 0x243a171e,
- 0x243a9728,
- 0x243b173d,
- 0x243b974b,
- 0x243c1763,
- 0x243c977a,
- 0x243d1785,
- 0x243d9793,
+ 0x203215f7,
+ 0x20329602,
+ 0x2033160a,
+ 0x20339616,
+ 0x24321622,
+ 0x24329630,
+ 0x24331642,
+ 0x24339651,
+ 0x24341664,
+ 0x24349677,
+ 0x2435168e,
+ 0x243596a6,
+ 0x243616b4,
+ 0x243696cc,
+ 0x243716d5,
+ 0x243796e7,
+ 0x243816fb,
+ 0x24389708,
+ 0x2439171e,
+ 0x24399736,
+ 0x243a174e,
+ 0x243a9758,
+ 0x243b176d,
+ 0x243b977b,
+ 0x243c1793,
+ 0x243c97aa,
+ 0x243d17b5,
+ 0x243d97c3,
0x28320a8f,
0x28328a9e,
0x28330aa9,
0x28338aae,
0x28340ab9,
- 0x2c322a70,
- 0x2c32aa7c,
- 0x2c332a8f,
- 0x2c33aaa0,
- 0x2c342ab9,
- 0x2c34aae1,
- 0x2c352af8,
- 0x2c35ab15,
- 0x2c362b32,
- 0x2c36ab4f,
- 0x2c372b68,
- 0x2c37ab81,
- 0x2c382b97,
- 0x2c38aba5,
- 0x2c392bb7,
- 0x2c39abd4,
- 0x2c3a2bf1,
- 0x2c3aabff,
- 0x2c3b2c1d,
- 0x2c3bac3b,
- 0x2c3c2c56,
- 0x2c3cac6a,
- 0x2c3d2c7c,
- 0x2c3dac8c,
- 0x2c3e2c9a,
- 0x2c3eacaa,
- 0x2c3f2cba,
- 0x2c3facd5,
- 0x2c402ce6,
- 0x2c40ad01,
- 0x2c412d15,
- 0x2c41ad28,
- 0x2c422d47,
- 0x2c42ad5b,
- 0x2c432d6e,
- 0x2c43ad7d,
- 0x2c442d8c,
- 0x2c44ada3,
- 0x2c452dbe,
- 0x2c45add6,
- 0x2c462dea,
- 0x2c46adfd,
- 0x2c472e0e,
- 0x2c47ae1f,
- 0x2c482e30,
- 0x2c48ae41,
- 0x2c492e50,
- 0x2c49ae5d,
- 0x2c4a2e6a,
- 0x2c4aae77,
- 0x2c4b2e80,
- 0x2c4bae94,
- 0x2c4c2ea3,
- 0x2c4caeb1,
- 0x2c4d2ed3,
- 0x2c4daee4,
- 0x2c4e2ef5,
- 0x2c4eaec0,
- 0x2c4f2ad2,
+ 0x2c322aa0,
+ 0x2c32aaac,
+ 0x2c332abf,
+ 0x2c33aad0,
+ 0x2c342ae9,
+ 0x2c34ab11,
+ 0x2c352b28,
+ 0x2c35ab45,
+ 0x2c362b62,
+ 0x2c36ab7f,
+ 0x2c372b98,
+ 0x2c37abb1,
+ 0x2c382bc7,
+ 0x2c38abd5,
+ 0x2c392be7,
+ 0x2c39ac04,
+ 0x2c3a2c21,
+ 0x2c3aac2f,
+ 0x2c3b2c4d,
+ 0x2c3bac6b,
+ 0x2c3c2c86,
+ 0x2c3cac9a,
+ 0x2c3d2cac,
+ 0x2c3dacbc,
+ 0x2c3e2cca,
+ 0x2c3eacda,
+ 0x2c3f2cea,
+ 0x2c3fad05,
+ 0x2c402d16,
+ 0x2c40ad31,
+ 0x2c412d45,
+ 0x2c41ad58,
+ 0x2c422d77,
+ 0x2c42ad8b,
+ 0x2c432d9e,
+ 0x2c43adad,
+ 0x2c442dbc,
+ 0x2c44add3,
+ 0x2c452dee,
+ 0x2c45ae06,
+ 0x2c462e1a,
+ 0x2c46ae2d,
+ 0x2c472e3e,
+ 0x2c47ae4f,
+ 0x2c482e60,
+ 0x2c48ae71,
+ 0x2c492e80,
+ 0x2c49ae8d,
+ 0x2c4a2e9a,
+ 0x2c4aaea7,
+ 0x2c4b2eb0,
+ 0x2c4baec4,
+ 0x2c4c2ed3,
+ 0x2c4caee1,
+ 0x2c4d2f03,
+ 0x2c4daf14,
+ 0x2c4e2f25,
+ 0x2c4eaef0,
+ 0x2c4f2b02,
0x30320000,
0x30328018,
0x3033002c,
@@ -351,239 +351,241 @@ const uint32_t kOpenSSLFunctionValues[] = {
0x3c328ada,
0x3c330af1,
0x3c338b05,
- 0x3c340b20,
- 0x3c348b31,
- 0x3c350b3d,
- 0x3c358b51,
- 0x3c360b63,
- 0x3c368b8c,
- 0x3c370b99,
- 0x3c378ba6,
- 0x3c380bb4,
- 0x3c388bc1,
- 0x3c390bce,
- 0x3c398bf2,
- 0x3c3a0c02,
- 0x3c3a8c1a,
- 0x3c3b0c2f,
- 0x3c3b8c44,
- 0x3c3c0c51,
- 0x3c3c8c64,
- 0x3c3d0c77,
- 0x3c3d8c9b,
- 0x3c3e0cc3,
- 0x3c3e8cdc,
- 0x3c3f0cf2,
- 0x3c3f8cff,
- 0x3c400d12,
- 0x3c408d23,
- 0x3c410d34,
- 0x3c418d4d,
- 0x3c420d66,
- 0x3c428d7c,
- 0x3c430d99,
- 0x3c438daf,
- 0x3c440e33,
- 0x3c448e5a,
- 0x3c450e78,
- 0x3c458e92,
- 0x3c460eaa,
- 0x3c468ec2,
- 0x3c470eed,
- 0x3c478f18,
- 0x3c480f39,
- 0x3c488f62,
- 0x3c490f7d,
- 0x3c498fa6,
- 0x3c4a0fb3,
- 0x3c4a8fca,
- 0x3c4b0fe1,
- 0x3c4b900a,
- 0x3c4c101a,
- 0x3c4c9026,
- 0x3c4d103e,
- 0x3c4d9051,
- 0x3c4e1062,
- 0x3c4e9073,
- 0x3c4f1099,
+ 0x3c340b37,
+ 0x3c348b48,
+ 0x3c350b54,
+ 0x3c358b81,
+ 0x3c360b93,
+ 0x3c368bbc,
+ 0x3c370bc9,
+ 0x3c378bd6,
+ 0x3c380be4,
+ 0x3c388bf1,
+ 0x3c390bfe,
+ 0x3c398c22,
+ 0x3c3a0c32,
+ 0x3c3a8c4a,
+ 0x3c3b0c5f,
+ 0x3c3b8c74,
+ 0x3c3c0c81,
+ 0x3c3c8c94,
+ 0x3c3d0ca7,
+ 0x3c3d8ccb,
+ 0x3c3e0cf3,
+ 0x3c3e8d0c,
+ 0x3c3f0d22,
+ 0x3c3f8d2f,
+ 0x3c400d42,
+ 0x3c408d53,
+ 0x3c410d64,
+ 0x3c418d7d,
+ 0x3c420d96,
+ 0x3c428dac,
+ 0x3c430dc9,
+ 0x3c438ddf,
+ 0x3c440e63,
+ 0x3c448e8a,
+ 0x3c450ea8,
+ 0x3c458ec2,
+ 0x3c460eda,
+ 0x3c468ef2,
+ 0x3c470f1d,
+ 0x3c478f48,
+ 0x3c480f69,
+ 0x3c488f92,
+ 0x3c490fad,
+ 0x3c498fd6,
+ 0x3c4a0fe3,
+ 0x3c4a8ffa,
+ 0x3c4b1011,
+ 0x3c4b903a,
+ 0x3c4c104a,
+ 0x3c4c9056,
+ 0x3c4d106e,
+ 0x3c4d9081,
+ 0x3c4e1092,
+ 0x3c4e90a3,
+ 0x3c4f10c9,
0x3c4f8ac0,
- 0x3c500dcb,
- 0x3c508deb,
- 0x3c510e18,
- 0x3c518f98,
- 0x3c521083,
- 0x40321b21,
- 0x40329b3b,
- 0x40331b63,
- 0x40339b7b,
- 0x40341b99,
- 0x40349be0,
- 0x40351bf7,
- 0x40359c13,
- 0x40361c2f,
- 0x40369c49,
- 0x40371c68,
- 0x40379c87,
- 0x40381c9f,
- 0x40389cbc,
- 0x40391cdf,
- 0x40399cfc,
- 0x403a1d1a,
- 0x403a9d2a,
- 0x403b1d3f,
- 0x403b9d5b,
- 0x403c1d75,
- 0x403c9d80,
- 0x403d1da3,
- 0x403d9dc7,
- 0x403e1ddd,
- 0x403e9de7,
- 0x403f1df3,
- 0x403f9e04,
- 0x40401e1c,
- 0x40409e24,
- 0x40411e2d,
- 0x40419e36,
- 0x40421e5e,
- 0x40429e72,
- 0x40431e7d,
- 0x40439e89,
- 0x40441edd,
- 0x40449ee9,
- 0x40451ef6,
- 0x40459f09,
- 0x40461f21,
- 0x40469f39,
- 0x40471f4f,
- 0x40479f6a,
- 0x40481f85,
- 0x40489f99,
- 0x40491fb2,
- 0x40499fcb,
- 0x404a1fe5,
- 0x404a9fef,
- 0x404b1fff,
- 0x404ba020,
- 0x404c203b,
- 0x404ca049,
- 0x404d2056,
- 0x404da06a,
- 0x404e2082,
- 0x404ea090,
- 0x404f20ba,
- 0x404fa0d1,
- 0x405020e3,
- 0x4050a114,
- 0x40512145,
- 0x4051a15a,
- 0x4052216b,
- 0x4052a18b,
- 0x405321a6,
- 0x4053a1b6,
- 0x4054a1c2,
- 0x405521d8,
- 0x4055a1f6,
- 0x40562203,
- 0x4056a20d,
- 0x4057221b,
- 0x4057a236,
- 0x40582251,
- 0x4058a270,
- 0x40592285,
- 0x4059a29a,
- 0x405a22b7,
- 0x405aa2cb,
- 0x405b22e7,
- 0x405ba2fd,
- 0x405c231a,
- 0x405ca32c,
- 0x405d2343,
- 0x405da354,
- 0x405e2370,
- 0x405ea384,
- 0x405f2394,
- 0x405fa3b0,
- 0x406023c5,
- 0x4060a3db,
- 0x406123f8,
- 0x4061a411,
- 0x4062243b,
- 0x4062a444,
- 0x40632454,
- 0x4063a48d,
- 0x406424a3,
- 0x4064a4c1,
- 0x406524d6,
- 0x4065a4f3,
- 0x4066250a,
- 0x4066a528,
- 0x40672545,
- 0x4067a55c,
- 0x4068257a,
- 0x4068a591,
- 0x406925a9,
- 0x4069a5ba,
- 0x406a25cd,
- 0x406aa5e0,
- 0x406b25f4,
- 0x406ba618,
- 0x406c2633,
- 0x406ca654,
- 0x406d2678,
- 0x406da693,
- 0x406e26b4,
- 0x406ea6c9,
- 0x406f26e2,
- 0x406fa6ef,
- 0x407026fd,
- 0x4070a70a,
- 0x40712727,
- 0x4071a747,
- 0x40722762,
- 0x4072a77b,
- 0x40732792,
- 0x4073a7ac,
- 0x407427d0,
- 0x4074a7e6,
- 0x407527fa,
- 0x4075a80f,
- 0x40762829,
- 0x4076a83b,
- 0x40772850,
- 0x4077a876,
- 0x40782893,
- 0x4078a8b6,
- 0x407928dc,
- 0x4079a8f9,
- 0x407a291c,
- 0x407aa938,
- 0x407b2954,
- 0x407ba966,
- 0x407c2973,
- 0x407e2980,
- 0x407ea996,
- 0x407f29ae,
- 0x407fa9c1,
- 0x408029d6,
- 0x4080a9ef,
- 0x40812a0d,
- 0x4081aa2d,
- 0x40822a36,
- 0x4082aa52,
- 0x40832a5b,
- 0x4083a09f,
- 0x4084212e,
- 0x4084a0fe,
- 0x4085247c,
- 0x4085a460,
- 0x40861bb8,
- 0x40869bcb,
- 0x40871ebd,
- 0x40879ecc,
- 0x40881b47,
- 0x40889e46,
- 0x40891ea4,
- 0x4089a424,
+ 0x3c500dfb,
+ 0x3c508e1b,
+ 0x3c510e48,
+ 0x3c518fc8,
+ 0x3c5210b3,
+ 0x3c528b68,
+ 0x3c530b20,
+ 0x40321b51,
+ 0x40329b6b,
+ 0x40331b93,
+ 0x40339bab,
+ 0x40341bc9,
+ 0x40349c10,
+ 0x40351c27,
+ 0x40359c43,
+ 0x40361c5f,
+ 0x40369c79,
+ 0x40371c98,
+ 0x40379cb7,
+ 0x40381ccf,
+ 0x40389cec,
+ 0x40391d0f,
+ 0x40399d2c,
+ 0x403a1d4a,
+ 0x403a9d5a,
+ 0x403b1d6f,
+ 0x403b9d8b,
+ 0x403c1da5,
+ 0x403c9db0,
+ 0x403d1dd3,
+ 0x403d9df7,
+ 0x403e1e0d,
+ 0x403e9e17,
+ 0x403f1e23,
+ 0x403f9e34,
+ 0x40401e4c,
+ 0x40409e54,
+ 0x40411e5d,
+ 0x40419e66,
+ 0x40421e8e,
+ 0x40429ea2,
+ 0x40431ead,
+ 0x40439eb9,
+ 0x40441f0d,
+ 0x40449f19,
+ 0x40451f26,
+ 0x40459f39,
+ 0x40461f51,
+ 0x40469f69,
+ 0x40471f7f,
+ 0x40479f9a,
+ 0x40481fb5,
+ 0x40489fc9,
+ 0x40491fe2,
+ 0x40499ffb,
+ 0x404a2015,
+ 0x404aa01f,
+ 0x404b202f,
+ 0x404ba050,
+ 0x404c206b,
+ 0x404ca079,
+ 0x404d2086,
+ 0x404da09a,
+ 0x404e20b2,
+ 0x404ea0c0,
+ 0x404f20ea,
+ 0x404fa101,
+ 0x40502113,
+ 0x4050a144,
+ 0x40512175,
+ 0x4051a18a,
+ 0x4052219b,
+ 0x4052a1bb,
+ 0x405321d6,
+ 0x4053a1e6,
+ 0x4054a1f2,
+ 0x40552208,
+ 0x4055a226,
+ 0x40562233,
+ 0x4056a23d,
+ 0x4057224b,
+ 0x4057a266,
+ 0x40582281,
+ 0x4058a2a0,
+ 0x405922b5,
+ 0x4059a2ca,
+ 0x405a22e7,
+ 0x405aa2fb,
+ 0x405b2317,
+ 0x405ba32d,
+ 0x405c234a,
+ 0x405ca35c,
+ 0x405d2373,
+ 0x405da384,
+ 0x405e23a0,
+ 0x405ea3b4,
+ 0x405f23c4,
+ 0x405fa3e0,
+ 0x406023f5,
+ 0x4060a40b,
+ 0x40612428,
+ 0x4061a441,
+ 0x4062246b,
+ 0x4062a474,
+ 0x40632484,
+ 0x4063a4bd,
+ 0x406424d3,
+ 0x4064a4f1,
+ 0x40652506,
+ 0x4065a523,
+ 0x4066253a,
+ 0x4066a558,
+ 0x40672575,
+ 0x4067a58c,
+ 0x406825aa,
+ 0x4068a5c1,
+ 0x406925d9,
+ 0x4069a5ea,
+ 0x406a25fd,
+ 0x406aa610,
+ 0x406b2624,
+ 0x406ba648,
+ 0x406c2663,
+ 0x406ca684,
+ 0x406d26a8,
+ 0x406da6c3,
+ 0x406e26e4,
+ 0x406ea6f9,
+ 0x406f2712,
+ 0x406fa71f,
+ 0x4070272d,
+ 0x4070a73a,
+ 0x40712757,
+ 0x4071a777,
+ 0x40722792,
+ 0x4072a7ab,
+ 0x407327c2,
+ 0x4073a7dc,
+ 0x40742800,
+ 0x4074a816,
+ 0x4075282a,
+ 0x4075a83f,
+ 0x40762859,
+ 0x4076a86b,
+ 0x40772880,
+ 0x4077a8a6,
+ 0x407828c3,
+ 0x4078a8e6,
+ 0x4079290c,
+ 0x4079a929,
+ 0x407a294c,
+ 0x407aa968,
+ 0x407b2984,
+ 0x407ba996,
+ 0x407c29a3,
+ 0x407e29b0,
+ 0x407ea9c6,
+ 0x407f29de,
+ 0x407fa9f1,
+ 0x40802a06,
+ 0x4080aa1f,
+ 0x40812a3d,
+ 0x4081aa5d,
+ 0x40822a66,
+ 0x4082aa82,
+ 0x40832a8b,
+ 0x4083a0cf,
+ 0x4084215e,
+ 0x4084a12e,
+ 0x408524ac,
+ 0x4085a490,
+ 0x40861be8,
+ 0x40869bfb,
+ 0x40871eed,
+ 0x40879efc,
+ 0x40881b77,
+ 0x40889e76,
+ 0x40891ed4,
+ 0x4089a454,
0x4432042a,
0x4432843c,
0x44330445,
@@ -602,87 +604,87 @@ const uint32_t kOpenSSLFunctionValues[] = {
0x44398522,
0x443a052c,
0x443a8536,
- 0x4c32179b,
- 0x4c3297aa,
- 0x4c3317b9,
- 0x4c3397d2,
- 0x4c3417ed,
- 0x4c349809,
- 0x4c35181b,
- 0x4c359829,
- 0x4c36183e,
- 0x4c36984f,
- 0x4c37185d,
- 0x4c37986b,
- 0x4c38187d,
- 0x4c38988d,
- 0x4c391897,
- 0x4c3998af,
- 0x4c3a18c7,
- 0x4c3a98da,
- 0x50322f06,
- 0x5032af1b,
- 0x50332f2c,
- 0x5033af3f,
- 0x50342f50,
- 0x5034af63,
- 0x50352f72,
- 0x5035af87,
- 0x50362f97,
- 0x5036afa6,
- 0x50372fb7,
- 0x5037afc7,
- 0x50382fd8,
- 0x5038afeb,
- 0x50392ffd,
- 0x5039b013,
- 0x503a3025,
- 0x503ab036,
- 0x503b3047,
- 0x503bb058,
- 0x503c3063,
- 0x503cb06f,
- 0x503d307a,
- 0x503db085,
- 0x503e3092,
- 0x503eb0a7,
- 0x503f30b5,
- 0x503fb0c9,
- 0x504030dc,
- 0x5040b0ed,
- 0x50413107,
- 0x5041b116,
- 0x5042311f,
- 0x5042b12e,
- 0x50433140,
- 0x5043b14c,
- 0x50443154,
- 0x5044b167,
- 0x50453178,
- 0x5045b18e,
- 0x5046319a,
- 0x5046b1ae,
- 0x504731bc,
- 0x5047b1d0,
- 0x504831ea,
- 0x5048b1fe,
- 0x50493214,
- 0x5049b22b,
- 0x504a323d,
- 0x504ab251,
- 0x504b3266,
- 0x504bb27d,
- 0x504c3291,
- 0x504cb29a,
- 0x504d32a2,
- 0x504db2b1,
- 0x504e32c1,
- 0x683210ba,
- 0x683290cb,
- 0x683310db,
- 0x683390e9,
- 0x683410f6,
- 0x6c3210a9,
+ 0x4c3217cb,
+ 0x4c3297da,
+ 0x4c3317e9,
+ 0x4c339802,
+ 0x4c34181d,
+ 0x4c349839,
+ 0x4c35184b,
+ 0x4c359859,
+ 0x4c36186e,
+ 0x4c36987f,
+ 0x4c37188d,
+ 0x4c37989b,
+ 0x4c3818ad,
+ 0x4c3898bd,
+ 0x4c3918c7,
+ 0x4c3998df,
+ 0x4c3a18f7,
+ 0x4c3a990a,
+ 0x50322f36,
+ 0x5032af4b,
+ 0x50332f5c,
+ 0x5033af6f,
+ 0x50342f80,
+ 0x5034af93,
+ 0x50352fa2,
+ 0x5035afb7,
+ 0x50362fc7,
+ 0x5036afd6,
+ 0x50372fe7,
+ 0x5037aff7,
+ 0x50383008,
+ 0x5038b01b,
+ 0x5039302d,
+ 0x5039b043,
+ 0x503a3055,
+ 0x503ab066,
+ 0x503b3077,
+ 0x503bb088,
+ 0x503c3093,
+ 0x503cb09f,
+ 0x503d30aa,
+ 0x503db0b5,
+ 0x503e30c2,
+ 0x503eb0d7,
+ 0x503f30e5,
+ 0x503fb0f9,
+ 0x5040310c,
+ 0x5040b11d,
+ 0x50413137,
+ 0x5041b146,
+ 0x5042314f,
+ 0x5042b15e,
+ 0x50433170,
+ 0x5043b17c,
+ 0x50443184,
+ 0x5044b197,
+ 0x504531a8,
+ 0x5045b1be,
+ 0x504631ca,
+ 0x5046b1de,
+ 0x504731ec,
+ 0x5047b200,
+ 0x5048321a,
+ 0x5048b22e,
+ 0x50493244,
+ 0x5049b25b,
+ 0x504a326d,
+ 0x504ab281,
+ 0x504b3296,
+ 0x504bb2ad,
+ 0x504c32c1,
+ 0x504cb2ca,
+ 0x504d32d2,
+ 0x504db2e1,
+ 0x504e32f1,
+ 0x683210ea,
+ 0x683290fb,
+ 0x6833110b,
+ 0x68339119,
+ 0x68341126,
+ 0x6c3210d9,
0x74320a6a,
0x74328a7c,
0x783206c9,
@@ -720,7 +722,7 @@ const uint32_t kOpenSSLFunctionValues[] = {
0x784207a0,
0x784287be,
0x784307dc,
- 0x803215c2,
+ 0x803215f2,
};
const size_t kOpenSSLFunctionValuesLen = sizeof(kOpenSSLFunctionValues) / sizeof(kOpenSSLFunctionValues[0]);
@@ -896,9 +898,11 @@ const char kOpenSSLFunctionStringData[] =
"EC_GROUP_get_curve_GFp\0"
"EC_GROUP_get_degree\0"
"EC_GROUP_new_by_curve_name\0"
+ "EC_GROUP_new_curve_GFp\0"
"EC_KEY_check_key\0"
"EC_KEY_copy\0"
"EC_KEY_generate_key\0"
+ "EC_KEY_new_by_curve_name\0"
"EC_KEY_new_method\0"
"EC_KEY_set_public_key_affine_coordinates\0"
"EC_POINT_add\0"
diff --git a/src/crypto/ec/ec.c b/src/crypto/ec/ec.c
index 5426b8f..5e30730 100644
--- a/src/crypto/ec/ec.c
+++ b/src/crypto/ec/ec.c
@@ -265,8 +265,8 @@ EC_GROUP *ec_group_new(const EC_METHOD *meth) {
return ret;
}
-static EC_GROUP *ec_group_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
- const BIGNUM *b, BN_CTX *ctx) {
+EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
+ const BIGNUM *b, BN_CTX *ctx) {
const EC_METHOD *meth = EC_GFp_mont_method();
EC_GROUP *ret;
@@ -276,7 +276,7 @@ static EC_GROUP *ec_group_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
}
if (ret->meth->group_set_curve == 0) {
- OPENSSL_PUT_ERROR(EC, ec_group_new_curve_GFp,
+ OPENSSL_PUT_ERROR(EC, EC_GROUP_new_curve_GFp,
ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
return 0;
}
@@ -287,6 +287,38 @@ static EC_GROUP *ec_group_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
return ret;
}
+int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
+ const BIGNUM *order, const BIGNUM *cofactor) {
+ if (group->generator == NULL) {
+ group->generator = EC_POINT_new(group);
+ if (group->generator == NULL) {
+ return 0;
+ }
+ }
+
+ if (!EC_POINT_copy(group->generator, generator)) {
+ return 0;
+ }
+
+ if (order != NULL) {
+ if (!BN_copy(&group->order, order)) {
+ return 0;
+ }
+ } else {
+ BN_zero(&group->order);
+ }
+
+ if (cofactor != NULL) {
+ if (!BN_copy(&group->cofactor, cofactor)) {
+ return 0;
+ }
+ } else {
+ BN_zero(&group->cofactor);
+ }
+
+ return 1;
+}
+
static EC_GROUP *ec_group_new_from_data(const struct built_in_curve *curve) {
EC_GROUP *group = NULL;
EC_POINT *P = NULL;
@@ -322,7 +354,7 @@ static EC_GROUP *ec_group_new_from_data(const struct built_in_curve *curve) {
goto err;
}
} else {
- if ((group = ec_group_new_curve_GFp(p, a, b, ctx)) == NULL) {
+ if ((group = EC_GROUP_new_curve_GFp(p, a, b, ctx)) == NULL) {
OPENSSL_PUT_ERROR(EC, ec_group_new_from_data, ERR_R_EC_LIB);
goto err;
}
diff --git a/src/crypto/err/ec.errordata b/src/crypto/err/ec.errordata
index 3b815c8..252f7ab 100644
--- a/src/crypto/err/ec.errordata
+++ b/src/crypto/err/ec.errordata
@@ -3,9 +3,11 @@ EC,function,100,EC_GROUP_copy
EC,function,101,EC_GROUP_get_curve_GFp
EC,function,102,EC_GROUP_get_degree
EC,function,103,EC_GROUP_new_by_curve_name
+EC,function,166,EC_GROUP_new_curve_GFp
EC,function,104,EC_KEY_check_key
EC,function,105,EC_KEY_copy
EC,function,106,EC_KEY_generate_key
+EC,function,165,EC_KEY_new_by_curve_name
EC,function,107,EC_KEY_new_method
EC,function,108,EC_KEY_set_public_key_affine_coordinates
EC,function,109,EC_POINT_add
diff --git a/src/include/openssl/ec.h b/src/include/openssl/ec.h
index 633b11b..617cb19 100644
--- a/src/include/openssl/ec.h
+++ b/src/include/openssl/ec.h
@@ -286,6 +286,21 @@ OPENSSL_EXPORT int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r,
/* Deprecated functions. */
+/* EC_GROUP_new_curve_GFp creates a new, arbitrary elliptic curve group based
+ * on the equation y² = x³ + a·x + b. It returns the new group or NULL on
+ * error. */
+OPENSSL_EXPORT EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p,
+ const BIGNUM *a,
+ const BIGNUM *b, BN_CTX *ctx);
+
+/* EC_GROUP_set_generator sets the generator for |group| to |generator|, which
+ * must have the given order and cofactor. This should only be used with
+ * |EC_GROUP| objects returned by |EC_GROUP_new_curve_GFp|. */
+OPENSSL_EXPORT int EC_GROUP_set_generator(EC_GROUP *group,
+ const EC_POINT *generator,
+ const BIGNUM *order,
+ const BIGNUM *cofactor);
+
/* EC_GROUP_set_asn1_flag does nothing. */
OPENSSL_EXPORT void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);
@@ -381,6 +396,7 @@ OPENSSL_EXPORT void EC_GROUP_set_point_conversion_form(
#define EC_F_ec_group_copy 163
#define EC_F_nistp256_pre_comp_new 164
#define EC_F_EC_KEY_new_by_curve_name 165
+#define EC_F_EC_GROUP_new_curve_GFp 166
#define EC_R_BUFFER_TOO_SMALL 100
#define EC_R_COORDINATES_OUT_OF_RANGE 101
#define EC_R_D2I_ECPKPARAMETERS_FAILURE 102