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 of the /usr/local/cpanel/Cpanel/DKIM.pm file, you should comment out the existing line and add a new one with the value 1024 set as follows:
# 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: