Summary
RSA plays a very important role in data security, especially in the security of data network communication. When the heterogeneous system in the data network communication on the security requirements, RSA as one of the options, at this time the interoperability of RSA is particularly important.
This paper provides a feasible solution for RSA Interoperability (c#,java,php) with reference to network data, and this interoperability is achieved on certain limitations, such as the key is 1024-bit (higher level has not been tried, should also be feasible), based on the PKCS1 fill mode.
The code has been written in part using hard coding, but also focus on the implementation of the function, in the class structure design is not much attention, there is a need for self-modification refactoring.
For an associated assembly or package or code, see the attachment at the end of this article.
First, generate interoperability key pair
Key references are Jeffrey Walton (Http://www.codeproject.com/Articles/25487/Cryptographic-Interoperability-Keys)
1.c#
Using cn.ubingo.security.rsa.core;using Cn.Ubingo.Security.RSA.Key;
Generate a public private key to KeyPair KeyPair = Keygenerator.generatekeypair ();//convert to a different format keyPair Asnkeypair = Keypair.toasnkeypair (); KeyPair Xmlkeypair = Asnkeypair.toxmlkeypair (); KeyPair Pemkeypair = Xmlkeypair.topemkeypair ();//Get the Public private key, in XML format as an example string privatekey = Xmlkeypair.privatekey;string PublicKey = Xmlkeypair.publickey;
2.java
Import Cn.ubingo.security.rsa.core.*;import cn.ubingo.security.rsa.key.*;
Generate key pair KeyPair KeyPair = Keygenerator.generatekeypair (); Convert to a different format keyPair Asnkeypair = Keypair.toasnkeypair (); KeyPair Xmlkeypair = Asnkeypair.toxmlkeypair (); KeyPair Pemkeypair = Xmlkeypair.topemkeypair (); Gets the public private key, in the case of the ASN format, string publickey = Asnkeypair.getpublickey (); String Privatekey = Asnkeypair.getprivatekey ();
3. Key format A.xml---C # platform Usage
Private:
<rsakeyvalue><modulus>ocivsjfhjzxxad9mspll4mllmaknjob4opgb+ Hvo1qgcq9qwlymhupyco3qbp3ahkqqa4nekrkthfojeitxh69le78zyizne9n4hamahzsvmuba8dtsqmt06yjwxr4sig8jnmr9aqkmn7kgtxsjbn2 +cbiomxsmwsq2pqvfayks=</modulus><exponent>aqab</exponent><p>0ekrmbzu0ghiybtzsbnd/ Tc7qhte4tcffg98noc8ebgbe6u5i3zgrofy0jdwbymwne5gteminpvfrxj63euwkw==</p><q> Xu5vbntok5emt8ap823gizspg4h//5nvlbdaypdmgseg3jxi1cljlu8d0byfdokk+qadylpndmjkh2lc4lxqaq==</q><dp> Fvckvfovgv/vw1ev3jmlkgimel2ciajvuevb2sxzjuz8+qs+6nxvc6jdjcukcjylrd+28mhmqg6wr+5lpsjzjq==</dp><dq> ah9ameqn8fzyzs20pli83qj9yzdvsq8j9grkhwttnlenylfavg5q5b9cycikyv3esq0h/enezxsfgrr/xjgiaq==</dq>< inverseq>act01nk4ganwr0jryvjcslgwb38oog82hqrba/qupkcmjgtlzzkh9tfizjctwls1hsbvcpdbo7lm/wbzn1pg6a==</ inverseq><d>o+gf2+comlqxt9o0+ ajktqp3bdhwro6uvc4nsgn2f5vqkzu4b7lndulpbxckda8gs6fd1yc2wwxbwzde8sy0gjgof1eubbo8g1xvchfe5rgxmzsfjcy+ dhxgknqo08mxhvazyjkmqo7z7xpvfkbocduj39nee2myo25l07tqfbk=</d≫</rsakeyvalue>
Public:
<rsakeyvalue><modulus>ocivsjfhjzxxad9mspll4mllmaknjob4opgb+ Hvo1qgcq9qwlymhupyco3qbp3ahkqqa4nekrkthfojeitxh69le78zyizne9n4hamahzsvmuba8dtsqmt06yjwxr4sig8jnmr9aqkmn7kgtxsjbn2 +cbiomxsmwsq2pqvfayks=</modulus><exponent>aqab</exponent></rsakeyvalue>
B.ASN---Java Platform usage
Private:
miicdqibadanbgkqhkig9w0baqefaascal8wggjbageaaogbakhiluo34sc8cqhfzrkzs+jpzzmpj46aedj4g/ ovanubnepufi8jb7j8gqn6m6d2osqqmujxjezexxtixie1x+vsxo/ Gcos53vteiwpgb2ulzrgwvhbbejk9osivsuelihvcttefwkjdde5brcbcqtdvgmykjsujfkknqarxqmplagmbaaecgya76axb5ygwurfp07t4akq2qndsofze 7q5vzg2ya3z/ lwqtntghuu11qs9veionryblp8pvglbbbftzkn7xjjscoa4xurrts7wbve9wcutmsbgzmwukjj52hgcseo7twxcdvpliosza7vptem8uoghx26pf00r7azg7b Mxttnb8gqjbanhpetawvnbosgg02um53f0wu0b7roewhx4pfjzgvbargroloyt84eah2ncxvgwjljroylrdcdt1x0csetxlsjmcqqdftlvue2itksa3xo /zbeclnkkbih//k28sembikoyzj6dcnglvyuku7x3rth8m6st5aaniwk12ymqfauliveppakaw9wq8whuzx+9bus/ ckwsoyiz6xyihqo9r5vvaxfonrnz6qz7qddulol0kjqpypkvep7bwwcyqdpzh7kumwlklakach1qz6qfwvnjllbskulzeon1jn2+ xdyp2bgqda1oev6fkv8bubmrkh1xhwitjxcsxdqf8sd5ldj+bgv/gmyhpakbok3tu2tiaa1zhqmti8lywudahfw44bzafcsfr+q4+ Qiyma0tnmqh1mwjmnxnyuzwgwg8i8me7ssz/btmfu8bo
Public:
migfma0gcsqgsib3dqebaquaa4gnadcbiqkbgqchyjvkn+enpheb32aymuviawwzqseoghg4+bv6fwjvazxd1byviwe4/ Ikjepundqeqqpricsrgrmcu4l4hncfr0stvxnklod703ifqyadljwa4frx22xczptrilbfhiyibwk0xh1pcqw3uqa3gwke3b4jsiibfixzjdamq8udkswidaq Ab
C.PEM---PHP platform usage
Private:
-----BEGIN PRIVATE KEY-----miicdqibadanbgkqhkig9w0baqefaascal8wggjbageaaogbakhiluo34sc8cqhfzrkzs+jpzzmpj46aedj4g /ovanubnepufi8jb7j8gqn6m6d2osqqmujxjezexxtixie1x+vsxo/ Gcos53vteiwpgb2ulzrgwvhbbejk9osivsuelihvcttefwkjdde5brcbcqtdvgmykjsujfkknqarxqmplagmbaaecgya76axb5ygwurfp07t4akq2qndsofze 7q5vzg2ya3z/ lwqtntghuu11qs9veionryblp8pvglbbbftzkn7xjjscoa4xurrts7wbve9wcutmsbgzmwukjj52hgcseo7twxcdvpliosza7vptem8uoghx26pf00r7azg7b Mxttnb8gqjbanhpetawvnbosgg02um53f0wu0b7roewhx4pfjzgvbargroloyt84eah2ncxvgwjljroylrdcdt1x0csetxlsjmcqqdftlvue2itksa3xo /zbeclnkkbih//k28sembikoyzj6dcnglvyuku7x3rth8m6st5aaniwk12ymqfauliveppakaw9wq8whuzx+9bus/ ckwsoyiz6xyihqo9r5vvaxfonrnz6qz7qddulol0kjqpypkvep7bwwcyqdpzh7kumwlklakach1qz6qfwvnjllbskulzeon1jn2+ xdyp2bgqda1oev6fkv8bubmrkh1xhwitjxcsxdqf8sd5ldj+bgv/gmyhpakbok3tu2tiaa1zhqmti8lywudahfw44bzafcsfr+q4+ Qiyma0tnmqh1mwjmnxnyuzwgwg8i8me7ssz/btmfu8bo-----END PRIVATE KEY-----
Public:
-----BEGIN Public KEY-----migfma0gcsqgsib3dqebaquaa4gnadcbiqkbgqchyjvkn+enpheb32aymuviawwzqseoghg4+ bv6fwjvazxd1byviwe4/ Ikjepundqeqqpricsrgrmcu4l4hncfr0stvxnklod703ifqyadljwa4frx22xczptrilbfhiyibwk0xh1pcqw3uqa3gwke3b4jsiibfixzjdamq8udkswidaq AB-----END Public KEY-----
4. Key Interoperability
Keys in various formats can be converted to each other through the C#:to*keypair () or Java:to*keypair () methods of the KeyPair class, with no thresholds and no barriers.
C#
Convert to a different format keyPair Asnkeypair = Keypair.toasnkeypair (); KeyPair Xmlkeypair = Asnkeypair.toxmlkeypair (); KeyPair Pemkeypair = Xmlkeypair.topemkeypair ();
Java
Convert to a different format keyPair Asnkeypair = Keypair.toasnkeypair (); KeyPair Xmlkeypair = Asnkeypair.toxmlkeypair (); KeyPair Pemkeypair = Xmlkeypair.topemkeypair ();
Second, interoperability and decryption
Based on the RSA PKCS1 filling method, which is supported by three languages, the encryption and decryption are realized.
Keyworker C#:encrypt,decrypt or Java:encrypt,decrypt or Php:encrypt,decrypt method to implement the function of encryption and decryption
1.c#
Using cn.ubingo.security.rsa.core;using Cn.Ubingo.Security.RSA.Data;
Add Decrypt//xmlkeyworker Privateworker = new Keyworker (Privatekey, keyformat.xml); Keyworker publicworker = new Keyworker (PublicKey, keyformat.xml); Console.WriteLine (Privateworker.decrypt (Publicworker.encrypt) ("Hello!" World "))); Console.WriteLine (Publicworker.decrypt (Privateworker.encrypt) ("Hello!" China "));//asnprivateworker = new Keyworker (Asnkeypair.privatekey, keyformat.asn);p ublicworker = new Keyworker ( Asnkeypair.publickey, KEYFORMAT.ASN); Console.WriteLine (Privateworker.decrypt (Publicworker.encrypt) ("Hello!" World "))); Console.WriteLine (Publicworker.decrypt (Privateworker.encrypt) ("Hello!" China "));//pemprivateworker = new Keyworker (Pemkeypair.privatekey, KEYFORMAT.PEM);p ublicworker = new Keyworker ( Pemkeypair.publickey, KEYFORMAT.PEM); Console.WriteLine (Privateworker.decrypt (Publicworker.encrypt) ("Hello!" World "))); Console.WriteLine (Publicworker.decrypt (Privateworker.encrypt) ("Hello!" China "));
2.java
Import Cn.ubingo.security.rsa.core.*;import cn.ubingo.security.rsa.data.*;
Asnkeyworker privateworker = new Keyworker (Privatekey, KEYFORMAT.ASN); Keyworker publicworker = new Keyworker (PublicKey, KEYFORMAT.ASN); System.out.print (Privateworker.decrypt (publicworker.encrypt) ("Hello!" World "))); System.out.print (Publicworker.decrypt (privateworker.encrypt) ("Hello!" China "));//xmlprivateworker = new Keyworker (Xmlkeypair.getprivatekey (), keyformat.xml);p ublicworker = new KeyWorker ( Xmlkeypair.getpublickey (), keyformat.xml); System.out.print (Privateworker.decrypt (publicworker.encrypt) ("Hello!" World "))); System.out.print (Publicworker.decrypt (privateworker.encrypt) ("Hello!" China "));//pemprivateworker = new Keyworker (Pemkeypair.getprivatekey (), KEYFORMAT.PEM);p ublicworker = new KeyWorker ( Pemkeypair.getpublickey (), KEYFORMAT.PEM); System.out.print (Privateworker.decrypt (publicworker.encrypt) ("Hello!" World "))); System.out.print (Publicworker.decrypt (privateworker.encrypt) ("Hello!" China "));
3.php
Make sure the php file is in utf-8 format
Include "keyworker.php"; use Cn\ubingo\security\rsa\core as Core;use cn\ubingo\security\rsa\data as Data;
/*pem test*/$publicWorker = new Data\keyworker ("-----BEGIN Public KEY-----migfma0gcsqgsib3dqebaquaa4gnadcbiqkbgqczw5tybnjsjgvrpkluiwf9el5eoxl1aydvbnj/wwpktzjbwyxudw+1ji5ifml+ 1dkcxw/2qlowzviv1olnpnawr7zvlpn6i7oztq0o2yfc+ Vv6vccttpmvfartrrwdextrbgogd71uwwgdmou8gmr9sv5u3c9kj5fhj0i4wgb94widaqab-----END Public KEY-----", Core\keyformat: :P em); $privateWorker = new Data\keyworker ("-----BEGIN PRIVATE KEY-----miicdwibadanbgkqhkig9w0baqefaascamewggjdageaaogbajndm3ie0myobws+ qtqhyx16xkq5cvudj1ugcn9zy8pnkkfzjg51b7wmjmj8wv7uoqlhd/zaujdnwjxu4uek0bavvo8uk3qls5m2rsjzh9z6+/ q8jy1oky8vqu1fhan5dnegcgz3vvtbab0w67waav2y/m7cl0qpl+gpqjhaah3jagmbaaecgya6anhylv0ruhlnntvcdcmkhe6fcdtvnbtwo/ hhfcvrasyuxmt2vhifub/wax5dpqbc53ib+hrcyhpyovxe8aswjgbjcj3rhxjlmou0jbu6mtjclgkzmym85yhscmmdcc8l/ ep9bhbijjstvm8rqqxfdpmy5cagfwsnxruc7zb5wqjbamxvzhr+izoeylsmeciy2ooatq5u8o6yjx7rapiggiktdru5g2gecylrhyzh/+u2/ nl3undip74fxizatzgte3ecqqdapnkzamobpw23wrese+ddjjxynqvqomzs22d6s+bkwdmhpot+ojmriry4lwmouwufgabodwh5y/q5+ Qjhp5stakeaux+f4ur2ndxpnfpkg4l3k8f3qdum/wgwqchef9gd9/z0jabrm+txc8x4+ 0s6ar4hhwasalwwrdwxvchio770cqjagaeuaxhq4wreipdiffu77em1tzimc0dvwha7q77olsltvg8b4yhet+ spapnptcypxtj6ml7hdsothlcsheyyjwjbajfdk3vgzs0sk4oy6ioaocux+5ubkpf9ran0gipehygzia+f1xf/+nns22qer/ advrmnnyhfqh24qwxqust39uq=-----END PRIVATE KEY-----", Core\keyformat::P em); Echo $publicWorker->decrypt ($ Privateworker->encrypt ("Hello! World "), Echo $privateWorker->decrypt ($publicWorker->encrypt (" Hello! "). China ")/*asn test*/$publicWorker = new Data\keyworker (" migfma0gcsqgsib3dqebaquaa4gnadcbiqkbgqczw5tybnjsjgvrpkluiwf9el5eoxl1aydvbnj/wwpktzjbwyxudw+1ji5ifml+1dkcxw/ 2qlowzviv1olnpnawr7zvlpn6i7oztq0o2yfc+vv6vccttpmvfartrrwdextrbgogd71uwwgdmou8gmr9sv5u3c9kj5fhj0i4wgb94widaqab " , core\keyformat::asn); $privateWorker = new Data\keyworker (" miicdwibadanbgkqhkig9w0baqefaascamewggjdageaaogbajndm3ie0myobws+ qtqhyx16xkq5cvudj1ugcn9zy8pnkkfzjg51b7wmjmj8wv7uoqlhd/zaujdnwjxu4uek0bavvo8uk3qls5m2rsjzh9z6+/ Q8jy1oky8vqu1fhan5dnegcgz3vvtbab0w67waav2y/m7cl0qpl+gpqjhaah3jagmbaaecgya6anhylv0ruhlnntvcdcmkhe6fcdtvnbtwo/hhfcvrasyuxmt2vhifub/wax5dpqbc53ib+ Hrcyhpyovxe8aswjgbjcj3rhxjlmou0jbu6mtjclgkzmym85yhscmmdcc8l/ep9bhbijjstvm8rqqxfdpmy5cagfwsnxruc7zb5wqjbamxvzhr +izoeylsmeciy2ooatq5u8o6yjx7rapiggiktdru5g2gecylrhyzh/+u2/nl3undip74fxizatzgte3ecqqdapnkzamobpw23wrese+ ddjjxynqvqomzs22d6s+bkwdmhpot+ojmriry4lwmouwufgabodwh5y/q5+qjhp5stakeaux+f4ur2ndxpnfpkg4l3k8f3qdum/ wgwqchef9gd9/z0jabrm+txc8x4+ 0s6ar4hhwasalwwrdwxvchio770cqjagaeuaxhq4wreipdiffu77em1tzimc0dvwha7q77olsltvg8b4yhet+ spapnptcypxtj6ml7hdsothlcsheyyjwjbajfdk3vgzs0sk4oy6ioaocux+5ubkpf9ran0gipehygzia+f1xf/+nns22qer/ Advrmnnyhfqh24qwxqust39uq= ", core\keyformat::asn); Echo $publicWorker->decrypt ($privateWorker->encrypt (" Hello! World "), Echo $privateWorker->decrypt ($publicWorker->encrypt (" Hello! "). China "));
4. Encryption and decryption interoperability
Any language (referring to c#,java,php) is encrypted using keyworker encryption, and the Keyworker in any language can be decrypted as long as the public private key is paired.
Three, test example
The complete Test instance code is as follows
1.c#
Using cn.ubingo.security.rsa.core;using cn.ubingo.security.rsa.data;using cn.ubingo.security.rsa.key;using System; Using system.collections.generic;using system.linq;using system.text;using system.threading.tasks;namespace cn.ubingo.security.rsa.test{//<summary>//Chen Sechin (fochen,[email protected])//2015-01-23//< ;/summary> class Program {static void Main (string[] args) {//Generate public private key pair KeyPair KeyPair = Keygenerator.generatekeypair (); Convert to a different format KeyPair Asnkeypair = Keypair.toasnkeypair (); KeyPair Xmlkeypair = Asnkeypair.toxmlkeypair (); KeyPair Pemkeypair = Xmlkeypair.topemkeypair (); Get Public Private key string privatekey = Xmlkeypair.privatekey; string publickey = Xmlkeypair.publickey; Add Decrypt//xml keyworker privateworker = new Keyworker (Privatekey, keyformat.xml); Keyworker Publicworker = new KeywoRker (PublicKey, keyformat.xml); Console.WriteLine (Privateworker.decrypt (Publicworker.encrypt) ("Hello!" World "))); Console.WriteLine (Publicworker.decrypt (Privateworker.encrypt) ("Hello!" China ")); ASN privateworker = new Keyworker (Asnkeypair.privatekey, KEYFORMAT.ASN); Publicworker = new Keyworker (Asnkeypair.publickey, KEYFORMAT.ASN); Console.WriteLine (Privateworker.decrypt (Publicworker.encrypt) ("Hello!" World "))); Console.WriteLine (Publicworker.decrypt (Privateworker.encrypt) ("Hello!" China ")); PEM privateworker = new Keyworker (Pemkeypair.privatekey, KEYFORMAT.PEM); Publicworker = new Keyworker (Pemkeypair.publickey, KEYFORMAT.PEM); Console.WriteLine (Privateworker.decrypt (Publicworker.encrypt) ("Hello!" World "))); Console.WriteLine (Publicworker.decrypt (Privateworker.encrypt) ("Hello!" China ")); } }}
2.java
Package Cn.ubingo.security.rsa.test;import Cn.ubingo.security.rsa.core.*;import cn.ubingo.security.rsa.data.*; Import cn.ubingo.security.rsa.key.*;/* Chen Sechin (fochen,[email protected]) 2015-01-23*/public class Program {public static void Main (string[] args) throws Exception {//Generate key pair KeyPair KeyPair = Keygenerator.generatekeypair (); Convert to a different format KeyPair Asnkeypair = Keypair.toasnkeypair (); KeyPair Xmlkeypair = Asnkeypair.toxmlkeypair (); KeyPair Pemkeypair = Xmlkeypair.topemkeypair (); Gets the public private key, in the case of the ASN format, String PublicKey = Asnkeypair.getpublickey (); String Privatekey = Asnkeypair.getprivatekey (); ASN keyworker privateworker = new Keyworker (Privatekey, KEYFORMAT.ASN); Keyworker publicworker = new Keyworker (PublicKey, KEYFORMAT.ASN); System.out.print (Privateworker.decrypt (publicworker.encrypt) ("Hello!" World "))); System.out.print (Publicworker.decrypt (PrivaTeworker.encrypt ("Hello! China ")); XML privateworker = new Keyworker (Xmlkeypair.getprivatekey (), keyformat.xml); Publicworker = new Keyworker (Xmlkeypair.getpublickey (), keyformat.xml); System.out.print (Privateworker.decrypt (publicworker.encrypt) ("Hello!" World "))); System.out.print (Publicworker.decrypt (privateworker.encrypt) ("Hello!" China ")); PEM privateworker = new Keyworker (Pemkeypair.getprivatekey (), KEYFORMAT.PEM); Publicworker = new Keyworker (Pemkeypair.getpublickey (), KEYFORMAT.PEM); System.out.print (Privateworker.decrypt (publicworker.encrypt) ("Hello!" World "))); System.out.print (Publicworker.decrypt (privateworker.encrypt) ("Hello!" China ")); }}
3.php
<?phpinclude "keyworker.php"; use Cn\ubingo\security\rsa\core as Core;use cn\ubingo\security\rsa\data as Data;/*PEM test*/$publicWorker = new Data\keyworker ("-----BEGIN Public KEY-----migfma0gcsqgsib3dqebaquaa4gnadcbiqkbgqczw5tybnjsjgvrpkluiwf9el5eoxl1aydvbnj/wwpktzjbwyxudw+1ji5ifml+ 1dkcxw/2qlowzviv1olnpnawr7zvlpn6i7oztq0o2yfc+ Vv6vccttpmvfartrrwdextrbgogd71uwwgdmou8gmr9sv5u3c9kj5fhj0i4wgb94widaqab-----END Public KEY-----", Core\keyformat: :P em); $privateWorker = new Data\keyworker ("-----BEGIN PRIVATE KEY-----miicdwibadanbgkqhkig9w0baqefaascamewggjdageaaogbajndm3ie0myobws+ qtqhyx16xkq5cvudj1ugcn9zy8pnkkfzjg51b7wmjmj8wv7uoqlhd/zaujdnwjxu4uek0bavvo8uk3qls5m2rsjzh9z6+/ q8jy1oky8vqu1fhan5dnegcgz3vvtbab0w67waav2y/m7cl0qpl+gpqjhaah3jagmbaaecgya6anhylv0ruhlnntvcdcmkhe6fcdtvnbtwo/ hhfcvrasyuxmt2vhifub/wax5dpqbc53ib+hrcyhpyovxe8aswjgbjcj3rhxjlmou0jbu6mtjclgkzmym85yhscmmdcc8l/ ep9bhbijjstvm8rqqxfdpmy5cagfwsnxruc7zb5wqjbamxvzhr+izoeylsmeciy2ooatq5u8o6yjx7rapiggiktdru5g2gecylrhyzh/+u2/ Nl3undip74fxizatzgte3ecqqdapnkzamobpw23wrese+ddjjxynqvqomzs22d6s+bkwdmhpot+ojmriry4lwmouwufgabodwh5y/q5+qjhp5stakeaux+ f4ur2ndxpnfpkg4l3k8f3qdum/wgwqchef9gd9/z0jabrm+txc8x4+ 0s6ar4hhwasalwwrdwxvchio770cqjagaeuaxhq4wreipdiffu77em1tzimc0dvwha7q77olsltvg8b4yhet+ spapnptcypxtj6ml7hdsothlcsheyyjwjbajfdk3vgzs0sk4oy6ioaocux+5ubkpf9ran0gipehygzia+f1xf/+nns22qer/ advrmnnyhfqh24qwxqust39uq=-----END PRIVATE KEY-----", Core\keyformat::P em); Echo $publicWorker->decrypt ($ Privateworker->encrypt ("Hello! World "), Echo $privateWorker->decrypt ($publicWorker->encrypt (" Hello! "). China ")/*asn test*/$publicWorker = new Data\keyworker (" migfma0gcsqgsib3dqebaquaa4gnadcbiqkbgqczw5tybnjsjgvrpkluiwf9el5eoxl1aydvbnj/wwpktzjbwyxudw+1ji5ifml+1dkcxw/ 2qlowzviv1olnpnawr7zvlpn6i7oztq0o2yfc+vv6vccttpmvfartrrwdextrbgogd71uwwgdmou8gmr9sv5u3c9kj5fhj0i4wgb94widaqab " , core\keyformat::asn); $privateWorker = new Data\keyworker (" miicdwibadanbgkqhkig9w0baqefaascamewggjdageaaogbajndm3ie0myobws+ Qtqhyx16xkq5cvudj1ugcn9zy8pnkkfzjg51b7wmjmj8wv7uoqlhd/zaujdnwjxu4uek0bavvo8uk3qls5m2rsjzh9z6+/q8jy1oky8vqu1fhan5dnegcgz3vvtbab0w67waav2y/m7cl0qpl+ gpqjhaah3jagmbaaecgya6anhylv0ruhlnntvcdcmkhe6fcdtvnbtwo/hhfcvrasyuxmt2vhifub/wax5dpqbc53ib+ Hrcyhpyovxe8aswjgbjcj3rhxjlmou0jbu6mtjclgkzmym85yhscmmdcc8l/ep9bhbijjstvm8rqqxfdpmy5cagfwsnxruc7zb5wqjbamxvzhr +izoeylsmeciy2ooatq5u8o6yjx7rapiggiktdru5g2gecylrhyzh/+u2/nl3undip74fxizatzgte3ecqqdapnkzamobpw23wrese+ ddjjxynqvqomzs22d6s+bkwdmhpot+ojmriry4lwmouwufgabodwh5y/q5+qjhp5stakeaux+f4ur2ndxpnfpkg4l3k8f3qdum/ wgwqchef9gd9/z0jabrm+txc8x4+ 0s6ar4hhwasalwwrdwxvchio770cqjagaeuaxhq4wreipdiffu77em1tzimc0dvwha7q77olsltvg8b4yhet+ spapnptcypxtj6ml7hdsothlcsheyyjwjbajfdk3vgzs0sk4oy6ioaocux+5ubkpf9ran0gipehygzia+f1xf/+nns22qer/ Advrmnnyhfqh24qwxqust39uq= ", core\keyformat::asn); Echo $publicWorker->decrypt ($privateWorker->encrypt (" Hello! World "), Echo $privateWorker->decrypt ($publicWorker->encrypt (" Hello! "). China "));? >
Iv. Related Accessories
Compile package: C # (4.0,dll) Java (1.6,jar) PHP (5.3,php)
Source code: C # (4.0,visual studio) Java (1.6,eclipse 4.4.1) PHP (5.3,zend Studio 12.0)
RSA interoperability key pair generation and interoperability plus decryption (c#,java,php)