obsidian-gpgCrypt icon indicating copy to clipboard operation
obsidian-gpgCrypt copied to clipboard

Support obsidian mobile

Open tionis opened this issue 1 year ago โ€ข 2 comments

Using gpg.js it should be possible to support obsidian mobile (Android / iOS) or are there some larger roadblocks?

tionis avatar Jun 27 '24 01:06 tionis

I'd be also happy to see this! Willing to beta test it, or support in another way.

georgjaehnig avatar Aug 25 '24 13:08 georgjaehnig

Another, maybe easier approach for Android could be using the API of OpenKeyChain

OpenKeychain provides two APIs, namely the OpenKeychain Intents and the OpenPGP API. The Intents can be used without permissions to start OpenKeychainโ€™s activities for cryptographic operations, import of keys, etc. However, it always requires user input, so that no malicious application can use this API without user intervention. The OpenPGP API is more sophisticated and allows to to operations without user interaction in the background. When utilizing this API, OpenKeychain asks the user on first use to grant access for the calling client application.

So it already handles the storage of the user's PGP key and possible password protection, our app would just need to communicate with its API.

georgjaehnig avatar Aug 25 '24 19:08 georgjaehnig

Implemented via PR #27

tejado avatar Jan 15 '25 18:01 tejado

Thank you for the implementation, @tejado.

I just tried it out and seems you can't use it via OpenKeychain, is that correct?

It'd be a pity if not, since this seems to be a generic solution in Android, where one needs to store (and secure) the private key only once.

georgjaehnig avatar Jan 15 '25 19:01 georgjaehnig

Thank you for the implementation, @tejado.

I just tried it out and seems you can't use it via OpenKeychain, is that correct?

It'd be a pity if not, since this seems to be a generic solution in Android, where one needs to store (and secure) the private key only once.

So far, I dont see a way to achieve this. In the limited (plugin) environment of Obsidian, Im not able to use Android Intents to interact with OpenKeychain. If you have any ideas, Im very open to it.

tejado avatar Jan 15 '25 21:01 tejado