aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/gost_3410
Commit message (Collapse)AuthorAgeFilesLines
* Replace PointGFp::check_invaraints, which would either return silentlylloyd2010-03-191-8/+4
| | | | | | | | | | | or throw an exception, with PointGFp::on_the_curve, which returns a bool. Update callers. This showed several cases where check_invaraints was being called multiple times, for instance when decoding a point with OS2ECP, check_invaraints was called; many callers of OS2ECP would then call check_invaraints again on the same object.
* Add a couple of verification tests for GOST 34.10lloyd2010-03-161-3/+16
| | | | | | | | | | | Generating the test vectors found yet another inane (and, of course, undocumented) behavior in the GOST implementation included in OpenSSL; it treats the hash inputs as little endian. Just out of curiousity, I checked RFC 5832, which supposedly specifies this algorithm; not a peep about endian conversions. The more I deal with standards coming out of the CryptoPro people, the less confidence I have in them.
* Remove iostream/stdio includeslloyd2010-03-131-3/+0
|
* Fix GOST 34.10 pub key loading (uses little endian format, what the fsck?)lloyd2010-03-131-6/+25
|
* Fix GOST, wasn't getting found in enginelloyd2010-03-132-4/+4
|
* Remove the now no-op classes PK_Encrypting_Key,lloyd2010-03-081-4/+2
| | | | | PK_Decrypting_Key, PK_Signing_Key, PK_Verifying_with_MR_Key, and PK_Verifying_wo_MR_Key.
* Constify sign and verify opslloyd2010-03-052-6/+5
|
* Remove sign and verify ops from key typeslloyd2010-03-052-43/+0
|
* Rename PK_Ops::Signature_Operation to PK_Ops::Signaturelloyd2010-03-051-1/+1
| | | | Rename PK_Ops::KA_Operation to PK_Ops::Key_Agreement
* Add verification ops for all signature key typeslloyd2010-03-052-3/+62
|
* Remove the sign() operation from the public key objects, totally replacedlloyd2010-03-052-49/+0
| | | | | | by using the ops. Add real ECDSA test vectors (two found in ANSI X9.62)
* Add signature generation operation classes. Remove sign() fromlloyd2010-03-052-1/+57
| | | | | | PK_Signing_Key, though for the moment the class remains because there are a few pieces of code that use it to detect if signatures are supported, or for passing to functions in look_pk
* 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).