Implement a communication infrastructure that uses AES to encrypt the traffic between two nodes A and B with the next characteristics. Lets consider a nod KM(key manager) that has three keys:K1,K2 and K3. K1 is linked with the CBC operating mode. K2 is linked with the OFB operating [login to view URL] is used for encrypting the keys K1 and K2. K3 is owned from the start by node A.
In order to initialize a secured sesion of comunication, node A sends a mesage to node B where it tells the operating mode(CBC or OFB) and asks node KM for the communication key in the same way.
The wanted key (K1 or K2) is encrypted as a single AES block by KM using the key K3 and it is sent back as an answer to node A,that will sent forward to node B toghether with K3 the wanted key.
A and B will decrypt the key (K1 or K2) at receving in order to start the [login to view URL] the keys are sent to B, node A starts to send to node B the content of a file encrypted on blocks using the selected mode(OFB or CBC).
Also, I need a short documentation for implementation, where you will describe
an access control model according to the key exchange executed, where KM,A and B are the subjects and the three keys the objects and .also, I need a file with minimal details about compilation and running the program and a description of the operating mode of access asked in the project.