>itojun>        cbc test vector on 
>itojun>        http://www.counterpane.com/vectors.txt
>itojun>        was generated with the above setting (little-endian
>itojun>                machine, ssleay code) and looks incorrect to me.
>Let's see, you seem to be saying that the test vectors that
>Counterpane, who are (as far as I know) the inventors of Blowfish
>(technically, B. Schneier is the inventor :-)), are giving people a
>test vector that they encourage implementors of Blowfish to use for
>correctness checking but that is incorrect?

        i was very wrong about the above.  sorry about confusion.

        i was highly confused by the fact BF_encrypt() takes two BF_LONG
        (32bit width) as host endian array.  this is rather exceptional calling
        convension in openssl itself (blowfish, case and idea functions seem to
        take host endian array, while others take net endian array).
        host endian calling convension effectively forbids us from doing
        something like this:
                char text[8] = { something };
                BF_encrypt(text, key);

        i really hope all algorithms under openssl/crypto/* to take a pointer
        to octet stream as its argument, like:
                void BF_encrypt(data, key)
                        u_int8_t *data;         <---
                        BF_KEY *key;
        and avoid such confusion.

itojun
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to