encrypt a string in midlet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nickyeng
    Contributor
    • Nov 2006
    • 252

    encrypt a string in midlet

    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
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    What decryption method is used on the other side of the wire?

    kind regards,

    Jos

    Comment

    • nickyeng
      Contributor
      • Nov 2006
      • 252

      #3
      Originally posted by JosAH
      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.... ?

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by nickyeng
        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

        Comment

        • nickyeng
          Contributor
          • Nov 2006
          • 252

          #5
          Originally posted by JosAH
          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

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            Originally posted by nickyeng
            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

            Comment

            • nickyeng
              Contributor
              • Nov 2006
              • 252

              #7
              Originally posted by JosAH
              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

              Comment

              Working...