Research Article

A Secure and Cached-Enabled NDN Forwarding Plane Based on Programmable Switches

Algorithm 1

The CPA-based encryption algorithm.
Input:
 RawPacket: .
Output:
 EncPacket: .
1 //generate the key
2 key = KeyGenerate() = = ;
3 //encrypt the RawPacket using the key
4 //step 1 to step n-2
5 for to do
6   ifthen
7     ;
8     for to do
9       ;
10     end
11     ;
12   else
13     NoAction();
14   end
15 end
16 //step n-1
17 whiledo
18   ifthen
19     ;
20     ;
21     ;
22   else
23     NoAction();
24   end
25 end