aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey
Commit message (Collapse)AuthorAgeFilesLines
* Address various GCC warningsJack Lloyd2017-10-061-1/+1
| | | | | Things like -Wconversion and -Wuseless-cast that are noisy and not on by default.
* Add wrappers for reinterpret_cast between char* and uint8_t*Jack Lloyd2017-10-031-4/+4
| | | | | | | Generally speaking reinterpret_cast is sketchy stuff. But the special case of char*/uint8_t* is both common and safe. By isolating those, the remaining (likely sketchy) cases are easier to grep for.
* Remove unnecessary virtuals from final classesJack Lloyd2017-10-025-8/+4
| | | | Found with Sonar
* Make m_emsa in PK_{Signature,Verification}_with_EMSA privateJack Lloyd2017-10-022-4/+7
|
* Remove redundant "virtual override" declarations.Jack Lloyd2017-10-027-33/+31
|
* Use explicit :: or std:: to refer to functions in namespacesJack Lloyd2017-10-011-1/+1
|
* Avoid -size_tJack Lloyd2017-09-301-1/+1
|
* Use class instead of struct for objects with member functionsJack Lloyd2017-09-303-5/+6
| | | | Flagged by Sonar and quite reasonable
* Include pk_keys.h in pkcs8.h and x509_key.hJack Lloyd2017-09-292-2/+2
| | | | Not strictly required but seems likely to cause problems for applications.
* Fixes for MSVCJack Lloyd2017-09-281-0/+1
| | | | BOTAN_UNUSED "uses" the RNG :/
* Further header cleanupsJack Lloyd2017-09-283-3/+12
|
* Add variants of PKCS8::load_key that don't require an RNG argumentJack Lloyd2017-09-282-32/+112
| | | | | It's not used and only there for compat with existing callers, but no reason we can't offer a version that doesn't require it.
* Header cleanupsJack Lloyd2017-09-283-3/+1
|
* Missing includeJack Lloyd2017-09-241-0/+1
|
* Further build/test fixes for restricted configurationsJack Lloyd2017-09-243-0/+11
|
* More build fixesJack Lloyd2017-09-241-0/+1
|
* More header cleanupsJack Lloyd2017-09-237-1/+7
|
* Fixes for headers missing in certain configurationsJack Lloyd2017-09-231-0/+1
|
* Apply final annotations to the library alsoJack Lloyd2017-09-2243-64/+64
| | | | | Done by a perl script which converted all classes to final, followed by selective reversion where it caused compilation failures.
* Another missing includeJack Lloyd2017-09-211-0/+1
| | | | For whatever reason only seen on the Kullo OS X build
* More include header cleanupsJack Lloyd2017-09-2132-30/+29
|
* Header file cleanupsJack Lloyd2017-09-213-0/+3
| | | | Some help from include-what-you-use
* Clean up header includesJack Lloyd2017-09-2115-31/+13
| | | | | | | Avoid including build.h or assert.h directly, instead always take them though types.h Avoid math.h in favor of cmath
* Update SM2 to use ASN.1 encoding for ciphertextsJack Lloyd2017-09-202-27/+32
| | | | | | | | | There are in fact 3 different variations of SM2 standard, first C1||C2||C3, then C1||C3||C2, then (most recently) an ASN.1 encoding. This makes us compatible with GmSSL This work was sponsored by Ribose Inc (@riboseinc).
* Avoid using double underscore in variable namesJack Lloyd2017-09-203-11/+10
| | | | | | | | Reserved identifiers, per C++ standard GH #512 [ci skip]
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-2065-130/+130
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Complete the final annotation changesJack Lloyd2017-09-197-16/+17
|
* Add API stability annotations.Jack Lloyd2017-09-1938-107/+107
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Avoid old style casts in Ed25519Jack Lloyd2017-09-172-270/+262
|
* Use constant_time_compare instead of same_memJack Lloyd2017-09-164-4/+4
| | | | New name, same great operation
* Remove inner/outer OID check in EC_PrivateKey ctorRené Korthaus2017-09-131-3/+0
| | | | | | | | RFC 5915 mandates that the OID of an ECDSA ECPrivateKey shall be id-ecPublicKey with the named curve as the parameters. ECPrivateKey may contain the named curve OID, too, which is compared to id-ecPublicKey. Such keys could not be loaded. We remove this check and add a test vector from strongswan.
* Change SM2 encryption to match updated standard.Jack Lloyd2017-09-101-5/+5
| | | | | | | | Unfortunately it seems the SM2 format changed between 2010 and 2012, now the ciphertext is C1 || C3 || C2. Unfortunate no matter how you slice it, but at least it's easy to convert from one form to another.
* Bump version for SM2Jack Lloyd2017-09-071-1/+1
| | | | | | To reflect support for arbitrary hashes [ci skip]
* Support arbitrary hashes for SM2 signaturesJack Lloyd2017-09-061-7/+37
| | | | This is a contribution from Ribose Inc
* Remove unused memberJack Lloyd2017-09-061-1/+0
|
* Support arbitrary hashes for SM2 encryptionJack Lloyd2017-09-051-12/+17
| | | | This is a contribution from Ribose Inc.
* Avoid g_ prefix on local variableJack Lloyd2017-09-031-3/+3
| | | | Reserving it for globals so they are easy to grep for
* Clean up use of <limits> headerJack Lloyd2017-09-037-14/+5
| | | | Don't include it where it is not needed, included it where it is used.
* More MSVC warnings fixesJack Lloyd2017-08-313-4/+4
|
* Fix various MSVC warningsJack Lloyd2017-08-314-4/+4
| | | | Based on VC2017 output
* Slight cleanup in Curve25519_PrivateKey constructorJack Lloyd2017-08-291-8/+6
|
* Avoid having variable named m_emsa twice in class hierarchyJack Lloyd2017-08-292-8/+16
| | | | | | | | In fact the variable was only used if we use deterministic nonces, and just to extract the hash name. So just do that once, and only if we are not using random nonces. Flagged by Sonar
* Avoid `throw new Exception`Jack Lloyd2017-08-291-1/+1
| | | | Caught by Sonar, once I managed to wade through the noise.
* Newhope cleanupsJack Lloyd2017-08-182-663/+668
| | | | Formatting, use size_t instead of int, etc
* Silence clang warning in create_private_key().Alexander Bluhm2017-08-131-1/+1
| | | | | | If compiled with OpenSSL, clang emitted the warning "using the result of an assignment as a condition without parentheses". Putting parentheses around the assignment fixes this.
* When creating an EC curve with default params, use algo-specific curveJack Lloyd2017-08-041-1/+17
| | | | | Eg previously ./botan keygen --algo=GOST-34.10 would create a GOST-34.10 curve over P-256, probably not useful in most cases.
* Add SM2 encryption to FFIJack Lloyd2017-08-041-0/+8
| | | | Also add hooks for keygen, etc
* Add SM2 encryption schemeJack Lloyd2017-08-045-11/+340
| | | | This is a contribution from Ribose Inc (@riboseinc)
* Merge GH #1094 Add initial BearSSL providerJack Lloyd2017-08-021-0/+34
|\
| * BearSSL: Support for ECDSAPatrick Wildt2017-07-051-0/+34
| | | | | | | | | | | | This commit adds support for ECDSA using BearSSL as a backend. This means we can test BearSSL's ECDSA algorithms using the extensive Botan testsuite.