RSA: Is it possible to recover the plaintext given that we have the ciphertext and the public key?
$begingroup$
The $N$ and ciphertext are huge number that is more than 600 digits long.
I'm trying to find the prime factors of $N$ in order to get $p$ and $q$. Using $p$ and $q$ I can get $phi(n)$. And using $phi(n)$ and the public key I would be able to calculate the private key.
So, my question is if it is possible to recover the plaintext given that we have ciphertext and the public key?
If so, is it computationally feasible?
rsa
$endgroup$
add a comment |
$begingroup$
The $N$ and ciphertext are huge number that is more than 600 digits long.
I'm trying to find the prime factors of $N$ in order to get $p$ and $q$. Using $p$ and $q$ I can get $phi(n)$. And using $phi(n)$ and the public key I would be able to calculate the private key.
So, my question is if it is possible to recover the plaintext given that we have ciphertext and the public key?
If so, is it computationally feasible?
rsa
$endgroup$
8
$begingroup$
Doing so means essentially breaking the scheme, right? The public key is known (hence the term public), and the modulus $N$ is part of the public key. Thus, what you're asking is whether or not we can find the underlying plaintext corresponding to some given ciphertext, which should not be possible according to our belief on the security of RSA.
$endgroup$
– Daniel
Jan 18 at 12:05
3
$begingroup$
What kind of digits are that? Bits? Decimals? If they are decimals - which for us humans is kind of the default - then we're probably talking about a 2048 bit key, and RSA 2048 is certainly unbreakable if the key pair generation and decryption procedures are implemented correctly.... Please clarify the type of digits.
$endgroup$
– Maarten Bodewes♦
Jan 18 at 13:06
add a comment |
$begingroup$
The $N$ and ciphertext are huge number that is more than 600 digits long.
I'm trying to find the prime factors of $N$ in order to get $p$ and $q$. Using $p$ and $q$ I can get $phi(n)$. And using $phi(n)$ and the public key I would be able to calculate the private key.
So, my question is if it is possible to recover the plaintext given that we have ciphertext and the public key?
If so, is it computationally feasible?
rsa
$endgroup$
The $N$ and ciphertext are huge number that is more than 600 digits long.
I'm trying to find the prime factors of $N$ in order to get $p$ and $q$. Using $p$ and $q$ I can get $phi(n)$. And using $phi(n)$ and the public key I would be able to calculate the private key.
So, my question is if it is possible to recover the plaintext given that we have ciphertext and the public key?
If so, is it computationally feasible?
rsa
rsa
edited Jan 18 at 15:34
Maeher
3,54911830
3,54911830
asked Jan 18 at 12:03
Maqruis1Maqruis1
162
162
8
$begingroup$
Doing so means essentially breaking the scheme, right? The public key is known (hence the term public), and the modulus $N$ is part of the public key. Thus, what you're asking is whether or not we can find the underlying plaintext corresponding to some given ciphertext, which should not be possible according to our belief on the security of RSA.
$endgroup$
– Daniel
Jan 18 at 12:05
3
$begingroup$
What kind of digits are that? Bits? Decimals? If they are decimals - which for us humans is kind of the default - then we're probably talking about a 2048 bit key, and RSA 2048 is certainly unbreakable if the key pair generation and decryption procedures are implemented correctly.... Please clarify the type of digits.
$endgroup$
– Maarten Bodewes♦
Jan 18 at 13:06
add a comment |
8
$begingroup$
Doing so means essentially breaking the scheme, right? The public key is known (hence the term public), and the modulus $N$ is part of the public key. Thus, what you're asking is whether or not we can find the underlying plaintext corresponding to some given ciphertext, which should not be possible according to our belief on the security of RSA.
$endgroup$
– Daniel
Jan 18 at 12:05
3
$begingroup$
What kind of digits are that? Bits? Decimals? If they are decimals - which for us humans is kind of the default - then we're probably talking about a 2048 bit key, and RSA 2048 is certainly unbreakable if the key pair generation and decryption procedures are implemented correctly.... Please clarify the type of digits.
$endgroup$
– Maarten Bodewes♦
Jan 18 at 13:06
8
8
$begingroup$
Doing so means essentially breaking the scheme, right? The public key is known (hence the term public), and the modulus $N$ is part of the public key. Thus, what you're asking is whether or not we can find the underlying plaintext corresponding to some given ciphertext, which should not be possible according to our belief on the security of RSA.
$endgroup$
– Daniel
Jan 18 at 12:05
$begingroup$
Doing so means essentially breaking the scheme, right? The public key is known (hence the term public), and the modulus $N$ is part of the public key. Thus, what you're asking is whether or not we can find the underlying plaintext corresponding to some given ciphertext, which should not be possible according to our belief on the security of RSA.
$endgroup$
– Daniel
Jan 18 at 12:05
3
3
$begingroup$
What kind of digits are that? Bits? Decimals? If they are decimals - which for us humans is kind of the default - then we're probably talking about a 2048 bit key, and RSA 2048 is certainly unbreakable if the key pair generation and decryption procedures are implemented correctly.... Please clarify the type of digits.
$endgroup$
– Maarten Bodewes♦
Jan 18 at 13:06
$begingroup$
What kind of digits are that? Bits? Decimals? If they are decimals - which for us humans is kind of the default - then we're probably talking about a 2048 bit key, and RSA 2048 is certainly unbreakable if the key pair generation and decryption procedures are implemented correctly.... Please clarify the type of digits.
$endgroup$
– Maarten Bodewes♦
Jan 18 at 13:06
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
It might be feasible, or not.
If "digits" had been binary digits or bits, the answer would have been yes. Anything about 600-bit can be factored by GNFS. The public record is for a 768-bit RSA modulus, factored in 2009. 600-bit is within reach of CADO-NFS and Msieve. That's even packaged into factoring as a service for semi-deep-pocketed script kiddies.
It could be that $N$ was poorly chosen and can be factored much more easily than by GNFS. Since the generation algorithm is unspecified, we can't tell. Poor RSA key generators have happened (see e.g. SmartFacts, ROCA, and predictable SSH hosts keys on way too many platforms).
It could also be that the encryption system used is plaintext RSA, where the ciphertext is $C=M^ebmod N$ with $M$ the plaintext. This contrasts secure RSA, where $M$ is obtained from plaintext and randomness using a padding scheme such as OAEP. If $M$ is the plaintext (or a known deterministic function of the plaintext), some attacks much easier than factoring the modulus might be possible:
- if $M$ is in a known small set (names on the class roll, 16-digit credit-card number), it is possible to enumerate possible $M$, perform encryption, and check against the ciphertext.
- if $M=Ucdot V$ with $U<2^u$, $V<2^v$, $ule v$ (which is likely when $Mll2^{u+v}$ ) then there's a Meet-in-the-Midle attack with cost $O(2^v)$ time and $O(2^u)$ memory.
- if $M<sqrt[e]N$ we have the $e^text{th}$ root attack (which can be extended to slightly larger $M$).
$endgroup$
$begingroup$
Could you post a link for the Meet-in -the-Middle attack?
$endgroup$
– kelalaka
Jan 18 at 13:56
1
$begingroup$
@kelalaka: see this, item 3
$endgroup$
– fgrieu
Jan 18 at 14:01
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "281"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f66582%2frsa-is-it-possible-to-recover-the-plaintext-given-that-we-have-the-ciphertext-a%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
It might be feasible, or not.
If "digits" had been binary digits or bits, the answer would have been yes. Anything about 600-bit can be factored by GNFS. The public record is for a 768-bit RSA modulus, factored in 2009. 600-bit is within reach of CADO-NFS and Msieve. That's even packaged into factoring as a service for semi-deep-pocketed script kiddies.
It could be that $N$ was poorly chosen and can be factored much more easily than by GNFS. Since the generation algorithm is unspecified, we can't tell. Poor RSA key generators have happened (see e.g. SmartFacts, ROCA, and predictable SSH hosts keys on way too many platforms).
It could also be that the encryption system used is plaintext RSA, where the ciphertext is $C=M^ebmod N$ with $M$ the plaintext. This contrasts secure RSA, where $M$ is obtained from plaintext and randomness using a padding scheme such as OAEP. If $M$ is the plaintext (or a known deterministic function of the plaintext), some attacks much easier than factoring the modulus might be possible:
- if $M$ is in a known small set (names on the class roll, 16-digit credit-card number), it is possible to enumerate possible $M$, perform encryption, and check against the ciphertext.
- if $M=Ucdot V$ with $U<2^u$, $V<2^v$, $ule v$ (which is likely when $Mll2^{u+v}$ ) then there's a Meet-in-the-Midle attack with cost $O(2^v)$ time and $O(2^u)$ memory.
- if $M<sqrt[e]N$ we have the $e^text{th}$ root attack (which can be extended to slightly larger $M$).
$endgroup$
$begingroup$
Could you post a link for the Meet-in -the-Middle attack?
$endgroup$
– kelalaka
Jan 18 at 13:56
1
$begingroup$
@kelalaka: see this, item 3
$endgroup$
– fgrieu
Jan 18 at 14:01
add a comment |
$begingroup$
It might be feasible, or not.
If "digits" had been binary digits or bits, the answer would have been yes. Anything about 600-bit can be factored by GNFS. The public record is for a 768-bit RSA modulus, factored in 2009. 600-bit is within reach of CADO-NFS and Msieve. That's even packaged into factoring as a service for semi-deep-pocketed script kiddies.
It could be that $N$ was poorly chosen and can be factored much more easily than by GNFS. Since the generation algorithm is unspecified, we can't tell. Poor RSA key generators have happened (see e.g. SmartFacts, ROCA, and predictable SSH hosts keys on way too many platforms).
It could also be that the encryption system used is plaintext RSA, where the ciphertext is $C=M^ebmod N$ with $M$ the plaintext. This contrasts secure RSA, where $M$ is obtained from plaintext and randomness using a padding scheme such as OAEP. If $M$ is the plaintext (or a known deterministic function of the plaintext), some attacks much easier than factoring the modulus might be possible:
- if $M$ is in a known small set (names on the class roll, 16-digit credit-card number), it is possible to enumerate possible $M$, perform encryption, and check against the ciphertext.
- if $M=Ucdot V$ with $U<2^u$, $V<2^v$, $ule v$ (which is likely when $Mll2^{u+v}$ ) then there's a Meet-in-the-Midle attack with cost $O(2^v)$ time and $O(2^u)$ memory.
- if $M<sqrt[e]N$ we have the $e^text{th}$ root attack (which can be extended to slightly larger $M$).
$endgroup$
$begingroup$
Could you post a link for the Meet-in -the-Middle attack?
$endgroup$
– kelalaka
Jan 18 at 13:56
1
$begingroup$
@kelalaka: see this, item 3
$endgroup$
– fgrieu
Jan 18 at 14:01
add a comment |
$begingroup$
It might be feasible, or not.
If "digits" had been binary digits or bits, the answer would have been yes. Anything about 600-bit can be factored by GNFS. The public record is for a 768-bit RSA modulus, factored in 2009. 600-bit is within reach of CADO-NFS and Msieve. That's even packaged into factoring as a service for semi-deep-pocketed script kiddies.
It could be that $N$ was poorly chosen and can be factored much more easily than by GNFS. Since the generation algorithm is unspecified, we can't tell. Poor RSA key generators have happened (see e.g. SmartFacts, ROCA, and predictable SSH hosts keys on way too many platforms).
It could also be that the encryption system used is plaintext RSA, where the ciphertext is $C=M^ebmod N$ with $M$ the plaintext. This contrasts secure RSA, where $M$ is obtained from plaintext and randomness using a padding scheme such as OAEP. If $M$ is the plaintext (or a known deterministic function of the plaintext), some attacks much easier than factoring the modulus might be possible:
- if $M$ is in a known small set (names on the class roll, 16-digit credit-card number), it is possible to enumerate possible $M$, perform encryption, and check against the ciphertext.
- if $M=Ucdot V$ with $U<2^u$, $V<2^v$, $ule v$ (which is likely when $Mll2^{u+v}$ ) then there's a Meet-in-the-Midle attack with cost $O(2^v)$ time and $O(2^u)$ memory.
- if $M<sqrt[e]N$ we have the $e^text{th}$ root attack (which can be extended to slightly larger $M$).
$endgroup$
It might be feasible, or not.
If "digits" had been binary digits or bits, the answer would have been yes. Anything about 600-bit can be factored by GNFS. The public record is for a 768-bit RSA modulus, factored in 2009. 600-bit is within reach of CADO-NFS and Msieve. That's even packaged into factoring as a service for semi-deep-pocketed script kiddies.
It could be that $N$ was poorly chosen and can be factored much more easily than by GNFS. Since the generation algorithm is unspecified, we can't tell. Poor RSA key generators have happened (see e.g. SmartFacts, ROCA, and predictable SSH hosts keys on way too many platforms).
It could also be that the encryption system used is plaintext RSA, where the ciphertext is $C=M^ebmod N$ with $M$ the plaintext. This contrasts secure RSA, where $M$ is obtained from plaintext and randomness using a padding scheme such as OAEP. If $M$ is the plaintext (or a known deterministic function of the plaintext), some attacks much easier than factoring the modulus might be possible:
- if $M$ is in a known small set (names on the class roll, 16-digit credit-card number), it is possible to enumerate possible $M$, perform encryption, and check against the ciphertext.
- if $M=Ucdot V$ with $U<2^u$, $V<2^v$, $ule v$ (which is likely when $Mll2^{u+v}$ ) then there's a Meet-in-the-Midle attack with cost $O(2^v)$ time and $O(2^u)$ memory.
- if $M<sqrt[e]N$ we have the $e^text{th}$ root attack (which can be extended to slightly larger $M$).
edited Jan 19 at 12:10
answered Jan 18 at 13:01
fgrieufgrieu
78.7k7168335
78.7k7168335
$begingroup$
Could you post a link for the Meet-in -the-Middle attack?
$endgroup$
– kelalaka
Jan 18 at 13:56
1
$begingroup$
@kelalaka: see this, item 3
$endgroup$
– fgrieu
Jan 18 at 14:01
add a comment |
$begingroup$
Could you post a link for the Meet-in -the-Middle attack?
$endgroup$
– kelalaka
Jan 18 at 13:56
1
$begingroup$
@kelalaka: see this, item 3
$endgroup$
– fgrieu
Jan 18 at 14:01
$begingroup$
Could you post a link for the Meet-in -the-Middle attack?
$endgroup$
– kelalaka
Jan 18 at 13:56
$begingroup$
Could you post a link for the Meet-in -the-Middle attack?
$endgroup$
– kelalaka
Jan 18 at 13:56
1
1
$begingroup$
@kelalaka: see this, item 3
$endgroup$
– fgrieu
Jan 18 at 14:01
$begingroup$
@kelalaka: see this, item 3
$endgroup$
– fgrieu
Jan 18 at 14:01
add a comment |
Thanks for contributing an answer to Cryptography Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f66582%2frsa-is-it-possible-to-recover-the-plaintext-given-that-we-have-the-ciphertext-a%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
8
$begingroup$
Doing so means essentially breaking the scheme, right? The public key is known (hence the term public), and the modulus $N$ is part of the public key. Thus, what you're asking is whether or not we can find the underlying plaintext corresponding to some given ciphertext, which should not be possible according to our belief on the security of RSA.
$endgroup$
– Daniel
Jan 18 at 12:05
3
$begingroup$
What kind of digits are that? Bits? Decimals? If they are decimals - which for us humans is kind of the default - then we're probably talking about a 2048 bit key, and RSA 2048 is certainly unbreakable if the key pair generation and decryption procedures are implemented correctly.... Please clarify the type of digits.
$endgroup$
– Maarten Bodewes♦
Jan 18 at 13:06