File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Security and the fly likes Getting processor ID Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » Security
Reply Bookmark "Getting processor ID" Watch "Getting processor ID" New topic
Author

Getting processor ID

Carlos Schweizer
Greenhorn

Joined: Sep 19, 2003
Posts: 13
Hi all, plese excuse me if this question does not fit here.
I post in security forum because my problem relates with. I need to crypt a private key with an symetric algorithm and I want to use the processor id as a key, so, if my private key is stolen, they have a little more job.
It's a correct approach ? I'm new on security issues, please forgive me if this question is not so smart. I look on the ranch for similar question but without results.
Thanks for all !

S/A SCJP MCP
Carlos.-
David Griffith
Greenhorn

Joined: Jun 07, 2004
Posts: 1
You won't be able to directly access the Processor ID, as the very nature of java is Write Once, Run Anywhere. I am fairly sure Macs don't have processors with accessible ID numbers.

You could write some native code to grab the id, and link it in with JNI, but if you want real security encrypting with a passphrase would be far better, although preventing unattended restarts might not be practical.
tommy k. lee
Greenhorn

Joined: Jun 16, 2004
Posts: 20
What is your business requirement? Are you trying to do this as a software licensing strategy?

If so, it may be better to use an asymmetric encryption algorithm, rather than a symmetric algorithm. What you can do is distribute your PUBLIC key as part of your software, and sign the license with your PRIVATE key. Your software can validate that the license is valid using the embedded PUBLIC key. Hence, you would NOT need to distribute your private key, and therefore, your PRIVATE key would not get compromised.

For more information on this subject, take a look at JCE (Java Cryptography Extensions).

http://java.sun.com/products/jce/index-14.html


SCJP,SCJD SCEA, SCWCD, SCBCD<br />OCP DBA 8i / 9i<br />CISSP, PMP, PHR<br />CCNA, CCDA <br /><a href="http://www.certgear.com" target="_blank" rel="nofollow">http://www.certgear.com</a>
 
 
subject: Getting processor ID
 
Threads others viewed
Hibernate Mapping & POJO Inheritance & Composition
how to write or map a primary key and two foreign key fields in one hbm.xml file
Generating Certificate and Certificate request
@PrimaryKeyJoinColumn: no insertable and no updatable
EJB - Everything works except persist()
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com