v0.0.13: Sender Keys for efficient group encryption
Protocol (sender_keys.rs): - SenderKey: symmetric key with chain ratchet (forward secrecy per chain) - generate(), rotate(), encrypt(), decrypt() - SenderKeyDistribution: share key via 1:1 encrypted channel - SenderKeyMessage: encrypted group message (O(1) instead of O(N)) - Chain key ratchets forward on each message (HKDF) - Generation counter for key rotation tracking - 4 tests: basic, multi-message, rotation, old-key rejection WireMessage: - GroupSenderKey variant: encrypted group message - SenderKeyDistribution variant: key sharing Server: dedup handles new variants. CLI TUI + recv: stub handlers for new message types. 23/23 protocol tests pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,10 @@ fn extract_message_id(data: &[u8]) -> Option<String> {
|
||||
WireMessage::FileHeader { id, .. } => Some(id),
|
||||
WireMessage::FileChunk { id, .. } => Some(id),
|
||||
WireMessage::Receipt { message_id, .. } => Some(message_id),
|
||||
WireMessage::GroupSenderKey { id, .. } => Some(id),
|
||||
WireMessage::SenderKeyDistribution { sender_fingerprint, group_name, .. } => {
|
||||
Some(format!("skd:{}:{}", sender_fingerprint, group_name))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
None
|
||||
|
||||
@@ -30,6 +30,10 @@ fn extract_message_id(data: &[u8]) -> Option<String> {
|
||||
WireMessage::FileHeader { id, .. } => Some(id),
|
||||
WireMessage::FileChunk { id, .. } => Some(id),
|
||||
WireMessage::Receipt { message_id, .. } => Some(message_id),
|
||||
WireMessage::GroupSenderKey { id, .. } => Some(id),
|
||||
WireMessage::SenderKeyDistribution { sender_fingerprint, group_name, .. } => {
|
||||
Some(format!("skd:{}:{}", sender_fingerprint, group_name))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user