Each stable RPM package that is published by CentOS Project is signed with a GPG signature. By default, dnf will verify these signatures and refuse to install any packages that are not signed, or have an incorrect signature. You should always verify the signature of a package prior to installation. These signatures ensure that the packages you install are what was produced by the CentOS Project and have not been altered by any mirror or website providing the packages.
The Project GPG keys are included in the centos-gpg-keys package, and are typically found in the /etc/pki/rpm-gpg directory. Please note that not all keys in this directory are used by the CentOS project. Some keys may be placed in this directory by 3rd party repositories to enable the secure use of extra packages as well. The keys used by CentOS are enabled in the dnf repository configuration, so you generally don't need to manually import them.
If you want to verify that the keys installed on your system match the keys listed here, you can use GnuPG to check that the key fingerprint matches. For example:
$ gpg --show-keys /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial pub rsa4096 2019-05-03 [SC] 99DB70FAE1D7CE227FB6488205B555B38483C65D uid CentOS (CentOS Official Signing Key) <security@centos.org>
The following keys are currently in use by the CentOS Project.
pub rsa4096 2019-05-03 [SC] 99DB70FAE1D7CE227FB6488205B555B38483C65D uid CentOS (CentOS Official Signing Key) <security@centos.org>
pub rsa4096 2019-05-03 [SC] 793D90726BF022DAE8682C36762E65855BA5FA8D uid CentOS Testing (CentOS Testing content) <security@centos.org>
pub rsa2048 2021-12-16 [SCEA] 363FC0972F64B699AED3968E1FF6A2171D997668 uid CentOS Extras SIG (https://wiki.centos.org/SpecialInterestGroup) <security@centos.org> sub rsa2048 2021-12-16 [SEA]
pub rsa2048 2023-06-02 [SCEA] 2C77CFEB1F99C559E52B3CDC8DEF9614B094B96D uid CentOS AltImages SIG (https://wiki.centos.org/SpecialInterestGroup/AltImages) <security@centos.org> sub rsa2048 2023-06-02 [SEA]
pub rsa2048 2015-06-10 [SC] 64E3E7558572B59A319452AAF17E745691BA8335 uid CentOS Atomic SIG (http://wiki.centos.org/SpecialInterestGroup/Atomic) <security@centos.org>
pub rsa2048 2021-07-27 [SCEA] D8ACED2DC7CE8029FEC77C084B411A9068E964CA uid CentOS Automotive SIG (https://wiki.centos.org/SpecialInterestGroup/Automotive) <security@centos.org> sub rsa2048 2021-07-27 [SEA]
pub rsa2048 2015-05-15 [SC] 736AF5116D9C40E2AF6B074BF9B9FEE7764429E6 uid CentOS Cloud SIG (http://wiki.centos.org/SpecialInterestGroup/Cloud) <security@centos.org>
pub rsa2048 2018-03-21 [SC] C75AFB57D5C0F238CB15BEC81AE110FA6E8B7E8A uid CentOS Config Management SIG (https://wiki.centos.org/SpecialInterestGroup/ConfigManagementSIG) <security@centos.org>
pub rsa2048 2021-10-06 [SCEA] E904CACD9EB83D8B13BAB052827F178E15BACBD2 uid CentOS Core SIG (https://wiki.centos.org/SpecialInterestGroup/Core) <security@centos.org> sub rsa2048 2021-10-06 [SEA]
pub rsa2048 2021-01-18 [SC] 9B04530E0ED6ABC4B2C358DD2A01FA2AEB3DAC40 uid CentOS HyperScale SIG (https://wiki.centos.org/SpecialInterestGroup/Hyperscale) <security@centos.org> sub rsa2048 2021-01-18 [E]
pub rsa2048 2020-08-13 [SC] 2F3B7058BCFAC3AB0C72B1BC8B444FCEF56D1621 uid CentOS Infra SIG (https://wiki.centos.org/SpecialInterestGroup/Core) <security@centos.org> sub rsa2048 2020-08-13 [E]
pub rsa2048 2023-05-26 [SCEA] D6895EFFD4B12FC38569C5A9C114980CDE702AB7 uid CentOS ISA SIG (https://wiki.centos.org/SpecialInterestGroup/Isa) <security@centos.org> sub rsa2048 2023-05-26 [SEA]
pub rsa2048 2021-06-22 [SCEA] 48EF712EC5DDB68B5280BE455B8E1A767AE06D54 uid CentOS Kmods SIG (https://wiki.centos.org/SpecialInterestGroup/Kmods) <security@centos.org> sub rsa2048 2021-06-22 [SEA]
pub rsa2048 2019-12-01 [SC] A9265AE9171868B82F91555083014EBBE16E0D12 uid CentOS Messaging SIG (https://wiki.centos.org/SpecialInterestGroup/Messaging) <security@centos.org> sub rsa2048 2019-12-01 [E]
pub rsa2048 2018-02-20 [SC] 35154228174901BEFA8E69A621465E289D2A76A7 uid CentOS NFV SIG (https://wiki.centos.org/SpecialInterestGroup/NFV) <security@centos.org>
pub rsa2048 2017-02-20 [SC] 787281769AD7387885EEA6494FD9532751BC2A13 uid CentOS OpsTools SIG (https://wiki.centos.org/SpecialInterestGroup/OpsTools) <security@centos.org>
pub rsa2048 2016-05-18 [SC] C5E8AB446FA7893D749051F1C34C5BD42F297ECC uid CentOS PaaS SIG (https://wiki.centos.org/SpecialInterestGroup/PaaS) <security@centos.org>
pub rsa2048 2015-10-01 [SC] C4DBD535B1FBBA14F8BA64A84EB84E71F2EE9D55 uid CentOS SoftwareCollections SIG (https://wiki.centos.org/SpecialInterestGroup/SCLo) <security@centos.org>
pub rsa2048 2015-01-23 [SC] 74129C0B173B071A3775951AD4A2E50BE451E5B5 uid CentOS Storage SIG (http://wiki.centos.org/SpecialInterestGroup/Storage) <security@centos.org>
pub rsa2048 2015-06-17 [SC] A7C8E761309D2F1C92C50B627AEBBE8261E8806C uid CentOS Virtualization SIG (http://wiki.centos.org/SpecialInterestGroup/Virtualization) <security@centos.org>
pub 4096R/F4A80EB5 2014-06-23 CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org> Key fingerprint = 6341 AB27 53D7 8A78 A7C2 7BB1 24C6 A8A7 F4A8 0EB5
pub 2048R/B6792C39 2014-07-15 CentOS-7 Debug (CentOS-7 Debuginfo RPMS) <security@centos.org> Key fingerprint = 759D 690F 6099 2D52 6A35 8CBD D0F2 5A3C B679 2C39
pub 4096R/8FAE34BD 2014-06-04 CentOS-7 Testing (CentOS 7 Testing content) <security@centos.org> Key fingerprint = BA02 A5E6 AFF9 70F7 269D D972 C788 93AC 8FAE 34BD
pub 4096R/C105B9DE 2011-07-03 CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org> Key fingerprint = C1DA C52D 1664 E8A4 386D BA43 0946 FCA2 C105 B9DE
pub 4096R/D0FF3D16 2011-07-03 CentOS-6 Debuginfo Key (CentOS-6 Debuginfo Signing Key) <centos-6-debug-key@centos.org> Key fingerprint = 69B3 0F26 BA2B 3AA4 C27C E4F5 3B75 CF79 D0FF 3D16
pub 4096R/EF1D6DB8 2011-07-03 CentOS-6 Testing Key (CentOS-6 Test and Beta Signing Key) <centos-6-testing-key@centos.org> Key fingerprint = 4233 9C29 8BC4 352C A4F9 7504 119C 1A87 EF1D 6DB8
pub 4096R/FE837F6F 2011-07-03 CentOS-6 Security Key (CentOS-6 Official Security Key) <centos-6-security-key@centos.org> Key fingerprint = 0830 F43C 928A A5A8 A6F1 AF97 0B13 2C3F FE83 7F6F
pub 1024D/E8562897 2007-01-06 CentOS-5 Key (CentOS 5 Official Signing Key) <centos-5-key@centos.org> Key fingerprint = 473D 66D5 2122 71FD 51CC 17B1 A8A4 47DC E856 2897 sub 1024g/1E9EA3B6 2007-01-06 [expires: 2017-01-03]
pub 1024D/092D7B2B 2007-01-06 CentOS-5 Beta Key (CentOS 5 Beta Signing Key) <centos-5-beta-key@centos.org> Key fingerprint = 5D82 2DFA 48B3 BE04 586C BD4D CFDA 6881 092D 7B2B sub 1024g/DA743639 2007-01-06 [expires: 2017-01-03]
pub 2048R/305D49D6 2015-07-28 CentOS AltArch SIG - AArch64 (http://wiki.centos.org/SpecialInterestGroup/AltArch/AArch64) <security@centos.org> Key fingerprint = EF8F 3CA6 6EFD F32B 36CD ADF7 6C7C B6EF 305D 49D6
pub 2048R/62505FE6 2015-11-27 CentOS AltArch SIG - Arm32 (https://wiki.centos.org/SpecialInterestGroup/AltArch/Arm32) <security@centos.org> Key fingerprint = 4D9E 39F1 499C A21D D289 77F8 CAFE F11B 6250 5FE6
pub 2048R/F533F4FA 2015-11-27 CentOS AltArch SIG - PowerPC (https://wiki.centos.org/SpecialInterestGroup/AltArch) <security@centos.org> Key fingerprint = BAFA 3436 FC50 768E 3C3C 2E4E A963 BBDB F533 F4FA