Re: Encrypt with RijndaelManaged and decrypt with OpenSSL
From: Michel Gallant (neutron_at_istar.ca)
Date: 04/21/05
- Next message: Michel Gallant: "Re: Encrypt with RijndaelManaged and decrypt with OpenSSL"
- Previous message: Rafal Gwizdala: "Re: Encrypt with RijndaelManaged and decrypt with OpenSSL"
- In reply to: Rafal Gwizdala: "Re: Encrypt with RijndaelManaged and decrypt with OpenSSL"
- Next in thread: Michel Gallant: "Re: Encrypt with RijndaelManaged and decrypt with OpenSSL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 21 Apr 2005 17:53:23 -0400
According to Openssl docs for this:
"When a password is being specified using one of the other options,
the IV is generated from this password."
- Mitch
"Rafal Gwizdala" <gwrafal@poczta.onet.pl> wrote in message news:%23Uv46QrRFHA.3704@TK2MSFTNGP12.phx.gbl...
> Now let me discuss a bit with myself
>
> I checked your commandline and encrypted a short text file
> Typed the exact command as you gave, and
> 1. It asked me for encryption password - so the password was used to
> generate the IV
> 2. The input file was 11 bytes, the result is 32, so I think that the file
> contains the IV (16 bytes) + 11 bytes of data + some padding to full block
> size.
> 3. The encrypted file contains:
> Salted__ß?ÝwNÔ\6àÄySw} Ì!' ýÁkQ
> I can speculate that the prefix 'Salted....' is the initialization vector
> (in some publications IV is called a 'salt' value)
>
> Can you verify that?
>
> Best regards
> RG
>
> "Rafal Gwizdala" <gwrafal@poczta.onet.pl> wrote in message
> news:eLbOcKrRFHA.3120@TK2MSFTNGP10.phx.gbl...
> > Hello,
> >
> > Well, it is possible that openssl prepends (or appends) the iv to
> > encrypted output. I just don't know openssl enough to give you an answer.
> > But please post an answer here if you check the openss behavior, I'm also
> > interested.
> >
> > It is not important how do you obtain the IV. It simply must be the same
> > in encryption and in decryption.
> > Some aes-encryption utilities use a text password that is used to generate
> > IV (IV = some value based on SHA-1 or md5 of password). You could also
> > obtain it from the encryption key (using the same technique), I don't
> > think this will lower the security anyhow in your case.
> > But on a second thought:
> > As I see it, you must pass the IV the same way as openssl passes it,
> > otherwise Sipura device won't be able to get it - so don't think how to
> > get the IV but how to pass it with the encrypted file. If Sipura says that
> > it is enough to use the commandline and to send only the encrypted file to
> > the device, then the IV must be somewhere in the encrypted file - so it is
> > either prepended or appended. The second option is that the IV is fixed
> > and not passed with the file (stored in device), but the commandline does
> > not specify any IV, so this is probably not true.
> >
> > Best regards,
> > Rafal Gwizdala
> >
> > "chlock" <taylor@innovaworks.net> wrote in message
> > news:1114106658.666175.97640@z14g2000cwz.googlegroups.com...
> >> Rafal-
> >>
> >> This is a point that I'm a bit stuck on...because the devices have
> >> to decrypt the file, and I can only give them the key. There is no way
> >> for me to provide them witht the IV. Sipura provides a command line
> >> tool that allows me to encrypt the files. It is obviously a wrapper for
> >> the OpenSSL.exe. It has some other functionality, but essentially it's
> >> use is equivelent to:
> >>
> >> OpenSSL> enc -aes-256-cbc -in MyInputFile -out MyOutputFile
> >>
> >> So. My question is this...or maybe my questions are these:
> >>
> >> 1. If I add the -p switch, I can see that OpenSSL is generating an IV.
> >> Is there some way to pass the IV to the recipient in the encrypted
> >> data? I've seen some references that seem to indicate the the IV may be
> >> prepended to the output...???
> >> 2. Perhaps there is some behavior that allows each party to derive the
> >> IV from the Key?
> >>
> >
> >
>
>
- Next message: Michel Gallant: "Re: Encrypt with RijndaelManaged and decrypt with OpenSSL"
- Previous message: Rafal Gwizdala: "Re: Encrypt with RijndaelManaged and decrypt with OpenSSL"
- In reply to: Rafal Gwizdala: "Re: Encrypt with RijndaelManaged and decrypt with OpenSSL"
- Next in thread: Michel Gallant: "Re: Encrypt with RijndaelManaged and decrypt with OpenSSL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|