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

Expose HMAC through the Public C++ Crypto API #4204

Merged
merged 3 commits into from
Sep 8, 2022

Conversation

andpiccione
Copy link
Member

This PR exposes the HMAC cryptographic function through the Public C++ Crypto API by moving the corresponding hmac.h definition to include/ccf. Public docs have also been updated to include the addition of the function.

@andpiccione andpiccione marked this pull request as ready for review September 8, 2022 12:58
@andpiccione andpiccione requested a review from a team September 8, 2022 12:58
@andpiccione
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 4204 in repo microsoft/CCF

@eddyashton
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Member

@achamayou achamayou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@achamayou achamayou enabled auto-merge (squash) September 8, 2022 13:18
@ghost
Copy link

ghost commented Sep 8, 2022

expose_crypto_hmac_api@49444 aka 20220908.14 vs main ewma over 20 builds from 49116 to 49440

Click to see table

main

build_id build_number tpcc_virtual_cft^ tpcc_virtual_cft_mem tpcc_sgx_cft^ tpcc_sgx_cft_mem ls_virtual_cft^ ls_virtual_cft_mem ls_jwt_virtual_cft^ ls_jwt_virtual_cft_mem ls_sgx_cft^ ls_sgx_cft_mem ls_js_virtual_cft^ ls_js_virtual_cft_mem ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_v8_virtual_cft^ ls_v8_virtual_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_full_js_virtual_cft^ ls_full_js_virtual_cft_mem ls_full_v8_virtual_cft^ ls_full_v8_virtual_cft_mem ls_v8_sgx_cft^ ls_v8_sgx_cft_mem ls_js_jwt_virtual_cft^ ls_js_jwt_virtual_cft_mem ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem hist_sgx_cft^ ls_full_v8_sgx_cft^ ls_full_v8_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)^
49116 20220831.9 11291.7 0 6277.52 8.3497e+07 40402.6 0 10289.7 0 19504.9 1.71746e+07 4639.58 0 5574.63 1.56017e+07 2767.63 0 2492.81 9.83456e+06 3622.28 0 2442.1 0 1586.51 1.66597e+08 3511.62 0 2146.08 9.31027e+06 24504.5 1404.73 9.79149e+07 1925.98 9.04813e+06 904468 1.3463e+06 9.33872e+06 3.5128e+07
49132 20220831.16 11552.5 0 6391.85 8.29727e+07 42111.1 0 10776.6 0 19777.9 1.66503e+07 4662.12 0 5648.95 1.56017e+07 2861.6 0 2545.37 1.00967e+07 3570.26 0 2500.12 0 1645.44 1.66597e+08 3351.31 0 2114.65 9.31027e+06 26516.1 1418.92 9.84392e+07 1937.53 9.04813e+06 902793 1.37458e+06 9.3815e+06 3.63121e+07
49144 20220901.3 11160.4 0 6219.9 8.40213e+07 43816.5 0 10710.1 0 19555.4 1.58639e+07 4610.55 0 5592.24 1.56017e+07 2884.93 0 2484.2 1.03588e+07 3592.2 0 2581.22 0 1568.03 1.66597e+08 3400.33 0 2069.72 9.31027e+06 26903.4 1380.86 9.76528e+07 1914.77 9.04813e+06 887609 1.36015e+06 9.23346e+06 3.54933e+07
49192 20220901.20 11466.2 0 6291.29 8.32349e+07 43892.7 0 10326.5 0 19553.4 1.69124e+07 4650.74 0 5611.48 1.53396e+07 2859.9 0 2487.2 1.00967e+07 3619.34 0 2521.16 0 1576.13 1.66335e+08 3404.77 0 2134.9 9.57242e+06 22720.1 1376.9 9.76528e+07 1960.47 9.04813e+06 908520 1.36034e+06 9.24597e+06 3.58669e+07
49201 20220902.3 11783.1 0 6071.92 8.29727e+07 41717.1 0 10292 0 19595.1 1.69124e+07 4672.78 0 5512.94 1.50774e+07 2948.57 0 2541.19 1.00967e+07 3623.67 0 2494.11 0 1573.3 1.66597e+08 3411.66 0 2109.91 9.04813e+06 24821.4 1382.23 9.81771e+07 1924.19 9.04813e+06 926098 1.37836e+06 9.44201e+06 3.63759e+07
49214 20220902.10 10859.5 0 6131.03 8.29727e+07 41226.3 0 10350.9 0 19760 1.71746e+07 4844.45 0 5570.12 1.56017e+07 2781.33 0 2480.01 1.00967e+07 3575.42 0 2501.09 0 1503.76 1.66335e+08 3345.38 0 2074.09 9.31027e+06 25352.7 1380.22 9.79149e+07 1920.74 9.04813e+06 899064 1.38069e+06 9.23346e+06 3.56794e+07
49223 20220905.3 11176.8 0 6242.76 8.29727e+07 40029.6 0 10731.5 0 19388.5 1.58639e+07 4810.8 0 5560.94 1.53396e+07 nan nan 2593.74 1.00967e+07 3749.32 0 2421.65 0 1566.31 1.66335e+08 3356.4 0 2083.89 9.31027e+06 21802.8 1379.45 9.81771e+07 1919.71 9.04813e+06 888077 1.37477e+06 9.30905e+06 3.56174e+07
49234 20220905.7 10905.1 0 6431.06 8.29727e+07 40930.2 0 10659.7 0 19818.6 1.63882e+07 4750.98 0 5669 1.50774e+07 2760.6 0 2550.03 1.00967e+07 3567.92 0 2445.56 0 1564.23 1.66597e+08 3207.15 0 2123.14 9.31027e+06 32009 1413.84 9.84392e+07 1926.61 9.04813e+06 892992 1.37661e+06 9.22934e+06 3.56168e+07
49239 20220905.9 nan nan 6399.81 8.69049e+07 nan nan nan nan 19883.2 1.58639e+07 nan nan 5603.01 1.53396e+07 nan nan 2547.35 9.83456e+06 nan nan nan nan 1591.61 1.66597e+08 nan nan 2158.88 9.57242e+06 20484.8 1408.33 9.81771e+07 1918.08 9.04813e+06 899541 1.36569e+06 9.35151e+06 3.58042e+07
49242 20220905.10 11506.8 0 6147.41 8.24484e+07 42664 0 10683.9 0 19864.5 1.63882e+07 4594.58 0 5578.21 1.53396e+07 2855.57 0 2483.16 9.83456e+06 3581.18 0 2497.85 0 1576.76 1.66859e+08 3355.62 0 2073.83 9.04813e+06 23463.6 1392.2 9.79149e+07 1928.57 8.78598e+06 903708 1.37145e+06 9.35151e+06 3.59298e+07
49243 20220905.11 11320.7 0 6244.91 8.3497e+07 40621.7 0 10260.7 0 19894.9 1.63882e+07 4676.21 0 5530.05 1.56017e+07 2798.88 0 2549.59 1.00967e+07 3589.82 0 2489.91 0 1588.65 1.66597e+08 3371.18 0 2116.87 9.31027e+06 22359.5 1395.13 9.81771e+07 1834.76 1.08831e+07 900054 1.36934e+06 9.26269e+06 3.59298e+07
49259 20220906.1 11256.8 0 6298.81 8.32349e+07 41564.7 0 10234.3 0 19838.2 1.58639e+07 4520.47 0 5637.77 1.53396e+07 2874.51 0 2488.7 9.83456e+06 3543.63 0 2443.25 0 1568.27 1.66597e+08 3402.88 0 2138.73 9.31027e+06 26178.7 1396.55 9.79149e+07 1926.24 9.04813e+06 906229 1.36505e+06 9.19206e+06 3.58663e+07
49287 20220906.8 11181.6 0 6313.21 8.27106e+07 42071 0 10734 0 19488.2 1.6126e+07 4579.41 0 5528.88 1.53396e+07 2790.3 0 2479.37 9.83456e+06 3547.34 0 2452.34 0 1554.43 1.66597e+08 3300.3 0 2101.41 9.31027e+06 23064.7 1374.59 9.81771e+07 1926.35 9.04813e+06 875774 1.35881e+06 9.17559e+06 3.44781e+07
49321 20220907.2 11546.3 0 6335.3 8.37592e+07 40423.4 0 10417.5 0 19895.8 1.66503e+07 4606.41 0 5568.19 1.53396e+07 2792.86 0 2510.33 1.2456e+07 3582.52 0 2483.64 0 1534.08 1.66597e+08 3527.99 0 2077.44 9.04813e+06 27714.5 1375.62 9.79149e+07 1928.95 9.04813e+06 883971 1.39737e+06 9.40736e+06 3.63766e+07
49338 20220907.8 nan nan 6293.79 8.27106e+07 nan nan nan nan 19885 1.6126e+07 nan nan 5571.13 1.53396e+07 nan nan 2498.72 9.83456e+06 nan nan nan nan 1600.78 1.66597e+08 nan nan 2120.24 9.31027e+06 20492.2 1397.94 9.79149e+07 1927.35 9.04813e+06 905949 1.37615e+06 9.25855e+06 3.55556e+07
49351 20220907.13 11695.3 0 6106.44 8.37592e+07 43199.7 0 10312 0 19329.5 1.69124e+07 4599.55 0 5552.91 1.53396e+07 2757.17 0 2496.15 1.03588e+07 3700.07 0 2491.49 0 1597.67 1.66335e+08 3372.11 0 2075.94 9.31027e+06 24225.7 1389.28 9.76528e+07 1926.07 1.11453e+07 908722 1.35772e+06 9.19615e+06 3.63759e+07
49358 20220907.15 11558.2 0 6491.99 8.37592e+07 42148.8 0 10353.5 0 19825 1.6126e+07 4800.17 0 5599.85 1.53396e+07 2874.26 0 2556.85 9.83456e+06 3561.8 0 2494.51 0 1620.53 1.645e+08 3718.59 0 2084.3 9.31027e+06 23107.4 1424.05 9.81771e+07 1940.17 9.04813e+06 924848 1.3793e+06 9.32172e+06 3.58042e+07
49399 20220907.32 11359.8 0 6238.04 8.29727e+07 42625.6 0 10315.6 0 19676.6 1.6126e+07 4768.15 0 5580.52 1.56017e+07 2786.84 0 2495.42 1.00967e+07 3618.43 0 2492.28 0 1596.16 1.66597e+08 3406.83 0 2073.91 1.21939e+07 27670.4 1394.62 9.63421e+07 1884.05 9.31027e+06 886539 1.37579e+06 9.02994e+06 3.46531e+07
49412 20220908.2 11376.9 0 6211.39 8.32349e+07 42804.1 0 10490.8 0 19699.9 1.66503e+07 4717.12 0 5673.08 1.58639e+07 2818.32 0 2558.06 1.03588e+07 3554.57 0 2444.03 0 1589.88 1.66859e+08 3720.75 0 2157.25 9.31027e+06 26838.4 1392.74 9.79149e+07 1933.43 9.04813e+06 903711 1.37182e+06 9.22103e+06 3.58042e+07
49440 20220908.13 11180.9 0 6383.7 8.27106e+07 42591.4 0 10667.7 0 19646.1 1.66503e+07 4595.63 0 5591.16 1.6126e+07 2777.81 0 2489.13 9.83456e+06 3648.87 0 2481.74 0 1594.8 1.66859e+08 3544.75 0 2118.61 9.57242e+06 28059.2 1404.82 9.79149e+07 1942.16 9.31027e+06 893186 1.36287e+06 9.21269e+06 3.5128e+07

expose_crypto_hmac_api

build_id build_number tpcc_virtual_cft^ tpcc_virtual_cft_mem ls_virtual_cft^ ls_virtual_cft_mem ls_jwt_virtual_cft^ ls_jwt_virtual_cft_mem ls_js_virtual_cft^ ls_js_virtual_cft_mem ls_v8_virtual_cft^ ls_v8_virtual_cft_mem tpcc_sgx_cft^ tpcc_sgx_cft_mem ls_full_js_virtual_cft^ ls_full_js_virtual_cft_mem ls_full_v8_virtual_cft^ ls_full_v8_virtual_cft_mem ls_sgx_cft^ ls_sgx_cft_mem ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_js_jwt_virtual_cft^ ls_js_jwt_virtual_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem hist_sgx_cft^ ls_v8_sgx_cft^ ls_v8_sgx_cft_mem ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_full_v8_sgx_cft^ ls_full_v8_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)^
49444 20220908.14 10865.6 0 39915.6 0 9992.26 0 4622.12 0 2714.01 0 6318.6 8.32349e+07 3639.64 0 2400.25 0 19548.2 1.63882e+07 5647.86 1.56017e+07 3350.34 0 2492.68 1.00967e+07 26127.5 1573.15 1.66859e+08 2128.17 9.57242e+06 1394.65 9.84392e+07 1933.81 9.31027e+06 907513 1.34365e+06 9.2293e+06 3.58669e+07

images

@andpiccione
Copy link
Member Author

andpiccione commented Sep 8, 2022

@eddyashton @achamayou The CI pipeline is failing on a lts_compatibility test (link). I don't think it's related to these changes as the error seems to point to a connection timeout and I see previous pipelines had a similar error (e.g., this). Could you please re-trigger the pipeline to check if this is just a transient failure (unfortunately I don't have permissions to do it)? Thanks!

@achamayou achamayou merged commit a88cfdf into microsoft:main Sep 8, 2022
@andpiccione
Copy link
Member Author

andpiccione commented Sep 8, 2022

@eddyashton @achamayou The CI pipeline is failing on a lts_compatibility test (link). I don't think it's related to these changes as the error seems to point to a connection timeout and I see previous pipelines had a similar error (e.g., this). Could you please re-trigger the pipeline to check if this is just a transient failure (unfortunately I don't have permissions to do it)? Thanks!

Never mind, looks like the failed checks re-ran on their own and passed this time 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants