Cryptography. Public & Private Keys.
Cryptography is a field of wisdom mainly used to hide communication. Its name origins from two ancient Greek words ( Kryptos and Graphein, meaning “hidden” and “to write”). This method has been created for securing information passed via open sources.
The most known techniques of cryptography are encryption and decryption.
Cryptography is used everywhere nowadays for security reasons, but not everyone knows what it is and how it works. Here we are going to explain some details.
There exist symmetric cryptography, asymmetric cryptography, and hashing. We will talk only about the first two options.
How is it used? When you send any information to someone via public network, to protect this data you need to apply encryption. Encryption is a process to code plain text to ciphertext. So it can not be read and understood when your text is converted to ciphertext. The receiver will decrypt this message.
You can use symmetrical or asymmetrical cryptography for this.
For symmetrical cryptography, you use a private key for both encryption and decryption, so if you send a message to another person, you should find a way to send him or her the private key before.
For asymmetrical, you use public and private keys. This is the main difference between the two methods.
Some technical distinctions between two types of keys are:
The private key is always kept as a secret key
The public key is shared openly
Private is quicker than the public
In the Credits ecosystem, an account includes a public key and a private key. So we use asymmetric cryptography.
To generate the cryptographic session keys, an ECDSA (Elliptic Curve Digital Signature Algorithm) digital signature scheme is used in conjunction with the open public key. Ed25519 uses SHA-512 and elliptic curve Curve25519 to calculate the digital signatures.
The signatures are used to authenticate and to keep integrity and nonrepudiation of each significant user’s or system message (i.e. transaction, block, some technical messages). Transactions are stored in the Credits Blockchain DataBase grouped by blocks.
On the Credits platform, a public key is used as a designation of the account that stores CS coins and/or tokens created within the ecosystem. Information about any wallet balance is stored in the blockchain and can be accessed by anyone. The platform automatically calculates the wallet balances, based on all incoming and outgoing transactions.
When transmitting any digital information we use both keys to ensure the integrity of the exchanged data. A message gets signed with the private key, and cannot be verified without using the corresponding public key. The verification process ensures that the message was received from the person, whose public key we use for this procedure.
We hope this note was informative. Stay safe and keep your private keys in secret. Credits are following the best practices in their products and services!