Граф коммитов

38 Коммитов

Автор SHA1 Сообщение Дата
Amaury Chamayou 942786003c
Update fmtlib (#1148) 2020-05-06 14:03:17 +01:00
Eddy Ashton 94b0c4df66
Fail on SAN errors, and fix SAN errors (#1022) 2020-04-01 23:22:55 +01:00
Alex 6f7b4dcbfc
Enable 2 round trip receipts (#999) 2020-04-01 10:38:46 +01:00
Eddy Ashton bfb341bb2f
Rename files for consistency (#989) 2020-03-25 16:02:04 +00:00
Eddy Ashton bd8619f2f6
Improve install with exported options (#986) 2020-03-25 14:50:30 +00:00
Julien Maffre 101da50851
Users' quote verification (#972) 2020-03-23 11:58:14 +00:00
Julien Maffre 7cb881bf7a
Members key share retrieval, decryption and submission (#932) 2020-03-11 08:39:20 +00:00
Eddy Ashton a4f8437c4d
Support non-JSON-RPC payloads (#852) 2020-02-25 14:35:53 +00:00
Julien Maffre 86c057b246
Encrypt each share under member's public key (cryptobox) (#872) 2020-02-21 11:39:09 +00:00
Julien Maffre 22f36b327a
Split keypair.h (#828) 2020-02-11 17:12:03 +00:00
Julien Maffre 6729fc0b4f
Shamir Secret Sharing library in CCF (#810) 2020-02-07 09:15:54 +00:00
Amaury Chamayou f8dadc0a44
Remove TODOs (#790) 2020-02-06 12:30:30 +00:00
Julien Maffre 68bba1ac76
Better hostname handling (#768) 2020-01-31 13:20:30 +00:00
Eddy Ashton fba15ed4cb
Install all headers and export CCF targets (#742) 2020-01-29 15:09:28 +00:00
Julien Maffre 74e9a55743
Ledger rekey RPC (#699) 2020-01-20 13:47:03 +00:00
olgavrou 5f9078b6bb
One keypair (#685) 2020-01-14 10:17:38 +00:00
Julien Maffre 517e6b1539
Prevent replay attacks of node-to-node messages (#665) 2020-01-06 13:03:23 +00:00
Eddy Ashton 5624c7d68a
HTTP C++ client (#622) 2019-12-10 14:42:01 +00:00
Julien Maffre 88d9e62834 Support for HTTP signature (#611) 2019-12-06 16:56:16 +00:00
Julien Maffre 652a08e285
Remove keygenerator C++ utility (#605) 2019-12-03 10:14:51 +00:00
Julien Maffre e6186110fe
Support for IPv6 (#588) 2019-11-25 18:09:49 +00:00
Julien Maffre 05d3a89b1e
Node certificate endorsement and TLS authentication changes (#581) 2019-11-25 12:11:07 +00:00
Julien Maffre 2dcf7354b8
Support for HTTP in the CI (#550) 2019-11-13 09:54:32 +00:00
Eddy Ashton f50568085b
Perf result tweaks (#425)
* tls_bench uses mbedtls verification when appropriate

* Bitcoin verification via KP uses Bitcoin impl

* Sanitise perf test ranges

* Remove unused public key

* Verify with public key, as end users will

* Return structured histogram buckets

* Tidy tx rates formatting

* Build ASCII histogram

* Correct samples count

* Move newline

* Reduce quiescence wait

* Don't oversell small histograms
2019-10-09 18:21:22 +01:00
Julien Maffre 0501a1e633
Fix spurious fail log messages (#389) 2019-09-23 17:48:49 +01:00
Eddy Ashton e60585e191
Remove debug prints (#348)
* Remove debug prints

* Undelete

* clang-format
2019-09-03 14:31:44 +01:00
Julien Maffre 6fe6254e83
Light genesis (#318) 2019-08-28 10:57:45 +01:00
Amaury Chamayou bbec213e69
OE upgrade (#308) 2019-08-16 19:52:55 +01:00
Eddy Ashton 3562c05470
Expose recoverable signatures, tidy keypair (#276)
* mbedtls writes with null byte, don't add another

* Don't return const context, its unusable

* Add some temporary hacky accessors

* Set secp256k1 illegal callback

* Pem holds a string

* Distinguish string pems from other data

* Recoverable signatures in keypair.h

* Catch awkward failure states

* Renames

* clang-format

* Wrap secp256k1_context so it is destroyed on error

* KeyPair inherits from PublicKey

* Feedback, name and document signature size
2019-07-31 12:35:08 +01:00
Eddy Ashton 1c56672439
Add SAN and coverage builds in Azure Pipelines (#253)
* Test: Add a coverage build to VSTS, on Microsoft-hosted pool

* Remove .circleci

* Restore main CI yml

* Split publish/download build into separate templates

* Add a no-sgx VSTS CI config

* Fix yml typo

* Remove CircleCI badge

* Early venv creation is part of publish_build

* Add debugging steps to Coverage build

* Roll static_checks into Coverage build

* Do our debugging ON FAILURE

* Restore missing label

* Add docker options, dedicated SigIll hunting test

* Explicitly report missing RDSEED support

* Remove the same typo, again

* Add CMake option for software entropy, enable by default

* yaml fixes

* Re-enable SAN build

* Duh

* Print sanity check of entropy implementation

* cat /etc/hosts

* Print CMake config

* Old school

* Publish all ports

* Run all coverage and SAN tests

* Remove prints

* Use gdb to print backtrace on SIG ILL

* Stop building Debug

* Quit when gdb is finished

* SOFTWARE_ENTROPY off by default

* cpuinfo on the SIG ILL agent

* Just run keyexchange directly

* TEMP: Disable other jobs

* Re-enable main jobs, cpuinfo in build

* Push coverage

* Remove SOFTWARE_ENTROPY option

* Push from correct workingDirectory

* Revert "Remove CircleCI badge"

This reverts commit 5202fe7c95.

* Revert "Remove .circleci"

This reverts commit 413883d9e7.

* Add comment for --publish-all option

* Print CMake config after building

* Use yaml anchor to avoid duplicating exclude paths

* Remove anchors - unsupported by VSTS

* Move comment to first use of --publish-all

* get_data() is used as MbedtlsEntropy, so return an MbedtlsEntropy

* Revert "get_data() is used as MbedtlsEntropy, so return an MbedtlsEntropy"

This reverts commit 03bc3d0750.

* Print actual error messages

* Update entropy.h

* inline

* Remove debug hack
2019-07-17 17:57:57 +01:00
Roy Schuster 86161bed99
Update entropy.h (#258)
Fix #255
2019-07-17 13:37:22 +01:00
Roy Schuster b6d30494b9
Entropy detection during runtime (#247)
Selecting the suitable random number generation method
2019-07-15 14:35:20 +01:00
Eddy Ashton 0f3fa033d2
Support multiple crypto curves (#243)
* Sketch CurveImpl enum, replace macro definitions with templates

* Replace use of MD_TYPE and HASH macros with templates

* Replace HASH macro

* WIP

* Remove remaining compile-disabled code from keypair.h

* Expose CurveImpl, correct 256k1_bitcoin params

* Test all supported curves

* Add test that wrong curve fails to validate

* verify(vector, vector) should delegate, not reimplement

* Corrupt more, to ensure we affect content not padding

* Rename CURVE_CHOICE options to be LEDGER_CURVE_CHOICE

* LEDGER_CURVE_CHOICE determines default_curve_choice

* Proof-of-concept - factories for virtual implementation

* Virtualise PublicKey

* Re-enable other tests

* Remove templated CurveParameters

* Add labels, test for wrong curve, wrong impl

* Correct comment

* Delegate sign(CBuffer), reducing code duplication

* Remove TODO enum

* tls_bench compares curves for signing

* Extract make_contents

* tls_bench does comparison of all supported curves

* Tidy

* Temporary verbose logging of ecp group ID

* Produce standard (non-recoverable) signatures by default, for compatibility

* Fix curve logging, add tests of key transfer across implementations

* Verify with non-recoverable sigs too

* Log inconsistent failing cases

* Correct implementation substitutability test

* Normalize secp256k1 signatures - they may  have come from mbedtls

* Re-order picobench results for readability

* Add some secp256k1 link dependencies

* Unprotect constructors - there are legitimate uses for direct construction

* Verifier curve type is parsed from cert

* history_bench builds

* Reminder TODO comment

* frontend_test builds and passes

* Clients compile

* genesisgenerator compiles

* membervoting_test builds

* Fix sign_hash, sign/verify ack data normally

* Remove unneeded CurveParams entirely

Detect PublicKey type

Simplify construction to minimum

* Correct test with new API

* verify_hash via publickey, test sign_hash and verify_hash

* Include tests

* Update to latest signature

* Ditto

* Update function signatures for people with raw data

* Fix history calls

* When constructing from explicit key, don't pass curve too

* API updates

* Fix nodestate

* inline

* EVERYTHING BUILDS

* Tidy cmake link args

* Remove unnecessary direct use of mbedtls_ecdsa_*

* Remove uint8_t restriction in sig_size

* tls_bench actually compares relevant hash operations

* bitcoin preference doesn't need to be a macro

* Standardise use of use_bitcoin_impl

* clang-format

* Test now uses distinct manual hash operation

CHECK rather than REQUIRE

* Rename LEDGER_curve to SERVICE_IDENTITY_curve

* use fmtlib

* Let mbedtls determine message digest size/function

* Add details to all thrown errors

* Remove parameter packs, document use_bitcoin_impl

* Name magic constant, extract parse_secp256k_bc
2019-07-12 11:12:05 +01:00
Roy Schuster 1dab271820
Reverted secp256k1 verification to use public key from cert (#235)
* Reverted secp256k1 verification to use public key from cert
2019-07-09 15:25:16 +01:00
Roy Schuster 2025258d75
Secp256k1 bc verify using embedded signature (#213)
* Added support for secp256k1 verification using the embedded signature
2019-07-03 15:15:21 +01:00
Eddy Ashton d19f0b368f
Friendlier formatting of log messages (#179)
* Stop repeating FMT_HEADER_ONLY

* Remove unnecessary format separator

* Add LOG_*_FMT macros

* Many replacements, mostly LOG_INFO > LOG_INFO_FMT

* Finish nodestate.h

* Fix typos

* Halfway through raft.h

* LOG_FATAL > LOG_FATAL_FMT

* Prefer continue to empty while, for readability

* Replace all LOGs in tcp.h

* Replace remaining LOG_TRACEs

* Add picobench tests comparing LOG_DEBUG with LOG_DEBUG_FMT

* Simplify string-only logs

* Another batch of renames

* Replace in keypair.h

* Include ostream.h - we defined operator<< and want to use it

* Clarify comments

* Replace in kv.h

* Replacements in rpcconnections.h

* Replacements in nodeconnections.h

* Final pass on LOG_FAILs

* Add missing brackets noticed in review
2019-06-19 17:51:45 +01:00
Eddy Ashton 301a201c15
Check cpp format (#37)
* check.format.sh runs on cpp files, clarify -or argument

* Remove suffix so --assume-filename works as intended

* Run clang-format over cpp files
2019-05-09 09:05:13 +01:00
Amaury Chamayou b05da63d5c Initial file import 2019-04-26 16:27:27 +01:00