Added flag to keygen to specify key length.