The public key pem can easily be transferred over the network. Am working on a project that should ask user for string input and then ask user to choose encryption algorithm which may include substitution cipher,play fair cipher, transposition cipher, Product cipher and RSA cipher.I have managed to implement substitution cypher with success. Public static KeyPair generateRsaKeyPair(int keySize) throws Exception ) Encrypting content in javascript and decrypting in java. android encrypting the content using a public key generated on javascript and then javascript decrypting it. I also needed to support the whole process in reverse i.e. Android should then be able to successfully decrypt the data using its private key. The idea was to pick up a public key generated on android and use it to encrypt content in javascript. The library also supported decryption using a private key using RSAES-OAEP/SHA-256/MGF1-SHA-256 which is compatible with Java’s RSA/ECB/OAEPWithSHA-256AndMGF1Padding algorithm. It also had a fair performance according to this evaluation. While developing an initial pairing mechanism for Ambient Dynamix, I had already settled on the forge library for javascript because of the availability of symmetric, asymmetric encryption algorithms, password based key derivation functions and hashing algorithms. including a python implementation, you can find it here. It’s extremely painful to implement RSA Encryption so that data encrypted on either of these platforms can be easily decrypted on the other platforms and even more so for someone like me who had almost zero knowledge of programming using encryption algorithms. The RSA algorithm is as follows: Choose p, q, two prime numbers Calculate n pq Calculate f(n) (p-1)(q-1).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |