Giter Site home page Giter Site logo
%%{init: {'themeVariables': {'fontFamily': 'Bernard MT Condensed', 'fontSize': '24px','fontWeight': 'bold'}}}%%
sequenceDiagram
    participant Alice as πŸ‘© Alice
    participant Bob as πŸ‘¨ Bob
    participant Server as πŸ’» Server

    rect rgb(200, 220, 255)
        note over Alice: Step 1
        Alice ->> Alice: πŸ‘© generates private key a πŸ”
        Bob ->> Bob: πŸ‘¨ generates private key b πŸ”
    end

    rect rgb(200, 220, 255)
        note over Alice: Step 2
        Alice ->> Alice: πŸ‘© computes public key A = g^a mod p πŸ”‘
        Alice ->> Bob: πŸ‘© sends public key A to πŸ‘¨ βœ‰οΈ
    end

    rect rgb(200, 220, 255)
        note over Bob: Step 3
        Bob ->> Bob: πŸ‘¨ computes public key B = g^b mod p πŸ”‘
        Bob ->> Alice: πŸ‘¨ sends public key B to πŸ‘© βœ‰οΈ
    end

    rect rgb(200, 220, 255)
        note over Alice, Bob: Step 4
        Alice ->> Alice: πŸ‘© computes shared secret s = B^a mod p = g^(ab) mod p πŸ”
        Bob ->> Bob: πŸ‘¨ computes shared secret s = A^b mod p = g^(ab) mod p πŸ”
    end

    rect rgb(200, 220, 255)
        note over Alice, Server: Step 5
        Alice ->> Server: πŸ‘© sends encrypted message to Server πŸ’»: {Alice, Bob, s} βœ‰οΈ
        Bob ->> Server: πŸ‘¨ sends encrypted message to Server πŸ’»: {Alice, Bob, s} βœ‰οΈ
    end

    rect rgb(200, 220, 255)
        note over Server: Step 6
        Server ->> Server: πŸ’» matches secrets received from πŸ‘© and πŸ‘¨
        Server ->> Server: πŸ’» generates session key Ks πŸ”
        Server ->> Alice: πŸ’» sends session key Ks to πŸ‘© βœ‰οΈ
        Server ->> Bob: πŸ’» sends session key Ks to πŸ‘¨ βœ‰οΈ
    end

    rect rgb(200, 220, 255)
        note over Alice, Bob: Step 7
        Alice ->> Alice: πŸ‘© receives session key Ks from Server πŸ”
        Bob ->> Bob: πŸ‘¨ receives session key Ks from Server πŸ”
    end

    rect rgb(200, 220, 255)
        note over Alice, Bob: Result
        Alice ->> Bob: πŸ‘© πŸ‘¨ can now communicate securely using session key Ks πŸ”
    end
Loading

c6ai's Projects

c6ai doesn’t have any public repositories yet.

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.