Added private key generation, fixed encryption of fields (decryption seems to bug still)