Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8712711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:09:52+00:00 2026-06-13T05:09:52+00:00

i am using a library 1 Aes algorithm implementation now i want to change

  • 0

i am using a library 1 Aes algorithm implementation now i want to change it to another implementation of library 2 its working fine but the thing is its giving me diff encrypted data form library 1 , is it possible for Aes implementation with ECB mode 128 bit with same key and plain text but differs only in cipher text(encrypted data) for 2 different implementation?

i found one more thing that is if i pass input byte which is less then 16 byte then the encrypted data of both library is getting matched but again in library1 the decryption is perfect but in library2 its showing encrypt and decrypt are same(not exactly decrypting to original text) what would be the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:09:55+00:00Added an answer on June 13, 2026 at 5:09 am

    Given your comment that strings less than 16 bytes lead to the same output, along with your use of ECB (which you should never use), my suspicion is that one of your libraries does not actually use ECB, and instead defaults to CBC (which is a much better default) and that you are passing a NULL IV to CBC. If my theory is correct, then you should expect the first 16 bytes to always be the same, and differences to begin after that point.

    The best solution to this is to convert all of your code from ECB (which is deeply broken in all but some very rare situations) to CBC or just about any other mode you can find. CBC is the most common, and you will need to pass it an randomly generated IV.

    If switching modes is impossible, I would investigate your second library and determine how to set it into ECB mode, which it probably is not currently in. Whoever is relying on your encryption should be warned that using ECB mode leaks significant information about the plaintext. Sometimes it’s barely encrypted at all. See the entry at Wikipedia for a nice visual example of how bad it really is. This isn’t some theoretical attack. It’s really, really broken.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the as3crypto library to get the AES algorithm working on a
I am using the AES methods here: http://msdn.microsoft.com/en-us/library/system.security.cryptography.rijndaelmanaged.aspx I want to have a string
I am using PHP's mcrypt library and the AES-256 (rijndael) algorithm, which requires both
I have integrated Facebook using library in my previous application and it works fine
Am using Easeljs library. Everthing works fine in firefox and ie9 except in google
I am using a library that generates code based on IDL definitions. Its great
I am using cezPDF library in CodeIgniter 2 But it seems it can't print
I have a simple thing to do : I want to encryt data using
I'm trying to encrypt/decrypt files with PBE using AES. I'm using Bouncy Casle library(lightweight
I'm using the Botan library for encryption within Qt. I have it working to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.