473,804 Members | 3,396 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

encrypt a string in midlet

254 Contributor
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
Oct 23 '07 #1
6 2560
JosAH
11,448 Recognized Expert MVP
What decryption method is used on the other side of the wire?

kind regards,

Jos
Oct 23 '07 #2
nickyeng
254 Contributor
What decryption method is used on the other side of the wire?

kind regards,

Jos
you mean gateway side ?

of course decryption method will be the compatible with encryption method in midlet side. Means will use same package for encryption and decryption methods.

is it necessary for developer to encrypt the message that is sending out in midlet internally ?

Without encryption, the message from midlet SMS out to our gateway ( sms://+12345 ), for example a string message "REGISTER 1234"...will it be intercepted by other people WHEN the time the message is on the way to gateway.... ?
Oct 24 '07 #3
JosAH
11,448 Recognized Expert MVP
you mean gateway side ?

of course decryption method will be the compatible with encryption method in midlet side. Means will use same package for encryption and decryption methods.

is it necessary for developer to encrypt the message that is sending out in midlet internally ?

Without encryption, the message from midlet SMS out to our gateway ( sms://+12345 ), for example a string message "REGISTER 1234"...will it be intercepted by other people WHEN the time the message is on the way to gateway.... ?
Ah, ok; so the en/decryption methods are up to you? I don't know your configuration
but I'd say that nothing *un*crypted should exist starting from your DMZ to the
outside world. Internally things can just pass uncrypted from one peer to another.

About the en/decryption itself: how much processing power have you available?

kind regards,

Jos
Oct 24 '07 #4
nickyeng
254 Contributor
Ah, ok; so the en/decryption methods are up to you? I don't know your configuration
but I'd say that nothing *un*crypted should exist starting from your DMZ to the
outside world. Internally things can just pass uncrypted from one peer to another.

About the en/decryption itself: how much processing power have you available?

kind regards,

Jos
what do you mean by processing power ?

our midlet should be the smallest size like 300kb....
today, my supervisor do not like Bouncy Castle encryption/decryption OR JSR177 because importing those jar files willl make midlet size increases.

i'm not so good in packaging jar for midlet, Do i need to put Bouncy Castle jar files into the jar file that creates midlet (the jar for us to install midlet in phone--i use usb cable to put jar into phone and then install from phone) ?

cos i have a folder which holds alot of jar files that midlet needs under my application directory e.g. /MyApp/j2melib/
so when i hit the "Create Package" option from droplist, it creates one jar file and one jad file under /MyApp/deployed/ directory. /deployed/ directory is automatic created once hit the option.

my supervisor want me to copy "formula" and use it to create my own classes to have encryption function. I am so confused by what he meant "formula".

I have no idea about creating my own encrypt function. And even if i use Bouncy Castle package, console shows me Warning message.

what can i do now?
i'm stuck with this for 2 days already...
i am so fresh =.=

from noob
Nick
Oct 25 '07 #5
JosAH
11,448 Recognized Expert MVP
what do you mean by processing power ?

our midlet should be the smallest size like 300kb....
Just as I wrote: "processing power" as in "how fast is your processor and how
much memory can you spare for the encryption process". As you described
your phone is quite small and I guess it's quite slow as well so a feasible and
valid option could be to implement a cheap and fast home brew encryption and
decryption algorithm.

How secure should your encryption method be? Can there be any communication
between the phone and the other side before the encrypted data is sent?

kind regards,

Jos
Oct 25 '07 #6
nickyeng
254 Contributor
Just as I wrote: "processing power" as in "how fast is your processor and how
much memory can you spare for the encryption process". As you described
your phone is quite small and I guess it's quite slow as well so a feasible and
valid option could be to implement a cheap and fast home brew encryption and
decryption algorithm.

How secure should your encryption method be? Can there be any communication
between the phone and the other side before the encrypted data is sent?

kind regards,

Jos
no communication with other side before the encryption.

Actually i just want a very small simple encryption function. You ask me like it is a very big process. hehe.

encrypt a string in phone and then send out(sms out) ... that's it.

thanks
from
Nick
Oct 26 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1559
by: shmoove | last post by:
Hi all, I'm a J2ME developer, with very little experience in WAP. I want to know if the following is possible on Nokia terminals: I would like to have a link in a WML page, that when it is pressed it should check if the phone has a certain MIDlet installed, and if so the MIDlet is launched. If the MIDlet is not installed then an alternate action is taken. Basically I would like to have a "link" to a MIDlet, that would just run the MIDlet...
1
7966
by: wqhdebian | last post by:
As far as I know,when encrypt or decrypt ,a key must first be got,and the key is first generate by a tool or from SecurityRandom,that means I can not generate the same key with the same input.Does there is a method which can generate a same with the same input string? There is a need to transfer file between to site,and the customer wish to encrypt these files during transfering,and they want to store a string into each database at...
8
4287
by: toupeira23 | last post by:
Hello, I'm trying to encrypt passwords in my app. After discovering that there's no simple function to do this, I wrote a wrapper class which decodes a string using UTF8, encrypts it with TripleDES and returns a Base64-encoded string. The decryption function does the reverse, i.e. Base64-decodes the string, decrypts it with the same Key and IV, and encodes it again with UTF8. The problem is that after decrypting, the 8th character is...
2
3183
by: fineman | last post by:
Hi all, I want to get a 64bit(8 bytes) Encrypt result use DES class in the VS2005. Though I encrypt data is 64bit(8 bytes), but DES return encrypt result that always is 128bit(16 bytes), I don't know why? How to get a 64bit(8 bytes) encrypt result using DES class in the VS2005?
3
8304
by: JDeats | last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting and decrypting a file. http://support.microsoft.com/kb/307010 In .NET 2.0 this approach is not fully supported (a .NET 2.0 build with these methods, will appear to encrypt and decrypt, but the resulting decrypted file will be corrupted. I tried encrypting a .bmp file and then decrypting, the resulting decrypted file under .NET 2.0 is garbage, the .NET 1.1 build works...
0
2144
by: lildiapaz | last post by:
Hi, everyone I'm developing a c# windows application that allows the user to encrypt any file type. i would like to encrypt the file using a powerful encrypting algorithm. I've tried to use the rinjael, triple des, but it doesn't seem to encrypt certain files at all. Can you please tell me what the problem is. I don't understand why this function doesn't work when I call it and encrypt the file. when I search for the file it still pulls up...
5
3785
by: rpradeepa | last post by:
Hi, im getting this type of error in midlet program package javax.microedition.midlet does not exist package javax.microedition.io doaes not exist Welcomeform.java:4: package javax.microedition.lcdui does not exis import javax.microedition.lcdui.*; ^ Welcomeform.java:8: cannot find symbol symbol: class Form public class WelcomeForm extends Form implements CommandListener
0
1943
by: simsimlhr | last post by:
I want to load form inherited from Midlet(j2me) in lwuit form.Is there any way, i cannot convert the midlet into lwuit.
0
1741
by: NitinSawant | last post by:
Hello, I'm working with Netbeans Mobility Pack (Sun java wireless toolkit 2.5), I've created small midlet, I'm adding "MYID" custom property(Attribute) to the midlet, I know how to retrieve the property, midlet.getAppProperty("MYID"); but i don't know how to change the custom App Property as there is no setAppProperty() method,
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9575
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10564
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10320
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10308
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10073
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6846
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5645
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3806
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.