How to store data in Secure Element in android

I want to create a Google wallet as an application in android. They say that "all the credentials for payment are stored in a chip with the name Secure Element contained in the phone." How can I access this protected item and store my credentials in it. My goal is to use my phone (Nexus) on the checkout counter instead of my card.

So, I want to save some data in the Secure Element chip and access the data when I click on the NFC reader.

Thanks in advance.

+7
source share
2 answers

If you've flagged frequently asked questions in Google Wallet , you can find the following:

  • Your billing information is stored on a chip called Secure Element contained in your phone. The protected item is isolated from the phoneโ€™s main operating system and hardware. Only authorized programs, such as Google Wallet, can access the Secure Element to initiate a transaction.

  • Even Google Wallet itself has very limited access to a protected item and cannot read or write data from its memory. There are several levels of data protection stored in a protected element, and it is protected at the hardware level from tracking or tampering.

So basically ... you do not have access to this SecureElement . Maybe talking to phone manufacturers to give you access / ways to access SecureElement will let you do this ... but I think that would be out of scope.

EDIT: An alternative solution is to store your data in a SQLite database, as well as use encryption in that database, such as AES ... or whatever you prefer. You still have to pay attention to how you hold / distribute encryption/decryption keys .

If you are concerned about the case when someone loses their phone and the โ€œfounderโ€ tries to steal data, you can also implement password protection on your Application , and if the password is entered incorrectly 3 times in a row, drop the SQLite database where the data is stored.

+7
source

You cannot store anything in a security encryption chip, as this hardware is separate from the operating system.

0
source

All Articles