Is data transferred via the channel being encrypted or not? Does anybody have access to them?
Yes, data will be transferred being encrypted that’s why nobody will have access to it.
Don’t you know which encryption algorithm will be used in CREDITS?
Each channel of communication between the main network node and the common node of the
CREDITS network is a separate thread (multithreading), within which data is sent in encrypted form
when the transaction is executed.
To ensure network security, all data between the validator nodes is transmitted in an encrypted
form, and each connection between nodes is low-level based on the network library. If the data transfer
occurs with an error, the thread should be automatically interrupted, the corresponding entry is placed
for writing to the logging system, and then to the log file. Data is transmitted through typified variables.
Transmitted data are encrypted using the symmetric RC4 algorithm. Since this algorithm works under a
common secret key, this key is transferred when a connection is created between nodes and is
transmitted in an encrypted form in accordance with the Diffie-Hellman algorithm.
The RC4 algorithm, like any stream cipher, is built on the basis of a pseudo-random bit
generator. The key is written to the generator input, and pseudo-random bits are read at the output. The
key length can be from 40 to 2048 bits. Generated bits have a uniform distribution.
The Diffie-Hellman algorithm allows two parties to receive a common secret key using a
channel unprotected from listening through but protected from communication channel change. The
received key can be used to exchange messages using symmetric encryption. The algorithm is based on
the complexity of computing discrete logarithms. In it, as in many other algorithms with a public key,
the calculations are performed modulo to a certain large prime number P.
First, a certain natural number A, smaller than P, is selected in a special way. If we want to
encrypt value X, then we calculate
Y = AX mod P.
And it is easy to calculate Y having X. The inverse problem of calculating X from Y is rather
complicated. Exponent X is exactly called the discrete logarithm Y. Thus, knowing the complexity of
calculating the discrete logarithm, the number Y can be publicly transmitted on any communication
channel, since with a large modulus P the initial value X will be almost impossible to pick. The
Diffie-Hellman algorithm to generate a key is based on this mathematical fact.
Any actions in the system are tied to the timestamp, the number of the previous block, the user’s
login, and the smart contract ID. This allows finding duplicates when executing. If a duplicate is found,
then we take the first transaction from the pool, the rest are considered illegitimate.