<div dir="ltr"><div><div><div><div><div><div><br></div>hi,<br><br></div>I really need some pointers about this issue<br><br></div>as i tried all kinds of combinations of IV and body<br></div>to be decrypted.<br><br></div>Am i missing something or there is a bug in cipher<br></div>blowfish_cbc ?<br><div><br><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 5, 2015 at 3:51 PM, Bogdan Andu <span dir="ltr"><<a href="mailto:bog495@gmail.com" target="_blank">bog495@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div> Data to be decrypted (arrived on socket, etc) is:<br><<IvSpec:8/binary, IV:8/binary, Rest/binary>> = EncryptedData<br><br></div>IV is ectracted form the 8-byte prepanded value preceding <br></div>IvSpec which has the value RandomIV.<br><br></div>decryption of Rest should be initialized with IV.<br><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 5, 2015 at 3:38 PM, Radoslaw Gruchalski <span dir="ltr"><<a href="mailto:radek@gruchalski.com" target="_blank">radek@gruchalski.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="padding-left:16px;padding-right:16px;padding-bottom:8px"><div>You say your data is:</div><div><br></div><div><<IvSpec>> == <<RandomIv>></div><div><br></div><div>But you read:</div><div><br></div><div>Is your data <<IvSpec:8/binary, IV:8/binary, Rest/binary>></div><div><br></div><div>Should it not be just:</div><div><br></div><div><<IV:8/binary, Rest/binary>></div><div><br></div><div>?<br><br><div>Sent from <a href="http://aka.ms/Ox5hz3" target="_blank">Outlook</a></div><br></div></div>
<div class="gmail_quote">_____________________________<br>From: Bogdan Andu <<a dir="ltr" href="mailto:bog495@gmail.com" target="_blank">bog495@gmail.com</a>><br>Sent: Thursday, November 5, 2015 2:26 p.m.<br>Subject: [erlang-questions] blowfish cbc mode decrypt<br>To: Erlang <<a dir="ltr" href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>><div><div><br><br><br> <div dir="ltr"> <div> <div> <div> <div> <div> <div> <div> <div> <div> Hi, <br> <br> </div>I have a stream of data called EncryptedData (with randomiv header specification). <br>I want to decrypt using: <br>crypto:block_decrypt(blowfish_cbc, hexstr2bin(Key), IV, Rest). <br> <br> </div> <div> where: <br> </div> <div> <br>EncryptedData is formatted as follows: <br> </div><<IvSpec:8/binary, IV:8/binary, Rest/binary>> <br> <br> </div>IvSpec == <<"RandomIV">> <br> <br> </div>However the decryption does not works and garbage is generated <br> </div> <div> (the function ) . <br> </div> <div> <br> </div>What could be done given the fact that IV is an 8-byte quantity <br> </div>the Key is formatted according to crypto test suites and is 16 bytes long <br> <br> </div>Am I missing something? <br> <br> </div>Thanks, <br> <br> </div>Bogdan <br> </div> <br><br></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>