Kris Nuttycombe
3cec519ce4
scripted-diff: Update Zcash copyrights to 2023
...
-BEGIN VERIFY SCRIPT-
for party in "The Zcash developers" "The Bitcoin Core developers" "Bitcoin Developers"; do
sed -i"" -e "s#Copyright (c) \([0-9]\{4\}\)\(-[0-9]\{4\}\)\? $party#Copyright (c) \1-2023 $party#" COPYING
sed -i"" -e "s#\(.*\)\([0-9]\{4\}\)\(-[0-9]\{4\}\)\, $party#\1\2-2023, $party#" contrib/debian/copyright
done
sed -i"" -e "s/define(_COPYRIGHT_YEAR, [0-9]\{4\})/define(_COPYRIGHT_YEAR, 2023)/" configure.ac
sed -i"" -e "s/#define COPYRIGHT_YEAR [0-9]\{4\}/#define COPYRIGHT_YEAR 2023/" src/clientversion.h
git grep "^// Copyright (c) .* The Zcash developers" \
| awk -F ':' '{print $1}' \
| xargs -I {} sed -i"" -e "s#// Copyright (c) \([0-9]\{4\}\)\(-[0-9]\{4\}\)\? The Zcash developers#// Copyright (c) \1-2023 The Zcash developers#" {}
-END VERIFY SCRIPT-
2023-01-23 11:31:54 -07:00
Kris Nuttycombe
5ae1772d2b
scripted-diff: Update Zcash copyrights to 2022
...
-BEGIN VERIFY SCRIPT-
git grep "// Copyright (c) .* The Zcash developers" \
| awk -F ':' '{print $1}' \
| xargs -I {} sed -i"" -e "s#// Copyright (c) \([0-9]\{4\}\)\(-[0-9]\{4\}\)\? The Zcash developers#// Copyright (c) \1-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 16:47:12 -06:00
Kris Nuttycombe
0c38ad9200
Return std::optional<CExtKey> from CExtKey::Master
...
Master key generation is fallible, but the type of master
key generation did not previously reflect that the generated
key might be invalid.
2022-03-11 18:47:01 -07:00
Kris Nuttycombe
b67e62d977
Address comments from code review.
2021-10-29 13:38:36 -06:00
Kris Nuttycombe
2885ae7643
Derive transparent keys from mnemonic seed.
2021-10-19 17:51:14 -06:00
Kris Nuttycombe
83dee7e886
Adds basic unified spending key derivation.
...
Also, begin pruning Sapling key derivation down to the
minimal amount required to support the legacy Sapling
key derivation process.
2021-10-19 11:48:02 -06:00
Pavel Janík
48be374f68
Do not shadow variables
...
(cherry picked from commit 4731cab8fbff51a8178c85d572e2482040278616)
Zcash: Excluding changes to code we haven't backported.
2021-04-02 16:04:55 +13:00
Dimitris Apostolou
f459e43dc9
Update links
2020-12-13 11:24:44 +02:00
practicalswift
a3fbfe4efc
Improve readability by removing redundant casts to same type (on all platforms)
2020-09-25 14:56:20 +01:00
Jeremy Rubin
94f7ae6ce8
Fix subscript[0] potential bugs in key.cpp
2020-09-25 14:54:17 +01:00
Wladimir J. van der Laan
8d0f80f831
wallet: Get rid of LockObject and UnlockObject calls in key.h
...
Replace these with vectors allocated from the secure allocator.
This avoids mlock syscall churn on stack pages, as well as makes
it possible to get rid of these functions.
Please review this commit and the previous one carefully that
no `sizeof(vectortype)` remains in the memcpys and memcmps usage
(ick!), and `.data()` or `&vec[x]` is used as appropriate instead of
&vec.
2020-07-31 06:43:08 +01:00
Daira Hopwood
bc909a7a7f
Replace http with https: in links to the MIT license.
...
Also change MIT/X11 to just MIT, since no distinction was intended.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-18 15:26:01 +01:00
Jonas Schnelli
6cbe2c482c
add bip32 pubkey serialization
...
CExtPubKey should be serializable like CPubKey
2018-04-16 07:38:36 -06:00
Jack Grigg
c4c7c6630b
Scope the ECDSA constant sizes to CPubKey / CKey classes
2017-12-20 17:28:13 +00:00
Bruno Arueira
d2c1e4a807
Removes out bitcoin mention in favor for zcash
...
Bitcoin Core => Zcash
bitcoin address => Zcash address
bitcoinaddress => zcashaddress
Closes #1756
2017-10-04 17:05:30 -07:00
Jack Grigg
fd0d1c7d60
Ensure that ECDSA constant sizes are correctly-sized
2017-06-17 12:10:15 +12:00
Jack Grigg
1f5941062a
Remove redundant `= 0` initialisations
2017-06-17 12:10:14 +12:00
Jack Grigg
877964c82f
Specify ECDSA constant sizes as constants
2017-06-17 12:10:14 +12:00
Jack Grigg
c032f1b687
Add comments
2017-06-17 12:09:44 +12:00
Jack Grigg
50fa079748
Fix potential overflows in ECDSA DER parsers
2017-06-06 20:08:03 +12:00
Pieter Wuille
c1afe40a17
Update key.cpp to new secp256k1 API
2017-06-06 17:50:22 +12:00
Jack Grigg
207924a1d5
Remove OpenSSL PRNG reseeding
...
Per https://download.libsodium.org/doc/generating_random_data/ reseeding the
default libsodium PRNG is not required.
2017-01-23 17:06:54 +01:00
Wladimir J. van der Laan
6a877e870e
Merge pull request #6034
...
a574899
chaincodes: abstract away more chaincode behavior [squashme] replace struct CCainCode with a typedef uint256 ChainCode (Cory Fields)
8cf1485
Abstract chaincodes into CChainCode (Pieter Wuille)
2015-05-06 18:37:49 +02:00
Cory Fields
a574899671
chaincodes: abstract away more chaincode behavior
...
[squashme] replace struct CCainCode with a typedef uint256 ChainCode
2015-05-06 17:22:46 +02:00
Pieter Wuille
a56054be65
Update key.cpp to use new libsecp256k1
...
libsecp256k1's API changed, so update key.cpp to use it.
Libsecp256k1 now has explicit context objects, which makes it completely thread-safe.
In turn, keep an explicit context object in key.cpp, which is explicitly initialized
destroyed. This is not really pretty now, but it's more efficient than the static
initialized object in key.cpp (which made for example bitcoin-tx slow, as for most of
its calls, libsecp256k1 wasn't actually needed).
This also brings in the new blinding support in libsecp256k1. By passing in a random
seed, temporary variables during the elliptic curve computations are altered, in such
a way that if an attacker does not know the blind, observing the internal operations
leaks less information about the keys used. This was implemented by Greg Maxwell.
2015-05-04 14:45:34 +02:00
Pieter Wuille
8cf1485f3b
Abstract chaincodes into CChainCode
...
# Conflicts:
# src/key.cpp
# src/key.h
2015-05-02 11:17:16 +02:00
Pieter Wuille
437ada3e55
Switch test case signing to RFC6979 extra entropy
...
Instead of manually tweaking the deterministic nonce post-generation,
pass the test case number in as extra entropy to RFC6979.
2015-03-27 15:31:47 -07:00
Cory Fields
16a58a8644
keys: remove libsecp256k1 verification until it's actually supported
...
This was added a while ago for testing purposes, but was never intended to be
used. Remove it until upstream libsecp256k1 decides that verification is
stable/ready.
2015-03-02 11:31:43 -05:00
Pieter Wuille
1a9576de9d
Use libsecp256k1's RFC6979 implementation
2015-01-06 00:28:44 +01:00
Wladimir J. van der Laan
734f85c4f0
Use arith_uint256 where necessary
...
Also add conversion from/to uint256 where needed.
2015-01-05 15:45:35 +01:00
Wladimir J. van der Laan
4f1524966a
Replace direct use of 0 with SetNull and IsNull
...
Replace x=0 with .SetNull(),
x==0 with IsNull(), x!=0 with !IsNull().
Replace uses of uint256(0) with uint256().
2015-01-05 15:45:34 +01:00
Pieter Wuille
9a5cabf3da
Merge pull request #5508
...
146c0a7
Add RandAddSeedPerfmon to MakeNewKey (21E14)
2015-01-04 16:37:24 +01:00
sandakersmann
f914f1a746
Added "Core" to copyright headers
...
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-19 19:55:32 +01:00
21E14
146c0a7c5a
Add RandAddSeedPerfmon to MakeNewKey
2014-12-18 20:25:04 -05:00
Pieter Wuille
830ee48b59
Update Bitcoin for libsecp256k1 API change
2014-12-11 02:06:28 +01:00
Wladimir J. van der Laan
f0877f8b62
Merge pull request #5227
...
4cdaa95
Resize after succesful result (Pieter Wuille)
9d8604f
Header define style cleanups (Pieter Wuille)
a53fd41
Deterministic signing (Pieter Wuille)
3060e36
Add the RFC6979 PRNG (Pieter Wuille)
a8f5087
Add HMAC-SHA256 (Pieter Wuille)
36fa4a7
Split up crypto/sha2 (Pieter Wuille)
2014-12-01 14:57:58 +01:00
Pieter Wuille
4cdaa95a20
Resize after succesful result
2014-11-28 21:16:51 +01:00
Pieter Wuille
f321d6bfff
Add key generation/verification to ECC sanity check
2014-11-23 10:47:39 +01:00
Pieter Wuille
d0c41a7350
Add sanity check after key generation
...
Add a sanity check to prevent cosmic rays from flipping a bit in the
generated public key, or bugs in the elliptic curve code. This is
simply done by signing a (randomized) message, and verifying the
result.
2014-11-23 10:47:39 +01:00
Pieter Wuille
a53fd41485
Deterministic signing
2014-11-20 17:22:06 +01:00
Pieter Wuille
36fa4a78ac
Split up crypto/sha2
2014-11-20 17:22:02 +01:00
Pieter Wuille
dffb8f81b8
Use libsecp256k1 in key.cpp
2014-11-18 18:06:46 +01:00
Pieter Wuille
f4e0aefadc
Do signature-s negation inside the tests
...
To avoid the need for libsecp256k1 to expose such functionality.
2014-11-10 05:03:24 -08:00
Cory Fields
d2e74c55bd
boost: moveonly: split CPubKey and friends to new files
2014-10-31 01:19:37 -04:00
Cory Fields
78c228c6e5
boost: moveonly: move BIP32Hash to hash.h
2014-10-31 01:13:07 -04:00
Cory Fields
900078aeb4
boost: moveonly: create eccryptoverify.h|cpp and move helper functions there
...
Eventually (after 0.10) these files will hold the logic for crypto
verification routines, and CKey/CPubKey will call into them.
2014-10-31 01:13:07 -04:00
Michael Ford
2b173d3bcc
Update comments in keystore to be doxygen compatible
2014-10-28 12:06:59 +08:00
Michael Ford
ffd8eddab5
Update comments in key to be doxygen compatible
2014-10-28 12:02:25 +08:00
Cory Fields
50f71cd52e
boost: code movement only: split CECKey into separate files
2014-10-27 15:00:58 -04:00
Cory Fields
bdaec6abd3
boost: remove CPubKey dependency from CECKey. Follow-up of e405aa48
2014-10-27 14:39:32 -04:00