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.
A = g**a % pis slow in most languages as it calculates
g**aand then performs the modulus calculation. Instead, use
A = pow(g, a, p)which speeds up the process by performing modular exponentiation.
bytes(shared_secret, "ascii")should be
bytes(hex(shared_secret), "ascii")or similar as the bytes function can't handle coversion directly from large integers to bytes.
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.
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%|