File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes Encryption with Midlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Encryption with Midlet" Watch "Encryption with Midlet" New topic

Encryption with Midlet

gnana sekar

Joined: May 29, 2006
Posts: 4
Iam sekar working in j2me, i want to do (Asymmetric)encryption and decryption in my midlet, i tried with BouncyCastle and i got output fine with symmetricKeys.
When i tried for AsymmetricKeyPair generation the runtime(compiled fine)error shown as
"java.lang.NoClassDefFoundError: java/security/SecureRandom: Cannot create class in system package"

what i have to do?

One more question: I want to get the public key (was generated by servlet) from server as inputstream in midlet. is it possible getas Publickey fron stream?
its urgent.. any help please.
gnana sekar

Joined: May 29, 2006
Posts: 4
I think j2me does not have the security packages like j2se.
Then how to achieve the Asymmetric encryption with j2me, but i believe j2me have any other way for this.
any of you have the idea...
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

"Lion JavaME"

Please clikc on the My Profile link above and change your display name to meet the JavaRanch Naming Policy of using your real first and real last names. We do close accounts that continually violate our policy.



Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Pankaj Bisaria

Joined: May 20, 2006
Posts: 4

Please see this tutorial.I think it will help you.

gnana sekar

Joined: May 29, 2006
Posts: 4
Thaks for interest,

i already did encryption with servlet and it work fine.

i want to do the encryption with MIDlet using the key was generated by servlet.
while try this i got error like.
what may wrong with my procedure or any change i have to made with my bouncy castle or wtk ???
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11957


Our naming policy requires TWO names... a first name, a space, and a last name. Accounts that fail to meet this requirement can and will be closed.

Please update your name to comply.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
I agree. Here's the link:
subject: Encryption with Midlet
It's not a secret anymore!