Home > Ask the Security Experts > Application Security Questions & Answers > Java programming resources
Ask The Security Expert: Questions & Answers
EMAIL THIS

Java programming resources

Michael Cobb, featured expert EXPERT RESPONSE FROM: Michael Cobb, featured expert

Pose a Question
Other Security Categories
Meet all Security Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 19 December 2005
I am a Java programmer. I have successfully done some secret key encryption and decryption. I can use the private key to sign a message and verify with the public key, but I still need some coding examples on how to encrypt with the public key and decrypt with the private key or vice versa. Can you recommend any resources on this topic?


BROWSE BY TAG
Application Security,   Application and Platform Security,   Software Development Methodology,   VIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Application Security
Are Web application penetration tests still important?
What does 'invoked by uid 78' mean?
How secure are iPhone App Store mobile applications?
What security software should be installed on Internet café computers?
Are message stubs a secure part of email retention policies?
How does a Web server model differ from an application server model?
Can Google Earth and other mash-up applications threaten enterprise security?
Do European laws prevent a U.S. company from blocking spam?
Can one antivirus program be used to get rid of spyware?
How to prevent cross-site scripting (XSS) session hijacking

Software Development Methodology
Adobe patches ColdFusion vulnerability blocking website attack
nCircle statistics show rising Web application vulnerabilities
Common PCI questions: Web application firewalls or source code review?
Juniper pulls ATM hacking presentation from Black Hat
V.i Labs integrates Google maps to track software piracy
Software Piracy pandemic needs government role, better vendor antipiracy plans
Software piracy losses total $53 billion, study finds
Google study backs browser silent auto update feature
Secure software development starts before coding begins
Security budget issues to resonate at RSA Conference

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
bypass  (SearchSecurity.com)
Common Weakness Enumeration  (SearchSecurity.com)
debugging  (SearchSoftwareQuality.com)
fuzz testing  (SearchSecurity.com)
heuristics  (SearchSoftwareQuality.com)
sandbox  (SearchSecurity.com)
threat modeling  (SearchSecurity.com)
trigraph  (SearchSecurity.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


I find the best place to go for Java code examples is the Sun Developer Network (SDN) run by Sun Microsystems, the developers of Java technology. SDN has two articles, which include the types of example you are after. The first is Cryptography: The Ancient Art of Secret Messages at http://java.sun.com/developer/technicalArticles/Security/Crypto/. The second is Java 2 Cryptography Extension: Encrypting and Decrypting Data at http://java.sun.com/developer/technicalArticles/Security/JCE/. This second article examines the classes in the JCE javax.crypto package and, in particular, the classes that are central to data encryption and decryption, the Cipher and KeyGenerator. They also provide pseudo code segments for an encryption and decryption program. An encryption program uses a secret key to encrypt a text string and a sealed object to wrap the secret key with the recipient's public key. A decryption program receives the encrypted text and wrapped session key over the network, then unwraps the secret key by using its private key and uses the recovered secret key to decrypt the message.

Two other articles that cover code examples are Using RSA encryption with Java by Aviran Mordo at http://www.aviransplace.com/index.php/archives/2004/10/12/using-rsa-encryption-with-java/2/ and Public Key Cryptography 101 Using Java by Richard G. Baldwin: http://www.developer.com/java/ent/article.php/3447491

Finally, if you don't already have it, I suggest looking into the Java Cryptography Extension (JCE)Reference Guide for the Java 2 SDK, Standard Edition, v 1.4 is available at http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/JCERefGuide.html




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Find Security Solutions for Your Business
Targeted Security Channel Tips for Resellers, Integrators and Consultants
TechTarget Security Media
Information Security View this month\\'s issue and subscribe today.
Information Security Decisions Apply online for free conference admission.
SearchSecurity.com
HomeNewsMagazineMultimediaWhite PapersLearningAdviceTopicsEventsAbout Us

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts