include "security.m"; login:= load Login Login->PATH;
user --> CA name CA --> user ACK user --> CA ivec CA --> user key(alpha**r0 mod p), alpha, p user --> CA alpha**r1 mod p CA --> user CA's public key, SHA(CA's public key + secret) user -->CA user's public key, SHA(user's public key + secret) CA --> user user's public key certificateThe complexity of this protocol is intended to shield the password. To start a clear text attack against the password, one needs to first attack the Diffie-Hellman exponential to determine alpha**r0 mod p. A possible weakness is that the encrypted quantity is base 64 encoded, constraining the possible values of each byte. This could aid a brute force attack.
The values alpha and p are sent unprotected, though the user code does a few sanity checks on the values it receives. This is another potential point of attack.
The role of ivec is to foil any replay attacks by someone spoofing the CA, though this is probably overkill.