Algorithms used in Transformers
Transformers adopts algorithms and security mechanisms that are widely used and have been widely tested in practice to protect the security of assets on the chain. Before expanding, introduce various algorithms used in Transformers chain ED25519, RSA, elliptic curve encryption, VRF algorithm, sha256hash, base58.
ED25519:
Ed25519 is a high-performance digital signature algorithm based on elliptic curve encryption (ECC) technology in the field of cryptography. It was jointly designed by Daniel J. Bernstein, Niels Duif, Tanja Lange, Peter Schwabe, and Bo Yin Yang in 2011. Ed25519 aims to provide shorter signatures and public keys while maintaining high security and performance.
Ed25519 is widely used in many scenarios, such as SSH keys, TLS certificates, cryptocurrencies, etc. It plays an important role in internet security, blockchain technology, and various encryption applications. The safety of ED25519 conic curve has been widely recognized in both mathematics and practice, and it also has extremely fast generation and verification speed, improving the verification speed of transactions while ensuring security.
Features of Ed25519
- High performance: Ed25519 performs excellently in terms of signature and verification speed. Compared to other signature algorithms such as RSA, DSA, and ECDSA, Ed25519 can provide faster signature and verification speeds in most scenarios. This makes Ed25519 perform well in blockchain systems with high throughput and low latency.
- Short Key and Signature Length: Ed25519 uses efficient elliptic curve cryptography, with relatively short key and signature lengths. Shorter key and signature lengths mean lower storage and transmission costs, which are crucial for blockchain systems as they require broadcasting a large number of transactions on the network.
- High Security: Ed25519 is based on the Edwards curve Digital Signature Algorithm (EdDSA), which has high security. Compared to other signature algorithms, Ed25519 is competitive in terms of cryptographic strength and has strong resistance to quantum computing attacks.
- Anti side channel attacks: Ed25519 has taken into account the characteristics of anti side channel attacks in its design. Side channel attacks refer to attacks that recover keys by analyzing information leaks (such as time, power consumption, etc.) in hardware or software implementations. The anti side channel attack feature of Ed25519 helps to improve the security of blockchain systems.
- Simple and easy to implement: The design of Ed25519 is relatively simple, easy to implement and review. This helps to reduce implementation errors and potential security vulnerabilities. In addition, Ed25519 has been widely used in many open source libraries and projects, making it highly available and interoperable in practical applications.
RSA:
The RSA(Rivest-Shamir-Adleman) algorithm is an asymmetric encryption algorithm proposed by Ron Rivest, Adi Shamir, and Leonard Adleman in 1978. It is widely used in the field of public key cryptography due to the difficulty of factorization of large numbers. The RSA algorithm is mainly used in scenarios such as encryption, decryption, digital signature, and signature verification.
However, the RSA algorithm involves modular exponentiation of large integers and has a high computational complexity, resulting in relatively slow encryption and decryption speeds. To ensure security, RSA algorithms typically require longer keys (such as 2048 bits or longer), which can result in significant overhead in key management and transmission.
Elliptic Curve Crypto:
Elliptic curve encryption technology is a public key cryptography method based on the discrete logarithm problem between points on the elliptic curve and integers. Compared to traditional RSA and DSA algorithms, elliptic curve encryption has higher security and lower computational complexity.
VRF:
VRF(Verifiable Random Function) was proposed by Silvio Micali et al. in 1999 as a verifiable pseudo random function. VRF accepts an input and generates a random output based on the holder's private key. At the same time, VRF can also generate a proof that allows others to verify the correctness of the output using the corresponding public key without knowing the private key.
Characteristics of VRF
- Verifiability: The core advantage of VRF is its verifiability. The random numbers generated by VRF can be accompanied by a proof, and anyone can use the public key to quickly verify the validity of the proof, ensuring the authenticity and correctness of the random numbers.
- Security: VRF has high security, and its random number generation process depends on the private key and cannot be predicted or tampered with by external attackers. Meanwhile, the implementation of VRF is usually based on elliptic curve cryptography, which has strong cryptographic security.
- Decentralization: VRF can be applied to decentralized scenarios, such as blockchain consensus algorithms. By using VRF to select leaders or validators, it can ensure that the entire process does not rely on centralized authoritative institutions, and improve the degree of decentralization of the system.
- Difficult to tamper with: The random numbers generated by VRF and their proofs are unique for the given input and private key, making the output of VRF difficult to tamper with. Even the holder of the private key cannot generate different valid random numbers to deceive other participants.
- Fairness: VRF can ensure that the generated random numbers have fairness, as it is not affected by any external factors. This makes VRF fair in scenarios such as lottery and blockchain consensus, preventing manipulation and cheating.
- Scalability: VRF has good scalability and can be applied to large-scale distributed systems. Due to the relatively efficient validation process of VRF, it can support a large number of participants to perform random numbers
SHA-256:
SHA-256 (Secure Hash Algorithm 256 bit) is an encrypted hash function used to generate hash values with a length of 256 bits. It is a member of the SHA-2 (Secure Hash Algorithm 2) series.
In summary, Ed25519 is a high-performance digital signature algorithm based on elliptic curve encryption. It provides high security and performance, as well as shorter signatures and public keys, making it an ideal choice for modern cryptography applications. VRF, as a cryptographic random number generation method with verifiability, uniqueness, and unpredictability, is widely used in scenarios such as blockchain consensus algorithms, privacy protection, and random lottery. With the continuous development and optimization of VRF technology, its applications in real life will become more diverse, providing reliable randomness and security guarantees for various scenarios. Transformers chain integrates these two excellent algorithms, laying a solid foundation for the security of transformers.