Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ResoDev · May 05, 2016 at 03:33 PM · securitycurrency

Is Encrypted Playerprefs Safe Enough For Virtual Currency?

Hello there! So I'm making my first real Android game and I was researching about secure data storage for quite a while. I want to store things like virtual currency on the client side and I also want the process to be as simple as possible. I've found this on the asset store. Do you think it is enough to keep MOST players from altering their money and other important things? At first I wanted to use Soomla, but then I've found the thing above and I will be using Unity IAP.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image gjf · May 05, 2016 at 01:48 PM 2
Share

most? maybe. ish. however, it only takes one person to get past it and make a solution available on the interwebs.

the code, even if obfuscated, can be used to break the encryption - you really need to have some sort of authoritative server handle those transactions. the client device can NEVER be trusted.

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Glurth · May 05, 2016 at 04:03 PM

Maybe for a while, but it's not a good idea.

" I want to store things like virtual currency on the client side "

This sounds like leaving the lockpicking thief, with a lock to practice on. I recommend that you do NOT keep currency on the client side. Keep it, and all user stats, on the server.

If your user set gets large enough, some people WILL abuse it. Giving them with a file they can do whatever they want to, as often as they want to, is not going to help keep it secure.

If you keep it on the server (and adjust it ONLY with server-based code), then users will need to authenticate to access currency amounts, and unless they hack INTO your server, will NEVER be able to change the amount of currency they have (outside of the normal in-game-ways).

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by fabian-mkv · May 05, 2016 at 03:51 PM

Yes. MOST players (ie: >50%) won't bother unless it's an online game. If it's strictly local single player, I wouldn't worry about the <5% who'd go and try to modify their files. However, from a security point of view, if you don't use online authentication and all the code to decrypt the currency is provided with the game, then a hacker has all the information necessary to hack it. Additionally, if using this currency is also not authenticated, then a hacker can trick the game into thinking it has "unlimited" currency without ever having to decrypt or encrypt the Playerprefs.

As a side note, since this is your first "real" Android game I suggest you not worry about this. This is considered a good problem to have. If you incorporate some sort of online leaderboard in which having unlimited game-currency will boost your score, you can just keep track of the leaderboard over time to see just how many people actually hack.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

what is the best way for in app, including virtual currency, syncing over cross platform 0 Answers

Secure Virtual Currency System 1 Answer

Detecting CD-ROM drives 1 Answer

Does Unity have any symmetric crypto libraries? 1 Answer

Security: Sending RPC to all clients 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges