* Encapsulate initialization of DLCOracle.start() method
* Use internal WalletAppConfig.kmConf rather than passing in custom key manager parameters
* Add KeyManagerAppConfig.defaultAccountType
* Get all tests passing besides TrezorAddressTest
* Get TrezorAddressTest passing with provided entropy
* Add unit test to make sure we can always derive the seed
* Get docs compiling
* Fix dlcWalletTest test cases
* Add more test cases to keymanager
* Add the new configuration to the example configuration
* Add more test cases
* Remove coverage on 2.12 as it isn't accurate
* Rework DLCOracleAppConfig.start() to call kmConf.start() so the oracle can use entropy provided via bitcoin-s.conf
* Removed type parameter from PublicKey
* Deduplicated call to public key decompression in isFullyValid
* Fixed FieldElement
* Added CurveCoordinate to replace FieldElement in places where it was being misused
* Added edge case tests
* Removed ExecutionContext from ECKey
* Refactored ECPublicKey to remove compression state and introduced ECPublicKeyBytes to handle cases where serialization of input is important
* Fixed the rest of bitcoin-s so that it passes all tests
* Made all ECKeys into case classes
* Successfully added isFullyValid invariant to ECPublicKey!
* Fixed docs
* Added scaladocs and fixed a RpcPsbtResult bug
* Reject private keys of length < 32 and fix WIF parsing bug
* Replaced secp256k1 with secp256k1-zkp as submodule pointing to my java-bindings branch
* Built new binaries for schnorr signing and adaptor signing and integrated into LibSecp256k1CryptoRuntime
* Added public key compression function with tests, removed old adaptor signature point serializers
* Implemented ECDSA adaptor signatures in scala according to the most recent spec
* Added static test vectors for adaptor signing from spec
* Moved bouncy castle adaptor signing tests to .jvm
* Added scaladocs and responded to nits
* Added scaladocs with legends to spec naming
* Responded to Ben's review
* Fixed scala 2.12 compile issue
* Fixed BouncyCastle secKeyVerify
* Updated add-to-jni build instructions
* Updated secp256k1-zkp to target bitcoin-s-master
* Add windows binary (#14)
* Added Mac OS binaries
Co-authored-by: benthecarman <benthecarman@live.com>
* Silence scalajs warnings for org.bitcoins.crypto package
* Add comments
* Create 'facades' package, move all js facades into that package. Make the new -Wconf flags work with only scala 2.13.x
* Small cleanups
* Schnorr sigs for Scala.js
* fix build
* put BIP340 test vectors in a shared space
* remove teskit dependency, fix point edge cases
* fix build
* Adaptor signatures for Scala.jsr
* add some more tests
* add unit tests for point addition
* scaladoc
* add more public keys tests
* Add scaladoc
* Remove extra isCompressed flag on CryptoRuntime.toPublicKey() as it is inside of ECPrivateKey already
Co-authored-by: christewart <stewart.chris1234@gmail.com>
* Schnorr sigs for Scala.js
* fix build
* put BIP340 test vectors in a shared space
* remove teskit dependency, fix point edge cases
* fix build
* add unit tests for point addition
* scaladoc
* cleanup
* respond to the comments
* Fix usage of BitcoinSLogger
Co-authored-by: christewart <stewart.chris1234@gmail.com>
* Update all deps that failed because of bad build
* Revert jvmopts
* Try bumping jvmopts max heap size to get mac builds to work
* Double up timeout in ScriptGenerators
* Use Future.successful() in signFunction to try and reduce overload on executionContext
* Push to github to force re-run of CI
* Upgrade sbt to 1.4.9
* Move CryptoParams to shared crypto project, make BouncyCastleCryptoParams for bouncy castle specific things
* Rework build structure to work better with scalajs
* Add unit test to make sure CryptoParams & BouncyCastleCryptoParams are consistent
* Refactor crypto module to be compatible with Scala.js
* more changes
* some more changes
* abstract out Schnorr stuff
* abstract out adapter stuff
* cleanup
* some more cleanup
* fix build
* Removed references to ECPoint outside of .jvm scope
* remove references to ECPoint from the shared code
* cleanup
* remove cirlular dependencies
* more cleanup
* cleanup
* move SipHash to CryptoContext
* scaladoc
* scalafmt
Co-authored-by: nkohen <nadavk25@gmail.com>
* Add CryptoRuntime, extend it with CryptoUtil
* Remove direct usages of CryptoUtil in the core project, use CryptoTrait.cryptoRuntime
* Add JvmCryptoRuntime
* Take ben's suggestion so we don't need to modify anyting in core, h/t to ben
* Refactor ECPrivateKey.freshPrivateKey to use CryptoUtil.freshPrivateKey
* Remove CryptoTrait as it is no longer necessary
* Moved dlc data structures from commons to core
* Renamed DLC payout curve classes
* Split OutcomeValuePoint up into an ADT
* Added utility for computing Schnorr multiple-signature points
* Replaced tuples in RoundingIntervals with types
* Replaced tuples in DLCPayoutCurve with Indexed
* Fixed a compile bug
* Pulled down work from adaptor-dlc onto master
* Reverted some accidental deletions
* Removed unused import
* Added scaladocs
* Responded to Ben's review
* Added some scaladocs and invariants
* Responded to chris' review
* Responded to more review
* Added some comments
* Add Wallet State Descriptors
* Sync blocks while offline w/ bitcoind backend
* Add to WalletDbManagement
* Update db management test
* Respond to review
* Rename function
* Apply string factory to a bunch of easy things
* Refactor HDPath, ExtKey, and LnTagPrefix to use StringFactory
* Implemen StringFactory on LnHumanReadablePart, ScriptType, ServiceIdentifier
* Implement StringFactory on AesCrypt, NodeUri, AddressTag, PSBT, TxoState
* Fix failing tests, fix website compile
* Apply StringFactory to all ScriptOperations, ChannelState, Script Parsing
* Added signing with entropy to the JNI and implemented low R signing
* Added check for determinism of low R signing
* Cleaned up test
* Implemented signing with entropy in Bouncy Castle
* Added docs for signing with entropy
* Fixed things after rebase
* De-parallelized signLowR and added scaladoc warnings to signWithEntropy
* Update scalafmt-core to 2.6.0
* Upgrade scalafmt, fix all formatting errors
* Scalafmt on 2.12
* fix test
* More fixes
Co-authored-by: Ben Carman <benthecarman@live.com>
* Pulled down crypto things from dlc branch including: Schnorr data structures, Schnorr Bouncy Castle implementation, FieldElement, and tests for these things
* Call fromValidHex in CryptoUtil
* Add more optimizations, MultSignatureScriptPubKey.isMultiSignatureScriptPubKey() fails fast if it's not a valid multisig spk, also use more caching inside of Number's (UInt64, UInt32, etc)
* Fix shortChannelidTest
* Cache popular UInt64 numbers that are used in ScriptPubKey's. This reduces allocations which reduces memory usage
* Attempt to optimize block tests more to avoid timeouts
* Fix asm.tail bug
* Make parseRedeemScript just return a ScriptPubKey rather than a Try[ScriptPubKey]
* Make encoding a UInt64 to hex more efficient
* Cache Transaction.bytesSize so we don't need to serialize everything again to estimate the byteSize
* Refactor CryptoBytesUtil.addPadding() and it's usage in UInt64
* Use StringBuilder.append() rather than StringBuilder.addAll() which is not supported in scala 2.11 & 2.12
* Address nadav's code review
* Implemented parseDERLax signature parsing and bumped bouncy castle version to most recent
* implemented using iterators
* Factored out common functionality and added comments, it is readable now! Deleted C-like version in place of this one after property based tests showed them to be equivalent
* Made compatible with scala 2.12
* Make compatible with scala 2.11
* Added tests for lax DER signatures