Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OpenSSL SHA digest API #5336

Merged
merged 7 commits into from
Jun 12, 2023
Merged

Update OpenSSL SHA digest API #5336

merged 7 commits into from
Jun 12, 2023

Conversation

jumaffre
Copy link
Contributor

@jumaffre jumaffre commented Jun 9, 2023

Part of #5291

The SHA256_...() API is deprecated in OpenSSL 3.x (see https://www.openssl.org/docs/man3.1/man3/SHA256_Init.html):

The following functions have been deprecated since OpenSSL 3.0, and can be hidden entirely by defining OPENSSL_API_COMPAT with a suitable version value, see openssl_user_macros(7)

We now make use of the generic EVP_Digest...() API, both available with OpenSSL 1.1.x and OpenSSL 3.x.

@jumaffre jumaffre requested a review from a team June 9, 2023 15:03
@jumaffre jumaffre added auto-backport Automatically backport this PR to LTS branch 4.x-backport Highlights PRs targeting the 4.x branch 4.x-todo PRs which should be backported to 4.x and removed 4.x-backport Highlights PRs targeting the 4.x branch labels Jun 9, 2023
@achamayou achamayou added the 3.x-todo PRs which should be backported to 3.x label Jun 9, 2023
@achamayou
Copy link
Member

3.x may also move over, not clear yet, might as well update it.

src/crypto/openssl/hash.h Outdated Show resolved Hide resolved
@ghost
Copy link

ghost commented Jun 9, 2023

openssl_3_sha_api@71549 aka 20230612.6 vs main ewma over 20 builds from 71201 to 71540

Click to see table

main

build_id build_number Commit latency factor ls_virtual_cft^ pi_ls_virtual_cft^ ls_sgx_cft^ ls_sgx_cft_mem pi_basic_virtual_cft^ pi_ls_sgx_cft^ pi_ls_sgx_cft_mem ls_jwt_virtual_cft^ pi_basic_sgx_cft^ pi_basic_sgx_cft_mem pi_ls_jwt_virtual_cft^ ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_js_virtual_cft^ pi_ls_jwt_sgx_cft^ pi_ls_jwt_sgx_cft_mem ls_full_js_virtual_cft^ ls_js_jwt_virtual_cft^ ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem hist_sgx_cft^ ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^
71201 20230601.19 0.808667 45895.1 48715.9 20363.9 1.88908e+07 56759.9 20478.9 1.25993e+07 12293.2 22950.9 1.25993e+07 13167.6 6406.29 1.67936e+07 4467.32 6502.8 6.30784e+06 3475.76 3280.43 1713.76 1.05021e+07 1418.43 1.05021e+07 47964.2 1421.34 1.05021e+07 829567 1.18099e+06 8.15316e+06 3.09165e+07
71211 20230601.22 0.796293 45714.4 48392.7 20216.6 1.88908e+07 56736.6 20483.1 1.25993e+07 12630 22930.1 1.25993e+07 13086.3 6736.26 1.67936e+07 4443.59 6563.4 6.30784e+06 3484.48 3265.72 1733.73 1.05021e+07 1422.61 1.05021e+07 50265.7 1422.76 1.05021e+07 833223 1.18487e+06 8.15442e+06 3.13073e+07
71221 20230602.2 0.829951 45570.2 47549.7 20418.8 1.88908e+07 55697.9 20526.8 1.25993e+07 12380.8 22968.3 1.25993e+07 12828.6 6737.26 1.88908e+07 4455.82 6607.2 6.30784e+06 3496.43 3234.86 1711.7 1.05021e+07 1418.74 1.05021e+07 44041.5 1420.2 1.05021e+07 836887 1.17647e+06 8.15225e+06 3.05726e+07
71242 20230602.9 0.792046 45520.7 47575.6 20310.9 1.88908e+07 55973.5 20439.1 1.25993e+07 12483.8 23053.5 1.25993e+07 12895.7 6717.2 1.67936e+07 4431.07 6600.6 6.30784e+06 3503.38 3289.73 1732.85 1.05021e+07 1417.24 1.05021e+07 47652 1418.2 1.05021e+07 838767 1.1824e+06 8.1542e+06 3.08109e+07
71259 20230602.12 0.789445 47627.5 48617.1 20414.9 1.88908e+07 56217.4 20684.4 1.25993e+07 12501.4 23054 1.25993e+07 12914.4 6766.88 1.67936e+07 4420.18 6549 6.30784e+06 3491.81 3262.77 1732.46 1.05021e+07 1419.76 1.05021e+07 48087.6 1404.96 1.05021e+07 834594 1.1753e+06 8.14657e+06 3.08053e+07
71294 20230605.1 0.776669 45620.2 49191.7 20311.5 1.88908e+07 56180.8 20743.7 1.25993e+07 12428 22996.9 1.25993e+07 12841.9 6731.81 1.67936e+07 4425.28 6552.7 6.30784e+06 3557.36 3254.37 1729.16 1.05021e+07 1430.71 1.05021e+07 48330.9 1422.45 1.05021e+07 840558 1.18085e+06 8.1518e+06 3.06637e+07
71322 20230606.2 0.832577 47696.3 48906.9 20239.4 1.88908e+07 56408.3 20638.3 1.25993e+07 12428.5 22963.4 1.25993e+07 12800.4 6726.37 1.67936e+07 4427.07 6554.5 6.30784e+06 3473.18 3242.39 1737.28 1.05021e+07 1420.01 1.05021e+07 48550.2 1424.1 1.05021e+07 833353 1.18023e+06 8.15339e+06 3.06904e+07
71328 20230606.5 0.805216 45780.9 49199.3 20323 1.88908e+07 57467.3 20452.8 1.25993e+07 12501.8 22886.1 1.25993e+07 13098.6 6745.83 1.67936e+07 4432.73 6562.2 6.30784e+06 3558.81 3250.9 1714.4 1.05021e+07 1431.66 1.05021e+07 50828.8 1420.02 1.05021e+07 833319 1.17569e+06 8.14243e+06 3.07166e+07
71335 20230606.7 0.785245 45750 48295.9 20185.4 1.88908e+07 55958.2 20428 1.25993e+07 12471.1 22949.3 1.25993e+07 13080.3 6385.89 1.67936e+07 4436.85 6558.2 6.30784e+06 3351.35 3272.5 1714.01 1.05021e+07 1418.76 1.05021e+07 50683.3 1408.26 1.05021e+07 834222 1.17729e+06 8.15115e+06 3.06982e+07
71347 20230606.10 0.779793 45887.3 48507 20358.1 1.67936e+07 57058.1 20384.2 1.25993e+07 12526.8 22951.1 1.25993e+07 13097.4 6328.38 1.67936e+07 4454.11 6547.2 6.30784e+06 3575.44 3241.25 1716.02 1.05021e+07 1421.71 1.05021e+07 44603.3 1422.67 1.05021e+07 836902 1.17795e+06 8.15212e+06 3.07586e+07
71360 20230607.3 0.78998 45845.1 47519.3 20409.4 1.88908e+07 42513.4 20464.5 1.25993e+07 12525.9 23079.5 1.25993e+07 13071.5 6748.4 1.88908e+07 4469.69 6558.2 6.30784e+06 3403.07 3248.86 1735.44 1.05021e+07 1432.58 1.05021e+07 43733.3 1423.65 1.05021e+07 834292 1.1762e+06 8.17314e+06 3.07226e+07
71369 20230607.7 0.797093 45767.5 48367.4 20112.8 1.88908e+07 57287.9 20517.7 1.05021e+07 12490.8 22923.6 1.25993e+07 12952.9 6734.07 1.67936e+07 4457.24 6553.3 6.30784e+06 3454.56 3255.97 1730 1.05021e+07 1421.78 1.05021e+07 50905.2 1404.58 1.05021e+07 831279 1.18223e+06 8.15322e+06 3.07517e+07
71406 20230607.19 0.816433 47784.3 48391.9 20154.6 1.88908e+07 57540.4 20412.9 1.25993e+07 12512.3 22959.3 1.25993e+07 13120.4 6730.9 1.67936e+07 4470.83 6557.1 6.30784e+06 3482.13 3282.72 1706.09 1.05021e+07 1428.46 1.05021e+07 45626.7 1403.58 1.05021e+07 839176 1.18744e+06 8.15218e+06 3.19665e+07
71422 20230608.1 0.793623 45800.3 49044.6 20307.2 1.88908e+07 57452.4 20420.7 1.25993e+07 12474.3 22922.3 1.25993e+07 12887.8 6687.38 1.67936e+07 4478.06 6552.9 6.30784e+06 3476.19 3233.92 1733.01 1.05021e+07 1431.06 1.05021e+07 50140.3 1399.2 1.05021e+07 834246 1.18279e+06 8.15546e+06 3.15465e+07
71456 20230609.1 0.780706 45726.2 49066.3 20117.9 1.88908e+07 57957.6 20502.6 1.25993e+07 12551.4 22937.3 1.25993e+07 12908.2 6762.84 1.67936e+07 4439.38 6552.9 6.30784e+06 3475.01 3272.17 1712.86 1.05021e+07 1424.66 1.05021e+07 48156 1423.51 1.05021e+07 833927 1.17805e+06 8.15283e+06 3.06229e+07
71469 20230609.7 0.807635 45623.6 47843 20386 1.67936e+07 57890.2 20523 1.25993e+07 12506.4 23018.8 1.25993e+07 12990.5 6713.28 1.67936e+07 4428.89 6517 6.30784e+06 3469.74 3250.6 1714.08 1.05021e+07 1432.89 1.05021e+07 45913.4 1404.5 1.05021e+07 819614 1.17572e+06 8.15394e+06 3.07097e+07
71496 20230609.15 0.772077 46007.3 48155.6 20331 1.88908e+07 57658.8 20496.8 1.25993e+07 12476.4 22942.2 1.25993e+07 13171.1 6439.42 1.67936e+07 4447.61 6510.3 6.30784e+06 3571.98 3369.43 1719.76 1.05021e+07 1423.68 1.05021e+07 48860.4 1407.57 1.05021e+07 837830 1.18395e+06 8.15517e+06 3.08578e+07
71523 20230609.22 0.802919 45590 47851.2 20413.1 1.88908e+07 57223.3 20609.1 1.25993e+07 12391.7 22943.7 1.25993e+07 13126.2 6735.43 1.67936e+07 4445.59 6567.8 6.30784e+06 3557.25 3247.14 1735.39 1.05021e+07 1421.93 1.05021e+07 47556.5 1422.56 1.05021e+07 839011 1.17396e+06 8.15524e+06 3.07134e+07
71535 20230609.24 0.838986 45595.9 47416.7 20236.5 1.88908e+07 57199.8 20486 1.25993e+07 12469.1 22938.8 1.25993e+07 12956.1 6713.73 1.67936e+07 4440.99 6511.9 6.30784e+06 3483.32 3367.21 1713.57 1.05021e+07 1420.79 1.05021e+07 48483.3 1401.98 1.05021e+07 828115 1.18552e+06 8.141e+06 3.07475e+07
71540 20230612.2 0.800894 45867.2 47831.4 20166.5 1.88908e+07 57943.1 20478.2 1.25993e+07 12546.1 23007.6 1.25993e+07 12854.1 6715.98 1.67936e+07 4457.17 6559.2 6.30784e+06 3561.99 3258.32 1718.8 1.05021e+07 1420.17 1.05021e+07 48729.1 1405.36 1.05021e+07 837423 1.17789e+06 8.15303e+06 3.07235e+07

openssl_3_sha_api

build_id build_number Commit latency factor ls_virtual_cft^ pi_ls_virtual_cft^ pi_basic_virtual_cft^ ls_jwt_virtual_cft^ pi_ls_jwt_virtual_cft^ ls_sgx_cft^ ls_sgx_cft_mem pi_ls_sgx_cft^ pi_ls_sgx_cft_mem ls_js_virtual_cft^ pi_basic_sgx_cft^ pi_basic_sgx_cft_mem ls_full_js_virtual_cft^ ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem pi_ls_jwt_sgx_cft^ pi_ls_jwt_sgx_cft_mem ls_js_jwt_virtual_cft^ ls_js_sgx_cft^ ls_js_sgx_cft_mem hist_sgx_cft^ ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^
71509 20230609.18 0.793571 45768.2 47068.8 56085.3 12461.3 13152.3 19971.7 1.88908e+07 20152.2 1.25993e+07 4469.86 22554.7 1.25993e+07 3571.63 6719.28 1.67936e+07 6557.2 6.30784e+06 3285.99 1734.29 1.05021e+07 47865.1 1421.01 1.05021e+07 1403.59 1.05021e+07 826285 1.17787e+06 8.15433e+06 3.0835e+07
71549 20230612.6 0.8068 45579.8 46337.5 56136.9 12419.4 13210.9 19967 1.88908e+07 20284 1.25993e+07 4424.25 22515.1 1.25993e+07 3555.12 6732.71 1.67936e+07 6560 6.30784e+06 3278.51 1735.46 1.05021e+07 47174.7 1431 1.05021e+07 1421.54 1.05021e+07 839046 1.18309e+06 8.15264e+06 3.08127e+07

images

@jumaffre jumaffre merged commit 623bf16 into main Jun 12, 2023
@jumaffre jumaffre deleted the openssl_3_sha_api branch June 12, 2023 10:23
ghost pushed a commit that referenced this pull request Jun 12, 2023
(cherry picked from commit 623bf16)
@ghost ghost added the backported This PR was successfully backported to LTS branch label Jun 12, 2023
ghost pushed a commit that referenced this pull request Jun 12, 2023
(cherry picked from commit 623bf16)
@jumaffre jumaffre mentioned this pull request Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x-todo PRs which should be backported to 3.x 4.x-todo PRs which should be backported to 4.x auto-backport Automatically backport this PR to LTS branch backported This PR was successfully backported to LTS branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants