File indexing completed on 2024-11-24 04:44:40
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org> 0003 * SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 #ifndef IRMAPUBLICKEY_H 0007 #define IRMAPUBLICKEY_H 0008 0009 #include "openssl/opensslpp_p.h" 0010 0011 #include <vector> 0012 0013 class QString; 0014 0015 /** Public key data for the Dutch IRMA system 0016 * @note this only covers the subset relevant for verifying CoronaCheck signatures 0017 *.*/ 0018 class IrmaPublicKey 0019 { 0020 public: 0021 explicit IrmaPublicKey(); 0022 0023 bool isValid() const; 0024 0025 int LePrime() const; 0026 int Lh() const; 0027 int Lm() const; 0028 int Lstatzk() const; 0029 int Le() const; 0030 int LeCommit() const; 0031 int LmCommit() const; 0032 0033 openssl::bn_ptr N; 0034 openssl::bn_ptr Z; 0035 openssl::bn_ptr S; 0036 std::vector <openssl::bn_ptr> R; 0037 }; 0038 0039 /** Loader for IRMA public keys. */ 0040 namespace IrmaPublicKeyLoader 0041 { 0042 IrmaPublicKey load(const QString &keyId); 0043 } 0044 0045 #endif // IRMAPUBLICKEY_H