aspose file tools*
The moose likes Java Micro Edition and the fly likes encrytion on string in midlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "encrytion on string in midlet" Watch "encrytion on string in midlet" New topic
Author

encrytion on string in midlet

Nicky Eng
Ranch Hand

Joined: Mar 26, 2005
Posts: 378
i have a midlet which will generate a string (message ) and send to our gateway.

but before sending, i will need to encrypt the string.

i've checked anywhere in internet but couldn't find j2me API about encryption.

what is the simple way to encrypt that string in midlet ?

anyone idea?

from
Nick


From NickyEng
Diploma in Computer Studies
SCJP 1.4
SCWCD 1.4
Formula 1 app by Maxis (Playbook)
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16308
    
  22

Depending on how you're handling the data and what you want, this may be easier than you think.

If your concern is simply to get data from the device to a server in a way that can't be read by anyone intercepting the data, just use an HTTPS connection and the job will be done for you.

If you need to keep data encrypted within the device, or you need to handle the decryption internally to the server, then you need a cryptography package. The standard one (javax.crypt, I think) features an architecture where different encrypt/decrypt services can be plugged in.

Probably the best approach in such a case is to use the JSR-177 package set, if your device supports it. If not, there are various other options around.


Customer surveys are for companies who didn't pay proper attention to begin with.
Nicky Eng
Ranch Hand

Joined: Mar 26, 2005
Posts: 378
is JSR-177 package within MIDP 1.0 or CDLC 1.0 ?

because my midlet need to be runs on various general phone(nokia, SE, motorola), so it is not specified to certain phone model.

what i want is encryption internally in midlet side and then send the encrypted message to our company gateway( sms://+12345 )

is this way can be done ?

from
Nick.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16308
    
  22

Well, my favorite smartphone, the rather pricey Nokia e70 includes JSR-177, but I don't think it's a guarantee for all devices. Best bet is to figure out which phones are most likely to be used and check their spec sheets.

Although if you're doing SMS on a digital cell phone network, it should be fairly secure without encryption - As far as I know, no one's been able to tap and decode them. Except, of course, the US Government. The greatest danger of interception would be within your own network.
Nicky Eng
Ranch Hand

Joined: Mar 26, 2005
Posts: 378
Originally posted by Tim Holloway:
Well, my favorite smartphone, the rather pricey Nokia e70 includes JSR-177, but I don't think it's a guarantee for all devices. Best bet is to figure out which phones are most likely to be used and check their spec sheets.

Although if you're doing SMS on a digital cell phone network, it should be fairly secure without encryption - As far as I know, no one's been able to tap and decode them. Except, of course, the US Government. The greatest danger of interception would be within your own network.


I'm not plan to have encryption in midlet but my company requires it, so i just follow instruction.

JSR 177 included 3 jar files, but these 3 jar-files don't contains javax.crypto package, so i can't copy it to my project directory. But without javax.crypto package i cannot do anything with encryption purpose.

So dilemma.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: encrytion on string in midlet