Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Dec 24, 2024
1 parent a30cd2c commit e9f942a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/19_crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ This approach ensures that both devices independently derive the same encryption
Once the secret key is derived, it is used to encrypt and decrypt all messages exchanged between devices. The process is as follows:

1. **Encryption**:
- The sending device uses the secret key to encrypt the plaintext message using AES-GCM.
- The resulting ciphertext, along with the `nonce` and `tag`, is packaged into a message and sent over the network.
- The sending device uses the secret key to encrypt the plaintext message using AES-GCM.
- The resulting ciphertext, along with the `nonce` and `tag`, is packaged into a message and sent over the network.

2. **Decryption**:
- The receiving device extracts the `ciphertext`, `nonce`, and `tag` from the message.
- Using the same secret key, it decrypts the `ciphertext` and verifies the message integrity using the `tag`.
- The receiving device extracts the `ciphertext`, `nonce`, and `tag` from the message.
- Using the same secret key, it decrypts the `ciphertext` and verifies the message integrity using the `tag`.

0 comments on commit e9f942a

Please sign in to comment.