Re: [key4.db] IV size for aes256-CBC

Louis Abraham via dev-tech-crypto <[email protected]>
Newsgroups gmane.comp.mozilla.crypto
Message-ID <CAPdmES8nheU-WVFXF_aLMGp0U1O1a1-GQcmh3HVYaY3z4n61xw@mail.gmail.com>
Hi Matthew,

Awesome, thanks and sorry for contacting the wrong list!

Since then, I found the answer to the 14 bytes question:
https://hg.mozilla.org/projects/nss/rev/fc636973ad06392d11597620b602779b4af312f6#l6.49
Basically the DER encoding is used instead for compatibility with a bugged
implementation.

I tried prepending b'\x04\x0e' to DER-encode the IV. However, the value I
get makes no sense (and even has an incorrect padding according to pkcs7
<https://tools.ietf.org/html/rfc2315>).


Best,

Louis

Le ven. 27 mars 2020 à 19:57, Matthew N. <[email protected]> a écrit :

> Hi Louis,
>
> The dev-tech-crypto mailing list I'm redirecting this to should be able to
> get you an answer.
>
> Thanks,
> MattN
>
>
> On Fri, Mar 27, 2020 at 8:51 AM Louis Abraham <[email protected]>
> wrote:
>
>> Hi,
>>
>> I'm the main developer of https://github.com/louisabraham/ffpass
>> We are currently trying to accommodate the (not so) recent cryptographic
>> changes in key4.db.
>>
>> If I understand correctly, key4.db contains a table metadata. The value
>> item2 defines a cryptographic algorithm in the DER format.
>>
>> In the latest version of Firefox, this algorithm is PBES2, using
>> aes256-CBC as the encryption algorithm.
>>
>> I'm facing a little problem when trying to execute aes256-CBC because the
>> IV size is only 14 bytes (56 bits) instead of the 64 bits defined in the
>> spec.
>>
>> Could you please help me to understand?
>>
>> Best,
>> Louis
>>
>
-- 
dev-tech-crypto mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-crypto
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.