×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    May 2010
    Posts
    64

    encryption of data in phone, sending it to server and decryption of it in server

    Hi,

    I can send GPS data to a server but now I want to first encrypt it before sending it. I have searched the forum and can find codes on how to encrypt data on the phone using JSR177. But I have some questions.

    1) How do we send encrypted data to the server? I was making a http connection and using php?lat=myLat&lon=myLon kind of thing. I don't know how to do it now with encrypted data.

    2) How do we decrypt data on the server? Can we use php to get data and decrypt it.

    I would really like tutorials, codes or suggestions. Any starting point for me is really appreciated.

  2. #2
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: encryption of data in phone, sending it to server and decryption of it in server

    Hi ,

    Why do you want to engript the data ?

    There are some open source algorithms you can use those to encrypt as well as decrypt ..
    http://www.winterwell.com/software/TEA.php
    http://wiki.forum.nokia.com/index.ph...ing_in_Java_ME

  3. #3
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,563

    Re: encryption of data in phone, sending it to server and decryption of it in server


  4. #4
    Regular Contributor
    Join Date
    May 2010
    Posts
    64

    Re: encryption of data in phone, sending it to server and decryption of it in server

    I think I understood how to do it on the phone. Especially this one is understandable: http://wiki.forum.nokia.com/index.ph...ing_in_Java_ME

    My other question is how to decrypt it back on the server. Can anyone help me with that (whole server process if you can)?

  5. #5
    Regular Contributor
    Join Date
    Jul 2010
    Location
    Hyderabad
    Posts
    63

    Re: encryption of data in phone, sending it to server and decryption of it in server

    For your php server, you can get many cipher api tool , from little effort of searching, you have to use the same secrete key to decrypt your cipher text,

    But the question is how will your php server know that secret key generated by mobile client? if you pass it by URL encoded parameter, means the key is getting exposed to the outside network, and your data protection level is not very good,

    So there is another method of doing that is Asymmetric key Encryption (also called public key encryption), Here i will tell you how it works, Server and Client each will have two key's one public key, and one private key.
    now server and client share there public key to each other (no mater how it share , they can share using simple getRequest parameter)
    now client encrypt data using server's public key and send it to server and now server can decrypt the data using it's own private key.
    if server needs to send data to the client than server encrypt those data using client's public key , now client can use it's private key to decrypt recieved data.


    So my recommendation is to Asymmetric Cipher encryption.
    - Mekal

  6. #6
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: encryption of data in phone, sending it to server and decryption of it in server

    If you want to encrypt data sent to your server, and decrypt it on the server... use HTTPS.

    Graham.

  7. #7
    Registered User
    Join Date
    Nov 2010
    Posts
    7

    Re: encryption of data in phone, sending it to server and decryption of it in server

    If i use HTTPS in connecting phone to server, there is no special code on midlet, it ll be a server side solution? is what i said true?

  8. #8
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: encryption of data in phone, sending it to server and decryption of it in server

    No, it's not a "server-side" solution. Any soution for encrypting and decrypting data must involve work done at each end. There's no point decrypting data on the server, if it was not encrypted by the device.

    Correct, there is no special code at either end. You are making use of functionality already built in to the device and the webserver.

    Graham.

Similar Threads

  1. RSA encryption with jsr 177 and decryption on server
    By federicom in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2010-12-09, 15:56
  2. Record audio, save it and send it to a server
    By Koryphäe in forum Mobile Java Media (Graphics & Sounds)
    Replies: 4
    Last Post: 2009-04-21, 09:34
  3. Recording Audio and sending it to server
    By shanprabu in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2009-02-02, 11:17
  4. Replies: 2
    Last Post: 2008-09-26, 03:11
  5. Data encryption/decryption in J2ME
    By divyas in forum Mobile Java General
    Replies: 1
    Last Post: 2006-05-18, 05:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×