Update BRING_THE_NOISE.md

This commit is contained in:
jack
2025-07-23 09:33:07 +02:00
committed by GitHub
parent 6be5d2587f
commit b461399743
-19
View File
@@ -128,16 +128,6 @@ let encrypted = try noiseService.encrypt(messageData, for: peerID)
let decrypted = try noiseService.decrypt(encryptedData, from: peerID)
```
### Channel Encryption
Password-protected channels use Noise for key distribution:
```swift
// Share channel key securely
let keyPacket = createChannelKeyPacket(password: password, channel: channel)
let encrypted = try encrypt(keyPacket, for: peerID)
```
## Security Properties
### Forward Secrecy
@@ -157,15 +147,6 @@ let encrypted = try encrypt(keyPacket, for: peerID)
## Implementation Details
### Key Derivation
```swift
// HKDF for key derivation
func hkdf(salt: Data, ikm: Data, info: Data, length: Int) -> Data
// Derive channel keys with PBKDF2
func deriveChannelKey(password: String, salt: Data) -> SymmetricKey
```
### Cryptographic Primitives
- **DH**: X25519 (Curve25519)
- **Cipher**: ChaChaPoly (AEAD)