First of all sorry , I am developing an messenger using servlet & jsp . please help me with code in servlet & jsp

a user to register via register module, followed by login and use encrypted or normal chat. Each stated function depends on its own module. The encryption and decryption of data will take place at the client side enabling more security during data transmission
  1. Encryption Process of Proposed Algorithm: - Proposed algorithm is divided into three phases, phase 1 and
    phase 2 and phase 3.

1.1 Step in the Phase 1
1. Take any 128 bit plain text.
2. Now divide this plain text into 2 parts, 64 bits each.
3. Reverse each part and then swap both.
4. Now apply a circular shift operation on both the parts twice and again combine parts to get 128 bit data.
5. Select 128 bits key value.
6. Perform XOR operation between plain text and key value and the final results should be in text data form.
7. Phase 1 is completed.

1.2 Step in the Phase 2
1. The 128 bits obtained after key mixing are divided into 16 equal parts of 8 bits each.
2. Again divide each 8 bit block into 2 parts of 4 bits each, combine odd numbered blocks on left side and even numbered on right side.
3. Now combine all the left 4 bit blocks to get a 64 bit block and perform the same with the right ones to get
another 64 bit block.
4. XOR both the 64 bit blocks. And the output is combined with the right 64 bit block (without any change) to
obtain 128 bit text.
5. Repeat the process 1 to 4 for N number of cycles.
6. Then the final 128 bits are divided into 16 blocks of 8 bits each.
7. Each 8 bit block is then split into 2 parts, of 2 bits and 6 bits, and circular shift is performed on the last 6
bits of each block.
8. Combine the 2 bit part and the modified 6 bit part to get 8 bit block (16 blocks in all).
9. These blocks are combined to finally obtain a 128 bit cipher text.

1.3 Step for Phase 3
1. Select 128 bits key value.
2. Perform XOR operation between 128 bits key values and 128 bit cipher text (final results of phase 2).
3. Now divide this cipher text into 2 parts, 64 bits each.
4. Now apply the reverse circular shift operation on both the parts twice
5. Swap both parts and apply re-reverse operation on both parts.
6. Finally combine both parts to get 128 bit plain text data.
7. Exit.

  1. Decryption Process of Proposed Algorithm: Decryption is the just reverse process of the encryption. Here
    decryption process is also divided into three phases, phase 1,phase 2 and phase 3.

2.1 Step in the Phase 1
1. Take any 128 bit plain text.
2. Now divide this plain text into 2 parts, 64 bits each.
3. Reverse each part and then swap both.
4. Now apply a circular shift operation on both the parts twice and again combine parts to get 128 bit data.
5. Select 128 bits key value.
6. Perform XOR operation between plain text and key value and the final results should be in text data form.
7. Phase 1 is completed.

2.2 Step for Phase 2
1. Select 128 bits cipher text.
2. The 128 bits cipher texts are divided into 16 equal parts of 8 bits each.
3. Each 8 bit cipher block is then split into 2 parts, of 2 bits and 6 bits.
4. Apply reverses circular shift on the second part of 6 bits
5. Combine the 2 bit part and the modified 6 bit part to get 8 bit block (16 blocks in all).
6. These blocks are combined to finally obtain a 128 bit cipher text.
7. Now divide this cipher text into 2 parts, 64 bits each, left and right.
8. XOR both the 64 bit blocks. And the output is a 64 bit block (without any change) to obtain left 64 bit
block 128 bit text.
9. After performing the XOR operation we will get both parts left and right parts of 64 bits each.
10. Now again divide both left and right 64 bits part into 4-4 bits part respectively.
11. Rearrange these 4 bits part in reversely to get original 64 bit parts (see architecture).
12. Finally combine all these blocks to get 128 bits.
13. Repeat process 7 to 12 for N number of cycles.
14. Then the final 128 bits will produce.
15. Phase 2 is completed.

2.3 Step for Phase 3
1. Select 128 bits key value.
2. Perform XOR operation between 128 bits key values and 128 bit cipher text (final results of phase 1).
3. Now divide this cipher text into 2 parts, 64 bits each.
4. Now apply the reverse circular shift operation on both the parts twice
5. Swap both parts and apply re-reverse operation on both parts.
6. Finally combine both parts to get 128 bit plain text data.
7. Exit.

What exactly is your question?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.