Hints and Details for SkyNet Part 1


You'll primarily be using RFC 2631 and RFC 3526 to implement Diffie-Hellman (DH). The PyCrypto library does not contain an implementation of DH itself, so you'll be implementing it. Two additional hints to assist you.

  • First, A = g**a % p is slow in most languages as it calculates g**a and then performs the modulus calculation. Instead, use A = pow(g, a, p) which speeds up the process by performing modular exponentiation.
  • Second, bytes(shared_secret, "ascii") should be bytes(str(shared_secret), "ascii"), bytes(hex(shared_secret), "ascii") or similar as the bytes function can't handle coversion directly from large integers to bytes.

Cyphers and HMACs

For improving the cypher and ensuring the messages aren't vulnerable to tampering or replay attacks, you'll be using the PyCrypto library. Refer to the PyCrypto API guide for guidance on using and justifying the use of these tools.

Code Submission

So that code submission is done sensibly, we will be using git and phabricator to submit code.
This platform will be used to both submit and review code, and is good practice for being in industry.

Please see this document for a run-down on how git and phabricator will be used for this project.

Part Title & Files Due In Lab Marks %
1 SkyNet: Security Essentials [project source code] Tuesday, Week 8 (23:59, 1st May, 2018) 9%
2 SkyNet: Commanding the Legion [part2 source code ] Sunday, Week 10 (23:59, 20th May, 2018) 9%
3 Common Vulnerabilities [project source code] Sunday, Week 12 (23:59, 3rd June, 2018 7%