aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-08-17 17:05:20 +0800
committerGitHub <noreply@github.com>2016-08-17 17:05:20 +0800
commitd5505e21ebfef2cd88545cb17f49d281910114e0 (patch)
treeaf0dfbaa1fab0dac59c63370710755acd59c7b2c /docs
parenta63f94e0423fb51e10e7d106a50e7dce14ace104 (diff)
parentd731225d02c9b8d6dc9f2ba632923b765d0e111d (diff)
downloaddexon-solidity-d5505e21ebfef2cd88545cb17f49d281910114e0.tar.gz
dexon-solidity-d5505e21ebfef2cd88545cb17f49d281910114e0.tar.zst
dexon-solidity-d5505e21ebfef2cd88545cb17f49d281910114e0.zip
Merge pull request #838 from chriseth/ecrecover
Make ecrecover return zero for malformed input.
Diffstat (limited to 'docs')
-rw-r--r--docs/miscellaneous.rst2
-rw-r--r--docs/units-and-global-variables.rst2
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst
index ca0cf593..804d69ef 100644
--- a/docs/miscellaneous.rst
+++ b/docs/miscellaneous.rst
@@ -286,7 +286,7 @@ Global Variables
- ``sha3(...) returns (bytes32)``: compute the Ethereum-SHA-3 (KECCAK-256) hash of the (tightly packed) arguments
- ``sha256(...) returns (bytes32)``: compute the SHA-256 hash of the (tightly packed) arguments
- ``ripemd160(...) returns (bytes20)``: compute the RIPEMD-160 hash of the (tightly packed) arguments
-- ``ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) returns (address)``: recover address associated with the public key from elliptic curve signature
+- ``ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) returns (address)``: recover address associated with the public key from elliptic curve signature, return zero on error
- ``addmod(uint x, uint y, uint k) returns (uint)``: compute ``(x + y) % k`` where the addition is performed with arbitrary precision and does not wrap around at ``2**256``
- ``mulmod(uint x, uint y, uint k) returns (uint)``: compute ``(x * y) % k`` where the multiplication is performed with arbitrary precision and does not wrap around at ``2**256``
- ``this`` (current contract's type): the current contract, explicitly convertible to ``address``
diff --git a/docs/units-and-global-variables.rst b/docs/units-and-global-variables.rst
index 62b9158d..d1d578ed 100644
--- a/docs/units-and-global-variables.rst
+++ b/docs/units-and-global-variables.rst
@@ -95,7 +95,7 @@ Mathematical and Cryptographic Functions
``ripemd160(...) returns (bytes20)``:
compute RIPEMD-160 hash of the (tightly packed) arguments
``ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) returns (address)``:
- recover the address associated with the public key from elliptic curve signature
+ recover the address associated with the public key from elliptic curve signature or return zero on error
In the above, "tightly packed" means that the arguments are concatenated without padding.
This means that the following are all identical::