@ -23,7 +23,7 @@ When we code things in the ethereum ecosystem, it is standard to represent data
The identity consists of:
- The **privateKey** which must never be revealed to anyone. It can be used to sign and decrypted messages and to create it's publicKey.
- The **privateKey** which must never be revealed to anyone. It can be used to sign and decrypt messages and to create it's publicKey.
- The **publicKey** is revealed whenever something is signed with the privateKey. It's also common to send the publicKey to other humans so that they can encrypt data with it, which then can only decrypted by the correct privateKey. It's important to know that there are [two ways to represent](https://github.com/bitpay/bitcore-lib/blob/master/docs/publickey.md) a publicKey compresssed and uncompressed. EthCrypto always creates the uncompressed key which starts with `0x04`. Compressed keys start with `0x03` or `0x02`. To represent the key, we strip the starting `04` away from it and internally add it when doing cryptographic calls.
- The **address** is calculated from the last 20 bytes of the keccak-256-hash of the publicKey. It is used to represent an identity. Notice that there is no way to calculate the publicKey from an address. This means that whenever we want to encrypt data for someone, we first have to get the publicKey. There are two ways to represent an address. The normal address is lowercase and represents just the 20 bytes of the hash. The checksum-format contains uppercase-letters which the purpose of detecting errors when the address is entered manually.