aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | Fix warnings from clangs -Wdocumentation flagJack Lloyd2017-07-285-8/+4
|/
* Merge GH #1093 In EC keys, use OID encoding if possibleJack Lloyd2017-07-031-6/+16
|\
| * ECC: use OID encoding if possiblePatrick Wildt2017-06-301-6/+16
| | | | | | | | | | | | Instead of explicitly encoding the domain, encode them with the OID if the OID is available. This makes the ecdsa_sign test run with OpenSSL, since OpenSSL needs the OID explicitly set.
* | escape \Z in doxygen comment causing doxygen warning (and in turn error), ↵Zoltan Gyarmati2017-07-011-1/+1
| | | | | | | | fixes #1102
* | Remove debug printsJack Lloyd2017-06-301-17/+1
| |
* | Add SM2 signature schemeJack Lloyd2017-06-296-1/+378
| | | | | | | | | | | | From https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02 This is a contribution from Ribose Inc (@riboseinc).
* | Add a check in EC_Group encoding for OID being setJack Lloyd2017-06-291-0/+6
|/ | | | Otherwise encoding would fail with an obtuse error message.
* Bump x25519 version in light of GH #1076 format changeJack Lloyd2017-06-211-1/+1
|
* Replaced USE_NULL_PARAM (0x05 0x00) by an empty vector (nothing)Francis Dupont2017-06-122-2/+8
|
* Fixed private key codeFrancis Dupont2017-06-124-25/+14
|
* Fixed public key code for *25519Francis Dupont2017-06-122-18/+4
|
* Added Curve25519_PrivateKey constructor from secret_keyFrancis Dupont2017-06-121-0/+12
|
* Fix 32-bit error in Ed25519Jack Lloyd2017-06-093-24/+21
| | | | Blamed VC miscompilation but actually a bug on my part.
* Add missing overridesJack Lloyd2017-06-081-2/+2
|
* Disable Ed25519 under Visual C++Jack Lloyd2017-06-081-0/+7
| | | | Miscompiles on x86-32, even with VS2017
* Fix inverted conditionalJack Lloyd2017-06-081-1/+1
|
* Avoid move operators in MSVC2013Jack Lloyd2017-06-071-2/+6
|
* Add Ed25519 key type and testsJack Lloyd2017-06-074-24/+380
| | | | This work was sponsored by Ribose Inc
* Add Ed25519 implementation based on SUPERCOP ref10Jack Lloyd2017-06-079-0/+4379
| | | | This work was sponsored by Ribose Inc
* Maintainer mode fixesJack Lloyd2017-05-181-0/+5
|
* Generate private RSA key with OpenSSL.Alexander Bluhm2017-04-302-2/+41
| | | | | Implement RSA private key generation with RSA_generate_key_ex(). Make PK_Key_Generation_Test iterate over all providers.
* Remove stray semicolonJack Lloyd2017-04-041-1/+1
|
* Content:Tomasz Frydrych2017-04-0335-100/+84
| | | | | | | | | * fixes for deprecated constructions in c++11 and later (explicit rule of 3/5 or implicit rule of 0 and other violations) * `default` specifier instead of `{}` in some places(probably all) * removal of unreachable code (for example `return` after `throw`) * removal of compilation unit only visible, but not used functions * fix for `throw()` specifier - used instead `BOTAN_NOEXCEPT` * removed not needed semicolons
* Remove "Dirty hack" for multiple defines in lex_me_harder()Simon Warta2017-04-0226-26/+78
|
* Fix Doxygen comment errorsJack Lloyd2017-03-311-1/+3
| | | | [ci skip]
* Merge GH #899 Add ability to specify iterations when encrypting a private keyJack Lloyd2017-03-294-14/+277
|\
| * Add ability to specify iterations when encrypting a private keyJack Lloyd2017-02-264-14/+277
| | | | | | | | GH #896
* | Merge GH #902 Extend EC_PublicKey check, add EC_Group check, ECC invalid key ↵Jack Lloyd2017-03-023-3/+79
|\ \ | |/ |/| | | tests
| * verify ec domain in EC_PublicKey::check_keyNever2017-02-281-1/+6
| |