Skip to content

Conversation

@karel-m
Copy link
Member

@karel-m karel-m commented Apr 17, 2015

This PR is related to #34

@karel-m karel-m mentioned this pull request Apr 17, 2015
@sjaeckel
Copy link
Member

I think the build error can be fixed in several ways:

  1. by making point compression optional and disabling it by default
  2. creating a new release of libtommath with the required additional algorithm, waiting until it's published
  3. building libtommath from the git repositories
  4. combining 1&3 and creating a special recipe with point compression enabled and build ltm from git

I would prefer going for 2 or 4

@karel-m
Copy link
Member Author

karel-m commented Apr 18, 2015

Or we can introduce in libtommath something like LTM_VERSION (e.g. 0x0042 for version 0.42) and then in libtomcrypt's ltm_desc.c:

/* 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
}

@sjaeckel sjaeckel force-pushed the miko-ecc-enhancements branch from 53cc5ce to 0d2d2cb Compare September 10, 2015 21:49
@karel-m karel-m force-pushed the miko-ecc-enhancements branch from 0d2d2cb to d346161 Compare January 10, 2016 19:29
@karel-m karel-m force-pushed the miko-ecc-enhancements branch from 0609803 to 637be09 Compare July 7, 2016 14:00
@sjaeckel sjaeckel modified the milestone: v2.0.0 Feb 21, 2017
@karel-m karel-m force-pushed the miko-ecc-enhancements branch from 637be09 to 3f8dbbf Compare March 1, 2017 23:15
@karel-m karel-m self-assigned this Mar 1, 2017
@karel-m karel-m force-pushed the miko-ecc-enhancements branch from 97e84e6 to 0742fd4 Compare March 2, 2017 19:03
@karel-m karel-m force-pushed the miko-ecc-enhancements branch 2 times, most recently from c155df3 to 530cef1 Compare March 14, 2017 17:24
@karel-m
Copy link
Member Author

karel-m commented Mar 14, 2017

@fperrad may I ask you for running your linting machine on miko-ecc-enhancements branch? Thanks.

@fperrad
Copy link
Contributor

fperrad commented Mar 15, 2017

@karel-m linting issues:

missing prototypes in tomcrypt.h : ecc_sign_hash_ex & ecc_verify_hash_ex

Info 765: external 'ecc_sign_hash_ex(const unsigned char *, unsigned long, unsigned char *, unsigned long *, union Prng_state *, int, struct ecc_key *, int)' (line 24, file src/pk/ecc/ecc_sign_hash.c) could be made static
Info 765: external 'ecc_verify_hash_ex(const unsigned char *, unsigned long, const unsigned char *, unsigned long, int *, struct ecc_key *, int)' (line 34, file src/pk/ecc/ecc_verify_hash.c) could be made static

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

@karel-m karel-m force-pushed the miko-ecc-enhancements branch from 573f52a to 26989ec Compare March 15, 2017 12:09
@sjaeckel
Copy link
Member

can we somehow bring the coverage up again?

@karel-m
Copy link
Member Author

karel-m commented Mar 15, 2017

can we somehow bring the coverage up again?

What has to be done to bring it up?

@sjaeckel
Copy link
Member

  1. These aren't tested at all

     ecc_sign_hash_rfc7518()
     ecc_verify_hash_rfc7518()
    
  2. There are no tests for all the added functionality

     pk_get_oid()
    
  3. The new tag field in DER/ltc_asn1_list

  4. The case a==NULL in some of the code paths that are handled specially

@karel-m
Copy link
Member Author

karel-m commented Mar 15, 2017

Oh yes, tests, I know.

@karel-m karel-m force-pushed the miko-ecc-enhancements branch 2 times, most recently from e960f43 to 1caf67f Compare March 29, 2017 07:41
@coveralls
Copy link

Coverage Status

Coverage decreased (-3.8%) to 83.635% when pulling 1caf67f on miko-ecc-enhancements into 1b81848 on develop.

case LTC_ASN1_CONTEXT_SPECIFIC:
case LTC_ASN1_EOL:
case LTC_ASN1_TELETEX_STRING:
default:
Copy link
Member

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

@karel-m karel-m force-pushed the miko-ecc-enhancements branch 2 times, most recently from bbee5e5 to c7c170d Compare April 4, 2017 07:36
@karel-m
Copy link
Member Author

karel-m commented Apr 4, 2017

@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?

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.5%) to 84.284% when pulling c7c170d on miko-ecc-enhancements into fbe7d22 on develop.

@sjaeckel
Copy link
Member

sjaeckel commented Apr 4, 2017

...splitting this PR into two parts: 1/ ASN.1 changes + 2/ EC-only stuf.

Very good idea, that also makes review easier. Can the EC part probably be split even more?

@sjaeckel sjaeckel modified the milestones: v1.18.0, next Jun 8, 2017
@karel-m karel-m force-pushed the miko-ecc-enhancements branch 3 times, most recently from a1ecab2 to 90fcc1f Compare June 15, 2017 05:11
@sjaeckel sjaeckel force-pushed the miko-ecc-enhancements branch from 90fcc1f to 86c2496 Compare June 15, 2017 08:37
@sjaeckel
Copy link
Member

We need a ltm-1.0 package backported to trusty to fix these build failures.
I had to remove the ltm from sid in #217 as I couldn't update clang otherwise...

@karel-m karel-m force-pushed the miko-ecc-enhancements branch from ba9ce92 to 5a43bcb Compare June 20, 2017 16:42
@karel-m karel-m force-pushed the miko-ecc-enhancements branch from 5a43bcb to f5a6aa2 Compare June 21, 2017 12:42
@karel-m
Copy link
Member Author

karel-m commented Jun 21, 2017

I have split this PR and my branch miko-ecc-enhancements to:

So basically current miko-ecc-enhancement is the same as pr/ecc-asn1-part

There fore I am closing this PR, please move futher discussion to #236 + #187

@karel-m karel-m closed this Jun 21, 2017
@karel-m karel-m deleted the miko-ecc-enhancements branch June 21, 2017 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants