This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
swiftson's profile picture

Secure Bank System

Started by swiftson, 24 November 2013 - 12:58 AM
swiftson #1
Posted 24 November 2013 - 01:58 AM
Hello, I was wondering if I could receive some help. I have worked with lua for a couple weeks now and am collaborating to try to make a very secure bank system. The system will have many features, but right now I am working on a system to send rsa keys on a case by case basis.

Server Program: http://pastebin.com/1DJ75gK6
Client Program: http://pastebin.com/fj6VdLCF

I am not sure what has gone wrong in these two trials for the data transfer, but it seems they get stuck in a position where they are both trying to receive a message. I am not sure why, they should respond a couple of times and the server should send a secure key. The functions to make the keys, to encrypt and decrypt all work. The sending doesn't, can anyone tell why?
Bomb Bloke #2
Posted 24 November 2013 - 07:47 AM
The server waits for a broadcast, then waits for two more messages before sending two, then waits for another four to arrive.

The client sends a broadcast, then waits for two messages before sending five more broadcasts.

So the client only sends six messages out of the seven the server waits for, and after that first broadcast, you've indeed got both systems waiting for more messages - the order of your send/receives is out of whack.
swiftson #3
Posted 24 November 2013 - 03:28 PM
The server waits for a broadcast, then waits for two more messages before sending two, then waits for another four to arrive.

The client sends a broadcast, then waits for two messages before sending five more broadcasts.

So the client only sends six messages out of the seven the server waits for, and after that first broadcast, you've indeed got both systems waiting for more messages - the order of your send/receives is out of whack.

Thanks, I guess at 1am I just wasn't thinking straight.