This assignment will make use of the theory taught in if how file encryption is performed in reality using the stal Cryptography Architecture. Along the way, you’ll explor and how to generate large, reasonably random keys fro You can split this task into three easy stages to allow yc these instructions ask you several questions – you shoi part of your assignment submission.
he first four weeks’ lectures and will teach you ndard cryptoprimitives provided in the Java e issues such as padding, block cipher modes m passwords (or, better still, passphrases). )u to check your work, and as you proceed, uld record your answers because they are
Download the file FileEncryptor.java from iLearn and im FileEncryptor so that you can work on it.
port it into an Eclipse Java project called
FileEncryptor.java is the skeleton of a simple file encryp first parameter is “E” or “D” for encrypt or decrypt, resr parameters are the input file and output file, as you’d e) key, but a password or passphrase. If a passphrase whi surrounded by quotes to stop the shell parsing it as mu Passphrase”.
Your mission, should you choose to accept it – and you complete the program by filling in the missing code whi
t/decrypt program. On the command line, the )ectively, while the second and third <pect. However, the fourth parameter is not a ch includes spaces is used, it must be Itiple parameters, e.g. “My Super Secret
don’t really have a lot of choice – is to ch instantiates objects of the right classes and
then calls the appropriate method calls. I created the skeleton by taking the completed, working version, and deleting code while leaving the explanatory comments – but I’ve been reasonably careful to replace multi-line function calls and blocks of code with the same number of blank lines (there’s usually a blank line below the excised code). So if you see a two-line gap, you can reasonably assume that one line of code will provide the missing functionality – and if you think a single line of code will fill a 15-line gap, you should wonder whether you’re missing something.
Along the way, you will need to refer to the online documentation for the Java Cryptography Architecture, which you will find at http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.htnnl . The JavaDoc for the various javax.crypto classes are at http://docs.oracle.com/javase/8/docs/api/javax/crypto/package-summary.html while javax.crypto.spec JavaDoc is at http://docs.oracle.com/javase/8/docs/api/javax/crypto/spec/package-surnmary.htnnl
A stock is presently selling for $100. over each of the next two months, the stock will either increase of decrease in value by 9%, and will not pay any dividends. The risk-free rate is 2% per year. Consider a call option on the stock with an exercise price of $90 and a maturity date two months hence:
u =1.09; d = 0.91; rf = 0.02; E = $90 (a) What is the value of the option if it is an American option? What is the value if it is a European option? (b) What position in stocks and bonds at time zero will have the same value as the call at t = 1. (c) If the expected return on the stock is 4% per month, what must the expected return on the call be over the first month? What will the expected return on the call be in the second month given that the stock has fallen to $91?
The post Forums Quizzes Resources s Workshops appeared first on My Assignment Online.