aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/gost_3410
Commit message (Collapse)AuthorAgeFilesLines
* Fix GOST pubkey encoding when x.bytes() != y.bytes()lloyd2010-03-041-1/+1
|
* Fix exception textlloyd2010-03-041-1/+1
|
* Quite the hack, here.lloyd2010-03-041-0/+3
| | | | | | | | | | | | | | | | | 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().
* Fix GOST 34.10 pubkey encodinglloyd2010-03-042-3/+13
|
* Remove load hooks from ECC classes, unusedlloyd2010-03-041-1/+8
|
* Add similar decoding constructors to the private keyslloyd2010-03-041-5/+4
|
* Remove X509_Decoder. Fix GOST-34.10 DER constructor (was default to normal ECC)lloyd2010-03-042-41/+14
|
* Add a new constructor to each public key algorithm (only the publiclloyd2010-03-041-15/+19
| | | | | | | keys so far, private keys not changed) that takes an AlgorithmIdentifier and a MemoryRegion<byte>&. This performs the X.509 decoding. It is not possible anymore to create uninitialized PK objects.
* Add a new function to public key x509_subject_public_key which returnslloyd2010-03-042-33/+10
| | | | | what x509_encoder()->key_bits() used to return. This is much simpler than using the explicit encoder objects. Remove X509_Encoder entirely.
* Small cleanupslloyd2010-03-022-22/+13
|
* Add some simple constructors to the EC_ base key types to simplifylloyd2010-03-022-28/+5
| | | | the various implementations
* Remove auto_ptr from ECC key typeslloyd2010-03-022-167/+25
|
* Remove a fairly useless member of EC_PublicKey that was only used forlloyd2010-03-022-44/+1
| | | | | | | handling ImplicitCA ECDSA keys in the CVC code. Currently dealt with in CVC by simply commenting out the calls - CVC is already pretty broken and I'd much rather have ECC sane and under control and CVC totally broken than ECC remaining in its current state.
* Kill get_EC_Dom_Pars_by_oidlloyd2010-03-011-3/+1
|
* Clean up EC_Domain_Paramslloyd2010-03-011-5/+3
|
* Move contents of gfpmath to numbertheory. Adjust dependencies.lloyd2010-02-251-1/+0
|
* Convert PointGFp::get_affine_{x,y} to return just the BigInt valuelloyd2010-02-251-5/+5
|
* Convert 3-arg constructoor of PointGFp to take BigInts instead oflloyd2010-02-251-2/+1
| | | | | | GFpElements. Clean up OS2ECP
* Remove PointGFp::mult_this_securelloyd2010-02-241-5/+4
|
* Remove debug printlloyd2010-02-241-5/+0
|
* Of _course_, GOST 34.10 uses a non-standard X.509 encoding, and _of course_lloyd2009-12-122-5/+105
| | | | | | | | it's ridiculously poorly thought out. The PKCS #8 format isn't documented anywhere I can find, so I'm declaring the standard GOST-34.10-2001 to be identical to the ECDSA/ECDH format, thus defining the problem away. :)
* Add an implementation of GOST 34.10-2001 as described inlloyd2009-11-193-0/+434
draft-dolmatov-cryptocom-gost34102001-06 Known problem: GOST's X.509 (and PKCS #8?) formats are different from ECDSA. ECDSA uses compressed points, GOST uses a completely raw pair of points (with, OF COURSE, no leading uncompressed pair identifier, because using something that already exists would just be too much).