When Alice encrypts the message with its own private key and sends to Bob then how Bob will decrypt it?

You might be looking for anonymous messaging in which the sender hides their identity from the receiver. The Libsodium has one specially designed for this sealed_box

Only the recipient can decrypt these messages, using its private key. While the recipient can verify the integrity of the message, it cannot verify the identity of the sender.

Bob can decrypt the incoming message from Alice, however, they cannot verify the identity of the sender. Also, there is no way Eve can determine the sender, too. This scheme uses an ephemeral private and public key pair (generated and used once) is generated and later the ephemeral private key is destroyed. As long as the sender IP etc. is hidden from the observers, there is no way to determine the sender.

Note 1: this is an existing and well-maintained library that you don't need to implement anything to achieve your target.

Note 2: ElGamal Encryption (1985) , on the other hand, is exactly designed in this manner. Alice doesn't need to set up a public-private key pair to send a message to Bob. ElGamal Encryption is used to encrypt the symmetric key ( or one can transmit the key material and derive the key with a good KDF like HKDF).

Section 8.2 Symmetric Key Cryptography

Symmetric key cryptography is an application of functions. An encryption function turns readable plain text into unreadable cipher text, and the corresponding decryption function turns the cipher text back into the original plain text.

Figure8.2.1.Alice sends a message to Bob, and Eve eavesdrops on their conversation.

Descriptions of cryptographic protocols are commonly phrased as interactions between Alice, Bob, and Eve. Alice sends a message to Bob, and the eavesdropper Eve listens in on their conversion and tries to break their encryption (Figure 8.2.1).

When Alice encrypts the message with its own private key and sends to Bob then how Bob will decrypt it?

Figure8.2.2.In a symmetric key encryption scheme, Alice and Bob share a common secret, namely the key \(K\text{.}\)

In a symmetric key encryption scheme, Alice and Bob first have to agree on a common shared key. Alice uses the key to encrypt a message and sends the encrypted message to Bob. Then, Bob uses the key to decrypt the encrypted message that was sent by Alice in order to obtain the message in its original form (Figure 8.2.2). We introduce Caesar ciphers and other substitution ciphers as examples for symmetric key encryption scheme in the following two sections.

Checkpoint8.2.3.Symmetric key cryptography.

Complete the following.

In a symmetric encryption protocol

  • select

  • Alice

  • Bob

  • Eve

  • Oscar

and

  • select

  • Alice

  • Bob

  • Eve

  • Oscar

agree on an encryption method, a decryption method, and a key that is used for encryption and decryption.

  • select

  • Alice

  • Bob

  • Eve

  • Oscar

encrypts a message using the encryption method and the key. She sends the encrypted message to

  • select

  • Alice

  • Bob

  • Eve

  • Oscar

.

  • select

  • Alice

  • Bob

  • Eve

  • Oscar

receives the message from

  • select

  • Alice

  • Bob

  • Eve

  • Oscar

and decrypts the message using the decryption method and the key.

We summarize this introduction to symmetric key cryptography in the video in Figure 8.2.4.

Figure8.2.4.Symmetric Key Cryptography by Matt Farmer and Stephen Steward

In the following two sections we give two examples for symmetric key encryption schemes, namely Caesar ciphers and more general substitution ciphers.

When Alice encrypts the message with its own private key and sends to Bob then how Bob will decrypt it?

Yet one more reason I'm barred from speaking at crypto conferences.

Figure8.2.5.Alice and Bob by Randall Munroe (https://xkcd.com/177).

When Alice encrypts a message using her private key before sending it to Bob What will Bob need to decrypt Alice's message?

If Bob wants to send Alice a secret message, he encrypts it with Alice's public key. Then no one but Alice can decrypt it. Only her private key can undo the encryption, and no one can figure out the private key from the public key.

How does Alice guarantee to Bob that it was her who sent the message and that the message wasn't modified during transmission without encrypting the entire message?

So Alice can use Bob's public key to verify that it was indeed signed by Bob, and then she can decrypt it using her own private key. That way, she knows that (a) Bob sent it and (b) it was sent to her and nobody else read it.

How does the private key decrypt the message?

Typically, we use the recipient's public key to encrypt the data and the recipient then uses their private key to decrypt the data. However, using the scheme of digital signatures, there's no way to authenticate the source of the message.

Which type of crypto key can be used to encrypt a message from Alice to Bob where only Bob can be expected to decrypt it?

Alice generates a random symmetric key (usually called a session key), encrypts it with Bob's public key and sends it to Bob. Bob decrypts the session key with his private key. Alice and Bob exchange messages using the session key.