-
Notifications
You must be signed in to change notification settings - Fork 485
ECC enhancements #65
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
ECC enhancements #65
Conversation
|
I think the build error can be fixed in several ways:
I would prefer going for 2 or 4 |
|
Or we can introduce in libtommath something like LTM_VERSION (e.g. 0x0042 for version 0.42) and then in libtomcrypt's /* sqrtmod_prime */
static int sqrtmod_prime(void *a, void *b, void *c)
{
LTC_ARGCHK(a != NULL);
LTC_ARGCHK(b != NULL);
LTC_ARGCHK(c != NULL);
#if !defined(LTM_VERSION) || LTM_VERSION < 0x0042
return CRYPT_LTM_TOO_OLD;
#else
return mpi_to_ltc_error(mp_sqrtmod_prime(a, b, c));
#endif
} |
53cc5ce to
0d2d2cb
Compare
0d2d2cb to
d346161
Compare
0609803 to
637be09
Compare
637be09 to
3f8dbbf
Compare
97e84e6 to
0742fd4
Compare
c155df3 to
530cef1
Compare
|
@fperrad may I ask you for running your linting machine on |
|
@karel-m linting issues: missing prototypes in tomcrypt.h : ecc_sign_hash_ex & ecc_verify_hash_ex bad indentation line 30 in src/pk/ecc/ecc_export_raw.c bad indentation line 62 in src/pk/ecc/ecc_sign_hash.c bad indentation line 72, 74 & 75 in src/pk/ecc/ecc_import_raw.c |
573f52a to
26989ec
Compare
|
can we somehow bring the coverage up again? |
What has to be done to bring it up? |
|
|
Oh yes, tests, I know. |
e960f43 to
1caf67f
Compare
| case LTC_ASN1_CONTEXT_SPECIFIC: | ||
| case LTC_ASN1_EOL: | ||
| case LTC_ASN1_TELETEX_STRING: | ||
| default: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer not to use a default case when I switch on an enum as the compiler then warns me if I add elements to the enum and forget to modify the switch-case
bbee5e5 to
c7c170d
Compare
|
@sjaeckel this PR is too complex (rebasing is quite often a pain), I am considering the idea of splitting this PR into two parts: 1/ ASN.1 changes + 2/ EC-only stuf. The part 1/ would be a new PR (which I want to merge to develop before continuing on the remaining EC-only part) comprising of approx. ede958b + subset of 01c319d What do you think? |
Very good idea, that also makes review easier. Can the EC part probably be split even more? |
a1ecab2 to
90fcc1f
Compare
90fcc1f to
86c2496
Compare
|
We need a ltm-1.0 package backported to trusty to fix these build failures. |
ba9ce92 to
5a43bcb
Compare
5a43bcb to
f5a6aa2
Compare
|
I have split this PR and my branch
So basically current There fore I am closing this PR, please move futher discussion to #236 + #187 |
This PR is related to #34