问题描述
最近合作的时候,发现合作方接口传输过来的数据都是用rsa加密过的(对方是java,模式是RSA/ECB/PKCS1Padding),同时给了我一个私钥Stringpk="MIIEogIBAAKCAQEAtriYGW/4xc1IXhMTuWFAGKiMvFwfdEURwYWL0AuEikap7231=";假设这是加密后的密文StringpInfo="daodafioauddhvbiyaevpenvoeavnasdadwa";我要怎么解密呢?
解决方案
解决方案二:
参考下这个呢http://bbs.csdn.net/topics/391922686
构造出这个几个元素就ok了<RSAKeyValue><Modulus>smMv1x5Rih26CUZYsCT+A5xS8Ww85yD4M1ZQSpmNsz3F9qZmprYnu56ijf06mRiQED7KR5vyxnzIejLZIFoPzcF0UP/Qy77k8G4onflJQkSNHofn3SkJGsj4QZ3jNZPVZeUwL1a8AG/4g57DMKq6EsKTWIVbz53dJnbh6LN7idk=</Modulus><Exponent>AQAB</Exponent><P>2YMdvFYjAkn8AZC3CabPAK81qo2Lx48vA3pvCQiTWAotzhLQJWGesbFsogTPntmFgTMyssVZfgqt/mL1QpqJzQ==</P><Q>0fPLvIC0m8L8rLOKPQ6g6C9HwkbEQMBVGF2hHEt9aOnnqFzLleGJwxKU3oJD3z/b8hpEf+qhNWJUz9wq5QeEPQ==</Q><DP>tDiEQdFo7nOYnz9luVSB/YIuyCLBp1aG0K34JBb75p2AeFd0KRTqZTap2NB9qpN2n6dpIWCNFvcIVVdu+YGMHQ==</DP><DQ>gNQOEg8Pw/wzu203yBtv1MkeSTHPPsRF8vuQ3qHbxEKy6XZ3XfLU66Q9QQPBzf2LYtWHbs50OSOrUxiQIZUpKQ==</DQ><InverseQ>fx1L6FnBD2sXku1k9Z5jTLcRrqsG/JvXNu5BGuktAfoJnR56oy8xRPORpkLBVeGGfrS9gJ2pYjkF8uba0iOKJw==</InverseQ><D>WELvJrafjYDLzU77Dpwe+lZcS4tMTudnJq9sJpz3GVpVGoaWf6Hc4t3IfAxw89LNZNxMZUXpxv9yidOiznkBG+89Y/3Kqlmdwb02Fg9dSFWIf7nP4KHycXTTWubVnFiilpNVwTLJhcOK5V5kS+MK1u/sGWI4Fq6wMVR8xlE7mCE=</D></RSAKeyValue>
解决方案三:
ModulusPQDQD五个元素
解决方案四:
链接贴错了这个http://blog.csdn.net/lubiaopan/article/details/6233517