 |
BOOK: Beginning Cryptography with Java  | This is the forum to discuss the Wrox book Beginning Cryptography with Java by David Hook; ISBN: 9780764596339 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning Cryptography with Java section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

October 3rd, 2007, 09:28 AM
|
|
Registered User
|
|
Join Date: Apr 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
SecureRandom&BigInteger in J2ME
Hi all,
Im trying to implement an encryption method in cldc J2ME using Bouncy Castle, however i need to use a number of libraries which arenât available in J2ME such as:
java.security.PrivateKey;
java.math.BigInteger;
java.security.SecureRandom;
I cant find any version of these libraries in bouncy castle that i can use. Does anyone know how i can implement them?
Thanks a million in advance
|
|

October 11th, 2007, 04:41 AM
|
|
Registered User
|
|
Join Date: Apr 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks to your help I figured out how to implement java.math.BigInteger and java.security.SecureRandom
However i am still unable to implement java.security.PrivateKey within J2ME-CLDC
Does anyone know of any way i can use this?
Thanks again
|
|

October 11th, 2007, 06:26 AM
|
|
Wrox Author
|
|
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
|
|
Somehow, I managed to miss the reference to PrivateKey in your earlier post. Private key is only available in the most recent CLDC profile. There are equivalent parameter classes in the lightweight API though so you can get by without having to use them. It all depends what sort of private key you want.
Regards,
David
|
|

April 16th, 2009, 03:35 PM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
|
|
I was having problems with BigInteger in a MIDlet I was trying out in Netbeans - I found this post which showed me how to resolve the problem http://discussion.forum.nokia.com/fo...ad.php?t=90558
When I sorted out the Obfuscation in Netbeans (as described in the post), the MIDlet worked ok in Netbeans emulator and on a Nokia Series 40 using Bouncy Castle API

|
|

April 19th, 2009, 10:26 AM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by Littlen
Thanks to your help I figured out how to implement java.math.BigInteger and java.security.SecureRandom
However i am still unable to implement java.security.PrivateKey within J2ME-CLDC
Does anyone know of any way i can use this?
Thanks again
|
Hi, so what should I do in order to use BigInteger for my j2me application...
really need your help please..thanks in advance ^^
|
|

April 19th, 2009, 11:06 AM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Well what I did was follow the advice contained in the link in my previous post:-
In Netbeans you go to Project Name-> Properties -> Obfuscating -> and then choose "High". That worked for me when I loaded the .jar on to a Seies 40 Nokia handset.
|
|
The Following User Says Thank You to wotcha For This Useful Post:
|
|
|

April 19th, 2009, 08:02 PM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hi wotcha ^^
How about if I need to use BigInteger only..and I use Wireless ToolKit, not netbeans..
Is there a manual way to use the library of BC??
|
|

April 19th, 2009, 11:01 PM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
have found the solution..\
for WTK user..
just download the lightweight for J2ME
and copy zips/cldc_classes.zip into the lib folder of your project
note: you should have obfusator installed on in order to be able to use the lib..^^
|
|

July 3rd, 2013, 05:09 AM
|
|
Registered User
|
|
Join Date: Jul 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
BigInteger exception
hello all
im using RSA encryption on LWUIT mobile application
but getting this exception
NoClassDefFoundError : java/math/BigInteger: Cannot create class in system package
im using jdk1.6.0_13 and netbeans 6.7.1 and wtk 2.5.2
i have encluded cldc_classes.zip in my resources and checked obfuscatiing with the highest level with additional setting :
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-ignorewarnings
pls help me to solve this problem
Regards
|
|
 |