[crypto/ec] deprecate Jprojective_coordinates_GFp functions #11527
Conversation
| } | ||
|
|
||
| point->Z_is_one = 0; | ||
| return 1; |
bbbrumley
Apr 12, 2020
•
Author
Contributor
This was early on in the change, and now seems a bit heavy handed. Should I just call ec_GFp_simple_set_Jprojective_coordinates_GFp directly here?
Edit: Yes it was heavy handed. Plus a few other mistakes. Force push coming ...
This was early on in the change, and now seems a bit heavy handed. Should I just call ec_GFp_simple_set_Jprojective_coordinates_GFp directly here?
Edit: Yes it was heavy handed. Plus a few other mistakes. Force push coming ...
|
Travis red cross is not relevant. |
|
From a documentation perspective we should include a CHANGES entry which summarises the change and gives pointers (perhaps to the man pages) about what users of these APIs should do instead. The relevant man page should also be updated to clearly indicate in the SYNOPSIS that the functions are deprecated (see DH_generate_parameters.pod for an example). The description should also say that the functions are deprecated and what users should do instead. Finally the HISTORY section should be updated to say when the deprecation occurred. |
| * Tests a point known to cause an incorrect underflow in an old version of | ||
| * ecp_nist521.c | ||
| */ | ||
| static int underflow_test(void) |
mattcaswell
Apr 13, 2020
Member
Moving this test to the internal test is fine. An acceptable alternative is to include this at the top of the file to suppress issues with deprecated warnings (and enclosing the relevant tests in guards for OPENSSL_NO_DEPRECATED_3_0):
/*
* We need access to the deprecated EC_POINT_get_Jprojective_coordinates_GFp
* and EC_POINT_set_Jprojective_coordinates_GFp APIs for testing purposes
* when the deprecated calls are not hidden
*/
#ifndef OPENSSL_NO_DEPRECATED_3_0
# define OPENSSL_SUPPRESS_DEPRECATED
#endif
Moving this test to the internal test is fine. An acceptable alternative is to include this at the top of the file to suppress issues with deprecated warnings (and enclosing the relevant tests in guards for OPENSSL_NO_DEPRECATED_3_0):
/*
* We need access to the deprecated EC_POINT_get_Jprojective_coordinates_GFp
* and EC_POINT_set_Jprojective_coordinates_GFp APIs for testing purposes
* when the deprecated calls are not hidden
*/
#ifndef OPENSSL_NO_DEPRECATED_3_0
# define OPENSSL_SUPPRESS_DEPRECATED
#endif
bbbrumley
Apr 14, 2020
Author
Contributor
TIL -- thanks for the tip :) I this case, I'd prefer it internal because (as I'm sure you know!) it's pretty common for developers to look at the tests to understand what they're supposed to do. And I wouldn't want to mislead anyone ;)
TIL -- thanks for the tip :) I this case, I'd prefer it internal because (as I'm sure you know!) it's pretty common for developers to look at the tests to understand what they're supposed to do. And I wouldn't want to mislead anyone ;)
|
Apart form the changes needed in EC_POINT_new.pod it looks good. |
|
Thanks @mattcaswell for the tips and @slontis for the review. I'll make the doc changes Matt pointed me at in the next week or so. |
This should be done now in fb5df41. I apologize in advance -- I don't know how to test the |
|
LGTM |
|
Approved |
|
This pull request is ready to merge |
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from #11527)
|
Merged with 07caec8. Thanks! |
Reiterating from #8332:
Deprecate the following two functions:
EC_POINT_set_Jprojective_coordinates_GFpEC_POINT_get_Jprojective_coordinates_GFpWhether a point has 3, 4, 5, ... coordinates, and what coordinate system the
EC_METHODuses, should not be public facing.Before I sat down to write this PR, I used my Google-fu to search for linking applications using these functions. I only found one:
ec_test.Disclaimer: This is my first time marking something deprecated. I don't really know what I'm doing. Please tell me what I did wrong. (Including documenting the deprecation.)
Tagging @mattcaswell who seemed to like the suggestion. I reckon you have to vote on it.