We do not advise that you reduce the security of any aspect of your server, this includes making less secure DKIM keys. By default, cPanel generates 2048 bit DKIM keys which are more secure.
However, it's still possible to generate a 1024 bit DKIM key in cPanel but wholly unsupported.
Around line 227 in the /usr/local/cpanel/Cpanel/DKIM.pm file, you should comment out existing lines with a hash as shown below and add new lines where the value is 1024:
# local $Cpanel::OpenSSL::DEFAULT_KEY_SIZE = $_MYDNS_KEY_SIZE if _nameserver_is_mydns();
local $Cpanel::OpenSSL::DEFAULT_KEY_SIZE = 1024;
# my $keysize_min = $Cpanel::OpenSSL::DEFAULT_KEY_SIZE;
my $keysize_min = 1024;
Uninstall the DKIM keys for the user in question with the following command where you replace $USERNAME with the actual username.
Reinstall the DKIM keys: