/** * This file is a part of the UMSKT Project * * Copyleft (C) 2019-2024 UMSKT Contributors (et.al.) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * * @FileCreated by Neo on 06/06/2023 * @Maintainer Neo */ #ifndef UMSKT_BINK1998_H #define UMSKT_BINK1998_H #include "PIDGEN3.h" class EXPORT BINK1998 : public PIDGEN3 { public: using PIDGEN3::PIDGEN3; BINK1998() = default; explicit BINK1998(PIDGEN3 *p3) { privateKey = p3->privateKey; genOrder = p3->genOrder; genPoint = p3->genPoint; pubPoint = p3->pubPoint; eCurve = p3->eCurve; } ~BINK1998() override = default; static constexpr DWORD32 FieldBits = (48 * 8); static constexpr DWORD32 FieldBytes = (FieldBits / 8); static constexpr DWORD32 SHAMessageLength = (4 + 2 * FieldBytes); using PIDGEN3::Pack; Integer Pack(const KeyInfo &ki) override; using PIDGEN3::Unpack; KeyInfo Unpack(const Integer &raw) override; using PIDGEN3::Generate; BOOL Generate(std::string &pKey) override; using PIDGEN3::Validate; BOOL Validate(const std::string &pKey) override; }; #endif // UMSKT_BINK1998_H