I'm developing a program that contains a login function in C++. The problem is that I don't know how to develop it in my situation. I want to run the software on a raspberry pi, it only has a CPU clocked on 1 GHZ and 512MB of memory. The Memory isn't going to cause a problem, but the CPU does.
The problem is that I can't effort a lot of CPU power on encryption, of course I encrypt all passwords, but I can't encrypt the connection. This is because I think that HTTPS is to heavy. No HTTPS is not a real problem because the data is not classified, but I want to make sure that no one else can capture the connection and preform actions.
This is what I designed till now:
The login functions validates the user, if a correct user name and password is given then the user gets a unique encrypted number. The user must send this number every time to get access to his account.
The problem is that every one can capture the unique number of the user, and he could use this number to login to his account. How can I develop a login function with out this problem? I can use the users IP in the encrypted number, but this is not secure when the hacker has access to the targets network.
Besides that, the user sends his credentials over the network. I guess I can also preform some encryption client side, but this isn't very handy for my CPU because I need to do more encryption cycles on my server.