Giter VIP home page Giter VIP logo

encryption_and_digital_signature's Introduction

Encryption:

client will encrypt and send the message to the server only the server can decrypt that message since only the server has the private key

1. clinet will encrypt a message using servers's public key

2. clinet will send the message to the server

3. server will decrypt the message using its private key

SSL / TLS:

client already has the public key of the server and knows the message that must be sent by the server.

1. server will encrypt the message uing its private key

2. client will recive the encrypted message from the server

3. client will decrypt the message using server's public key

4. client will compare the decrypted message with the messge that ther server must have sent if they match that means the message has been signed by the server

Identity checking

// sender

1. hash the data with hash_algorithm

2. encrypt the hashed data with sender's private key

3. send the { encripted_and_hashed_data, hash_algorithm, original_data }

// reciver

4. recive { encripted_and_hashed_data, hash_algorithm, original_data }

5. hash the original_data with hash_algorithm

6. decrypt the encripted_and_hashed_data with senders public key

7. compare new_hashed_data with recived_hashed_data

JWT:

// issue

1. prepare raw header and payload

2. convert them to $base64urlHeader, $base64urlPayload

3. sign the $base64urlHeader, $base64urlPayload with private key

4. JWT = base64urlHeader + '.' + base64urlPayload + '.' + signatureBase64Url


// verify

1. split JWT to headerBase64Url, payloadBase64Url, signatureBase64Url

2. convert signatureBase64Url to signatureBase64

3. try to verify signatureBase64 with headerBase64Url + '.' + payloadBase64Url

encryption_and_digital_signature's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.