Bitcoin Forum
May 01, 2024, 10:15:46 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Asymmetric Encryption Vs. Symmetric Encryption!  (Read 340 times)
nakamura12 (OP)
Hero Member
*****
Offline Offline

Activity: 2254
Merit: 669


Bitcoin Casino Est. 2013


View Profile
June 05, 2021, 06:17:54 PM
Last edit: July 11, 2021, 11:12:52 AM by nakamura12
Merited by GazetaBitcoin (10), Symmetrick (7), pooya87 (5), NotATether (4), Shamm (4), rosenbauer02 (3), Pmalek (2), hugeblack (2), DdmrDdmr (2), Little Mouse (2), ifarted (2), Daniel91 (1), crwth (1), khaled0111 (1), agustina2 (1)
 #1

Let's talk about encryption. There are two types of encryption which you can read in the title.
There are some people here on the forum that they encrypted something. Encryption can be of help to all of us which it can help us secure data, plain text or whatever you want to encrypt.


What is ENCRYPTION?

Encryption means decoding or locking the data to protect it from unauthorized access. This usually happen on a site when you are surfing. It makes the plaintext data that looks like it is typed randomly that doesn’t make sense to the reader. The encrypted data looks like a string of random alphabets and digits. For example, when you  encrypt the word “Hello, this is nakamura12 and this is the plaintext that will be encrypted” then it will become like this “n587ngw8y7356nhgiej39!”.

How does ENCRYPTION works?

Let’s explore this concept with Bob, Alice, and Mallory to understand encryption in a simpler way.

    Bob sends a letter to Alice. Mallory (the villain) gets access to the letter while it’s in transit. Because the letter is in plaintext, she can read, interpret, and even modify the message before it reaches Alice.  
    To tackle this issue, Bob and Alice decide to use a trick. They will replace the original alphabet with its next to the next alphabet. That means A=C, B=D, C=E …. X=Z, Y=A, Z=B.  
    Now, when Bob sends the message, “HELLO,” he writes, “JGNNQ” Instead.
    Now, if Mallory (or anyone else) gets access to the letter, all she’ll read is a bunch of text that doesn’t make any sense! But when Alice receives it, she knows the trick and shifts each letter of the message back two steps in the alphabet so she can interpret the message.

TWO TYPES OF ENCRYPTION.

Symmetric Encryption and Asymmetric Encryption

Asymmetric Encryption
This type of encryption uses two separate keys for encryption (public key) and decryption (private key). Each key is different and have it's own purpose as mentioned which the public key used to encrypt the data and private key to decrypt the data.


Advantages
° Encrypting and decrypting data in asymmetric uses two unique keys which is public key and private key.
° Good for smaller data.
° The private key is not shared, and the overall process is more secure as compared to symmetric encryption.

Disadvantages
° The process is slower.
° It’s a much more complicated process than symmetric key encryption.

Symmetric Encryption
This type of encryption is reciprocal, meaning that the same key is used to encrypt and decrypt data. This is great for large batches of data but has issues in terms of key distribution and management.


Advantages
° It is not complicated to encrypt a data.
° The process is much faster.
° It’s mostly used when large chunks of data need to be transferred.

Disadvantages
° Only one key (symmetric key) is used, and the same key is used to encrypt and decrypt the message.
° The secret key is shared. Consequently, the risk of compromise is higher.

Encryption can also be used to encrypt your private key and store the keys when you want to store a back up of your private key (bitcoin wallet or a mnemonic phrase safely and secured.

Edit:

An example of encrypted text. Everyone can decrypt this text by using the private key. The private key and the public key is 1024 bit. Take note that this site is for example use only.

There is another assymetric encryption which is Open PGP (Pretty Good Privacy).
This encrypted text is encrypted using public key and you need to have the private key to decrypt the encrypted text. Try it out yourselves using this site for encrypting and decrypting purpose. https://www.devglan.com/online-tools/rsa-encryption-decryption.

Asymmetric Encryption

This RSA key size is 1024 bit
Public Key I used to encrypt the message.
Code:
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCUVtbBBjGVhGHken/JDA56OgfkBcTi2DbewObvxZMi3cVmRqswlpgLXxJ2GC6Q3e1zBd1yySxbofXbxDSiXkvVG9TddMVTLZBrBDcooraSNecGsysKW8Y6h7jq7+x88C8fzKabbbbIIyhX25FUyONTtXkT5TDL+ajIP0g+AdbUdQIDAQAB

Encrypted Message
Code:
AWMsMztC6b3bNjzOvuDR7DnsiTxTnKhRsDp0p0LpfVjflRqPcIoaXtQvtW6rbvQB0ogdwJl1Nlu25Zlb4s2PlzPvX6e8gSXCq+w2bd+rSfy9Ug59xkuA5CfuBJcFRCQ+m0y3W3A6D6sEbTEHd0M7TAaT4qv8GJ09meZL/fi5wVI=

Private Key
Code:
MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJRW1sEGMZWEYeR6f8kMDno6B+QFxOLYNt7A5u/FkyLdxWZGqzCWmAtfEnYYLpDd7XMF3XLJLFuh9dvENKJeS9Ub1N10xVMtkGsENyiitpI15wazKwpbxjqHuOrv7HzwLx/MpptttsgjKFfbkVTI41O1eRPlMMv5qMg/SD4B1tR1AgMBAAECgYAO7WoxBHGK7UZ4mocvcSIn1J0kqhv1A/MJmXnj2QsEcDLEJwplGlJ0mn2eGrLc6yhQ8d8mBO6MzhCSq/zr9fdFdIhksTGdmXfn+k8GLx7jHMde3TDhhImihaJVDPhKc1GUSKnZFbgdgSmZMM35fjkb8fPSXbfP2CqFwz0aP2KIgQJBAMmMPQQvtBKUkheZvyo8h5zfwYMtLwLDDIBfrXDt0mcvNztlxaDPFKpcn1uXTXvKBu+wLS2JA1TUggjZlaJfyxUCQQC8aoFm6DGjLIu1VsjC7O533BSa8XJUqLHDnjsT4nfuvRSdl5AQAyzNzTiK4L81tRsfdjVDPEbg53Po61vYWbvhAkAbOp0Lsb4sPHI4Sgcvl5niscAdDr+pKdzIgySVeyvP0OsvVSKMBS4Pjg/heeF39eVWAIE6A6a1kTg4Jd03YKW5AkEAjCvgISLU6sQVG894hCuoLVt5qNu/ZuQpe5KX+O8esmnQkH1VG9SA3Iq0af1Rwy79Aqb6cQ7C3EbUoI+YQJhhgQJAVjKuSW1qbgtvvIoUyPeLjN6jnbbWhHflolobODWHY5Lrdsdmkhm6qEzDVtfi4u93DzryaSOcRZJlkNqYe4tLEA==

Symmetric Encryption
https://www.javainuse.com/aesgenerator. Use this site to decrypt the message.
ECB Mode
256 bit

Symmetric Key This is the key I wanted to use. You can use whatever key you wanted as long as it is the exact characters needed for each key size.
Code:
wksowndkg1248a7fn9dn27dn3nd7fjd4

Encrypted Message
Code:
G/opDEYTMbpjvzKXi8lffZiUs+2mjFLVw2dxeE+he7ffKPZojNNwYGuHBiNm4db+t/xYbB4Kv3kH3Nz+zxR5AMVPieQSXX0B6QHN8SaKuzldSMH5lj//23OuVOI/A8ya+GgEhj6kbQtkFaBdE3TzLw==

This thread also mentions encryption and examples of already encrypted text using electrum wallet
https://bitcointalk.org/index.php?topic=5223953.0
https://bitcointalk.org/index.php?topic=5289839.0
Take note:

If there is a thread of the same topic is I will locked it right away, Just let me know.
It is not my responsibility if you ever wanted to encrypt your crypto wallet private key or mnemonic phrase and you lose it or getting comprised by a hacker or your own carelessness.


If you want to know more about encryption and the types of encryption you can find it here

Source:
https://sectigostore.com/blog/what-is-encryption-and-how-does-it-work/
https://sectigostore.com/blog/5-differences-between-symmetric-vs-asymmetric-encryption/
https://sectigostore.com/blog/what-is-asymmetric-encryption-how-does-it-work/?sa=X&ved=2ahUKEwjnqMSm-IDxAhUq7GEKHQ6ODB0Q9QF6BAgDEAI
https://www.cryptomathic.com/news-events/blog/an-overview-of-symmetric-encryption-and-the-key-lifecycle

███▄▀██▄▄
░░▄████▄▀████ ▄▄▄
░░████▄▄▄▄░░█▀▀
███ ██████▄▄▀█▌
░▄░░███▀████
░▐█░░███░██▄▄
░░▄▀░████▄▄▄▀█
░█░▄███▀████ ▐█
▀▄▄███▀▄██▄
░░▄██▌░░██▀
░▐█▀████ ▀██
░░█▌██████ ▀▀██▄
░░▀███
▄▄██▀▄███
▄▄▄████▀▄████▄░░
▀▀█░░▄▄▄▄████░░
▐█▀▄▄█████████
████▀███░░▄░
▄▄██░███░░█▌░
█▀▄▄▄████░▀▄░░
█▌████▀███▄░█░
▄██▄▀███▄▄▀
▀██░░▐██▄░░
██▀████▀█▌░
▄██▀▀██████▐█░░
███▀░░
1714558546
Hero Member
*
Offline Offline

Posts: 1714558546

View Profile Personal Message (Offline)

Ignore
1714558546
Reply with quote  #2

1714558546
Report to moderator
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714558546
Hero Member
*
Offline Offline

Posts: 1714558546

View Profile Personal Message (Offline)

Ignore
1714558546
Reply with quote  #2

1714558546
Report to moderator
tranthidung
Legendary
*
Offline Offline

Activity: 2254
Merit: 3994


Farewell o_e_l_e_o


View Profile WWW
June 06, 2021, 04:07:12 AM
 #2

Thanks OP now I know what is the advantages and disadvantages of ncryption
You don't need to quote all text in OP in order to say thanks.
  • You can simply say thanks without a quote
  • If you want to use quote, let's snip the texts

Quote
snip
<snip>
~snip~
~
...
<...>

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
nakamura12 (OP)
Hero Member
*****
Offline Offline

Activity: 2254
Merit: 669


Bitcoin Casino Est. 2013


View Profile
June 06, 2021, 04:41:39 AM
 #3

You don't need to quote all text in OP in order to say thanks.
As far as I'm concerned about iphomme is that he/she is still learning about crypto related topics and I even replied in the post that he/she made and provide help and information for him/her to learn. You can see it in the profile that he/she just registered not long ago. Let's guide this member and have more people to contribute in this forum.

███▄▀██▄▄
░░▄████▄▀████ ▄▄▄
░░████▄▄▄▄░░█▀▀
███ ██████▄▄▀█▌
░▄░░███▀████
░▐█░░███░██▄▄
░░▄▀░████▄▄▄▀█
░█░▄███▀████ ▐█
▀▄▄███▀▄██▄
░░▄██▌░░██▀
░▐█▀████ ▀██
░░█▌██████ ▀▀██▄
░░▀███
▄▄██▀▄███
▄▄▄████▀▄████▄░░
▀▀█░░▄▄▄▄████░░
▐█▀▄▄█████████
████▀███░░▄░
▄▄██░███░░█▌░
█▀▄▄▄████░▀▄░░
█▌████▀███▄░█░
▄██▄▀███▄▄▀
▀██░░▐██▄░░
██▀████▀█▌░
▄██▀▀██████▐█░░
███▀░░
tranthidung
Legendary
*
Offline Offline

Activity: 2254
Merit: 3994


Farewell o_e_l_e_o


View Profile WWW
June 06, 2021, 02:06:29 PM
 #4

As far as I'm concerned about iphomme is that he/she is still learning about crypto related topics and I even replied in the post that he/she made and provide help and information for him/her to learn. You can see it in the profile that he/she just registered not long ago. Let's guide this member and have more people to contribute in this forum.
@Iphomme is welcome.

Because the lack of understanding and practice with the Quote button, I recommend @Iphomme to visit the [INFO] Video resources for newbies getting started and watch this tutorial video Bitcointalk.org - Post formating & trimming quotes.

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
khaled0111
Legendary
*
Offline Offline

Activity: 2506
Merit: 2840


Top Crypto Casino


View Profile WWW
June 06, 2021, 08:43:41 PM
 #5

Disadvantages
° The secret key is shared. Consequently, the risk of compromise is higher.
This is in fact the main disadvantage of symmetric encryption. Sharing the key with the receiver is very challenging as there is a risk a malicious party might intercept it and use it to decrypt the exchanged messages. Asymmetric encryption solves this problem by using a key pair where the public key can be shared publicly while the private key have to be kept secret.
OP, if you have the time, I'll appreciate if you focus more on the pros and cons of each of these encryption types and give some examples and real life applications as this is a very interesting subject.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
nakamura12 (OP)
Hero Member
*****
Offline Offline

Activity: 2254
Merit: 669


Bitcoin Casino Est. 2013


View Profile
June 07, 2021, 05:04:47 AM
 #6

This is in fact the main disadvantage of symmetric encryption. Sharing the key with the receiver is very challenging as there is a risk a malicious party might intercept it and use it to decrypt the exchanged messages. Asymmetric encryption solves this problem by using a key pair where the public key can be shared publicly while the private key have to be kept secret.
OP, if you have the time, I'll appreciate if you focus more on the pros and cons of each of these encryption types and give some examples and real life applications as this is a very interesting subject.
I'll do it if I have enough time since I have other things to do and have little time to join discussions. If have enough time, I'll even include some example of encryption program like the one used in electrum if it's symmetric or asymmetric encryption. But for now, I'll enjoy some rest a little bit. Thanks for the suggestion mate.

███▄▀██▄▄
░░▄████▄▀████ ▄▄▄
░░████▄▄▄▄░░█▀▀
███ ██████▄▄▀█▌
░▄░░███▀████
░▐█░░███░██▄▄
░░▄▀░████▄▄▄▀█
░█░▄███▀████ ▐█
▀▄▄███▀▄██▄
░░▄██▌░░██▀
░▐█▀████ ▀██
░░█▌██████ ▀▀██▄
░░▀███
▄▄██▀▄███
▄▄▄████▀▄████▄░░
▀▀█░░▄▄▄▄████░░
▐█▀▄▄█████████
████▀███░░▄░
▄▄██░███░░█▌░
█▀▄▄▄████░▀▄░░
█▌████▀███▄░█░
▄██▄▀███▄▄▀
▀██░░▐██▄░░
██▀████▀█▌░
▄██▀▀██████▐█░░
███▀░░
nakamura12 (OP)
Hero Member
*****
Offline Offline

Activity: 2254
Merit: 669


Bitcoin Casino Est. 2013


View Profile
June 09, 2021, 04:47:25 PM
 #7

I have added an example of encrypted message that you guys can decrypt using the key I provided. There is a site that you can use to decrypt for each encryption type. For now, you can see that I only put examples of 256 bits and 1024 bits for key size. I also mentioned in the op that it's for testing purposes only. UP.

███▄▀██▄▄
░░▄████▄▀████ ▄▄▄
░░████▄▄▄▄░░█▀▀
███ ██████▄▄▀█▌
░▄░░███▀████
░▐█░░███░██▄▄
░░▄▀░████▄▄▄▀█
░█░▄███▀████ ▐█
▀▄▄███▀▄██▄
░░▄██▌░░██▀
░▐█▀████ ▀██
░░█▌██████ ▀▀██▄
░░▀███
▄▄██▀▄███
▄▄▄████▀▄████▄░░
▀▀█░░▄▄▄▄████░░
▐█▀▄▄█████████
████▀███░░▄░
▄▄██░███░░█▌░
█▀▄▄▄████░▀▄░░
█▌████▀███▄░█░
▄██▄▀███▄▄▀
▀██░░▐██▄░░
██▀████▀█▌░
▄██▀▀██████▐█░░
███▀░░
nakamura12 (OP)
Hero Member
*****
Offline Offline

Activity: 2254
Merit: 669


Bitcoin Casino Est. 2013


View Profile
June 25, 2021, 05:14:20 PM
 #8

Bump for newbies to know about encryption and trying out themselves. Feel free to what I missed about encryption in this thread and i'll update it once I read and know what I didn't/forgot to add. Test your knowledge on the examples that I provided. You never know that it will come in handy in the future.

███▄▀██▄▄
░░▄████▄▀████ ▄▄▄
░░████▄▄▄▄░░█▀▀
███ ██████▄▄▀█▌
░▄░░███▀████
░▐█░░███░██▄▄
░░▄▀░████▄▄▄▀█
░█░▄███▀████ ▐█
▀▄▄███▀▄██▄
░░▄██▌░░██▀
░▐█▀████ ▀██
░░█▌██████ ▀▀██▄
░░▀███
▄▄██▀▄███
▄▄▄████▀▄████▄░░
▀▀█░░▄▄▄▄████░░
▐█▀▄▄█████████
████▀███░░▄░
▄▄██░███░░█▌░
█▀▄▄▄████░▀▄░░
█▌████▀███▄░█░
▄██▄▀███▄▄▀
▀██░░▐██▄░░
██▀████▀█▌░
▄██▀▀██████▐█░░
███▀░░
NotATether
Legendary
*
Online Online

Activity: 1582
Merit: 6717


bitcoincleanup.com / bitmixlist.org


View Profile WWW
July 07, 2021, 11:32:07 PM
Merited by nakamura12 (1)
 #9

Asymmetric Encryption

~

Disadvantages
° Only one key (symmetric key) is used, and the same key is used to encrypt and decrypt the message.
° The secret key is shared. Consequently, the risk of compromise is higher.

Not entirely correct. Most protocols that need to encrypt data are using Diffie-Hellman to generate an intermediate key that can be shared without leaking the main private key. Diffie-Hellman is a scheme where two parties can send secret information to each other without it ever being understood by an intermediary. You take the other party's public key and combine it with your private key to get a third key that's only known to yourself and not shared with the other party, and you use that in symmetric encryption for communication to the other party.

The other party does the same process to get the exact same shared secret as you, thus no private keys are transmitted. It assumes the method of combining keys into a shared secret is computationally expensive.

Wikipedia's page on the subject has a simple explanation of this in terms of colors:


https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
kxwhalexk
Member
**
Offline Offline

Activity: 98
Merit: 173


View Profile
July 08, 2021, 02:32:05 AM
 #10

A simple and interesting example of asymmetric encryption
Code:

Three digits:
encryption
215(information)*91(Public key)=19565→Take the last three digits:565(Ciphertext)
Decrypt
565(Ciphertext)*11(Private key)=6215→Take the last three digits:215(information)

Four digits:
encryption
7777(information)*73(Public key)=567721→Take the last four digits:7721(Ciphertext)
Decrypt
7721(Ciphertext)*137(Private key)=1057777→Take the last three digits:7777(information)


Of course, the private key and public key in this example are actually inaccurate. If anyone else knows the algorithm, it fails.

This is just a simple example

Explanation of this example:
Code:
91*11=1001
73*137=10001
11*9091=100001
The essence is that the two algorithms (multiplication) used by the encrypting party and the decrypting party are equal to the original number multiplied by 1.

(Because the end is 1, the remaining numbers are 0, and the number in the middle is 0, which does not affect the number of 3, 4, and 5 digits)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!