The principle of public key and private key, public key and private key

Updated on technology 2024-02-21
11 answers
  1. Anonymous users2024-02-06

    The public key and private key are commonly known as asymmetric encryption, which is an improvement from the previous symmetric encryption method (using a username and password). Explain the principle by email.

    The purpose of using public and private keys is to enable secure e-mail, and the following must be achieved:

    1.The content I send to you must be encrypted so that it cannot be seen by others while the email is in transit.

    2.I have to make sure that I sent the email and that no one else is impersonating me.

    To achieve such a goal, both people who send the message must have a public key and a private key.

    The public key is for everyone, you can publish it by email, you can let others **, the public key is actually used to encrypt the seal. The private key, which is your own, must be kept very carefully, it is best to add a password, the private key is used to decrypt the signature, first of all, in terms of the ownership of the key, the private key is only owned by the individual. The functions of the public and private keys are:

    Content encrypted with a public key can only be decrypted with a private key, and content encrypted with a private key can only be decrypted with a public key.

    For example, I'm going to send you an encrypted email. First, I have to have your public key, and you have to have my public key.

    First of all, I encrypt the email with your public key, so that the email cannot be seen by others, and that the email has not been modified during transmission. Once you receive the email, you can decrypt it with your private key and you will be able to see the contents.

    Secondly, I use my private key to encrypt this email, and after sending it to you, you can use my public key to decrypt it. Because the private key is only in my hand, this ensures that this email is sent by me.

    When A->B data, A will use B's public key to encrypt it, so as to ensure that only B can unravel it, otherwise the general public can unravel the encrypted message, which is to remove the confidentiality of the data. In terms of verification, the mechanism of signing and checking the seal is used, and when A transmits the information to everyone, it will use its own private key to make a signature, so that all people who receive the message can use A's public key to verify the seal, and they can confirm that the message is sent by A.

  2. Anonymous users2024-02-05

    For the safety and confidentiality of users.

  3. Anonymous users2024-02-04

    The private key cryptography algorithm uses a single private key to encrypt and decrypt data.

    Since either party with the key can use the key to decrypt the data, the key must be protected from unauthorized access.

    Private key encryption is also known as symmetric encryption because the same key is used for both encryption and decryption.

    Private key cryptography algorithms are very fast (compared to public key algorithms) and are particularly suitable for performing cryptographic transformations on large data streams.

    Typically, a private key algorithm (known as a block cipher) is used to encrypt one block of data at a time.

    Block ciphers (such as rc2, des, tripledes, and rijndael) convert an input block of n bytes into an output block of encrypted bytes by encryption.

    If you want to encrypt or decrypt a sequence of bytes, it must be done block by block.

    Since n is small (for RC2, DES, and Tripledes, n = 8 sections; n = 16 [default]; n = 24;For rijndael, n = 32), so you must encrypt one block at a time for data values greater than n.

  4. Anonymous users2024-02-03

    A private key is a string of randomly extracted numbers, and owning and controlling the private key is fundamental to the user's control of the funds associated with the Bitcoin address. If a user wants to prove that the funds used are his own, he must sign the transaction with his private key. The privacy of the private key must be kept private at all times, and revealing the private key to a third party is tantamount to handing over control of the bitcoins it protects to a third party.

    The private key should also be backed up and protected to prevent accidental loss. If the private key is lost, it will be irretrievable, and the funds protected by it will be completely lost.

  5. Anonymous users2024-02-02

    From the technical point of view, you may hear a lot of terms in digital wallets at present, but the core is the private key, but the private key is very difficult to remember because it is usually a long list of hexadecimal characters.

  6. Anonymous users2024-02-01

    1) Bob has two keys, one is the public key and the other is the private key.

    2) Bob gives the public key to his friends--- Patty, Doug, Susan, --- one each.

    4) After Bob received the letter, he decrypted it with his private key and saw the contents of the letter. The emphasis here is that as long as Bob's private key is not revealed, the letter is safe and cannot be decrypted even if it falls into someone else's hands.

    9) Susan then uses the hash function on the letter itself to compare the results obtained with the summary obtained in the previous step. If the two are consistent, it proves that the letter has not been modified.

    The HTTP protocol is easy to be tampered with and hijacked, such as some unscrupulous operators will implant ads in your page through the server.

    Therefore, many ** choose to use the https protocol. The HTTPS protocol provides three major functions: content encryption, identity authentication, and data integrity through the TLS layer and certificate mechanism.

    1) Below, let's look at an app"Digital certificates"Example: https protocol. This protocol is mainly used for web encryption.

    2) First, the client makes an encryption request to the server.

    4) Client's (browser)."Certificate Manager", there is"Trusted Root Certification Authority"List. Based on this list, the client checks to see if the public key of the unlocked digital certificate is in the list.

  7. Anonymous users2024-01-31

    A public key is the exposed part of a key pair, and it is typically used to encrypt a session key, verify a digital signature, or encrypt data that can be decrypted with a corresponding private key.

    A key is a key that the owner of the key should hide on the public key cryptographic infrastructure. In a public-key cryptography, the public key and the key are paired, and we assume that when the public key is released to a third party, the private key should be kept secret.

    Before the advent of public-key cryptography, public-key cryptography was commonly used because the encryption key and the decryption key were the same and were shared with a communication partner to encrypt the communication. However, if it is eavesdropped during the exchange of keys, public key encryption has no cryptographic significance.

    With public-key cryptography, the owner of the key first passes the public key to the communication partner. The communication partner uses the public key to encrypt and sends the encrypted document (data) to the owner of the key, and the owner of the key to receive the encrypted document decrypts the document with the private key, and the key required to decrypt the document is not exchanged on the communication path, making it easier to ensure security.

    The most widely used public-key encryption is RSA encryption, in which the public key and the key have the same structure, and the key encrypted with one key can be decrypted with the other, in other words, it can be used not only to encrypt with the public key, decrypt with the key, but also to encrypt with the key and decrypt with the public key.

    Digital signatures use this feature in such a way that it is not possible to create an encrypted document that can be decrypted with a specific public key so that the owner of the key can be guaranteed unless it is the person who has the key paired with the public key.

    However, it should be noted that the private and public keys of RSA are never symmetrical. It is possible to create a public key from a private key, but it is considered very difficult and impossible to create a key from a public key, and the security of RSA is based on the fact that it is difficult to break down a large number of factors, so it is necessary to extend the key length for better security.

    Since new decoding algorithms are expected to be discovered in the future and computational speeds will increase, key lengths and algorithms will also change.

  8. Anonymous users2024-01-30

    Public key (public key) and private key (private key) are the contents of asymmetric encryption algorithms in cryptography. As the name suggests, the public key is public, while the private key is kept secure.

    The private key is generated from a random seed, and the public key is an algorithmic derivation of the private key. Since the public key is too long, for the sake of simplicity and practicality, there is an "address", which is derived from the public key. These derivation processes are unidirectional and irreversible.

    That is, the address cannot be derived from the public key, and the public key cannot be derived from the private key.

    From this, we can see that the public key and the private key exist in pairs. Their usefulness can be summed up in 16 words:Public key encryption, private key decryption; Private key signature, public key verification.

    Public key encryption, private key decryption; That is, the original data is encrypted with the public key, and only the corresponding private key can unravel the original data. In this way, the original data can be transmitted in the network without being stolen and privacy can be protected.

    Private key signature, public key verification. The original data is signed with the private key, and only the corresponding public key can verify that the signature string matches the original data.

    You can use locks and keys to compare public keys and private keys. The lock is used to lock an item, and the key is used to unlock the item. The key owner is the owner of the item.

    In fact, this is the case, the public and private key pair establishes the account system of the blockchain and the ownership of assets (tokens, etc.), the assets of the blockchain are locked on the public key, and the private key is used to unlock the asset and then use it. For example, if I want to transfer assets to you, that is, I use my private key to sign a transaction (including assets, quantity, etc.) that I transfer assets to you and submit it to the blockchain network, and the node will verify the signature, and if it is correct, the asset will be unlocked from my public key and locked to your public key.

    We have seen the role of the private key, which is as important as the password of the centralized accounting system (Alipay, WeChat Pay, etc.), and having the private key means that you have the ownership of the asset, so we must keep the private key and not leak it.

  9. Anonymous users2024-01-29

    Using the encryption method of a single-key cryptosystem, the same key can be used as both encryption and decryption of information, and this encryption method is called symmetric encryption, also known as single-key encryption.

    Unlike symmetric encryption algorithms, asymmetric encryption algorithms require two keys: a public key and a private key. If the public key is used to encrypt the data, only the corresponding private key can be decrypted. If data is encrypted with a private key, it can only be decrypted with the corresponding public key.

    Because encryption and decryption use two different keys, this algorithm is called an asymmetric encryption algorithm.

    First, give an example.

    1. Send a message.

    Send a message to the other party with their public key.

    2. Make an announcement.

    When making an announcement, use your private key to form a signature!

    2. Encryption and Signature.

    RSA's public and private keys correspond to each other, RSA will generate two keys, you can use either one for the public key, and the other is the private key that you must protect.

    Both the public and private keys of RSA can be encrypted and decrypted.

    Among them: Encrypting with a public key requires a private key to decrypt, which is called "encryption". Since the private key is not public, the confidentiality of the content is ensured, and the content cannot be obtained without the private key;

    Encryption with a private key requires a public key to decrypt, known as a "signature". Since the public key is public, anyone can decrypt the content, but only with the publisher's public key, verifying that the content was sent by that publisher.

    So: if it is used for encryption and decryption, it is to encrypt the private key with the public key (only you can read it but no one else can read it, anyone can write it).

    If it is used for certificate validation, it is encrypted with the private key and the public key is decrypted (only you can write but no one else can write it, and anyone can read it).

    3. Certification process.

    Tags: http

  10. Anonymous users2024-01-28

    1. Public key algorithm and private key algorithm 1, private key algorithm private key encryption algorithm, also known as symmetric encryption algorithm, because this algorithm decryption key and encryption key are the same. Because the same key is used for both encryption and decryption, this key cannot be disclosed. Common ones include DES Encryption Algorithm and AES Encryption Algorithm.

    2. Public key algorithm public key encryption algorithm, that is, asymmetric encryption algorithm, this algorithm encryption and decryption of the password are different, one is the public key, the other is the private key: the public key and the private key appear in pairs 1The public key is called the public key, and the one that only you know is called the private key 2

    Data encrypted with a public key can only be decrypted by the corresponding private key3Data encrypted with a private key can only be decrypted by the corresponding public key4If it can be decrypted with a public key, it must be the corresponding private key plus the encryption 5

    If it can be decrypted with the private key, it must be the corresponding public key plus the cipher 6Public and private keys are relative, and there is no stipulation in themselves which must be a public or private key.

  11. Anonymous users2024-01-27

    Blockchain private key, public key.

    The relationship between the three and the address is that the private key generates the public key, and the public key is converted into the address. So the private key is the most important. The relationship between these three is irreversible, and the address cannot generate a public key, and the public key cannot be converted into a private key.

    First of all, let's talk about the disadvantages of losing and understanding what is a private key, which is a string of characters generated by the wallet according to the principles of cryptography, and the random number generated by various algorithms when creating the wallet.

    The role of the private key is equivalent to an identity on the blockchain, and half of your assets on the blockchain are stored in your identity, that is, stored in the address below your private key identity, so whoever has the private key will master the digital assets in the address under the identity.

    The private key is equivalent to the bank card password, and it must be kept offline to prevent theft.

    The second is the public key, which is equivalent to a transaction record of the blockchain accounting, which is recorded in the blockchain after the transaction occurs, which is public and cannot be tampered with, because in the blockchain, every time a transaction occurs, it must be broadcast to the block, and everyone keeps the account. For example, Zhang San gave Wang Wu.

    Buying a cow, in real life is just a matter of the two of them, the transaction of the cow** as long as they reach an agreement can be traded, and it has nothing to do with the whole village, and their transaction records are not called public keys because they are not public. But in the blockchain, Zhang San bought a cow for Wang Wu, except for the two of them reaching an agreement, the whole village has to keep accounts, and the whole village will complete the transaction after the account is completed, so the records recorded by the whole village are called public keys.

    Again, there's the blockchain address, which is usually a string of letters and numbers of 26 to 35 characters.

    Composition, the blockchain address is mainly the public key, the blockchain address is equivalent to the bank card number we usually use, it can be disclosed to anyone, there is no security limit, and the main role is to receive and send digital assets on the blockchain.

    Blockchain technology.

    It is now in the early stage of development, but because of its decentralization, security, and non-tampering, it may produce killer-level landing applications in future life and work, and has attracted the attention of various countries. This article is for reference only, welcome to leave a message to discuss.

Related questions