namespace Esiur.Security.Cryptography;
///
/// Creates a per-session symmetric cipher from authenticated session material.
/// Providers are registered and negotiated by .
///
public interface IEncryptionProvider
{
///
/// Gets the stable protocol name advertised during connection establishment.
///
string DefaultName { get; }
///
/// Maximum number of bytes added by
/// to one plaintext record. The transport uses this before encryption so a rejected
/// oversized send cannot consume a cipher sequence number.
///
uint MaximumRecordOverhead { get; }
///
/// Creates an independent authenticated record cipher for one session.
/// Implementations must derive independent directional keys/nonces while binding
/// every negotiation field in , authenticate each record,
/// reject replay/reordering, and fail closed on authentication errors. A cipher and
/// its nonce sequence must never be reused for another connection.
///
ISymetricCipher CreateCipher(EncryptionContext context);
}