Inventrohyder / will

0 stars 0 forks source link

SRP #13

Open Inventrohyder opened 1 year ago

Inventrohyder commented 1 year ago

Secure Remote Password Protocol (SRP) based on the Diffie-Hellman Key Exchange.

sequenceDiagram
    participant Alice
    participant Bob
    Alice->>Alice: Selects some salt (s)
    Alice->>Alice: Computes hash of password (p) and salt (s)
    Alice->>Alice: Calculates V using generator value (g) and hash x
    Alice->>Bob: Send V and s 
    Bob->>Bob: Index V and s as I
    Bob->>Alice: Send I
    Alice->>Alice: Generates a number A
    Alice->>Bob: Send I and A
    Bob->>Bob: Generates B from Bob's secret b, generator value g and V from Alice before
    Bob->>Alice: Sends B and salt (s) 
    Alice->>Alice: Computes u from A and B
    Bob->>Bob: Computes u from A and B
    Alice->>Alice: computes hash of s, I and p, then calculate a shared key Kc
    Bob->>Bob:  Computes session key Ks
    Alice->>Bob: Send Kc
    Bob->>Alice: Confirm that Kc == Ks
Inventrohyder commented 1 year ago
sequenceDiagram
    participant Alice
    participant Bob
    Bob->>Alice: Verify password
    Alice->>Alice: Generate KEK from password
    Alice->>Alice: Generate random DEK (Decryption Key)
    Alice->>Alice: Encrypt KEK with DEK
    Alice->>Bob: Send Encrypted DEK
    Bob->>Bob: Save Encrypted DEK
Inventrohyder commented 1 year ago
sequenceDiagram
    participant Alice
    participant Bob
    Bob->>Alice: Verify password
    Bob->>Alice: Send Encrypted DEK
    Alice->>Alice: Decrypt DEK
    Alice->>Alice: Use DEK to encrypt will
    Alice->>Bob: Send Encrypted will
    Bob->>Bob: Save Encrypted will