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 793947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:14:13+00:00 2026-05-14T22:14:13+00:00

If I am using a block cipher such as AES which has a block

  • 0

If I am using a block cipher such as AES which has a block size of 128 bits, what do I do if my data is not an even multiple of 128 bits? I am working with packets of data and do not want to change the size of my packet when encrypting it, yet my data is not an even multiple of 128?

Does the AES block cipher allow handling of a final block that is short without changing the size of my message once encrypted?

  • 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-14T22:14:13+00:00Added an answer on May 14, 2026 at 10:14 pm

    That kind of detail depends on the chaining mode which you use. The chaining mode is what defines how many times you invoke the AES primitive. and on what, for a given input message. The simplest chaining mode consists in simply splitting the input data into successive 16-byte blocks and encrypting each of them independently; this is called ECB (as “Electronic Code Book”) and it is known to have weaknesses (namely, if two input blocks are identical, something which is frequent in “real life” data, then the two corresponding output blocks will be equal to each other as well, and anybody can see that).

    Some chaining modes enlarge the data, i.e. the encrypted message will be slightly larger than the input message. Other chaining modes (e.g. CTR) do not. Almost all secure chaining modes require handling an “initial value”, which is a piece of data (usually the same size than a block) which needs not be secret, but must be known to both the sender and the receiver, and must be distinct for each message. Some modes (e.g. CBC) require a uniformly random IV, whereas some other modes will be happy with a simple counter. It is customary to send the IV along with the encrypted message. You could also derive the IV from the secret key itself with a hash function.

    These things are tricky, and it is difficult to know whether you did it right: security cannot be tested; a weak cryptosystem compiles and runs just like any other application. Designing your own cryptographic protocol is not recommended. At all. Employing robust primitives is no guarantee that the result will be secure.

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

Sidebar

Ask A Question

Stats

  • Questions 449k
  • Answers 449k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In many cases, your best solution may be splitting up… May 15, 2026 at 8:12 pm
  • Editorial Team
    Editorial Team added an answer You're close... The model binder considers all of the data… May 15, 2026 at 8:12 pm
  • Editorial Team
    Editorial Team added an answer How about HttpWebRequest. May 15, 2026 at 8:12 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.