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

  • Home
  • SEARCH
  • 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 6893009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:36:20+00:00 2026-05-27T06:36:20+00:00

I’m toying around with openssl to learn more about symmetric encryption. I read that

  • 0

I’m toying around with openssl to learn more about symmetric encryption. I read that one reason ECB (Electronic Codebook) mode is not as secure as CBC (Cipher Block Chaining) is due to the fact that in ECB mode, the cipher (in this case, aes-128), encrypts in 128 bits at a time, which could result in the same sequence appearing. For example, if the word “security” appears multiple times in the file, and they happen to be aligned in a 128-bit sequence, repeated sequences should appear. I’m trying to see this effect in a practical setting, specifically, with openssl.

The command I typed was:

openssl aes-128-ecb -a -in plain.txt -out cipher.txt

plain.txt contained:
0123456789abcdef0123456789abcdef

The encryption password I used was “password” (without the double quotes).

cipher.txt contained:
U2FsdGVkX18qCQ5SjLaVsLS8als/h5eJl69ATS3pD94x5kwkpmfNWauW/lUOZdeC
5a38fSS7mTUc7hT7XiXdIw==

If I am understanding everything correctly, each character in plain.txt should represent one byte. 16 characters = 128 bits. As you can see, I’m trying to align the sequences in 128-bit blocks to see the repeated sequences.

What’s wrong with the logic above?

  • 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-05-27T06:36:20+00:00Added an answer on May 27, 2026 at 6:36 am

    Your command line uses base64, salt, and padding, all of which mess things up. Try:

    openssl aes-128-ecb -in plain.text -out cipher.txt -nosalt -nopad
    

    You’ll find that cipher.txt contains 32 bytes:

     83 d2 41 fb ca 6e 8a e3 3b 6e 55 ae 2c ac 62 af
     83 d2 41 fb ca 6e 8a e3 3b 6e 55 ae 2c ac 62 af
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a
I have a French site that I want to parse, but am running into
In my XML file chapters tag has more chapter tag.i need to display chapters

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.