I have what I think is a security IT question (I'm more of a programmer myself).

Assuming I am running a dedicated machine (say a PC) for a single program, meaning that the only port visible and open to the outside is the port this program is listening on.

Additional assumptions:

  • The program's code has no exploits, meaning no outside packet can cause the program to send information back or change anything on the machine's hard drive.

  • All communication to and from the machine are encrypted in PGP or AES+RSA in some other fashion, including all the supplementary conditions that are required by said algorithms (length of keys, padding scheme and whatnot).

What possibilities remain for an attacker to decrypt messages transmitted to and from the machine?

I add the single port and no exploits assumptions as I figure that given an ordinary PC runing some operating system with say 40 open ports this gives an attacker the option to infiltrate the machine via said ports and plant a keylogger or something similar.

The idea here is to create a maximal security two person chat system over open networks using for example a dedicated netbook over public wifi.

3 Answers 3



  • all ports are closed except the one leading to your server software;
  • your server software is exploit-free;
  • the implementation, by the OS, of the TCP/IP mechanics is exploit-free;
  • the implementation, by the OS, of non-TCP network services (e.g. ICMP) is exploit-free;
  • there is no alternative network-controllable access to the machine (like IPMI or a network-based KVM), or, if there is, that access is devoid of any exploitable hole;
  • the cryptography is done properly, as per the standards, using standards for which no security issue is known or suspected, and without leaking information through side-channels;
  • whatever lies at the other end of the communication is similarly protected and exploit-free;
  • attackers are assumed to be able to eavesdrop on the network, and alter bytes at will, but not to achieve physical access to the involved machines or local networks, or to bypass the firewalls which enforce port-blocking;

then, indeed, attackers will not be able to obtain information on the exchanged data, save its existence, approximate size, and exact times at which the data chunks are sent back and forth (which can already be quite revealing; historically, it allowed the US military to predict the Japanese attack on Midway in June 1942). Attackers may still block data, duplicate messages or reroute them, and might possibly learn information through the reactions of the sender and receiver in such cases.

That's an awful lot of "if", though.

  • 3
    You forgot an If: No one who has legitimate access to the messages can be tricked, bribed, blackmailed or otherwise suborned into disclosing them.
    – Mike Scott
    Jan 26, 2012 at 14:56
  • @Tom Leek: Tnx for the links, helpful.
    – Legion
    Jan 27, 2012 at 16:10

The programs code has no exploits

This is easy to say and hard to implement

All communication to and from the machine are encoded

Did you mean "encrypted"?

Now seriously: You have to answer few questions before you go to into development:

  1. You have to take care about Authentication, how do you know that you are talking with other side and not attacker?
  2. Will you use Client side certificates? How do you revoke them?
  3. How do you publish your IP? (You mention public WiFi – so I guess you don’t have static IP)
  4. Is there any server involved that makes connection/synchronize clients?



  • authentication will be via signed messages, you can sent a hello msg and see if the response is signed by who you think you should be talking to. I though of dyndns and the likes to find each other, what are the holes in that approach and what other idea you can suggest. No server.
    – Legion
    Jan 27, 2012 at 16:11

I am a little confused, you state:

Assuming I am runing a dedicated machine (say a PC) for a single program, meaning that the only port visible and open to the outside is the port this program is listening on.

By "single program" I take that to mean your program only, no web browser, no DHCP client, no email client, no bluetooth, no wireless keyboard or mouse etc. Further it means that your operating system is not running any programs or services. and that users will not be able to install or run any other programs on these computers.

If so this effectively means your computer must have a fixed IP address which effectively precludes it's use in a coffee shop etc where one typically needs to log in with a web browser and use a dynamic IP address.

Is this what you intend?

  • DHCP clients needs to run ofc to connect to wifi, and no to the other stuff. What are the implications of running the DHCP client ?
    – Legion
    Jan 27, 2012 at 16:11
  • Legion: The first implication is that you should re-word your question since you will be running at least two programs (yours + DHCP client). The DHCP opens up another whole can of worms. What should be "secure" often isn't from a public Wi-Fi access point due to all sorts of security vulnerabilities. For example: guardian.co.uk/technology/2011/apr/25/…
    – JonnyBoats
    Jan 27, 2012 at 16:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .