<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def freeze_encrypt(dest_dir, zip_filename, config, opt):
 """Encrypts the zip file"""

    pgp_keys = grok_keys(config)
    icefile_prefix = "aomi-%s" % \
                     os.path.basename(os.path.dirname(opt.secretfile))
    if opt.icefile_prefix:
        icefile_prefix = opt.icefile_prefix

    timestamp = time.strftime("%H%M%S-%m-%d-%Y",
                              datetime.datetime.now().timetuple())
    ice_file = "%s/%s-%s.ice" % (dest_dir, icefile_prefix, timestamp)
    if not encrypt(zip_filename, ice_file, pgp_keys):
        raise aomi.exceptions.GPG("Unable to encrypt zipfile")

    return ice_file