Introduction to Cryptography for Blockchain
摘要
This chapter provides information about the major branches of the field of cryptography. In particular, public and private key cryptography and their applications are discussed. Public key cryptosystems are based on functions or algorithms whose inverses do not exist or whose inverses cannot be filled in by modern science and technology, at very high material cost and a lot of time in the future. Symmetric block cipher algorithms are an important component of all cryptographic systems. Symmetric block cipher algorithms provide data confidentiality by dividing data into blocks of a certain length and repeating operations on them. Symmetric block ciphers consist of various transformations and can be broadly classified into linear and nonlinear types. In recent years, elliptic curves have been widely used in cryptography. This section introduces general information about such elliptic curves, their position and properties in the coordinate system, and operations performed on points with rational coordinates in finite fields. These operations are operations such as adding points to an elliptic curve, and determining the order. The SHA256 hash algorithm and its sequence of steps are also explained. Information is also presented on hashing, one-way functions, methods for generating one-way functions, formulas used for hashing, and some properties of hash functions, including deterministic, fast computation, avalanche effect, and must withstand collision properties. The characteristics of an electronic digital signature are different and depend on the bits of memory registers, which are determined by the characteristics of the binary number system. Copying or changing an electronic signature consisting of a specific sequence of memory bits is not difficult in computer communication systems. In today’s highly developed world civilization, the use of documents, including confidential ones, in electronic form and their transmission in communication systems is widely used, which makes the issues of determining the authenticity of electronic documents and electronic signatures very important. No matter how convenient and secure public key cryptographic systems are, they cannot completely solve the authentication problem. Therefore, it is necessary to comprehensively use authentication methods and means together with cryptographic algorithms. Currently, electronic digital signatures based on RSA and El-Gamal are widely used. However, there are attack methods designed to create digital signatures. The signature can be forged by factoring and solving a discrete logarithm problem that produces the value of the signer’s key using the signature verification key. As a result, digital signature algorithms for Edwards Curve and Elliptic Curve known as EdDSA (Edwards Digital Signature Algorithm) and ECDSA (Elliptic Curve Digital Signature Algorithm) were developed and are in use. This chapter also provides information about the DSA (Digital Signature Algorithm) GOST R 34.10–2001 DSA standards. The Diffie–Hellman key exchange algorithm used for key exchange is also discussed. Discusses the security of the Diffie–Hellman key exchange algorithm and shows that the algorithm can be analyzed using a man-in-the-middle attack. Cryptography uses authentication information that is provided to the other party, that is, known in advance by both parties. Authentication information is typically private or confidential information. It is also risky to provide the other party with complete authentication information when the time comes. In this context, providing part of the authentication information without providing the full information is called zero-knowledge proof. Using “zero-knowledge proofs”, one party can demonstrate to another (the verifying party) that a statement is true, while hiding any information other than the truth of the statement. Protocols based on zero-knowledge evidence ensure the anonymity of the parties.