Can not use big prime number for pair of key of RSA Algorithm [on hold]Prime number theorem - RSACompare two approaches for cracking RSA keyWhy isn't a table used to solve the large number factoring problem?Are the prime numbers used for RSA encryption known?How can I edit or build an app to encrypt data, and build a decryption key?Why we need pixel data encryption (perceptual encryption), not the complete file encryption (conventional encryption)?Why use RSA-2048 for plaintext when AES-256 is much more secure?Why does this RSA example break when: 1) setting p or q as non-prime, or 2) setting p and q as the same number?Why is a Diffie-Hellman key exchange required when RSA is already being used for key exchange in TLS?Two working decipher keys giving various, valid results for one ciphered message - is it possible?

Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?

Symmetry in quantum mechanics

Shall I use personal or official e-mail account when registering to external websites for work purpose?

"listening to me about as much as you're listening to this pole here"

Is there a name of the flying bionic bird?

Is Social Media Science Fiction?

Does it makes sense to buy a new cycle to learn riding?

Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?

New order #4: World

What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?

Why is my log file so massive? 22gb. I am running log backups

What is GPS' 19 year rollover and does it present a cybersecurity issue?

Manga about a female worker who got dragged into another world together with this high school girl and she was just told she's not needed anymore

Pristine Bit Checking

What is the offset in a seaplane's hull?

Where else does the Shulchan Aruch quote an authority by name?

Crop image to path created in TikZ?

Finding files for which a command fails

extract characters between two commas?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

Doomsday-clock for my fantasy planet

Copycat chess is back

What is it called when one voice type sings a 'solo'?

What happens when a metallic dragon and a chromatic dragon mate?



Can not use big prime number for pair of key of RSA Algorithm [on hold]


Prime number theorem - RSACompare two approaches for cracking RSA keyWhy isn't a table used to solve the large number factoring problem?Are the prime numbers used for RSA encryption known?How can I edit or build an app to encrypt data, and build a decryption key?Why we need pixel data encryption (perceptual encryption), not the complete file encryption (conventional encryption)?Why use RSA-2048 for plaintext when AES-256 is much more secure?Why does this RSA example break when: 1) setting p or q as non-prime, or 2) setting p and q as the same number?Why is a Diffie-Hellman key exchange required when RSA is already being used for key exchange in TLS?Two working decipher keys giving various, valid results for one ciphered message - is it possible?













0












$begingroup$


I'm new to cryptography. I have a binary image with 64x64 pixel in size. I perform an encryption to the image using RSA Algorithm. I wanna ask something bothering me, why can I not use big prime numbers as a pair of key for the RSA algorithm? Thank you in advance.










share|improve this question









New contributor




user67286 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$



put on hold as unclear what you're asking by forest, Squeamish Ossifrage, Ilmari Karonen, Ella Rose 10 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.













  • 4




    $begingroup$
    You can, nobody is preventing you! There is, however, a problem with performance. The larger modulus the slower the encryption. Keep in mind that the general practice is using Hybrid Encryption.
    $endgroup$
    – kelalaka
    20 hours ago










  • $begingroup$
    Big prime numbers for what part of the key pair? An RSA key pair typically consists of $e, N$ for the public key, and depending on implementation $d, N$, or $d, p, q$ (or some other variation of that information). Right now it's not clear what you're asking, and it is possible the question may end up closed until it can be clarified. Please use the "edit" link beneath the question to include what part of the key pair you want to be large primes, and please why you want this as well.
    $endgroup$
    – Ella Rose
    14 hours ago











  • $begingroup$
    If you manage to generate the keypair, you won't have to upgrade for quantum attacks for a longer time than anybody else. Big keypairs suck for quantum computers.
    $endgroup$
    – Joshua
    13 hours ago















0












$begingroup$


I'm new to cryptography. I have a binary image with 64x64 pixel in size. I perform an encryption to the image using RSA Algorithm. I wanna ask something bothering me, why can I not use big prime numbers as a pair of key for the RSA algorithm? Thank you in advance.










share|improve this question









New contributor




user67286 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$



put on hold as unclear what you're asking by forest, Squeamish Ossifrage, Ilmari Karonen, Ella Rose 10 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.













  • 4




    $begingroup$
    You can, nobody is preventing you! There is, however, a problem with performance. The larger modulus the slower the encryption. Keep in mind that the general practice is using Hybrid Encryption.
    $endgroup$
    – kelalaka
    20 hours ago










  • $begingroup$
    Big prime numbers for what part of the key pair? An RSA key pair typically consists of $e, N$ for the public key, and depending on implementation $d, N$, or $d, p, q$ (or some other variation of that information). Right now it's not clear what you're asking, and it is possible the question may end up closed until it can be clarified. Please use the "edit" link beneath the question to include what part of the key pair you want to be large primes, and please why you want this as well.
    $endgroup$
    – Ella Rose
    14 hours ago











  • $begingroup$
    If you manage to generate the keypair, you won't have to upgrade for quantum attacks for a longer time than anybody else. Big keypairs suck for quantum computers.
    $endgroup$
    – Joshua
    13 hours ago













0












0








0





$begingroup$


I'm new to cryptography. I have a binary image with 64x64 pixel in size. I perform an encryption to the image using RSA Algorithm. I wanna ask something bothering me, why can I not use big prime numbers as a pair of key for the RSA algorithm? Thank you in advance.










share|improve this question









New contributor




user67286 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




I'm new to cryptography. I have a binary image with 64x64 pixel in size. I perform an encryption to the image using RSA Algorithm. I wanna ask something bothering me, why can I not use big prime numbers as a pair of key for the RSA algorithm? Thank you in advance.







encryption rsa keys






share|improve this question









New contributor




user67286 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




user67286 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 21 hours ago









AleksanderRas

2,9721935




2,9721935






New contributor




user67286 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 22 hours ago









user67286user67286

41




41




New contributor




user67286 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





user67286 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






user67286 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as unclear what you're asking by forest, Squeamish Ossifrage, Ilmari Karonen, Ella Rose 10 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









put on hold as unclear what you're asking by forest, Squeamish Ossifrage, Ilmari Karonen, Ella Rose 10 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









  • 4




    $begingroup$
    You can, nobody is preventing you! There is, however, a problem with performance. The larger modulus the slower the encryption. Keep in mind that the general practice is using Hybrid Encryption.
    $endgroup$
    – kelalaka
    20 hours ago










  • $begingroup$
    Big prime numbers for what part of the key pair? An RSA key pair typically consists of $e, N$ for the public key, and depending on implementation $d, N$, or $d, p, q$ (or some other variation of that information). Right now it's not clear what you're asking, and it is possible the question may end up closed until it can be clarified. Please use the "edit" link beneath the question to include what part of the key pair you want to be large primes, and please why you want this as well.
    $endgroup$
    – Ella Rose
    14 hours ago











  • $begingroup$
    If you manage to generate the keypair, you won't have to upgrade for quantum attacks for a longer time than anybody else. Big keypairs suck for quantum computers.
    $endgroup$
    – Joshua
    13 hours ago












  • 4




    $begingroup$
    You can, nobody is preventing you! There is, however, a problem with performance. The larger modulus the slower the encryption. Keep in mind that the general practice is using Hybrid Encryption.
    $endgroup$
    – kelalaka
    20 hours ago










  • $begingroup$
    Big prime numbers for what part of the key pair? An RSA key pair typically consists of $e, N$ for the public key, and depending on implementation $d, N$, or $d, p, q$ (or some other variation of that information). Right now it's not clear what you're asking, and it is possible the question may end up closed until it can be clarified. Please use the "edit" link beneath the question to include what part of the key pair you want to be large primes, and please why you want this as well.
    $endgroup$
    – Ella Rose
    14 hours ago











  • $begingroup$
    If you manage to generate the keypair, you won't have to upgrade for quantum attacks for a longer time than anybody else. Big keypairs suck for quantum computers.
    $endgroup$
    – Joshua
    13 hours ago







4




4




$begingroup$
You can, nobody is preventing you! There is, however, a problem with performance. The larger modulus the slower the encryption. Keep in mind that the general practice is using Hybrid Encryption.
$endgroup$
– kelalaka
20 hours ago




$begingroup$
You can, nobody is preventing you! There is, however, a problem with performance. The larger modulus the slower the encryption. Keep in mind that the general practice is using Hybrid Encryption.
$endgroup$
– kelalaka
20 hours ago












$begingroup$
Big prime numbers for what part of the key pair? An RSA key pair typically consists of $e, N$ for the public key, and depending on implementation $d, N$, or $d, p, q$ (or some other variation of that information). Right now it's not clear what you're asking, and it is possible the question may end up closed until it can be clarified. Please use the "edit" link beneath the question to include what part of the key pair you want to be large primes, and please why you want this as well.
$endgroup$
– Ella Rose
14 hours ago





$begingroup$
Big prime numbers for what part of the key pair? An RSA key pair typically consists of $e, N$ for the public key, and depending on implementation $d, N$, or $d, p, q$ (or some other variation of that information). Right now it's not clear what you're asking, and it is possible the question may end up closed until it can be clarified. Please use the "edit" link beneath the question to include what part of the key pair you want to be large primes, and please why you want this as well.
$endgroup$
– Ella Rose
14 hours ago













$begingroup$
If you manage to generate the keypair, you won't have to upgrade for quantum attacks for a longer time than anybody else. Big keypairs suck for quantum computers.
$endgroup$
– Joshua
13 hours ago




$begingroup$
If you manage to generate the keypair, you won't have to upgrade for quantum attacks for a longer time than anybody else. Big keypairs suck for quantum computers.
$endgroup$
– Joshua
13 hours ago










1 Answer
1






active

oldest

votes


















5












$begingroup$

Although it is theoretical possible to create two large primes and use that to establish the private and public key, there are real issues doing so. First of all, let's check how big a modulus you need, as that defines the size of the two primes.



Let's assume color, and use the RGB color space without gamma, each color having 8 bits of color depth. That means each pixel uses 3 bytes. So your bitmap takes $64 cdot 64 cdot 3 cdot 8 = 98304$ bits. That's excluding overhead of both the image as well as the overhead required for the padding required for secure RSA encryption (both of which may be insignificant with these kind of values).



This requires you to find two primes of half the number of bits to create secure RSA, assuming that you use the regular RSA and not multi-prime RSA. Unfortunately, even a modern CPU can take time to calculate an 8K-bit modulus. The problem is that each prime number is now close to 49152 bits. The density of primes is much smaller for such large spaces. Furthermore, doing primality testing on that kind of values will take a lot of time. So the time to find the primes $p$ and $q$ grows very rapidly (a factor of 12 to 16 for each additional bit). So the time to generate a key pair that size is prohibitively large (and depends on chance as well).



Just type in openssl genrsa 98304 on your computer to use it as a heater.



So key pair generation is a huge issue at these key sizes. Performing any modular exponentiation with these kind of exponents and modulus sizes will be a lesser-but-still-significant issue as well. Many cryptographic libraries will have maximum key sizes for these reasons (and others, such as limiting testing, memory usage etc.).




So what can you do? Well: you can simply split up your plaintext into blocks and encrypt each with RSA. This will still be slow and will expand your ciphertext significantly compared to the plaintext image size, as padding the blocks is required.



What most cryptographers do is to pair the RSA algorithm with a symmetric cipher such as AES. In that case you can generate a random AES key and use that to encrypt the image (using a secure mode of operation). Then the AES key itself can be encrypted using the RSA public key. This kind of scheme is called a hybrid cryptosystem.






share|improve this answer











$endgroup$



















    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    5












    $begingroup$

    Although it is theoretical possible to create two large primes and use that to establish the private and public key, there are real issues doing so. First of all, let's check how big a modulus you need, as that defines the size of the two primes.



    Let's assume color, and use the RGB color space without gamma, each color having 8 bits of color depth. That means each pixel uses 3 bytes. So your bitmap takes $64 cdot 64 cdot 3 cdot 8 = 98304$ bits. That's excluding overhead of both the image as well as the overhead required for the padding required for secure RSA encryption (both of which may be insignificant with these kind of values).



    This requires you to find two primes of half the number of bits to create secure RSA, assuming that you use the regular RSA and not multi-prime RSA. Unfortunately, even a modern CPU can take time to calculate an 8K-bit modulus. The problem is that each prime number is now close to 49152 bits. The density of primes is much smaller for such large spaces. Furthermore, doing primality testing on that kind of values will take a lot of time. So the time to find the primes $p$ and $q$ grows very rapidly (a factor of 12 to 16 for each additional bit). So the time to generate a key pair that size is prohibitively large (and depends on chance as well).



    Just type in openssl genrsa 98304 on your computer to use it as a heater.



    So key pair generation is a huge issue at these key sizes. Performing any modular exponentiation with these kind of exponents and modulus sizes will be a lesser-but-still-significant issue as well. Many cryptographic libraries will have maximum key sizes for these reasons (and others, such as limiting testing, memory usage etc.).




    So what can you do? Well: you can simply split up your plaintext into blocks and encrypt each with RSA. This will still be slow and will expand your ciphertext significantly compared to the plaintext image size, as padding the blocks is required.



    What most cryptographers do is to pair the RSA algorithm with a symmetric cipher such as AES. In that case you can generate a random AES key and use that to encrypt the image (using a secure mode of operation). Then the AES key itself can be encrypted using the RSA public key. This kind of scheme is called a hybrid cryptosystem.






    share|improve this answer











    $endgroup$

















      5












      $begingroup$

      Although it is theoretical possible to create two large primes and use that to establish the private and public key, there are real issues doing so. First of all, let's check how big a modulus you need, as that defines the size of the two primes.



      Let's assume color, and use the RGB color space without gamma, each color having 8 bits of color depth. That means each pixel uses 3 bytes. So your bitmap takes $64 cdot 64 cdot 3 cdot 8 = 98304$ bits. That's excluding overhead of both the image as well as the overhead required for the padding required for secure RSA encryption (both of which may be insignificant with these kind of values).



      This requires you to find two primes of half the number of bits to create secure RSA, assuming that you use the regular RSA and not multi-prime RSA. Unfortunately, even a modern CPU can take time to calculate an 8K-bit modulus. The problem is that each prime number is now close to 49152 bits. The density of primes is much smaller for such large spaces. Furthermore, doing primality testing on that kind of values will take a lot of time. So the time to find the primes $p$ and $q$ grows very rapidly (a factor of 12 to 16 for each additional bit). So the time to generate a key pair that size is prohibitively large (and depends on chance as well).



      Just type in openssl genrsa 98304 on your computer to use it as a heater.



      So key pair generation is a huge issue at these key sizes. Performing any modular exponentiation with these kind of exponents and modulus sizes will be a lesser-but-still-significant issue as well. Many cryptographic libraries will have maximum key sizes for these reasons (and others, such as limiting testing, memory usage etc.).




      So what can you do? Well: you can simply split up your plaintext into blocks and encrypt each with RSA. This will still be slow and will expand your ciphertext significantly compared to the plaintext image size, as padding the blocks is required.



      What most cryptographers do is to pair the RSA algorithm with a symmetric cipher such as AES. In that case you can generate a random AES key and use that to encrypt the image (using a secure mode of operation). Then the AES key itself can be encrypted using the RSA public key. This kind of scheme is called a hybrid cryptosystem.






      share|improve this answer











      $endgroup$















        5












        5








        5





        $begingroup$

        Although it is theoretical possible to create two large primes and use that to establish the private and public key, there are real issues doing so. First of all, let's check how big a modulus you need, as that defines the size of the two primes.



        Let's assume color, and use the RGB color space without gamma, each color having 8 bits of color depth. That means each pixel uses 3 bytes. So your bitmap takes $64 cdot 64 cdot 3 cdot 8 = 98304$ bits. That's excluding overhead of both the image as well as the overhead required for the padding required for secure RSA encryption (both of which may be insignificant with these kind of values).



        This requires you to find two primes of half the number of bits to create secure RSA, assuming that you use the regular RSA and not multi-prime RSA. Unfortunately, even a modern CPU can take time to calculate an 8K-bit modulus. The problem is that each prime number is now close to 49152 bits. The density of primes is much smaller for such large spaces. Furthermore, doing primality testing on that kind of values will take a lot of time. So the time to find the primes $p$ and $q$ grows very rapidly (a factor of 12 to 16 for each additional bit). So the time to generate a key pair that size is prohibitively large (and depends on chance as well).



        Just type in openssl genrsa 98304 on your computer to use it as a heater.



        So key pair generation is a huge issue at these key sizes. Performing any modular exponentiation with these kind of exponents and modulus sizes will be a lesser-but-still-significant issue as well. Many cryptographic libraries will have maximum key sizes for these reasons (and others, such as limiting testing, memory usage etc.).




        So what can you do? Well: you can simply split up your plaintext into blocks and encrypt each with RSA. This will still be slow and will expand your ciphertext significantly compared to the plaintext image size, as padding the blocks is required.



        What most cryptographers do is to pair the RSA algorithm with a symmetric cipher such as AES. In that case you can generate a random AES key and use that to encrypt the image (using a secure mode of operation). Then the AES key itself can be encrypted using the RSA public key. This kind of scheme is called a hybrid cryptosystem.






        share|improve this answer











        $endgroup$



        Although it is theoretical possible to create two large primes and use that to establish the private and public key, there are real issues doing so. First of all, let's check how big a modulus you need, as that defines the size of the two primes.



        Let's assume color, and use the RGB color space without gamma, each color having 8 bits of color depth. That means each pixel uses 3 bytes. So your bitmap takes $64 cdot 64 cdot 3 cdot 8 = 98304$ bits. That's excluding overhead of both the image as well as the overhead required for the padding required for secure RSA encryption (both of which may be insignificant with these kind of values).



        This requires you to find two primes of half the number of bits to create secure RSA, assuming that you use the regular RSA and not multi-prime RSA. Unfortunately, even a modern CPU can take time to calculate an 8K-bit modulus. The problem is that each prime number is now close to 49152 bits. The density of primes is much smaller for such large spaces. Furthermore, doing primality testing on that kind of values will take a lot of time. So the time to find the primes $p$ and $q$ grows very rapidly (a factor of 12 to 16 for each additional bit). So the time to generate a key pair that size is prohibitively large (and depends on chance as well).



        Just type in openssl genrsa 98304 on your computer to use it as a heater.



        So key pair generation is a huge issue at these key sizes. Performing any modular exponentiation with these kind of exponents and modulus sizes will be a lesser-but-still-significant issue as well. Many cryptographic libraries will have maximum key sizes for these reasons (and others, such as limiting testing, memory usage etc.).




        So what can you do? Well: you can simply split up your plaintext into blocks and encrypt each with RSA. This will still be slow and will expand your ciphertext significantly compared to the plaintext image size, as padding the blocks is required.



        What most cryptographers do is to pair the RSA algorithm with a symmetric cipher such as AES. In that case you can generate a random AES key and use that to encrypt the image (using a secure mode of operation). Then the AES key itself can be encrypted using the RSA public key. This kind of scheme is called a hybrid cryptosystem.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 19 hours ago

























        answered 20 hours ago









        Maarten BodewesMaarten Bodewes

        55.8k679196




        55.8k679196













            Popular posts from this blog

            Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

            Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

            199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單