Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: security(encrypt/decrypt) across machines

  1. #1
    Junior Member
    Join Date
    Feb 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default security(encrypt/decrypt) across machines

    hi ,
    i am using AES/CBC/PKCS5Padding algorithm to encrypt/decrypt,
    it works fine across machines, since i am not using a Facrtory to create the secret .
    i am using constant SecretKeySpec and iv for the ciphers.
    this of course heart the security , and doesn't prevent the "man of the middle" problem .
    i saw that there are ways with key generation with MAC , and RSA symmetric encryption , but i am not sure
    how to implement it , and how to it depends on local certificates or files .
    i have searched for an complete example , but in vain.
    please help


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: security(encrypt/decrypt) across machines

    Welcome to the Forum! Please read this topic to learn how to post code correctly and other useful tips for newcomers.

    What's your question? Can you state it in one or two sentences, possibly with one of them ending in a question mark, maybe both?

    Thanks.

  3. #3
    Junior Member
    Join Date
    Feb 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: security(encrypt/decrypt) across machines

    i didn't post code ....
    i just asked a question....
    i need a good,encrypted way , that does not use a constant string for the secret key (that is needed for the SecretKeySpec).
    i saw that there is the RSA way (keyPair generation) and the MAC way (generate some key too .
    the question is : if i generate a key is the machine that does encryption - then in the decrypting machine i won't be able to decrypt it .
    i will need the key .
    so - what is the better way to generate some random key , but still be able to decrypt it on another machine ? (question mark...:-))

Similar Threads

  1. Simple string encrypt and decrypt
    By mds1256 in forum Java Theory & Questions
    Replies: 3
    Last Post: August 9th, 2013, 07:47 AM
  2. I need help to write encrypt and decrypt 4 digit numbers.
    By shin777 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: June 29th, 2013, 01:07 PM
  3. [SOLVED] Encrypt Decrypt
    By dianac in forum What's Wrong With My Code?
    Replies: 15
    Last Post: April 14th, 2013, 11:01 AM
  4. Code not working on other machines
    By Coty0010 in forum Java Theory & Questions
    Replies: 14
    Last Post: April 3rd, 2012, 05:33 PM
  5. Need Help for encrypt/decrypt.
    By superdhebz in forum What's Wrong With My Code?
    Replies: 3
    Last Post: September 17th, 2010, 12:17 PM

Tags for this Thread