{"repo":"pubkey/eth-crypto","free":true,"listed":false,"github":"https://github.com/pubkey/eth-crypto","clone":"git clone https://github.com/pubkey/eth-crypto.git","description":"Cryptographic javascript-functions for ethereum and tutorials to use them with web3js and solidity","language":"JavaScript","stars":920,"topics":["web3","web3js","solidity","smart-contracts","ethereum","publickey","signature","privatekey","eth","dapp"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"eth-crypto Cryptographic javascript-functions for ethereum and tutorials on how to use them together with web3js and solidity. Tutorials - Creating keys and use them for ethereum transactions In this tutorial we will create an ethereum-identity and use it to send transactions to the blockchain. - Sign and validate data with solidity In this tutorial we will sign data in javascript and validate the signature inside of a smart-contract. - Sending encrypted and signed data to other identities In this tutorial we will use the ethereum-identities and asymmetric cryptography to send an encrypted and signed message from Alice to Bob. Sponsored by The JavaScript Database Using eth-crypto Install API - createIdentity() - publicKeyByPrivateKey() - publicKey.toAddress() - publicKey.compress() - publicKey.decompress() - sign() - recover() - recoverPublicKey() - encryptWithPublicKey() - decryptWithPrivateKey() - cipher.stringify() - cipher.parse() - signTransaction() - txDataByCompiled() - calculateContractAddress() - hex compress/decompress createIdentity() Creates a new ethereum-identity with privateKey, publicKey and address as hex-string. You can also create an identity by providing your own entropy-buffer. Use this with caution, a bad entropy can result in an unsecure private key. publicKeyByPrivateKey() Derives the publicKey from a privateKey and returns it as hex-string. publicKey.toAddress() Derives the ethereum-address from the publicKey. publicKey.compress() Compresses an uncomp","default_branch":null,"files":null,"tree":[],"storefront":"/r/pubkey","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pubkey/eth-crypto/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}