实现需要访问机密数据的Java桌面应用程序 [英] Implement a Java desktop application that needs to access confidential data

查看:92
本文介绍了实现需要访问机密数据的Java桌面应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Java桌面应用程序(一个可运行的jar),它被提供给CD中的客户端。然后autorun.inf自动启动该jar,应用程序从CD运行(因此在只读环境中运行)。



此应用程序需要访问一些已知的数据并以某种方式使用它。由于应用程序是独立的,因此应该将应用程序分发到某种文件中。



现在有挑战性的目标:




  • 这些数据只是数字列,类似于数据库表导出。最方便的访问方式就像是一个可以对这个文件执行SQL查询的数据库表。


  • 此数据对用户客户端应保密。虽然数据必须与应用程序一起分发,但用户不能清楚。所以,数据必须以某种方式进行加密或混淆。




所以我请你的帮助主要是指出一些想法将帮助我理解和讨论与您是实现这些功能的最佳方法。



提前非常感谢您,
Alves



编辑#1:
使用嵌入式数据库引擎是一个好主意,可以同时解决这两个问题。但是它给我一些问题:




  • 数据库引擎是否需要在某处写入文件?我已经用HSQLDB做了一些测试,我认为它是。这将是一个问题,因为应用程序是从CD运行的。


  • 如果真的需要这样的文件,我可以释放它们与应用程序,而不是在飞行中创建?


  • 只是为了确认,如果我使用加密数据库,我必须把某个应用程序的某个位置让我解密,对吧?



解决方案

你的目标是绝对不可能的这很明显为什么:您的应用程序显然需要读取加密数据(否则为什么要打扰它),因此必须将其解密,因此必须将密钥存储在某处。



那就是你:你发送加密数据和密钥将其解密到客户端 - 阻止他们做同样的事情你的应用程序是什么?



是它可能会阻止一些人获取您的数据,但是对于甚至对wh进行轻微了解的人来说,这并不安全在


I have a Java desktop application (a runnable jar) that is being made available to clients within a CD. Then "autorun.inf" automatically launches the jar and the application runs from the CD (therefore running in a read-only environment).

This application needs to access some known data and use it somehow. Since the application is standalone, this data should be distributed with the application in some kind of files.

Now comes the challenging goals:

  • This data are just columns of numbers, similar to database table exports. And the most convenient way to access it would be exactly like if it was a database table where one can do SQL queries to this files.

  • This data should be confidential to the user clients. Although the data must be distributed with the application, it cannot be legible to users. So, the data must be encrypted or obfuscated somehow.

So I kindly ask for your help mainly to point me some ideas that will help me understand and discuss with you which is the best way to implement such features.

Thank you very much in advance, Alves

Edit #1: Using an embedded database engine is a great idea and would solve both problems at the same time. But it raises some questions for me:

  • Does the database engine needs to write files somewhere? I've done some tests with HSQLDB and I think it does. That would be an issue since the application is running from a CD.

  • If it really needs to have such files, can I release them also with the application, instead of being created on the fly?

  • Just to confirm, if I use an encrypted database, I have to put somewhere on the application the secret Key that will make me decrypt it, right?

解决方案

Your goal is absolutely impossible and it's rather obvious why: Your application obviously needs to read the encrypted data (otherwise why bother including it), hence has to decrypt it, hence has to store the keys somewhere.

Well there you are: You sent the encrypted data AND the key to decrypt it to the client - what's to stop them from doing the same thing your application does?

Yes it may stop some people from getting your data, but it's nowhere safe against someone who has even a slight understanding of what's going on

这篇关于实现需要访问机密数据的Java桌面应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆