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 2 of 2

Thread: Java Crypto Libraries

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java Crypto Libraries

    I am very new to java programming and I need to implement a security project in Java, any idea how to go about it?

    The project involes encryption messages in google docs. below is the details of the project.

    <> Google Docs is a free, Web-based word processor, spreadsheet, presentation,
    and form application offered by Google. It allows users to create and edit
    documents online while collaborating in real-time with other users. 2 One
    problem with Google Docs is, you need to trust Google with respect to security
    of your files. In this project, you need to write a program to securely open,
    process and store text files in encrypted format using Google Docs and verify
    that it has not been modified while it is stored on Google Docs.
    In order to do this, first, you need to encrypt your message so that no one else
    should be able to read your private message details without knowing the
    encryption key. To do this, use AES Algorithm in CTR mode. Second, in
    addition to privacy, you should also guarantee the authenticity of your
    message. As a part of the encryption of the message, your program should
    calculate HMAC of the plaintext and append the HMAC value of the plaintext
    to the message. It should then encrypt the full string (message and MAC)
    using AES in CTR mode. Whenever you want to access your message, your
    implementation should first verify that the content of the stored message has
    not been changed by recalculating the HMAC value of the ciphertext. By doing
    so, you will make sure that if someone has altered the contents of the
    encrypted message on the Google servers. If the HMAC value of the retrieved
    message is different from the recalculated HMAC, then you should inform the
    user that contents have been modified.
    You are also encouraged to build up a user interface that shows your program
    working for each process including calculating and appending the HMAC
    code, encryption of the message, uploading, downloading, decryption and etc.
    Here is a sample of the implementation (Secure Notepad):


    1. Create a new encrypted file using an
    input password (key) and an underlying encrypt algorithm. You should
    calculate the HMAC for the message, append it to the message, then
    encrypt the entire string. Then by pressing the “save file” button, you can
    save the file at Google Docs.

    2. Decryption fetch the encrypted file from the
    Google Docs and decrypt it. Then, separate the message into the body
    and MAC. Calculate the HMAC of the message to ensure that the
    integrity of the data has not been compromised. If their values are not
    equal, which means the message content has been changed, prompt a
    warning that tells the user the original message has been modified.
    Otherwise, the message will be successfully decrypted using the correct
    key you provide and shown in the “File content” area. Of course, the
    message must be exactly as the same as the original one.</>


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Java Crypto Libraries

    Do you have any specific java programming questions about your assignment?

    Look at the java.security package.
    Last edited by Norm; April 14th, 2012 at 05:39 AM.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. How to use GNU Crypto LIbrary in Matlab via Java Interface
    By divix in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 18th, 2012, 01:27 PM
  2. Decimal to Hexadecimal, Without Java Libraries.
    By ribmant in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 3rd, 2012, 07:28 AM
  3. Java - Crypto ISBN number verification, GUI program
    By djl1990 in forum What's Wrong With My Code?
    Replies: 11
    Last Post: October 13th, 2011, 11:22 AM
  4. The difference between two Java libraries
    By ice in forum Java Theory & Questions
    Replies: 1
    Last Post: January 11th, 2011, 10:34 AM
  5. Replies: 3
    Last Post: May 15th, 2010, 02:05 PM