|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GOST 34.10 public keys use a funky encoding. There is no standard for
PKCS #8 format private keys, so the obvious choice is to act exactly
the same as ECDSA/ECDH (following the rule of thumb that if you're
going to make up a random non-standard thing, at least try to copy
something that's standard for something else). However the public key
encoding uses a weird scheme for encoding the OID in the algorithm
identifier, which we don't want to use for the PKCS #8 encoding.
Add a new function to Private_Key, pkcs8_algorithm_identifier, which
by default just calls algorithm_identifier(). However
GOST_3410_PrivateKey overrides it, and calls
EC_PublicKey::algorithm_identifier(), basically skipping over the
virtual function hierarchy, so it doesn't pick up the funky format
from the public key's version of algorithm_identifier().
|