Hi Pedro,
Pedro Izecksohn wrote:
> sal/inc/rtl/cipher.h
>
> enum __rtl_CipherMode
> {
> rtl_Cipher_ModeECB,
> rtl_Cipher_ModeCBC,
> rtl_Cipher_ModeStream,
> rtl_Cipher_ModeInvalid,
> rtl_Cipher_Mode_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
> };
>
> According to
> http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation
> "The cipher feedback (CFB) and output feedback (OFB) modes make the block
> cipher into a stream cipher"
Indeed.
>
> So wouldn't
> #define rtl_Cipher_ModeCFB rtl_Cipher_ModeStream
> clear the code meaning?
Can you explain what you think is unclear here?
To me, rtl_Cipher_ModeStream is an API (i.e. an interface). How such a
stream mode is implemented, can be regarded as an implementation detail.
E.g., rtl_Cipher_AlgorithmBF (Blowfish, a block cipher) implements this
mode as cipher feedback mode (CFB), while rtl_Cipher_AlgorithmARCFOUR (a
stream cipher) implements this mode natively (and doesn't accept other
mode arguments).
>
> Shouldn't rtl_Cipher_ModeStream be deprecated?
As this is part of stable API, and as such used by clients, it can
probably not be deprecated.
Hope that helps,
Matthias
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]