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 ]||Thursday, 18th of April 2019||9%|
|2||SkyNet: Commanding the Legion [part2 source code ]||Monday 6th May, Week 10 2019||9%|
|3||Common Vulnerabilities [project source code ]||Sunday, Week 12 2019||7%|