• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

encryption and decryption algorithms

 
Greenhorn
Posts: 14
Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need help with an assignment please.


Write two computer programs to simulate an Unicode stream cipher that consists of both encryption and decryption algorithms. The encryption program accepts inputs from an existing text file, called “letter.txt.” The encryption program produces an output ciphertext file, called “secret” The decryption program takes “secret” as input and decrypts it into a plaintext, called “message.txt.” (Hint: the random “seed” must be known, but be kept secure, by the pseudorandom number generators in both encryption and decryption programs.)
 
Saloon Keeper
Posts: 2622
128
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats a very interesting assignment, What have you done so far ?

Which algorithm are you planning to use ?
I would suggest to look at one time pad, it matches your requirement as far as i understand. Also note that pseudorandom number generators is a huge topic by itself.
 
jessica stud
Greenhorn
Posts: 14
Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not a strong programmer. We have to use EVE. Not sure if you are familiar with that terminal.

What is my best option for the start of it?



 
author
Posts: 23879
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

jessica stud wrote:I am not a strong programmer. We have to use EVE. Not sure if you are familiar with that terminal.

What is my best option for the start of it?



Not sure of what is being asked. Is this for help on starting the application / assignment? Or this for help on options for editors, compilers, and other setup, for the developement environment?

Henry
 
Ranch Hand
Posts: 186
1
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a very awesome looking assignment. Is it for a Data Structures & Algorithms class? What have you done thus far in the assignment. What kind of lanning have you started to do?
 
Ranch Hand
Posts: 954
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose as per assignment, need to write a code to perform file encryption algorithm.

You need to know what type of algorithm, padding, key and IV.

Then you can use any of the method available most preferably CipherInputStream and CipherOutputStream.  
 
Marshal
Posts: 69813
277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

You have to use EVE? What is EVE?
 
jessica stud
Greenhorn
Posts: 14
Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am asking how I would go about starting this? What are the basics I have to research to get this code going?
 
jessica stud
Greenhorn
Posts: 14
Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eve is a type of terminal we have to log into. Its ran unix linux. Its basically our terminal for our school.
 
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure how much Java programming you have done, but if you're looking for how to create a program, you can look here and here.  If you're looking for how to program this specific problem, I would begin by writing out the steps you would take to solve the problem one simple step at a time.
 
Sheriff
Posts: 15784
264
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

jessica stud wrote:I am asking how I would go about starting this? What are the basics I have to research to get this code going?


You have to give us a little more context so we know what "this" means. I hope you don't mean "How do I get this code going with EVE?" because you probably won't get much help on that from these forums.

What discussions/learning materials do you have from your class about encryption/decryption algorithms? Is that something that was discussed in your class? Do you have any example code you can use to pattern your solution after? Is there a specific library of utility classes for encryption/decryption/random number generation that your instructor has provided for you to use for this or do you have to use classes from the Standard Java API? I certainly hope you're not expected to write your own utilities to do all that.
 
Campbell Ritchie
Marshal
Posts: 69813
277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

jessica stud wrote:Eve is a type of terminal we have to log into. Its ran unix linux. . . .

In which case it will probably work similarly to the Bash shell I use for Fedora Linux. There is probably no difference in the Java® code from what you would write on Bash or a Mac or Windows®.
 
jessica stud
Greenhorn
Posts: 14
Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. Found out eve is only a site used to transfer it. The project requires a regular java code. 3 different files to be exact. The encryption program accepts inputs from an existing text file, called “letter.txt.”

The encryption program produces an output ciphertext file, called “secret” The decryption program takes “secret” as input and decrypts it into a plaintext, called “message.txt.”

by the pseudorandom number generators in both encryption and decryption programs


 
Henry Wong
author
Posts: 23879
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

jessica stud wrote:I am asking how I would go about starting this? What are the basics I have to research to get this code going?



Well, assuming that you are allowed to use it for the assignment, Java does have encryption support built into the core platform. See this tutorial on getting started... https://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html.  I am not sure if it is outdated though, it has been a while since I used it...

Henry
 
Rancher
Posts: 1041
6
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Welcome to the Ranch

You have to use EVE? What is EVE?



In the crypto context Eve is usually the Bad Guy (Bad Gal), the (Wo)Man in the Middle wanting to intercept the messages and to do eavesdropping ;-)

Alice and Bob @ Wiki
 
Campbell Ritchie
Marshal
Posts: 69813
277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ivan Jozsef Balazs wrote:. . .  Eve is usually the Bad . . . Gal . . .

 
He was giving me directions and I was powerless to resist. I cannot resist this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic