โ— Shell
clean mode source โ†—

c6ai - Overview

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