Is hashing an optional step to use with public key cryptography for blockchain
I am confused by the public key cryptography versions that I've read so far. Are the steps optional, dependable on the types of blockchain or they are referring to different methods?
Version 1 =========
Alice to Bob
Step 1. Content > Hash > Digest > Encrypt with Alice's private key > Digital Signature
Step 2. Digital Signature > Encrypt with Alice's private key + Bob's public key > Digest
Step 3. Send digest to Bob
In the above steps, Alice uses private key TWICE. First to encrypt the content's digest. Second time encrypt together with Bob's public key.
Is hashing optional?
Is the hash generated automatically once it is encrypted with Alice's private key?
Or encrypting with Alice's private key step is optional?
Is step 2 optional too? or are all the above steps automated?
Bob received
Step 1. Digest > Alice's public key > Content
Step 2. Digest > Bob's private key > Content
=
=
Version 2 =========
Alice to Bob
Step1. Alice generates the keys pair
Step2. Alice gives Bob her public key
Step3. Alice encrypts content with her own private key
In the above steps, Alice didn't hash the content first.
Bob received
Step1. Bob decrypts with Alice's public key
What if someone else has Alice's public key, aren't they able to decrypt it too?
=
=
Version 3 =========
Alice to Bob
Step1. Alice encrypts with Bob's public key
Bob received
Step1. Bob decrypts with his own private key
=
=
https://ift.tt/2AoJdyR
Comments
Post a Comment