郑铮

Results 2 comments of 郑铮

SM2 sm02 = new SM2(); SM2KeyPair keyPair = sm02.generateKeyPair(); ECPoint publicKey2=keyPair.getPublicKey(); BigInteger privateKey2=keyPair.getPrivateKey(); sm02.exportPublicKey(publicKey2, "E:/publickey.pem"); sm02.exportPrivateKey(privateKey2, "E:/privatekey.pem"); ECPoint publicKey3 = sm02.importPublicKey("E:/publickey.pem"); BigInteger privateKey3 = sm02.importPrivateKey("E:/privatekey.pem");

你对公钥私钥的概念弄反了. 如果多方对接,要么就生成多对秘钥对.每个人都要有自己公钥秘钥.互相交换公钥