Refactored file encryption/decryption logic for P2P transfers
- Reworked the core logic for encrypting and decrypting files exchanged between users - Improved key derivation and session handling for file chunks - Enhanced integrity checks to prevent tampering and replay attacks - Work in progress: adding hardened encryption schemes and conducting fault-tolerance testing
This commit is contained in:
@@ -4053,6 +4053,18 @@ handleSystemMessage(message) {
|
||||
|
||||
console.log('✅ Session activation handled successfully');
|
||||
|
||||
if (this.fileTransferSystem && this.isConnected()) {
|
||||
console.log('🔄 Synchronizing file transfer keys after session activation...');
|
||||
|
||||
if (typeof this.fileTransferSystem.onSessionUpdate === 'function') {
|
||||
this.fileTransferSystem.onSessionUpdate({
|
||||
keyFingerprint: this.keyFingerprint,
|
||||
sessionSalt: this.sessionSalt,
|
||||
hasMacKey: !!this.macKey
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
console.error('❌ Failed to handle session activation:', error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user