The password on my AP is a 256 bit (64 char) hex string, and was generated by
https://www.grc.com/passwords.htm. ifconfig will only allow you to set a hex WPA key if it's the right length.
What you need to do is outline
exactly the specifics of the network you're trying to connect to - ie which type of encryption (WEP, WPA, WPA2?)...