For a bit of time now, I've had the same issue I've seen with 11.10 users having trouble with connecting to a wireless encrypted network after it had previously worked once all ready. In this thread I'm going to try to give as much detail as possible (since I'm a little new to ubuntu still, and only used but haven't gotten far into learning kernel operations yet).
I had a fresh install from a USB drive. While I installed it, I didn't connect it to my network and just let it install because I was under a time constraint. When the install finished, I did a proper shutdown, removed the drive when the laptop was off, then restarted it.
I booted up into my ubuntu partition. Connected to my wireless network just fine with my WPA2 key. Installed updates and Google Chromium, and Gnome 3 (i personally dislike unity) and Wine (which I used to install a game called The Binding of Isaac). When I was finished with my web browsing (yes it included a bit of facebooking and installing adobe flash for chromium) and testing the game, I shut the laptop down.
The next time I booted up Ubuntu, it kept asking me for the WPA2 key for my network. I clicked to show my key text which was correct (with involved verifying the spelling of a simple word), and no matter what it wouldn't connect. I tried using ifconfig to shut the interface down and turn it back to up again to no avail. i went into the network manager gui, turned wireless off, and back on, big issues. connected to my neighbors unprotected wireless network easily. connected back to my encrypted, wouldn't work.
I freshly installed Linux Mint on my usb stick. I go into it's live CD, connects with no issues. I didn't install Linux Mint. I restarted my computer.
Got back into ubuntu, and I didn't have even a chance to blink, and it connected with no issue.
I'm wondering why this time it worked all of a sudden. I'm kinda expecting the next time I shut this laptop down and power it back on to ubuntu again, I will have a problem connecting again. I google searched for the bug and I have seen some people have said to manually connect to the access point via terminal with your mac address info. I knew it wasn't a mac address problem with my laptop because on my Windows 7 partition, I connect flawlessly everytime, and there's no DHCP reservation for it (I was thinking at first it may be a computer name to mac address conflict and that the router was refusing the connection out of confusion with inconsistant data. my comp name in the router shows up as my username in ubuntu while on windows 7 it shows up as something else).
I haven't seen a resolution to this problem pop up yet with my little bit of looking, but if it's still an on going issue, I hope this helps anyone. And if this bug is solved, I was hoping for a bit of enlightenment because I haven't seen it with what I searched.
Thanks ahead of time!