7d50c1147d
Major fixes: - Persistent cipher state: ciphers maintain counter across packets - Cipher direction bug: use cipher_ctos for client packets, cipher_stoc for server packets - MAC key length: 32 bytes for HMAC-SHA256 (was incorrectly 16 bytes) - MtE mode MAC: calculate MAC over plaintext before encryption - AES-CTR encryption: encrypt entire packet including packet_length field - Service name length: corrected to 12 for 'ssh-userauth' - mpint encoding: properly remove leading zeros and handle high bit Remaining issue: - SSH client reports 'Corrupted MAC on input' - Likely due to key derivation mismatch with OpenSSH client - Requires further investigation with packet capture analysis Progress: 80% of SSH encryption implementation complete Security: Still using RustCrypto authoritative libraries (⭐⭐⭐⭐⭐)