Hello,
I'm polishing the GOST implementation for LibreSSL
(https://github.com/libressl-portable/openbsd/pull/6).
Currently there are three instances of ASN methods
and pmethods structures, because there three
different OIDs related to GOST public keys
(-2001, -2012, 256 bit, -2012 512 bit).
I think I can merge all of them. However I need
to store an additional NID (digest NID, which
is a part of public key parameters) together
with a _KEY instance. I see two possibilities.
First is to add a digest_nid field to EC_KEY
structure. Second is to add a
typedef struct {
EC_KEY *ec;
int digest_nid;
} GOST_KEY;
First way is a bit hackish. Second is clean but clumsy.
What would you prefer?
--
With best wishes
Dmitry