On Mon, Oct 8, 2012 at 3:48 PM, James Coglan <[email protected]> wrote:
> Hi all,
>
> I'm trying to implement a crypto system, and want to make sure I'm doing
> something portable, i.e. the ciphertexts I generate can be understood by any
> language with openssl functionality. I have a Ruby program that uses
> AES-256-CBC to encrypt some data, and I want to make sure I can generate the
> same ciphertext using Node.
>
> What mode of operation does crypto.createCipher('aes256') use? I assume it's
> not a bare AES function since it can encrypt arbitrary amounts of data, so
> it must be using a construction like CBC or CTR. Which one does it use, and
> can it be changed by the user?
It's CBC. Here is how you create an AES-256 cipher with a different mode:
cipher = crypto.createCipher('aes-256-ecb', key); // *not* 'aes256-ecb'
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en