Everything in a contract is public so it is not a good idea to store the private keys inside a contract to decode messages. A hacker can determine your private key and create fake messages.
Also not a good idea to have a hardcoded private key in your mobile app. It is possible that a hacker can do a reverse engineering and find your keys.
It is hard to recommend something without more details. Probably I'd create a new pair private/public key on installation and store them in secure storage of the OS, and register the public key with your contract.
Now your app can sign transaction with its private key and send the signed message to the contract. The contract can use the ecrecover trick to recover the public key of the message signature and verify it is one of the registered in the contract.
Sorry, it cannot be done safely on Ethereum blockchain with standard solidity, not in that mode. If you should encrypt using solidity in a smart contract, all the variables involved in the elaboration are stored on/in the blockchain. It can be formally demonstrated.
What you can do is to store any already crypt value on the blockchain, readable by any person who knows the encryption key.
This (the decryption) requires to be made off chain (i.e. on a separate server and/or in JavaScript on the web UI) if the data must be accessed by more than one user and need to remain secret, because if you decrypt it on EVM using some
decrypt (address encryptedData, uint256 key) returns (byte32 decryptedData)
a copy of the key shall be available on the blockchain forever, readable by all (you can read the transaction in clear text on etherscan, for instance)
You can have something useful by zk-SNARK algorithms, see https://link.medium.com/Gj2AvUVMeR , but it is not trivial and, until now, no suitable implementation are known in Solidity and EVM.
Best Answer
thx @Edmunx Edgar, i tried to use ECIES, but it failed to install because of a subdepencency. I now used the bitcore-lib together with bitcore-ecies. This works like expected.
EDIT: I created a npm-module which does exactly theses things and also has some performance optimisations and tutorials: github:eth-crypto.
Here is my code for anyone with the same question:
Run via CodeSandbox