[erlang-questions] blowfish cbc mode decrypt

Radoslaw Gruchalski radek@REDACTED
Thu Nov 5 14:38:13 CET 2015

You say your data is:
<<IvSpec>> == <<RandomIv>>
But you read:
Is your data <<IvSpec:8/binary, IV:8/binary, Rest/binary>>
Should it not be just:
<<IV:8/binary, Rest/binary>>

Sent from Outlook

From: Bogdan Andu <bog495@REDACTED>
Sent: Thursday, November 5, 2015 2:26 p.m.
Subject: [erlang-questions] blowfish cbc mode decrypt
To: Erlang <erlang-questions@REDACTED>

           I have a stream of data called EncryptedData (with randomiv header specification).           
I want to decrypt  using:           
crypto:block_decrypt(blowfish_cbc, hexstr2bin(Key), IV, Rest).           
EncryptedData is formatted as follows:           
          <<IvSpec:8/binary, IV:8/binary, Rest/binary>>          
         IvSpec == <<"RandomIV">>         
        However the decryption does not works and garbage is generated        
                      (the function  ) .        
       What could be done given the fact that IV is an 8-byte quantity       
      the Key is formatted according to crypto test suites and is 16 bytes long       
     Am I missing something?     
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151105/d8c1e878/attachment.htm>

More information about the erlang-questions mailing list