[email protected] (Niels Möller) writes:

> Nikos Mavrogiannopoulos <[email protected]> writes:
>
>> In the master branch you break the ABI anyway, so it may be a good time
>> to introduce that. Otherwise you may simply introduce new functions for
>> the new structures and leave the old API intact.
>
> I think I can do that *almost* without breaking source-level
> compatibility. API draft:
>
> New structs:
>
>   struct dsa_params
>   {  
>     /* Modulo */
>     mpz_t p;
>   
>     /* Group order */
>     mpz_t q;
>   
>     /* Generator */
>     mpz_t g;
>   };
>
>   struct dsa_value
>   {
>     const struct dsa_params *params;
>     /* For private keys, represents an exponent (0 < x < q). For public
>        keys, represents a group element, 0 < x < p) */
>     mpz_t x;
>   };           

I have now implemented this and pushed it to the dsa-reorg branch in the
repo. Comments appreciated.

It remains to convert the function that convert dsa keys to and from
strings using sexp or asn.1 der formatting. I'm not sure if we need to
maintain any source-level backwards compatibility there. And to add
tests using the new interface.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
_______________________________________________
nettle-bugs mailing list
[email protected]
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to