Skip to content

Commit

Permalink
Fix typo in crypto.rst (#324)
Browse files Browse the repository at this point in the history
* Update crypto.rst

Fixes "private" typo

* Update crypto.rst

Fixes typo

* Update crypto.rst

More natural formulation
  • Loading branch information
HashMapsData2Value committed May 5, 2022
1 parent caa6a28 commit ec3fbed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/crypto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Operator Cost Description
:code:`Sha256(e)` `35` `SHA-256` hash function, produces 32 bytes
:code:`Keccak256(e)` `130` `Keccak-256` hash funciton, produces 32 bytes
:code:`Sha512_256(e)` `45` `SHA-512/256` hash function, produces 32 bytes
:code:`Ed25519Verify(d, s, p)` `1900`\* `1` if :code:`s` is the signature of :code:`d` signed by private key :code:`p`, else `0`
:code:`Ed25519Verify(d, s, p)` `1900`\* `1` if :code:`s` is the signature of :code:`d` signed by the private key corresponding to the public key :code:`p`, else `0`
=============================== ========= ========================================================================================

\* :code:`Ed25519Verify` is only available in signature mode up to version 4 of TEAL. From version 5 upwards, `Ed25519Verify` can be used in any mode.

Note the cost amount is accurate for version 2 of TEAL and higher.

These cryptographic primitives cover the most used ones in blockchains and cryptocurrencies. For example, Bitcoin uses `SHA-256` for creating Bitcoin addresses;
Alogrand uses `ed25519` signature scheme for authorization and uses `SHA-512/256` hash function for
Algorand uses `ed25519` signature scheme for authorization and uses `SHA-512/256` hash function for
creating contract account addresses from TEAL bytecode.

0 comments on commit ec3fbed

Please sign in to comment.