> While blowfish internally deals with data in form of two uint32_ts, this
> doesn't say anything about how data should be interpreted if I've got one or
> more blocks of bytes that I want to encrypt with ECB/CBC.
>
> In those cases, a block of 8 bytes should be treated as 2 big endian words,
> which actually is contrary to what Adobe does in RTMPE.
>
> To make this explicit, it might be good to add a normal ECB/CBC function
> just as for AES and XTEA for this cipher, too. This is useful for
> interaction with normal systems, while the internal blowfish encryption
> routines that deal with uint32_ts are useful for anyone where a protocol
> does something weird/different (like RTMPE).

Okay, so the prototype should be :
void av_blowfish_crypt(AVBlowfish *b, uint8_t *dst, const uint8_t
*src, int count, uint8_t * iv, int decrypt);

yes?

>
> As a test for blowfish ECB, if you use the key "abcdefghijklmnopqrstuvwxyz"
> (26 bytes) and encrypt the 8 byte string "BLOWFISH", you should end up with
> 0x32 0x4E 0xD0 0xFE 0xF4 0x13 0xA2 0x03. (This test is taken from nettle,
> which has taken it from GnuPG.)


-- 
Best regards,
Samuel Pitoiset.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to