im trying to encrypt Realm DB. Key should be 64 bytes long. Minimum api level of my application is 21, so I can generate only RSA key, which minimum length is 512 bytes, relying on an android sdk solution. Is it safe to shorten the RSA key to 64 bytes?
KeyStoreHelper.createKeys(application, "REALM_KEY")
RealmConfiguration.Builder()
.name("MyDatabaseName")
.encryptionKey(KeyStoreHelper.getSigningKey("REALM_KEY")!!.take(64).toByteArray())
.schemaVersion(2)
.deleteRealmIfMigrationNeeded()
.build()
.run(Realm::setDefaultConfiguration)