<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Texto de bal\00E3o Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EstiloDeEmail17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.TextodebaloChar
        {mso-style-name:"Texto de bal\00E3o Char";
        mso-style-priority:99;
        mso-style-link:"Texto de bal\00E3o";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi there,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’ve been trying to use DES_EDE3_CFB1 encryption in openssl version 1.0.1f but I couldn’t make it work correctly.<o:p></o:p></p><p class=MsoNormal>My understanding is that EVP_CipherUpdate is expecting the input data length (inl) in bytes, not bits as expected.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I tried digging a little the GitHub repository but I’m not sure if it has already been fixed in newer versions.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>According to the link below, AES seems to be handling CFB1 as an exception in crypto/evp/e_aes.c file. However I couldn’t find similar exception for DES.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><a href="https://github.com/openssl/openssl/search?utf8=%E2%9C%93&q=EVP_CIPH_FLAG_LENGTH_BITS">https://github.com/openssl/openssl/search?utf8=%E2%9C%93&q=EVP_CIPH_FLAG_LENGTH_BITS</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Anyone here could ever encode data with bit length which is not a multiple of 8?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Example from FIPS tests:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-left:36.0pt'><span lang=PT-BR>KEY1 = 04f16e92fd3b463e<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><span lang=PT-BR>KEY2 = 04f16e92fd3b463e<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><span lang=PT-BR>KEY3 = 04f16e92fd3b463e<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'>IV = c7203aec8a805910<o:p></o:p></p><p class=MsoNormal style='margin-left:36.0pt'>PLAINTEXT = 011<o:p></o:p></p><p class=MsoNormal style='margin-left:36.0pt'>CIPHERTEXT = 110<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks very much,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Marcus<o:p></o:p></p></div></body></html>