关键词 > SCC.311

SCC.311 Coursework Stage 1 Specification

发布时间:2021-12-08

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit



SCC.311 Coursework Stage 1 Specification

This coursework stage does not need to be submitted, but is test-marked in Week 4 with feedback. It is re-marked for real, along with your more advanced submission, in Week 7.

The goal of this stage is to build a simple client-server setup that invokes a method using Java RMI. You will develop both the client and the server.

You can either develop Level 1 or Level 2, with more marks available for Level 2.  Developing only Level 1 will gain fewer marks for this stage of the coursework, but does not prevent you from gaining full marks in the subsequent coursework stages.

Level 1:  Invocation (9%)

Build an RMI server that offers this exact interface, listening on the default port 1099:              public  AuctionItem  getSpec(int  itemId,  int  clientId)  throws  RemoteException;

This function call should return the details of an auctioned item that has the identifier itemId. The clientId can  be assumed to  be a  username, and is  used only in the  later versions of the coursework.   The details of the  return type AuctionItem are for you to define,  but  below  is a suggested structure.

int  itemId

String  itemTitle

String  itemDescription

You may want to extend this structure to add other variables, such as item condition (new / used), etc. – this may especially be relevant in the next stages of the coursework.

You must also build a very simple client that invokes the above method on the server using RMI,   and displays the return values to the user. A basic command-line client is sufficient, but must allow    the user to enter the itemId details (this should not be hard-coded).                  

Tip:  Do not forget to start the RMI registry when running your code.

Level 2:  Encryption (+ 8%)

This level should have all of the functionality of Level 1, but should use a different interface function which supports encryption:

public  SealedObject  getSpec(int  itemId,  SealedObject  clientReq)  throws  RemoteException;

 

To achieve this, use the Java SealedObject class, a mechanism that allows you to encrypt and decrypt objects. When doing this you should use AES encryption and AES session keys rather than passwords. You do not need to develop a key distribution mechanism for this stage of the coursework; you can simply store your session key on disk in a location that both the client and server can access. The modified interface (above) will take an item ID and a sealed (i.e. encrypted) “client request” (a class that just includes clientId and is Serializable) as its arguments, and returns a sealed server  response that encapsulates  an  AuctionItem.   The client  needs to display the decrytped response. You will need to generate a shared key (see KeyGenerator) which you can store in a file.


 

Mark Scheme

Level 1

Client invocation and display — 3 marks

Server interface — 3 marks

Answer in-lab questions — 3 marks

Level 2

Achieving this level implies that you will gain all of the marks for Level 1 Key creation and use — 2 marks

Create client request — 3 marks

Decrypt sealed server response — 3 marks