Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which parts of a RSA private key is secret?

This is a RSA private key :

<BitStrength>4944</BitStrength>
<RSAKeyValue>
    <Modulus>vqZ07gIBoLEzJZHhNYj3WSt9F5iw/Klr/hb22Q8YT5NivYS8UpuzteNHpE7u0pk4Izcto4fqtqPHFpXxzhpswtCwOO7czabK/8B+im6T6aRHSSbZXB59NPxj883BS04F1/zziwPj84Ez+/t1ckrK8O/Gbo8DOr4UPQ3CDoDw4gAQpNe4H48zfGV42WIOQjm00DHOhgpFpZaYapXjDz3KfbdY+p4y1R0Yt4eNViRmvQ2jBPIeXVZACC3Ef3J0TCTWne+1Y4gCfMl0z+4hkE1XZpPiDxt2BR46GYU+NwsrI82pIJ6Bigj51jYpgPE4uQBmjYylY/HTJw4b6N45MuljWFuaxOrDHaHdskhSGUS+fAzp5KXh1xsRdzXysv6uliPU3BmgNsM0Av5Gm4EnVoeqjeC/0G3dLoIJi//IqBCNGOfV8sSo/Y6JNGZoAlE6KT101Q89ClrJyHVoZCbU3qVg9F6tPCorn9+UH9rEKQbABpMMjBM3H2MFuiUlvDWlatP+VH1WugKInlP3b20cINGs+Z5obUYcnAiZ8Dj5WN+OVOZH2nqG3X/Hl+V/87kAVhl1lb1gkDzl53aJ+CgmKJ8GRNdxhtV0xmfewrGxhVdWR3qszY05O1GH914tD0viDXgGDIq6ZyHm78XKQQ6eztdfxT/pNi4Dmtd49vyjSjseEa8uMn/KjvePIBJ02pweSo7tkROptAENE+MWSANdH89NU06tOC+bQ57TaVD2AKvlo8nZudshMrBMXRsUYTsy0kRnFvjPw4U2EUz3rfNLabela1OS1gR8QvPaFBf+mxxJgk002xPgSAdhVRiv</Modulus>
    <Exponent>AQAB</Exponent>
    <P>8RUZbaB91ve478Jam2QjOWooTrvtaOzoe6hygPA8E6GlEqwryGg2180lUUoM+RdFTgmKvxaLyV7Xg4RZHD0vWYmE4VT/ChulT52qn8IPgIV1O+F67EVh4ovVCx/vXEiDCLpzWRgyM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mYpa2QIgc0ANzKNJrdXSVNSuKCD0Sv52ceD0SrE8KshA7yPcP+om6OOdT900D1efvmJ9J7xHY4lukTMWvfvAcfrAvrwdDp//bO7MbTnLIE6DEXPyO43b7Yxc996h4MSXmKj73Zu4aidVP0DHrMRibpivs8ZReSfnD06zzlGpjpoX2Lhcc2kJN+Rn1NsISMP+jN9Ufv/RTePXy/3YSLnZX6H+GJ2gIcAJ4B9mwfz8dD6nUFyrhZELvc3/Bp9iW5wYWwbAIKQwAM4MfBBo77ur3VXWymlSwAOj2IQEfCpb0qY7n/3reJ5PfUD17LbWyuboiPL1oRzPp7VgxBXoSYAIQUTimEHOaJUogh3SLeK5b4Vx4ukFZp/c54qfJQz8oHOS3cCXIgiqKhPwDczeCY6h2Ya0YHn32jUacPQu3RyC1KQq+zEQ8nzL8uH7RA2dEYX0Wlco+9d7OamNsQL78+2GhtbKAvPlymMUFLSZVT1pRPpGBdpzQylRQpAk6PG5XZSGNjXPa6nHhHRTuLkCtoEH6xzS5gRTtRUnK8mxXGnc1eTHaVnKMuCdo82YLWCoLobHclHSLiKy20lIR3i84mXH4vLxwdaSMyLDwbDZxkepKx7Ga3J2HXtQ/NDvNoIRxmB</D>
</RSAKeyValue>

It contains couple of elements (Modules, Exponent, P, E, DP, DQ, InverseQ, D)

I read somewhere that the main element of a RSA private key is D.

But I want to know which parts of these elements should be secret and which parts can be publicly shared ? (Means there's no security problem if it be shared)

Thanks

like image 452
Seyed Hamed Shams Avatar asked May 14 '14 12:05

Seyed Hamed Shams


1 Answers

From Wikipedia: The public key consists of the modulus n and the public (or encryption) exponent e. The private key consists of the modulus n and the private (or decryption) exponent d, which must be kept secret. p, q, and φ(n) must also be kept secret because they can be used to calculate d.

This means that that you are correct. D is the most important part, but because 'd' can be found from other information (p,DP,DQ, InverseQ) they too should also be kept secret. The modulus and exponent form the public key.

source: http://en.wikipedia.org/wiki/RSA_(cryptosystem)

like image 96
Scott Avatar answered Oct 13 '22 21:10

Scott