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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:40:18+00:00 2026-05-22T01:40:18+00:00

javax.crypto.IllegalBlockSizeException: Data must not be longer than 53 bytes i know that it is

  • 0

javax.crypto.IllegalBlockSizeException: Data must not be longer than 53 bytes
i know that it is because of the RSA algorithm can only encrypt data that has a maximum byte length of the RSA key length in bits divided with eight minus eleven padding
bytes, i.e. number of maximum bytes = key length in bits / 8 – 11.

Here am using a 512 key size so it is not allowing more than 53.but i need to maintain 512 bit key but to encrypt more than 53 byte is there any possibility .

  • 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-22T01:40:19+00:00Added an answer on May 22, 2026 at 1:40 am

    Yes and no. You can’t encrypt with RSA, but you can go with one of the following:

    1. Do the usual approach of encrypting with symmetric algorithm and passing the key encrypted with RSA. For example, to send data D to another man with public key PK:

      1. send Ek(D) (D encrypted with symmetric algorithm with key K)
      2. send Epk(K) as well (K encrypted with RSA algorithm with PK)

      The other side open PK(K) to get K, and open K(D) to get D.

    2. split the data into small pieces and encrypt each one separately.

    The first approach is a much better one for two main reasons:

    1. You don’t mess with the data (except of the encryption itself).
    2. Symmetric encryption / decryption is much faster than public encryption, for example, RC4 is a simple XOR of the data, while RSA uses a large power.

    (3. There must be a reason why PGP is so common…)

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

Sidebar

Related Questions

Talking about javax.crypto.Cipher I was trying to encrypt data using Cipher.getInstance(RSA/None/NoPadding, BC) but I
In the code javax.crypto.KeyGenerator.getInstance(AES).generateKey(); What's the size of the generated key?
When I am using (encrypt/decrypt) javax.crypto.Cipher class for long string, some characters in output
Where do I find the javax.crypto source code? --update Thanks for the OpenJdk version,
Consider: import java.awt.*; import javax.swing.*; import java.awt.event.*; import javax.crypto.*; import javax.crypto.spec.*; import java.security.*; import
I want to do AES CBC encryption in Java. I'm using javax.crypto . After
I am new to encryption. I have looked at the javax.crypto documentation and got
How to get back from encoded byte[] to java.security.Key? import java.security.Key; import javax.crypto.SecretKey; import
i get the error password , salt not resolved . any suggestions ? package
Short Version: I write an 8 byte, byte array filled with random bytes 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.