Current location - Quotes Website - Personality signature - RSA encryption and HASH algorithm
RSA encryption and HASH algorithm

In the previous article RSA Encryption Principles, we learned about the mathematical principles of RSA encryption and RSA encryption and certificate generation through OpenSSL. We found that the encrypted certificates are all transcoded into base64 format

< p> Base64 is a representation method for binary data based on 64 printable characters. Since log264=6, every 6 bits is a unit, corresponding to a certain printable character. 3 bytes are equivalent to 24 bits, corresponding to 4 Base64 units, that is, 3 bytes can be represented by 4 printable characters. Printable characters in Base64 include letters A-z, a-z and numbers 0-9, so there are 62 characters in total. In addition, the two printable symbols vary in different systems. Some other encoding methods such as uuencode, and later versions of BinHex use a different 64-character set to represent 6 binary digits, but are not called Base64.

Base64 is often used to represent, transmit, and store some binary data in situations where text data is usually processed, including MIME emails and some complex data in XML.

Hash, generally translated as "hash", but also directly transliterated as "hash", is to convert an input of any length into a fixed-length output through a hash algorithm, and the output is the hash value. This transformation is a compressed mapping, that is, the hash value space is usually much smaller than the input space, different inputs may hash into the same output, so it is impossible to determine a unique input value from the hash value.

Simply put, it is a function that compresses a message of any length into a message digest of a certain fixed length

HASH characteristics

HASH usage