I'm new to ingress and I'm totally confused about the items in my inventory. Recently I hacked few resistance portals and I got their portal keys I know what to do with my own keys and I know that I can't link to an enemy's portal.So my question is What is the use of enemy's portal key in ingress??
So keys are for portals, not just enemy's. The keys are used in order for you to link portals that your team has taken over. Without a key, you cannot link a portal to another. Let's say you get a key for portal A, you are now able to link portal B to portal A. Now you will not be able to link portal A to portal B unless you have a key for it (but if you have created the link from B to A then the link exists and you don't have to worry). A key is usually acquired after hacking a portal a couple of times, between 4 to 6 from what I have experienced.