- Aug 22, 2019
-
-
Péter Szilágyi authored
-
- Aug 21, 2019
-
-
Péter Szilágyi authored
-
Piotr Dyraga authored
The precompile at 0x09 wraps the BLAKE2b F compression function: https://tools.ietf.org/html/rfc7693#section-3.2 The precompile requires 6 inputs tightly encoded, taking exactly 213 bytes, as explained below. - `rounds` - the number of rounds - 32-bit unsigned big-endian word - `h` - the state vector - 8 unsigned 64-bit little-endian words - `m` - the message block vector - 16 unsigned 64-bit little-endian words - `t_0, t_1` - offset counters - 2 unsigned 64-bit little-endian words - `f` - the final block indicator flag - 8-bit word [4 bytes for rounds][64 bytes for h][128 bytes for m][8 bytes for t_0] [8 bytes for t_1][1 byte for f] The boolean `f` parameter is considered as `true` if set to `1`. The boolean `f` parameter is considered as `false` if set to `0`. All other values yield an invalid encoding of `f` error. The precompile should compute the F function as specified in the RFC (https://tools.ietf.org/html/rfc7693#section-3.2) and return the updated state vector `h` with unchanged encoding (little-endian). See EIP-152 for details.
-
- Jul 22, 2019
-
-
Kitten King authored
-
- Jul 18, 2019
-
-
Felix Lange authored
-
- Jul 17, 2019
-
-
大彬 authored
-
- May 28, 2019
-
-
Antoine Rondelet authored
* Removed comment section referring to Cloudflare's bn curve parameters * Added comment to clarify the nature of the parameters * Changed value of xi to i+9
-
- May 25, 2019
-
-
Antoine Rondelet authored
* Added checks for nil pointers in Marshal functions * Set nil pointer to identity in GT before marshaling
-
- Feb 28, 2019
-
-
Péter Szilágyi authored
-
- Feb 27, 2019
-
-
Samuel Marks authored
-
- Feb 19, 2019
-
-
Jeremy Schlatter authored
Package crypto works with or without cgo, which is great. However, to make it work without cgo required setting the build tag `nocgo`. It's common to disable cgo by instead just setting the environment variable `CGO_ENABLED=0`. Setting this environment variable does _not_ implicitly set the build tag `nocgo`. So projects that try to build the crypto package with `CGO_ENABLED=0` will fail. I have done this myself several times. Until today, I had just assumed that this meant that this package requires cgo. But a small build tag change will make this case work. Instead of using `nocgo` and `!nocgo`, we can use `!cgo` and `cgo`, respectively. The `cgo` build tag is automatically set if cgo is enabled, and unset if it is disabled.
-
- Feb 18, 2019
-
-
Matthew Halpern authored
-
- Jan 04, 2019
-
-
Dave McGregor authored
-
- Dec 13, 2018
-
-
Shuai Qi authored
-
- Oct 04, 2018
-
-
Martin Holst Swende authored
* core/vm/runtim: benchmark create/create2 * core/vm: do less hashing in CREATE2 * core/vm: avoid storing jumpdest analysis for initcode * core/vm: avoid unneccesary lookups, remove unused fields * core/vm: go formatting tests * core/vm: save jumpdest analysis locally * core/vm: use common.Hash instead of nil, fix review comments * core/vm: removed type destinations * core/vm: correct check for empty hash * eth: more elegant api_tracer * core/vm: address review concerns
-
- Sep 25, 2018
-
-
Liang ZOU authored
-
- Sep 21, 2018
-
-
Payne authored
`(void)data;` may cause link error on Windows.
-
- Aug 27, 2018
-
-
Wenbiao Zheng authored
-
- Aug 20, 2018
-
-
Péter Szilágyi authored
-
- Aug 16, 2018
-
-
Péter Szilágyi authored
-
- Aug 14, 2018
-
-
Gary Rong authored
-
- Jul 26, 2018
-
-
Péter Szilágyi authored
-
- Jul 24, 2018
-
-
Gary Rong authored
* core, crypto, params: implement CREATE2 evm instrction * core/vm: add opcode to string mapping * core: remove past fork checking * core, crypto: use option2 to generate new address
-
Péter Szilágyi authored
Our original wrapper code had two parts. One taken from a third party repository (who took it from upstream Go) licensed under BSD-3. The second written by Jeff, Felix and Gustav, licensed under LGPL. This made this package problematic to use from the outside. With the agreement of the original copyright holders, this commit changes the license of the LGPL portions of the code to BSD-3: --- I agree changing from LGPL to a BSD style license. Jeff --- Hey guys, My preference would be to relicense to GNUBL, but I'm also OK with BSD. Cheers, Gustav --- Felix Lange (fjl): I would approve anything that makes our licensing less complicated ---
-
- Jun 12, 2018
-
-
Felix Lange authored
ToECDSAPub was unsafe because it returned a non-nil key with nil X, Y in case of invalid input. This change replaces ToECDSAPub with UnmarshalPubkey across the codebase.
-
- May 08, 2018
-
-
kiel barry authored
-
- Apr 17, 2018
-
-
thomasmodeneis authored
-
- Apr 03, 2018
-
-
David Huie authored
-
- Mar 26, 2018
-
-
David Huie authored
The parameter `rand` is unused in `PrivateKey.Decrypt`. Decryption in the ECIES encryption scheme is deterministic, so randomness isn't needed.
-
- Mar 19, 2018
-
-
Péter Szilágyi authored
* crypto/bn256: full switchover to cloudflare's code * crypto/bn256: only use cloudflare for optimized architectures * crypto/bn256: upstream fallback for non-optimized code * .travis, build: drop support for Go 1.8 (need type aliases) * crypto/bn256/cloudflare: enable curve mul lattice optimization
-
- Mar 05, 2018
-
-
Péter Szilágyi authored
* core/vm, crypto/bn256: switch over to cloudflare library * crypto/bn256: unmarshal constraint + start pure go impl * crypto/bn256: combo cloudflare and google lib * travis: drop 386 test job
-
- Jan 03, 2018
-
-
Furkan KAMACI authored
-
- Jan 02, 2018
-
-
Alex Wu authored
Fixes #15744
-
- Dec 20, 2017
-
-
Felix Lange authored
* crypto: ensure that VerifySignature rejects malleable signatures It already rejected them when using libsecp256k1, make sure the nocgo version does the same thing. * crypto: simplify check * crypto: fix build
-
- Dec 15, 2017
-
-
Felix Lange authored
This adds the inverse to DecompressPubkey and improves a few minor details in crypto/secp256k1.
-
- Dec 14, 2017
-
-
George Ornbo authored
-
- Dec 11, 2017
-
-
Felix Lange authored
With this change, key, err := crypto.HexToECDSA("000000...") returns nil key and an error instead of a non-nil key with nil X and Y inside. Issue found by @guidovranken.
-
- Dec 06, 2017
-
-
Felix Lange authored
We need those operations for p2p/enr. Also upgrade github.com/btcsuite/btcd/btcec to the latest version and improve BenchmarkSha3. The benchmark printed extra output that confused tools like benchstat and ignored N.
-
- Dec 01, 2017
-
-
Matthew Di Ferrante authored
Generator in the current lib uses -2 as the y point when doing ScalarBaseMult, this makes it so that points/signatures generated from libs like py_ecc don't match/validate as pretty much all other libs (including libsnark) have (1, 2) as the standard generator. This does not affect consensus as the generator is never used in the VM, points are always explicitly defined and there is not ScalarBaseMult op - it only makes it so that doing "import github.com/ethereum/go-ethereum/crypto/bn256" doesn't generate bad points in userland tools.
-
- Aug 17, 2017
-
-
Péter Szilágyi authored
-