Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: AES Interoperability between Perl and C#

by Thelonius (Priest)
on Nov 17, 2005 at 10:23 UTC ( [id://509356]=note: print w/replies, xml ) Need Help??


in reply to Re^2: AES Interoperability between Perl and C#
in thread AES Interoperability between Perl and C#

My program works fine for strings that are not multiples of 16 bytes.

I could not get Crypt:CBC to work in a compatible way. I might have gotten in to work by experimenting with padding and the IV on both sides, but since my method works, there didn't seem to be any advantage.

  • Comment on Re^3: AES Interoperability between Perl and C#

Replies are listed 'Best First'.
Re^4: AES Interoperability between Perl and C#
by ikegami (Patriarch) on Nov 17, 2005 at 22:57 UTC

    Oh I see! You (redundantly) include the length of the plaintext, and require extra code on the decryption side to remove the padding. If you used Crypt::CBC, you wouldn't need to include the length of the plaintext in the ciphertext.

    Caveat: I'm assuming FlushFinalBlock uses a padding method compatible with Crypt::CBC's. Well, Crypt::CBC since Crypt::CBC can handle any padding, so I guess I meant "compatible with the default Crypt::CBC padding method".

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://509356]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-06-22 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.