Giter Site home page Giter Site logo

c6ai / aifaq Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hyperledger-labs/aifaq

0.0 0.0 0.0 88 KB

AI FAQ Proof-of-Concept project: it provides a chatbot that replies to the questions on Hyperledger Ecosystem

License: Apache License 2.0

Python 100.00%

aifaq's Introduction

%%{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

aifaq's People

Contributors

gcapuzzi 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.