From dda926f3d2014100484d3a2755844910ee1d285c Mon Sep 17 00:00:00 2001 From: Miryam Weil <150753861+miryamW@users.noreply.github.com> Date: Thu, 25 Jul 2024 19:40:33 +0300 Subject: [PATCH 01/21] HSM: Implement and test ECC algorithm. --- .gitignore | 61 +++++++++ CMakeLists.txt | 31 +++++ Dockerfile | 39 ++++++ include/ecc.h | 54 ++++++++ src/ecc.cpp | 308 ++++++++++++++++++++++++++++++++++++++++++++ tests/ecc_tests.cpp | 27 ++++ 6 files changed, 520 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100644 Dockerfile create mode 100644 include/ecc.h create mode 100644 src/ecc.cpp create mode 100644 tests/ecc_tests.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3ea2995a --- /dev/null +++ b/.gitignore @@ -0,0 +1,61 @@ +# build system files & directories +/build/ +/CMakeFiles/ +/CMakeCache.txt +/cmake_install.cmake +/Makefile + +# gtest files +/gtest/ + +# VS Code files +.vscode/ + +# binary files +*.o +*.a +*.so +*.exe +*.dll + +# log files +*.log + +# Vim swap files +*.swp + +# Emacs backup files +*~ + +# other files of C++ projects +*.obj +*.pdb +*.pch +*.ilk +*.lib +*.exp +*.idb +*.ipch +*.rsp +*.tlog +*.log +*.vspscc +*.vssscc +*.suo +*.user +*.userosscache +*.sln.docstates + +# log files +*.log + +# operating system files +Thumbs.db +Desktop.ini + +# linux operating system files +*~ + +#clangd library +.cache +.clang-format \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..71e27cbf --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.10) +project(MyTest) + +# Include directories +include_directories(src) + +# Find GMP library +find_path(GMP_INCLUDE_DIR NAMES gmp.h) +find_library(GMP_LIBRARY NAMES gmp) +find_library(GMPXX_LIBRARY NAMES gmpxx) + +# Check if GMP libraries were found +if(NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARY OR NOT GMPXX_LIBRARY) + message(FATAL_ERROR "Could not find GMP or GMPXX libraries") +endif() + +# Include GMP headers +include_directories(${GMP_INCLUDE_DIR}) + +# Add source files +file(GLOB SOURCES "src/*.cpp") + +# Add the executable for the tests +add_executable(runTests tests/ecc_tests.cpp ${SOURCES}) + +# Link libraries +target_link_libraries(runTests + ${GMP_LIBRARY} + ${GMPXX_LIBRARY} + gtest gtest_main pthread +) \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..39691dec --- /dev/null +++ b/Dockerfile @@ -0,0 +1,39 @@ +# Use an official Ubuntu as a parent image +FROM ubuntu:20.04 + +# Set environment variables to avoid user input prompts during installation +ENV DEBIAN_FRONTEND=noninteractive + +# Install dependencies +RUN apt-get update && \ + apt-get install -y cmake g++ git wget libgtest-dev\ + build-essential \ + cmake \ + git \ + libgmp-dev \ + libgmpxx4ldbl \ + wget + +# Install Google Test +RUN cd /usr/src/gtest && \ + cmake . && \ + make && \ + cp lib/*.a /usr/lib + +# Create and set the working directory +WORKDIR /usr/src/myapp + +# Copy the current directory contents into the container +COPY . . + +# Ensure the build directory exists and clean any previous cache +RUN mkdir -p build && \ + rm -rf build/* + +# Run CMake and build the project +RUN cd build && \ + cmake .. && \ + make + +# Run the tests +CMD ["./build/runTests"] diff --git a/include/ecc.h b/include/ecc.h new file mode 100644 index 00000000..92df2cfb --- /dev/null +++ b/include/ecc.h @@ -0,0 +1,54 @@ +#ifndef ECC_H_ +#define ECC_H_ +#include +#include + +// Structure for representing a point +struct Point { + mpz_class x; + mpz_class y; + Point() : x(0), y(0) {} + Point(mpz_class x, mpz_class y) : x(x), y(y) {} +}; + +// Structure for representing an encrypted message +struct EncryptedMessage { + mpz_class c1X; + bool c1Y; + mpz_class c2X; + bool c2Y; + EncryptedMessage(mpz_class c1X, bool c1Y, mpz_class c2X, bool c2Y) + : c1X(c1X), c1Y(c1Y), c2X(c2X), c2Y(c2Y) {} +}; + +class ECC +{ + private: + mpz_class privateKey; + static const mpz_class prime; + static const mpz_class a; + static const mpz_class b; + unsigned int added = 0; + mpz_class generatePrivateKey(); + Point generatePublicKey(); + + public: + static const Point basicPoint; + Point publicKey; + mpz_class k; + + ECC(); + mpz_class calculateY(mpz_class x); + Point convertMessageToPoint(const std::string& text) ; + std::string convertPointToMessage(const Point& point); + EncryptedMessage encrypt(std::string message); + std::string decrypt(EncryptedMessage); + mpz_class generateK(); + Point multiply(Point P, mpz_class times); + Point add(Point P, Point Q); + mpz_class mod(mpz_class x); + bool isOnCurve(Point P); + mpz_class inverse(mpz_class base); + bool modularSqrt(mpz_t result, const mpz_t a, const mpz_t p); +}; +#endif diff --git a/src/ecc.cpp b/src/ecc.cpp new file mode 100644 index 00000000..e0cd2dd8 --- /dev/null +++ b/src/ecc.cpp @@ -0,0 +1,308 @@ +#include "../include/ecc.h" +#include +#include +#include +#include +#include + +// Prime number for the elliptic curve +std::string decimalString = "115792089237316195423570985008687907853269984665640564039457584007913129639936"; +const mpz_class ECC::prime(decimalString); +const mpz_class ECC::a = 0;// Curve parameter a +const mpz_class ECC::b = 7;// Curve parameter b +// Curve basic point +const Point ECC::basicPoint(mpz_class("55066263022277343669578718895168534326250603453777594175500187360389116729240"), + mpz_class("32670510020758816978083085130507043184471273380659243275938904335757337482424")); + +/** + * ECC constructor. + */ +ECC::ECC() +{ + privateKey = generatePrivateKey(); + publicKey = generatePublicKey(); + k = generateK(); +} + +/** + * Converts a message string to a point on the elliptic curve. + * @param text The message to convert. + * @return The point on the elliptic curve. + */ + +Point ECC::convertMessageToPoint(const std::string& text) +{ + std::string binaryStr; + for (char c : text) + for (int i = 7; i >= 0; --i) + binaryStr += ((c >> i) & 1) ? '1' : '0'; + + mpz_class x; + x.set_str(binaryStr, 2); + for (;; added++) { + mpz_class xAdded = x + mpz_class(added); + mpz_class rhs = mod(xAdded * xAdded * xAdded + a * xAdded + b); + mpz_class yAdded; + if (modularSqrt(yAdded.get_mpz_t(), rhs.get_mpz_t(), prime.get_mpz_t())) + return Point(xAdded, yAdded); + } + + throw std::runtime_error( + "Unable to convert message to a valid point on the curve."); +} + +/** + * Converts a point on the elliptic curve to a message string. + * @param point The point to convert. + * @return The message string. + */ +std::string ECC::convertPointToMessage(const Point& point) +{ + mpz_class x = point.x - mpz_class(added); + std::string binaryStr = x.get_str(2); + + // Adding leading zeros to complete to a multiple of 8 + size_t paddingLength = 8 - (binaryStr.size() % 8); + if (paddingLength != 8) // If the string is not already a multiple of 8 + binaryStr = std::string(paddingLength, '0') + binaryStr; + + std::string text; + for (size_t i = 0; i < binaryStr.size(); i += 8) { + std::string byteStr = binaryStr.substr(i, 8); + char c = static_cast(std::bitset<8>(byteStr).to_ulong()); + text += c; + } + + return text; +} + +/** + * Computes the modular square root using the Tonelli-Shanks algorithm. + * @param result The computed square root. + * @param a The value to find the square root of. + * @param p The modulus. + * @return True if the square root exists, false otherwise. + */ +bool ECC::modularSqrt(mpz_t result, const mpz_t a, const mpz_t p) +{ + mpz_t q, s, z, m, c, t, r, b, temp; + mpz_inits(q, s, z, m, c, t, r, b, temp, NULL); + + // Check if a is sqrt of 1 (x^2 ≡ a (mod p)) + if (mpz_legendre(a, p) != 1) { + std::cout << "No solution exists." << std::endl; + mpz_clears(q, s, z, m, c, t, r, b, temp, NULL); + return false; + } + + // If p ≡ 3 (mod 4), the solution is: a^((p+1)/4) mod p + mpz_mod_ui(temp, p, 4); + if (mpz_cmp_ui(temp, 3) == 0) { + mpz_add_ui(q, p, 1); + mpz_tdiv_q_ui(q, q, 4); + mpz_powm(result, a, q, p); + mpz_clears(q, s, z, m, c, t, r, b, temp, NULL); + return true; + } + + // For the general case, use the Tonley-Shanks method + mpz_sub_ui(m, p, 1); + mpz_tdiv_q_ui(m, m, 2); + mpz_set_ui(s, 0); + mpz_set_ui(z, 2); + + while (true) { + mpz_powm(b, z, m, p); + if (mpz_cmp_ui(b, 1) != 0) + break; + mpz_add_ui(s, s, 1); + mpz_sub_ui(m, p, 1); + mpz_tdiv_q_ui(m, m, 2); + mpz_tdiv_q_ui(m, m, 2); + mpz_add_ui(m, m, 1); + } + + mpz_set_ui(c, 0); + mpz_set(r, a); + mpz_set_ui(t, 1); + mpz_powm(t, t, m, p); + + while (true) { + mpz_powm(b, t, c, p); + if (mpz_cmp_ui(b, 1) == 0) + break; + mpz_set_ui(b, 0); + mpz_powm(b, r, b, p); + mpz_mul(r, r, b); + mpz_mod(r, r, p); + mpz_mul(t, t, b); + mpz_mod(t, t, p); + mpz_set_ui(c, 0); + mpz_add_ui(c, c, 1); + } + + mpz_set(result, r); + + // Clear memory + mpz_clears(q, s, z, m, c, t, r, b, temp, NULL); + return true; +} + +/** + * Generates a private key for ECC. + * @return The generated private key. + */ +mpz_class ECC::generatePrivateKey() +{ + gmp_randclass rng(gmp_randinit_default); + rng.seed(time(nullptr)); + return rng.get_z_range(prime - 1) + 1; +} + +/** + * Generates a random value k for ECC. + * @return The generated value of k. + */ +mpz_class ECC::generateK() +{ + gmp_randclass rng(gmp_randinit_default); + rng.seed(time(nullptr)); + return rng.get_z_range(prime - 1) + 1; +} + +/** + * Generates a public key for ECC. + * @return The generated public key. + */ +Point ECC::generatePublicKey() +{ + return multiply(basicPoint, privateKey); +} + +/** + * Calculates the y-coordinate for a given x-coordinate on the elliptic curve. + * @param x The x-coordinate. + * @return The y-coordinate. + */ +mpz_class ECC::calculateY(mpz_class x) +{ + mpz_class rhs = mod(x * x * x + a * x + b); + mpz_class y; + if (modularSqrt(y.get_mpz_t(), rhs.get_mpz_t(), prime.get_mpz_t())) + return y; + else + throw std::runtime_error("No solution for Y."); +} + +/** + * Checks if a point is on the elliptic curve. + * @param P The point to check. + * @return True if the point is on the curve, false otherwise. + */ +bool ECC::isOnCurve(Point P) +{ + return mod(P.y * P.y) == mod(P.x * P.x * P.x + a * P.x + b); +} + +/** + * Computes the modular reduction of a value by the curve's prime. + * @param x The value to reduce. + * @return The reduced value. + */ +mpz_class ECC::mod(mpz_class x) +{ + mpz_class result; + mpz_mod(result.get_mpz_t(), x.get_mpz_t(), prime.get_mpz_t()); + return result; +} + +/** + * Computes the modular inverse of a value. + * @param base The value to invert. + * @return The modular inverse. + */ +mpz_class ECC::inverse(mpz_class base) +{ + mpz_class result; + mpz_invert(result.get_mpz_t(), base.get_mpz_t(), prime.get_mpz_t()); + return result; +} + +/** + * Adds two points on the elliptic curve. + * @param P The first point. + * @param Q The second point. + * @return The resulting point. + */ +Point ECC::add(Point P, Point Q) +{ + mpz_class incline; + if (P.x == 0 && P.y == 0) + return Q; + + if (Q.x == 0 && Q.y == 0) + return P; + + if (P.x == Q.x && P.y == -Q.y) + return Point(0, 0); + + if (P.x == Q.x && P.y == Q.y) + incline = mod((3 * P.x * P.x + a) * inverse(2 * P.y)); + else + incline = mod((Q.y - P.y) * inverse(Q.x - P.x)); + + mpz_class x = mod(incline * incline - P.x - Q.x); + mpz_class y = mod(incline * (P.x - x) - P.y); + return Point(x, y); +} + +/** + * Multiplies a point by a scalar on the elliptic curve. + * @param P The point to multiply. + * @param times The scalar to multiply by. + * @return The resulting point. + */ +Point ECC::multiply(Point P, mpz_class times) +{ + Point R(0, 0); + Point N = P; + while (times > 0) { + if (times % 2 == 1) + R = add(R, N); + + N = add(N, N); + times /= 2; + } + + return R; +} + +/** + * Encrypts a message using ECC. + * @param message The message text to encrypt. + * @return A pair of points representing the ciphertext. + */ +EncryptedMessage ECC::encrypt(std::string message) +{ + Point meesagePoint = convertMessageToPoint(message); + Point C1 = multiply(basicPoint, k); + Point C2 = add(meesagePoint, multiply(publicKey, k)); + return EncryptedMessage(C1.x, C1.y < 0, C2.x, C2.y < 0); +} + +/** + * Decrypts a ciphertext using ECC. + * @param ciphertext The ciphertext to decrypt. + * @return The decrypted message point. + */ +std::string ECC::decrypt(EncryptedMessage ciphertext) +{ + + Point temp = multiply(Point(ciphertext.c1X, calculateY(ciphertext.c1X) * + (ciphertext.c1Y ? -1 : 1)), + privateKey); Point negTemp = Point(temp.x, mod(-temp.y)); + Point decrypted = add(Point(ciphertext.c2X, calculateY(ciphertext.c2X) * + (ciphertext.c1Y ? -1 : 1)), + negTemp); + return convertPointToMessage(decrypted); +} diff --git a/tests/ecc_tests.cpp b/tests/ecc_tests.cpp new file mode 100644 index 00000000..890a64a7 --- /dev/null +++ b/tests/ecc_tests.cpp @@ -0,0 +1,27 @@ +#include "gtest/gtest.h" +#include "../include/ecc.h" + +// This test case checks the encryption and decryption functionality of the ECC class. +TEST(ECCTest, EncryptDecrypt) { + // Create an ECC object + ECC ecc; + + // The message to be encrypted + std::string message = "hello"; + + // Encrypt the message + auto cipher = ecc.encrypt(message); + + // Decrypt the message + auto decryptedMessage = ecc.decrypt(cipher); + + // Check if the decrypted message matches the original message + EXPECT_EQ(message, decryptedMessage); +} + +// The main function for running all the tests +int main(int argc, char **argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} From 8aca6bde5353ddbd0c5990ea392c546d3aab1093 Mon Sep 17 00:00:00 2001 From: MiryamW Date: Sun, 11 Aug 2024 14:40:05 +0300 Subject: [PATCH 02/21] HSM: Convert ECC class-based implementation to functional approach. --- CMakeLists.txt | 9 ++- Dockerfile | 12 +--- include/ecc.h | 53 ++++++-------- src/ecc.cpp | 163 ++++++++++++++++++++++++++++++++++---------- tests/ecc_tests.cpp | 33 ++++++--- 5 files changed, 179 insertions(+), 91 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71e27cbf..0a008669 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,19 +4,18 @@ project(MyTest) # Include directories include_directories(src) -# Find GMP library +# Find GMP library find_path(GMP_INCLUDE_DIR NAMES gmp.h) find_library(GMP_LIBRARY NAMES gmp) find_library(GMPXX_LIBRARY NAMES gmpxx) - -# Check if GMP libraries were found if(NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARY OR NOT GMPXX_LIBRARY) message(FATAL_ERROR "Could not find GMP or GMPXX libraries") endif() - -# Include GMP headers include_directories(${GMP_INCLUDE_DIR}) +# Find Google Test +find_package(GTest REQUIRED) + # Add source files file(GLOB SOURCES "src/*.cpp") diff --git a/Dockerfile b/Dockerfile index 39691dec..0f564a85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,13 +6,7 @@ ENV DEBIAN_FRONTEND=noninteractive # Install dependencies RUN apt-get update && \ - apt-get install -y cmake g++ git wget libgtest-dev\ - build-essential \ - cmake \ - git \ - libgmp-dev \ - libgmpxx4ldbl \ - wget + apt-get install -y cmake g++ git wget libgtest-dev lsb-release gnupg ca-certificates # Install Google Test RUN cd /usr/src/gtest && \ @@ -30,9 +24,9 @@ COPY . . RUN mkdir -p build && \ rm -rf build/* -# Run CMake and build the project +# Run CMake with SYCL and build the project RUN cd build && \ - cmake .. && \ + cmake -DCMAKE_CXX_COMPILER=clang++ .. && \ make # Run the tests diff --git a/include/ecc.h b/include/ecc.h index 92df2cfb..6aa91416 100644 --- a/include/ecc.h +++ b/include/ecc.h @@ -1,5 +1,7 @@ #ifndef ECC_H_ #define ECC_H_ +#pragma once + #include #include @@ -21,34 +23,23 @@ struct EncryptedMessage { : c1X(c1X), c1Y(c1Y), c2X(c2X), c2Y(c2Y) {} }; -class ECC -{ - private: - mpz_class privateKey; - static const mpz_class prime; - static const mpz_class a; - static const mpz_class b; - unsigned int added = 0; - mpz_class generatePrivateKey(); - Point generatePublicKey(); - - public: - static const Point basicPoint; - Point publicKey; - mpz_class k; - - ECC(); - mpz_class calculateY(mpz_class x); - Point convertMessageToPoint(const std::string& text) ; - std::string convertPointToMessage(const Point& point); - EncryptedMessage encrypt(std::string message); - std::string decrypt(EncryptedMessage); - mpz_class generateK(); - Point multiply(Point P, mpz_class times); - Point add(Point P, Point Q); - mpz_class mod(mpz_class x); - bool isOnCurve(Point P); - mpz_class inverse(mpz_class base); - bool modularSqrt(mpz_t result, const mpz_t a, const mpz_t p); -}; -#endif +mpz_class generatePrivateKey(); +Point generatePublicKey(mpz_class key); +mpz_class calculateY(mpz_class x); +Point convertMessageToPoint(const std::string &text); +std::string convertPointToMessage(const Point &point); +EncryptedMessage encryptECC(std::vector message, Point publicKey); +std::vector decryptECC(EncryptedMessage ciphertext, mpz_class privateKey); +mpz_class generateK(); +std::vector stringToUint8(const std::string& str); +std::string uint8ToString(const std::vector& uint8Vec); +Point multiply(Point P, mpz_class times); +Point add(Point P, Point Q); +mpz_class mod(mpz_class x); +bool isOnCurve(Point P); +mpz_class inverse(mpz_class base); +std::pair signMessageECC(const std::vector &message, const mpz_class &privateKey); +bool verifySignatureECC(const std::vector &message, const std::pair &signature, const Point& publicKey); +bool modularSqrt(mpz_t result, const mpz_t a, const mpz_t p); + +#endif \ No newline at end of file diff --git a/src/ecc.cpp b/src/ecc.cpp index e0cd2dd8..f2723d96 100644 --- a/src/ecc.cpp +++ b/src/ecc.cpp @@ -1,36 +1,32 @@ #include "../include/ecc.h" #include #include +#include #include #include #include -// Prime number for the elliptic curve -std::string decimalString = "115792089237316195423570985008687907853269984665640564039457584007913129639936"; -const mpz_class ECC::prime(decimalString); -const mpz_class ECC::a = 0;// Curve parameter a -const mpz_class ECC::b = 7;// Curve parameter b -// Curve basic point -const Point ECC::basicPoint(mpz_class("55066263022277343669578718895168534326250603453777594175500187360389116729240"), - mpz_class("32670510020758816978083085130507043184471273380659243275938904335757337482424")); -/** - * ECC constructor. - */ -ECC::ECC() -{ - privateKey = generatePrivateKey(); - publicKey = generatePublicKey(); - k = generateK(); -} +unsigned int added = 0; + +// Define static constants +const mpz_class prime( + "11579208923731619542357098500868790785326998466564056403945758400791312963" + "9936"); +const mpz_class a = 0; +const mpz_class b = 7; +const Point basicPoint(mpz_class("550662630222773436695787188951685343262506034" + "53777594175500187360389116729240"), + mpz_class("326705100207588169780830851305070431844712733" + "80659243275938904335757337482424")); + /** * Converts a message string to a point on the elliptic curve. * @param text The message to convert. * @return The point on the elliptic curve. */ - -Point ECC::convertMessageToPoint(const std::string& text) +Point convertMessageToPoint(const std::string &text) { std::string binaryStr; for (char c : text) @@ -56,7 +52,7 @@ Point ECC::convertMessageToPoint(const std::string& text) * @param point The point to convert. * @return The message string. */ -std::string ECC::convertPointToMessage(const Point& point) +std::string convertPointToMessage(const Point &point) { mpz_class x = point.x - mpz_class(added); std::string binaryStr = x.get_str(2); @@ -83,7 +79,7 @@ std::string ECC::convertPointToMessage(const Point& point) * @param p The modulus. * @return True if the square root exists, false otherwise. */ -bool ECC::modularSqrt(mpz_t result, const mpz_t a, const mpz_t p) +bool modularSqrt(mpz_t result, const mpz_t a, const mpz_t p) { mpz_t q, s, z, m, c, t, r, b, temp; mpz_inits(q, s, z, m, c, t, r, b, temp, NULL); @@ -129,7 +125,7 @@ bool ECC::modularSqrt(mpz_t result, const mpz_t a, const mpz_t p) while (true) { mpz_powm(b, t, c, p); - if (mpz_cmp_ui(b, 1) == 0) + if (mpz_cmp_ui(b, 1) == 0) break; mpz_set_ui(b, 0); mpz_powm(b, r, b, p); @@ -152,7 +148,7 @@ bool ECC::modularSqrt(mpz_t result, const mpz_t a, const mpz_t p) * Generates a private key for ECC. * @return The generated private key. */ -mpz_class ECC::generatePrivateKey() +mpz_class generatePrivateKey() { gmp_randclass rng(gmp_randinit_default); rng.seed(time(nullptr)); @@ -163,7 +159,7 @@ mpz_class ECC::generatePrivateKey() * Generates a random value k for ECC. * @return The generated value of k. */ -mpz_class ECC::generateK() +mpz_class generateK() { gmp_randclass rng(gmp_randinit_default); rng.seed(time(nullptr)); @@ -174,7 +170,7 @@ mpz_class ECC::generateK() * Generates a public key for ECC. * @return The generated public key. */ -Point ECC::generatePublicKey() +Point generatePublicKey(mpz_class privateKey) { return multiply(basicPoint, privateKey); } @@ -184,7 +180,7 @@ Point ECC::generatePublicKey() * @param x The x-coordinate. * @return The y-coordinate. */ -mpz_class ECC::calculateY(mpz_class x) +mpz_class calculateY(mpz_class x) { mpz_class rhs = mod(x * x * x + a * x + b); mpz_class y; @@ -199,7 +195,7 @@ mpz_class ECC::calculateY(mpz_class x) * @param P The point to check. * @return True if the point is on the curve, false otherwise. */ -bool ECC::isOnCurve(Point P) +bool isOnCurve(Point P) { return mod(P.y * P.y) == mod(P.x * P.x * P.x + a * P.x + b); } @@ -209,7 +205,7 @@ bool ECC::isOnCurve(Point P) * @param x The value to reduce. * @return The reduced value. */ -mpz_class ECC::mod(mpz_class x) +mpz_class mod(mpz_class x) { mpz_class result; mpz_mod(result.get_mpz_t(), x.get_mpz_t(), prime.get_mpz_t()); @@ -221,7 +217,7 @@ mpz_class ECC::mod(mpz_class x) * @param base The value to invert. * @return The modular inverse. */ -mpz_class ECC::inverse(mpz_class base) +mpz_class inverse(mpz_class base) { mpz_class result; mpz_invert(result.get_mpz_t(), base.get_mpz_t(), prime.get_mpz_t()); @@ -234,7 +230,7 @@ mpz_class ECC::inverse(mpz_class base) * @param Q The second point. * @return The resulting point. */ -Point ECC::add(Point P, Point Q) +Point add(Point P, Point Q) { mpz_class incline; if (P.x == 0 && P.y == 0) @@ -262,7 +258,7 @@ Point ECC::add(Point P, Point Q) * @param times The scalar to multiply by. * @return The resulting point. */ -Point ECC::multiply(Point P, mpz_class times) +Point multiply(Point P, mpz_class times) { Point R(0, 0); Point N = P; @@ -282,27 +278,122 @@ Point ECC::multiply(Point P, mpz_class times) * @param message The message text to encrypt. * @return A pair of points representing the ciphertext. */ -EncryptedMessage ECC::encrypt(std::string message) +EncryptedMessage encryptECC(std::vector message, Point publicKey) { - Point meesagePoint = convertMessageToPoint(message); + std::string text = uint8ToString(message); + mpz_class k = generateK(); + Point meesagePoint = convertMessageToPoint(text); Point C1 = multiply(basicPoint, k); Point C2 = add(meesagePoint, multiply(publicKey, k)); return EncryptedMessage(C1.x, C1.y < 0, C2.x, C2.y < 0); } +/** + * @brief Converts a vector of uint8_t to a string. + * + * This function takes a vector of uint8_t and converts it to a std::string. + * It uses the std::string constructor that takes two iterators, converting + * the entire vector to a string. + * + * @param uint8Vec The vector of uint8_t to convert. + * @return std::string The resulting string from the conversion. + */ +std::string uint8ToString(const std::vector& uint8Vec) +{ + return std::string(uint8Vec.begin(), uint8Vec.end()); +} + +/** + * @brief Converts a string to a vector of uint8_t. + * + * This function takes a std::string and converts it to a vector of uint8_t. + * It uses the std::vector constructor that takes two iterators, converting + * the entire string to a vector of uint8_t. + * + * @param str The string to convert. + * @return std::vector The resulting vector of uint8_t from the conversion. + */ +std::vector stringToUint8(const std::string& str) +{ + std::vector uint8Vec(str.begin(), str.end()); + return uint8Vec; +} + /** * Decrypts a ciphertext using ECC. * @param ciphertext The ciphertext to decrypt. * @return The decrypted message point. */ -std::string ECC::decrypt(EncryptedMessage ciphertext) +std::vector decryptECC(EncryptedMessage ciphertext, mpz_class privateKey) { Point temp = multiply(Point(ciphertext.c1X, calculateY(ciphertext.c1X) * (ciphertext.c1Y ? -1 : 1)), - privateKey); Point negTemp = Point(temp.x, mod(-temp.y)); + privateKey); + Point negTemp = Point(temp.x, mod(-temp.y)); Point decrypted = add(Point(ciphertext.c2X, calculateY(ciphertext.c2X) * (ciphertext.c1Y ? -1 : 1)), negTemp); - return convertPointToMessage(decrypted); + std::string text=convertPointToMessage(decrypted); + return stringToUint8(text); +} + +/** +* Function to sign a message using ECC +* @param message: The message to be signed, represented as a vector of uint8_t +* @param privateKey: The private key used for signing +* @param G: The base point for the elliptic curve +* @param n: The order of the elliptic curve +* @return: A pair containing the signature (r, s) +*/ +std::pair signMessageECC(const std::vector &message, const mpz_class &privateKey) + { + mpz_class r, s; + mpz_class k; + // Convert uint8_t message to mpz_class hash + mpz_class messageHash; + mpz_import(messageHash.get_mpz_t(), message.size(), 1, sizeof(uint8_t), 0, 0, message.data()); + do { + // Generate a random k + k = generateK(); + Point R = multiply(basicPoint, k); + r = mod(R.x); + mpz_class kInv; + // Compute the modular inverse of k + if (mpz_invert(kInv.get_mpz_t(), k.get_mpz_t(), prime.get_mpz_t()) == 0) + continue; // Retry if inversion fails + // Compute the signature s + s = mod((messageHash + r * privateKey) * kInv) ; + } while (s == 0); // Ensure s is not zero + return {r, s}; } + +/** +* Function to verify a message signature using ECC +* @param message: The message whose signature is to be verified, represented as a vector of uint8_t +* @param signature: The signature (r, s) to be verified +* @param publicKey: The public key used for verification +* @param G: The base point for the elliptic curve +* @param n: The order of the elliptic curve +* @return: True if the signature is valid, false otherwise +*/ +bool verifySignatureECC(const std::vector &message, const std::pair &signature, const Point& publicKey) +{ + mpz_class r = signature.first; + mpz_class s = signature.second; + // Check if r and s are within valid range + if (r <= 0 || r >= prime || s <= 0 || s >= prime) + return false; // Invalid r or s + + // Convert uint8_t message to mpz_class hash + mpz_class messageHash; + mpz_import(messageHash.get_mpz_t(), message.size(), 1, sizeof(uint8_t), 0, 0, message.data()); + // Compute v1 and v2 for verification + mpz_class v1 = mod(r * r ); + mpz_class v2 = mod(s * s); + // Perform scalar multiplication + Point P = multiply(publicKey, v1); + Point Q = multiply(basicPoint, v2); + // Verify the equality (r, s) = (P + Q) + return true; // Update with actual verification logic +} \ No newline at end of file diff --git a/tests/ecc_tests.cpp b/tests/ecc_tests.cpp index 890a64a7..306123ff 100644 --- a/tests/ecc_tests.cpp +++ b/tests/ecc_tests.cpp @@ -2,21 +2,34 @@ #include "../include/ecc.h" // This test case checks the encryption and decryption functionality of the ECC class. -TEST(ECCTest, EncryptDecrypt) { - // Create an ECC object - ECC ecc; - - // The message to be encrypted - std::string message = "hello"; +TEST(ECCTest, EncryptDecrypt) +{ + mpz_class privateKey = generatePrivateKey(); + Point publicKey = generatePublicKey(privateKey); + std::vector messageBytes = {0b01101000, 0b01100101, 0b01101100, 0b01101100, 0b01101111}; // 'hello' // Encrypt the message - auto cipher = ecc.encrypt(message); + auto cipher = encryptECC(messageBytes, publicKey); // Decrypt the message - auto decryptedMessage = ecc.decrypt(cipher); + auto decryptedMessage = decryptECC(cipher, privateKey); // Check if the decrypted message matches the original message - EXPECT_EQ(message, decryptedMessage); + EXPECT_EQ(messageBytes, decryptedMessage); +} + +// Test for ECC signature and verification +TEST(ECCTest, SignVerify) +{ + mpz_class privateKey = generatePrivateKey(); + Point publicKey = generatePublicKey(privateKey); + // Sign the message + std::vector messageBytes = {0b01110100, 0b01100101, 0b01110011, 0b01110100, 0b00100000, 0b01101101, 0b01100101, 0b01110011, 0b01110011, 0b01100001, 0b01100111, 0b01100101}; + auto signature = signMessageECC(messageBytes, privateKey); + // Verify the signature + bool isValid = verifySignatureECC(messageBytes, signature, publicKey); + // Check if the signature is valid + EXPECT_TRUE(isValid); } // The main function for running all the tests @@ -24,4 +37,4 @@ int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); -} +} \ No newline at end of file From b17bbf73e99e385ea9100d3e00029229ba3d412e Mon Sep 17 00:00:00 2001 From: MiryamW Date: Tue, 6 Aug 2024 11:54:17 +0300 Subject: [PATCH 03/21] HSM: Implement and test AES algorithm --- .gitignore | 8 +- CMakeLists.txt | 27 +--- Dockerfile | 6 +- include/aes.h | 92 +++++++++++ src/aes.cpp | 366 ++++++++++++++++++++++++++++++++++++++++++++ tests/aes_tests.cpp | 79 ++++++++++ 6 files changed, 549 insertions(+), 29 deletions(-) create mode 100644 include/aes.h create mode 100644 src/aes.cpp create mode 100644 tests/aes_tests.cpp diff --git a/.gitignore b/.gitignore index 3ea2995a..8bbd9f46 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,10 @@ # gtest files /gtest/ +#clangd +.cache +.clang-format + # VS Code files .vscode/ @@ -55,7 +59,3 @@ Desktop.ini # linux operating system files *~ - -#clangd library -.cache -.clang-format \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a008669..8003a046 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,30 +1,13 @@ cmake_minimum_required(VERSION 3.10) project(MyTest) -# Include directories -include_directories(src) - -# Find GMP library -find_path(GMP_INCLUDE_DIR NAMES gmp.h) -find_library(GMP_LIBRARY NAMES gmp) -find_library(GMPXX_LIBRARY NAMES gmpxx) -if(NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARY OR NOT GMPXX_LIBRARY) - message(FATAL_ERROR "Could not find GMP or GMPXX libraries") -endif() -include_directories(${GMP_INCLUDE_DIR}) +set(CMAKE_CXX_STANDARD 11) -# Find Google Test -find_package(GTest REQUIRED) +# Include the directory where AES.h is located +include_directories(src) # Add source files file(GLOB SOURCES "src/*.cpp") -# Add the executable for the tests -add_executable(runTests tests/ecc_tests.cpp ${SOURCES}) - -# Link libraries -target_link_libraries(runTests - ${GMP_LIBRARY} - ${GMPXX_LIBRARY} - gtest gtest_main pthread -) \ No newline at end of file +add_executable(runTests tests/aes_tests.cpp ${SOURCES}) +target_link_libraries(runTests gtest gtest_main pthread) diff --git a/Dockerfile b/Dockerfile index 0f564a85..92721481 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND=noninteractive # Install dependencies RUN apt-get update && \ - apt-get install -y cmake g++ git wget libgtest-dev lsb-release gnupg ca-certificates + apt-get install -y cmake g++ git wget libgtest-dev # Install Google Test RUN cd /usr/src/gtest && \ @@ -24,9 +24,9 @@ COPY . . RUN mkdir -p build && \ rm -rf build/* -# Run CMake with SYCL and build the project +# Run CMake and build the project RUN cd build && \ - cmake -DCMAKE_CXX_COMPILER=clang++ .. && \ + cmake .. && \ make # Run the tests diff --git a/include/aes.h b/include/aes.h new file mode 100644 index 00000000..70ca8ce7 --- /dev/null +++ b/include/aes.h @@ -0,0 +1,92 @@ +#ifndef _AES_H_ +#define _AES_H_ + +#include +#include + +enum class AESKeyLength +{ + AES_128, + AES_192, + AES_256 +}; + +class AES +{ + private: + static constexpr unsigned int numBlocks = 4; + static constexpr unsigned int blockBytesLen = 4 * numBlocks * sizeof(unsigned char); + unsigned int numWord; + unsigned int numRound; + unsigned char* generateKey(); + void addRoundKey(unsigned char state[4][numBlocks], unsigned char* roundKey); + void checkLength(unsigned int length); + void encryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys); + void decryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys); + void subBytes(unsigned char state[4][numBlocks]); + void invSubBytes(unsigned char state[4][numBlocks]); + void invShiftRows(unsigned char state[4][numBlocks]); + void invMixColumns(unsigned char state[4][numBlocks]); + void mixColumns(unsigned char state[4][numBlocks]); + void shiftRows(unsigned char state[4][numBlocks]); + void keyExpansion(const unsigned char* key, unsigned char roundKeys[]); + unsigned char xtime(unsigned char x); + void rotWord(unsigned char word[4]); + void subWord(unsigned char word[4]); + void rconWord(unsigned char rcon[4], unsigned int n); + unsigned char multiply(unsigned char x, unsigned char y); + + // Inverse S-Box + const unsigned char invSBox[16][16] = { + {0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb}, + {0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb}, + {0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e}, + {0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25}, + {0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92}, + {0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84}, + {0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06}, + {0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b}, + {0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73}, + {0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e}, + {0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b}, + {0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4}, + {0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f}, + {0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef}, + {0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61}, + {0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d} + }; + + // S-Box + const unsigned char sBox[16][16] = { + {0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76}, + {0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0}, + {0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15}, + {0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75}, + {0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84}, + {0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf}, + {0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8}, + {0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2}, + {0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73}, + {0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb}, + {0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79}, + {0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08}, + {0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a}, + {0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e}, + {0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf}, + {0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16} + }; + + public: + AES(const AESKeyLength keyLength); + + // Encrypt the input data using the provided key + unsigned char* encrypt(const unsigned char in[], unsigned int inLen, const unsigned char key[]); + + // Decrypt the input data using the provided key + unsigned char* decrypt(const unsigned char in[], unsigned int inLen, const unsigned char key[]); + + //Generate new ranom key; + unsigned char* generateKey(AESKeyLength keyLength); +}; + +#endif \ No newline at end of file diff --git a/src/aes.cpp b/src/aes.cpp new file mode 100644 index 00000000..54b01daa --- /dev/null +++ b/src/aes.cpp @@ -0,0 +1,366 @@ +#include "../include/aes.h" +#include +#include + +/* + Constructor for AES class + Initializes the number of words (numWord) and number of rounds (numRound) + based on the provided AES key length (128, 192, or 256 bits). +*/ +AES::AES(const AESKeyLength keyLength) +{ + switch (keyLength) { + case AESKeyLength::AES_128: + this->numWord = 4; + this->numRound = 10; + break; + case AESKeyLength::AES_192: + this->numWord = 6; + this->numRound = 12; + break; + case AESKeyLength::AES_256: + this->numWord = 8; + this->numRound = 14; + break; + } +} + +/* + Generates a random AES key of the specified length + `keyLength` - length of the key (128, 192, or 256 bits) + Returns a pointer to the generated key. +*/ +unsigned char* AES::generateKey(AESKeyLength keyLength) +{ + int keySize; + switch (keyLength) { + case AESKeyLength::AES_128: + keySize = 16; + break; + case AESKeyLength::AES_192: + keySize = 24; + break; + case AESKeyLength::AES_256: + keySize = 32; + break; + default: + throw std::invalid_argument("Invalid AES key length"); + } + + // Allocate memory for the key + unsigned char* key = new unsigned char[keySize]; + + // Initialize a random device and a random number generator + std::random_device rd; + std::mt19937 gen(rd()); + std::uniform_int_distribution dis(0, 255); + + // Fill the key with random bytes + for (int i = 0; i < keySize; i++) + key[i] = dis(gen); + + + return key; +} + +/* + Encrypts the input data using the provided key. + `in` - input data to be encrypted + `inLen` - length of the input data + `key` - encryption key + Returns a pointer to the encrypted data. +*/ +unsigned char* AES::encrypt(const unsigned char in[], unsigned int inLen, const unsigned char key[]) +{ + checkLength(inLen); + unsigned char* out = new unsigned char[inLen]; + unsigned char* roundKeys = new unsigned char[4 * numWord * (numRound + 1)]; + keyExpansion(key, roundKeys); + for (unsigned int i = 0; i < inLen; i += blockBytesLen) + encryptBlock(in + i, out + i, roundKeys); + + delete[] roundKeys; + return out; +} + +/* + Decrypts the input data using the provided key. + `in` - input data to be decrypted + `inLen` - length of the input data + `key` - decryption key + Returns a pointer to the decrypted data. +*/ +unsigned char *AES::decrypt(const unsigned char in[], unsigned int inLen, const unsigned char key[]) +{ + checkLength(inLen); + unsigned char* out = new unsigned char[inLen]; + unsigned char* roundKeys = new unsigned char[4 * numBlocks * (numRound + 1)]; + keyExpansion(key, roundKeys); + for (size_t i = 0; i < inLen; i += blockBytesLen) + decryptBlock(in + i, out+i, roundKeys); + + delete[] roundKeys; + return out; +} + +/* + Checks if the input length is a multiple of the block length. + Throws an exception if the length is invalid. +*/ +void AES::checkLength(unsigned int len) +{ + if (len % blockBytesLen != 0) + throw std::length_error("Plaintext length must be divisible by " + + std::to_string(blockBytesLen)); +} + +/* + Encrypts a single block of data. + `in` - input block to be encrypted + `out` - output block to store the encrypted data + `roundKeys` - expanded key for encryption +*/ +void AES::encryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys) +{ + unsigned char state[4][numBlocks]; + unsigned int i, j, round; + + // Initialize state array with input block + for (i = 0; i < 4; i++) + for (j = 0; j < numBlocks; j++) + state[i][j] = in[i + 4 * j]; + + // Initial round key addition + addRoundKey(state, roundKeys); + + // Main rounds + for (round = 1; round < numRound; round++) { + subBytes(state); + shiftRows(state); + mixColumns(state); + addRoundKey(state, roundKeys + round * 4 * numBlocks); + } + + // Final round + subBytes(state); + shiftRows(state); + addRoundKey(state, roundKeys + numRound * 4 * numBlocks); + + // Copy state array to output block + for (i = 0; i < 4; i++) + for (j = 0; j < numBlocks; j++) + out[i + 4 * j] = state[i][j]; +} + +/* + Decrypts a single block of data. + `in` - input block to be decrypted + `out` - output block to store the decrypted data + `roundKeys` - expanded key for decryption +*/ +void AES::decryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys) +{ + unsigned char state[4][numBlocks]; + unsigned int i, j, round; + + // Initialize state array with input block + for (i = 0; i < 4; i++) + for (j = 0; j < numBlocks; j++) + state[i][j] = in[i + 4 * j]; + + // Initial round key addition + addRoundKey(state, roundKeys + numRound * 4 * numBlocks); + + // Main rounds + for (round = numRound - 1; round >= 1; round--) { + invSubBytes(state); + invShiftRows(state); + addRoundKey(state, roundKeys + round * 4 * numBlocks); + invMixColumns(state); + } + + // Final round + invSubBytes(state); + invShiftRows(state); + addRoundKey(state, roundKeys); + + // Copy state array to output block + for (i = 0; i < 4; i++) + for (j = 0; j < numBlocks; j++) + out[i + 4 * j] = state[i][j]; +} + +/* Multiplies a byte by x in GF(2^8) */ +unsigned char AES::xtime(unsigned char b) +{ + return (b << 1) ^ (((b >> 7) & 1) * 0x1b); +} + +/* Multiplies two bytes in GF(2^8) */ +unsigned char AES::multiply(unsigned char x, unsigned char y) +{ + unsigned char result = 0; + unsigned char temp = y; + for (int i = 0; i < 8; i++) { + if (x & 1) + result ^= temp; + bool carry = temp & 0x80; + temp <<= 1; + if (carry) + temp ^= 0x1b; + x >>= 1; + } + return result; +} + +/* Apply SubBytes transformation using the S-box */ +void AES::subBytes(unsigned char state[4][numBlocks]) +{ + for (size_t i = 0; i < 4; i++) + for (size_t j = 0; j < numBlocks; j++) + state[i][j] = sBox[state[i][j] / 16][state[i][j] % 16]; +} + + +/* ShiftRows transformation */ +void AES::shiftRows(unsigned char state[4][numBlocks]) +{ + for (size_t i = 0; i < 4; i++) { + unsigned char tmp[numBlocks]; + for (size_t k = 0; k < numBlocks; k++) + tmp[k] = state[i][(k + i) % numBlocks]; + memcpy(state[i], tmp, numBlocks * sizeof(unsigned char)); + } +} + +/* MixColumns transformation */ +void AES::mixColumns(unsigned char state[4][numBlocks]) +{ + for (size_t i = 0; i < 4; i++) { + unsigned char a[4]; + unsigned char b[4]; + for (size_t j = 0; j < 4; j++) { + a[j] = state[j][i]; + b[j] = xtime(state[j][i]); + } + state[0][i] = b[0] ^ a[1] ^ b[1] ^ a[2] ^ a[3]; + state[1][i] = a[0] ^ b[1] ^ a[2] ^ b[2] ^ a[3]; + state[2][i] = a[0] ^ a[1] ^ b[2] ^ a[3] ^ b[3]; + state[3][i] = b[0] ^ a[0] ^ a[1] ^ a[2] ^ b[3]; + } +} + +/* AddRoundKey transformation */ +void AES::addRoundKey(unsigned char state[4][numBlocks], unsigned char *key) +{ + unsigned int i, j; + for (i = 0; i < 4; i++) + for (j = 0; j < numBlocks; j++) + state[i][j] = state[i][j] ^ key[i + 4 * j]; +} + +/* Applies the SubWord transformation using the S-box */ +void AES::subWord(unsigned char a[4]) +{ + for (size_t i = 0; i < 4; i++) + a[i] = sBox[a[i]/16][a[i]%16]; +} + +/* Rotates a word (4 bytes) */ +void AES::rotWord(unsigned char a[4]) +{ + unsigned char first = a[0]; + for (size_t i = 0; i < 3; i++) + a[i] = a[i + 1]; + a[3] = first; +} + +/* Applies the Rcon transformation */ +void AES::rconWord(unsigned char a[4], unsigned int n) +{ + unsigned char strong = 1; + for (size_t i = 0; i < n-1; i++) + strong = xtime(strong); + + a[0] = strong; + a[1] = a[2] = a[3] = 0; +} + +/* Expands the key for AES encryption/decryption */ +void AES::keyExpansion(const unsigned char* key, unsigned char w[]) +{ + unsigned char temp[4], rcon[4]; + unsigned int i = 0; + + //copy key to w array + while (i < 4 * numWord) { + w[i] = key[i]; + i++; + } + + i = 4 * numWord; + + //main expansion loop + while (i < 4 * numBlocks * (numRound + 1)) { + + for (size_t k =4 , j = 0; k > 0; --k, ++j) + temp[j] = w[i - k]; + + if (i / 4 % numWord == 0) { + rotWord(temp); + subWord(temp); + rconWord(rcon, i / (numWord * 4)); + + for (int i = 0; i < 4; i++) + temp[i] = temp[i] ^ rcon[i]; + + } + else if (numWord > 6 && i / 4 % numWord == 4) + subWord(temp); + + for (int k = 0; k < 4; k++) + w[i + k] = w[i + k - 4 * numWord] ^ temp[k]; + + i += 4; + } +} + +/* Applies the InvSubBytes transformation using the inverse S-box */ +void AES::invSubBytes(unsigned char state[4][numBlocks]) +{ + unsigned int i, j; + unsigned char t; + for (i = 0; i < 4; i++) + for (j = 0; j < numBlocks; j++) { + t = state[i][j]; + state[i][j] = invSBox[t / 16][t % 16]; + } +} + +/* Applies the InvMixColumns transformation */ +void AES::invMixColumns(unsigned char state[4][numBlocks]) +{ + for (size_t i = 0; i < numBlocks; i++) { + unsigned char a[4]; + unsigned char b[4]; + for (size_t j = 0; j < 4; j++) { + a[j] = state[j][i]; + b[j] = xtime(a[j]); + } + state[0][i] = multiply(0x0e, a[0]) ^ multiply(0x0b, a[1]) ^ multiply(0x0d, a[2]) ^ multiply(0x09, a[3]); + state[1][i] = multiply(0x09, a[0]) ^ multiply(0x0e, a[1]) ^ multiply(0x0b, a[2]) ^ multiply(0x0d, a[3]); + state[2][i] = multiply(0x0d, a[0]) ^ multiply(0x09, a[1]) ^ multiply(0x0e, a[2]) ^ multiply(0x0b, a[3]); + state[3][i] = multiply(0x0b, a[0]) ^ multiply(0x0d, a[1]) ^ multiply(0x09, a[2]) ^ multiply(0x0e, a[3]); + } +} + +/* Applies the InvShiftRows transformation */ +void AES::invShiftRows(unsigned char state[4][numBlocks]) +{ + for (size_t i = 0; i < 4; i++) { + unsigned char tmp[numBlocks]; + for (size_t k = 0; k < numBlocks; k++) + tmp[k] = state[i][(k - i + numBlocks) % numBlocks]; + memcpy(state[i], tmp, numBlocks * sizeof(unsigned char)); + } +} \ No newline at end of file diff --git a/tests/aes_tests.cpp b/tests/aes_tests.cpp new file mode 100644 index 00000000..d00b4d5e --- /dev/null +++ b/tests/aes_tests.cpp @@ -0,0 +1,79 @@ +#include +#include "gtest/gtest.h" +#include "../include/aes.h" +const unsigned int BLOCK_BYTES_LENGTH = 16 * sizeof(unsigned char); + +// Tests for different key lengths +TEST(KeyLengths, KeyLength128) +{ + unsigned char plain[BLOCK_BYTES_LENGTH] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + AES aes(AESKeyLength::AES_128); + unsigned char* key = aes.generateKey(AESKeyLength::AES_128); + unsigned char *encrypted = aes.encrypt(plain, BLOCK_BYTES_LENGTH, key); + unsigned char *decrypted = aes.decrypt(encrypted, BLOCK_BYTES_LENGTH, key); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; +} + +TEST(KeyLengths, KeyLength192) +{ + unsigned char plain[BLOCK_BYTES_LENGTH] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + AES aes(AESKeyLength::AES_192); + unsigned char* key = aes.generateKey(AESKeyLength::AES_192); + unsigned char *encrypted = aes.encrypt(plain, BLOCK_BYTES_LENGTH, key); + unsigned char *decrypted = aes.decrypt(encrypted, BLOCK_BYTES_LENGTH, key); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; +} + +TEST(KeyLengths, KeyLength256) +{ + unsigned char plain[BLOCK_BYTES_LENGTH] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + AES aes(AESKeyLength::AES_256); + unsigned char* key = aes.generateKey(AESKeyLength::AES_256); + unsigned char *encrypted = aes.encrypt(plain, BLOCK_BYTES_LENGTH, key); + unsigned char *decrypted = aes.decrypt(encrypted, BLOCK_BYTES_LENGTH, key); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; +} + +// Tests for encryption and decryption of one block +TEST(ECB, EncryptDecryptOneBlock) +{ + unsigned char plain[BLOCK_BYTES_LENGTH] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + AES aes(AESKeyLength::AES_256); + unsigned char* key = aes.generateKey(AESKeyLength::AES_256); + unsigned char *encrypted = aes.encrypt(plain, BLOCK_BYTES_LENGTH, key); + unsigned char *decrypted = aes.decrypt(encrypted, BLOCK_BYTES_LENGTH, key); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; +} + +// Tests for encryption of one block with missing or extra bytes +TEST(ECB, OneBlockWithoutByteEncrypt) +{ + unsigned char plain[15] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee}; // 15 bytes + unsigned char key[16] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; + AES aes(AESKeyLength::AES_128); + ASSERT_THROW(aes.encrypt(plain, 15, key), std::length_error); // Expecting invalid_argument exception +} + +TEST(ECB, OneBlockExtraByteEncrypt) +{ + unsigned char plain[17] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, // 17 bytes + 0x01}; // Extra byte + unsigned char key[16] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; + AES aes(AESKeyLength::AES_128); + ASSERT_THROW(aes.encrypt(plain, 17, key), std::length_error); // Expecting invalid_argument exception +} \ No newline at end of file From 1616a7cce8c02e5f9de9e93ccadf1da14397eeec Mon Sep 17 00:00:00 2001 From: MiryamW Date: Mon, 2 Sep 2024 11:35:54 +0300 Subject: [PATCH 04/21] HSM: Refactor - Change AES Implementation from Class-Based to Functional-Based --- include/aes.h | 38 +++---- src/aes.cpp | 264 ++++++++++++++++++++++++-------------------- tests/aes_tests.cpp | 88 +++++++++++---- 3 files changed, 226 insertions(+), 164 deletions(-) diff --git a/include/aes.h b/include/aes.h index 70ca8ce7..12556708 100644 --- a/include/aes.h +++ b/include/aes.h @@ -3,7 +3,8 @@ #include #include - +#define NUM_BLOCKS 4 +#define BLOCK_BYTES_LEN (4 * (NUM_BLOCKS) * sizeof(unsigned char)) enum class AESKeyLength { AES_128, @@ -11,30 +12,24 @@ enum class AESKeyLength AES_256 }; -class AES -{ - private: - static constexpr unsigned int numBlocks = 4; - static constexpr unsigned int blockBytesLen = 4 * numBlocks * sizeof(unsigned char); - unsigned int numWord; - unsigned int numRound; - unsigned char* generateKey(); - void addRoundKey(unsigned char state[4][numBlocks], unsigned char* roundKey); + void addRoundKey(unsigned char state[4][NUM_BLOCKS], unsigned char* roundKey); void checkLength(unsigned int length); void encryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys); void decryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys); - void subBytes(unsigned char state[4][numBlocks]); - void invSubBytes(unsigned char state[4][numBlocks]); - void invShiftRows(unsigned char state[4][numBlocks]); - void invMixColumns(unsigned char state[4][numBlocks]); - void mixColumns(unsigned char state[4][numBlocks]); - void shiftRows(unsigned char state[4][numBlocks]); + void subBytes(unsigned char state[4][NUM_BLOCKS]); + void invSubBytes(unsigned char state[4][NUM_BLOCKS]); + void invShiftRows(unsigned char state[4][NUM_BLOCKS]); + void invMixColumns(unsigned char state[4][NUM_BLOCKS]); + void mixColumns(unsigned char state[4][NUM_BLOCKS]); + void shiftRows(unsigned char state[4][NUM_BLOCKS]); void keyExpansion(const unsigned char* key, unsigned char roundKeys[]); unsigned char xtime(unsigned char x); void rotWord(unsigned char word[4]); void subWord(unsigned char word[4]); void rconWord(unsigned char rcon[4], unsigned int n); unsigned char multiply(unsigned char x, unsigned char y); + void xorBlocks(const unsigned char *a, const unsigned char *b, + unsigned char *c, unsigned int len); // Inverse S-Box const unsigned char invSBox[16][16] = { @@ -76,17 +71,16 @@ class AES {0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16} }; - public: - AES(const AESKeyLength keyLength); + + void init(const AESKeyLength keyLength); // Encrypt the input data using the provided key - unsigned char* encrypt(const unsigned char in[], unsigned int inLen, const unsigned char key[]); + void encrypt(const unsigned char in[], unsigned int inLen, unsigned char* key, unsigned char* &out, unsigned int &outLen, const unsigned char *iv); // Decrypt the input data using the provided key - unsigned char* decrypt(const unsigned char in[], unsigned int inLen, const unsigned char key[]); - + void decrypt(const unsigned char in[], unsigned int inLen, unsigned char* key, unsigned char* &out, unsigned int &outLen, const unsigned char *iv); //Generate new ranom key; unsigned char* generateKey(AESKeyLength keyLength); -}; + #endif \ No newline at end of file diff --git a/src/aes.cpp b/src/aes.cpp index 54b01daa..d339ce62 100644 --- a/src/aes.cpp +++ b/src/aes.cpp @@ -2,53 +2,59 @@ #include #include +unsigned int numWord; +unsigned int numRound; +unsigned int keySize; +AESKeyLength keyLength; + /* Constructor for AES class Initializes the number of words (numWord) and number of rounds (numRound) based on the provided AES key length (128, 192, or 256 bits). */ -AES::AES(const AESKeyLength keyLength) +void init(const AESKeyLength keyLengthUser) { + keyLength = keyLengthUser; switch (keyLength) { - case AESKeyLength::AES_128: - this->numWord = 4; - this->numRound = 10; - break; - case AESKeyLength::AES_192: - this->numWord = 6; - this->numRound = 12; - break; - case AESKeyLength::AES_256: - this->numWord = 8; - this->numRound = 14; - break; - } + case AESKeyLength::AES_128: + numWord = 4; + numRound = 10; + break; + case AESKeyLength::AES_192: + numWord = 6; + numRound = 12; + break; + case AESKeyLength::AES_256: + numWord = 8; + numRound = 14; + break; + } } /* - Generates a random AES key of the specified length - `keyLength` - length of the key (128, 192, or 256 bits) - Returns a pointer to the generated key. -*/ -unsigned char* AES::generateKey(AESKeyLength keyLength) +Generates a random AES key of the specified length +`keyLength` - length of the key (128, 192, or 256 bits) +Returns a pointer to the generated key. + */ +unsigned char* generateKey(AESKeyLength keyLength) { int keySize; switch (keyLength) { - case AESKeyLength::AES_128: - keySize = 16; - break; - case AESKeyLength::AES_192: - keySize = 24; - break; - case AESKeyLength::AES_256: - keySize = 32; - break; - default: - throw std::invalid_argument("Invalid AES key length"); + case AESKeyLength::AES_128: + keySize = 16; + break; + case AESKeyLength::AES_192: + keySize = 24; + break; + case AESKeyLength::AES_256: + keySize = 32; + break; + default: + throw std::invalid_argument("Invalid AES key length"); } // Allocate memory for the key - unsigned char* key = new unsigned char[keySize]; + unsigned char *key = new unsigned char[keySize]; // Initialize a random device and a random number generator std::random_device rd; @@ -56,9 +62,8 @@ unsigned char* AES::generateKey(AESKeyLength keyLength) std::uniform_int_distribution dis(0, 255); // Fill the key with random bytes - for (int i = 0; i < keySize; i++) + for (int i = 0; i < keySize; i++) key[i] = dis(gen); - return key; } @@ -69,49 +74,59 @@ unsigned char* AES::generateKey(AESKeyLength keyLength) `inLen` - length of the input data `key` - encryption key Returns a pointer to the encrypted data. -*/ -unsigned char* AES::encrypt(const unsigned char in[], unsigned int inLen, const unsigned char key[]) + */ +void encrypt(const unsigned char in[], unsigned int inLen, unsigned char* key, unsigned char* &out, unsigned int &outLen, const unsigned char *iv) { checkLength(inLen); - unsigned char* out = new unsigned char[inLen]; - unsigned char* roundKeys = new unsigned char[4 * numWord * (numRound + 1)]; + unsigned char block[BLOCK_BYTES_LEN]; + outLen = inLen; + out = new unsigned char[outLen]; + unsigned char* roundKeys = new unsigned char[(numRound + 1) * NUM_BLOCKS * 4]; keyExpansion(key, roundKeys); - for (unsigned int i = 0; i < inLen; i += blockBytesLen) - encryptBlock(in + i, out + i, roundKeys); + memcpy(block, iv, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN){ + xorBlocks(block, in + i, block, BLOCK_BYTES_LEN); + encryptBlock(block, out + i, roundKeys); + memcpy(block, out + i, BLOCK_BYTES_LEN); + } delete[] roundKeys; - return out; } /* Decrypts the input data using the provided key. `in` - input data to be decrypted `inLen` - length of the input data - `key` - decryption key - Returns a pointer to the decrypted data. +`key` - decryption key */ -unsigned char *AES::decrypt(const unsigned char in[], unsigned int inLen, const unsigned char key[]) +void decrypt(const unsigned char in[], unsigned int inLen, unsigned char* key, unsigned char* &out, unsigned int &outLen, const unsigned char *iv) { checkLength(inLen); - unsigned char* out = new unsigned char[inLen]; - unsigned char* roundKeys = new unsigned char[4 * numBlocks * (numRound + 1)]; + unsigned char block[BLOCK_BYTES_LEN]; + outLen = inLen; + out = new unsigned char[outLen]; + unsigned char* roundKeys = new unsigned char[(numRound + 1) * NUM_BLOCKS * 4]; keyExpansion(key, roundKeys); - for (size_t i = 0; i < inLen; i += blockBytesLen) - decryptBlock(in + i, out+i, roundKeys); - + memcpy(block, iv, BLOCK_BYTES_LEN); + + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN){ + decryptBlock(in + i, out + i, roundKeys); + xorBlocks(block, out + i, out + i, BLOCK_BYTES_LEN); + memcpy(block, in + i, BLOCK_BYTES_LEN); + } + delete[] roundKeys; - return out; } /* Checks if the input length is a multiple of the block length. Throws an exception if the length is invalid. */ -void AES::checkLength(unsigned int len) +void checkLength(unsigned int len) { - if (len % blockBytesLen != 0) + if (len % BLOCK_BYTES_LEN != 0) throw std::length_error("Plaintext length must be divisible by " + - std::to_string(blockBytesLen)); + std::to_string(BLOCK_BYTES_LEN)); } /* @@ -120,17 +135,17 @@ void AES::checkLength(unsigned int len) `out` - output block to store the encrypted data `roundKeys` - expanded key for encryption */ -void AES::encryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys) +void encryptBlock(const unsigned char in[],unsigned char out[], unsigned char* roundKeys) { - unsigned char state[4][numBlocks]; + unsigned char state[4][NUM_BLOCKS]; unsigned int i, j, round; // Initialize state array with input block for (i = 0; i < 4; i++) - for (j = 0; j < numBlocks; j++) + for (j = 0; j < NUM_BLOCKS; j++) state[i][j] = in[i + 4 * j]; - // Initial round key addition + // Initial round key addition addRoundKey(state, roundKeys); // Main rounds @@ -138,17 +153,17 @@ void AES::encryptBlock(const unsigned char in[], unsigned char out[], unsigned c subBytes(state); shiftRows(state); mixColumns(state); - addRoundKey(state, roundKeys + round * 4 * numBlocks); + addRoundKey(state, roundKeys + round * 4 * NUM_BLOCKS); } // Final round subBytes(state); shiftRows(state); - addRoundKey(state, roundKeys + numRound * 4 * numBlocks); + addRoundKey(state, roundKeys + numRound * 4 * NUM_BLOCKS); // Copy state array to output block for (i = 0; i < 4; i++) - for (j = 0; j < numBlocks; j++) + for (j = 0; j < NUM_BLOCKS; j++) out[i + 4 * j] = state[i][j]; } @@ -158,24 +173,24 @@ void AES::encryptBlock(const unsigned char in[], unsigned char out[], unsigned c `out` - output block to store the decrypted data `roundKeys` - expanded key for decryption */ -void AES::decryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys) +void decryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys) { - unsigned char state[4][numBlocks]; + unsigned char state[4][NUM_BLOCKS]; unsigned int i, j, round; // Initialize state array with input block for (i = 0; i < 4; i++) - for (j = 0; j < numBlocks; j++) + for (j = 0; j < NUM_BLOCKS; j++) state[i][j] = in[i + 4 * j]; - + // Initial round key addition - addRoundKey(state, roundKeys + numRound * 4 * numBlocks); + addRoundKey(state, roundKeys + numRound * 4 * NUM_BLOCKS); // Main rounds for (round = numRound - 1; round >= 1; round--) { invSubBytes(state); invShiftRows(state); - addRoundKey(state, roundKeys + round * 4 * numBlocks); + addRoundKey(state, roundKeys + round * 4 * NUM_BLOCKS); invMixColumns(state); } @@ -186,18 +201,18 @@ void AES::decryptBlock(const unsigned char in[], unsigned char out[], unsigned c // Copy state array to output block for (i = 0; i < 4; i++) - for (j = 0; j < numBlocks; j++) + for (j = 0; j < NUM_BLOCKS; j++) out[i + 4 * j] = state[i][j]; } /* Multiplies a byte by x in GF(2^8) */ -unsigned char AES::xtime(unsigned char b) +unsigned char xtime(unsigned char b) { return (b << 1) ^ (((b >> 7) & 1) * 0x1b); } /* Multiplies two bytes in GF(2^8) */ -unsigned char AES::multiply(unsigned char x, unsigned char y) +unsigned char multiply(unsigned char x, unsigned char y) { unsigned char result = 0; unsigned char temp = y; @@ -213,30 +228,29 @@ unsigned char AES::multiply(unsigned char x, unsigned char y) return result; } -/* Apply SubBytes transformation using the S-box */ -void AES::subBytes(unsigned char state[4][numBlocks]) +/* Apply SubBytes transformation using the S-box */ +void subBytes(unsigned char state[4][NUM_BLOCKS]) { for (size_t i = 0; i < 4; i++) - for (size_t j = 0; j < numBlocks; j++) + for (size_t j = 0; j < NUM_BLOCKS; j++) state[i][j] = sBox[state[i][j] / 16][state[i][j] % 16]; } - /* ShiftRows transformation */ -void AES::shiftRows(unsigned char state[4][numBlocks]) +void shiftRows(unsigned char state[4][NUM_BLOCKS]) { for (size_t i = 0; i < 4; i++) { - unsigned char tmp[numBlocks]; - for (size_t k = 0; k < numBlocks; k++) - tmp[k] = state[i][(k + i) % numBlocks]; - memcpy(state[i], tmp, numBlocks * sizeof(unsigned char)); + unsigned char tmp[NUM_BLOCKS]; + for (size_t k = 0; k < NUM_BLOCKS; k++) + tmp[k] = state[i][(k + i) % NUM_BLOCKS]; + memcpy(state[i], tmp, NUM_BLOCKS * sizeof(unsigned char)); } } /* MixColumns transformation */ -void AES::mixColumns(unsigned char state[4][numBlocks]) +void mixColumns(unsigned char state[4][NUM_BLOCKS]) { - for (size_t i = 0; i < 4; i++) { + for (size_t i = 0; i < 4; i++) { unsigned char a[4]; unsigned char b[4]; for (size_t j = 0; j < 4; j++) { @@ -251,116 +265,128 @@ void AES::mixColumns(unsigned char state[4][numBlocks]) } /* AddRoundKey transformation */ -void AES::addRoundKey(unsigned char state[4][numBlocks], unsigned char *key) +void addRoundKey(unsigned char state[4][NUM_BLOCKS], unsigned char *key) { unsigned int i, j; for (i = 0; i < 4; i++) - for (j = 0; j < numBlocks; j++) + for (j = 0; j < NUM_BLOCKS; j++) state[i][j] = state[i][j] ^ key[i + 4 * j]; } /* Applies the SubWord transformation using the S-box */ -void AES::subWord(unsigned char a[4]) +void subWord(unsigned char a[4]) { - for (size_t i = 0; i < 4; i++) - a[i] = sBox[a[i]/16][a[i]%16]; + for (size_t i = 0; i < 4; i++) + a[i] = sBox[a[i] / 16][a[i] % 16]; } /* Rotates a word (4 bytes) */ -void AES::rotWord(unsigned char a[4]) +void rotWord(unsigned char a[4]) { - unsigned char first = a[0]; + unsigned char first = a[0]; for (size_t i = 0; i < 3; i++) a[i] = a[i + 1]; a[3] = first; } /* Applies the Rcon transformation */ -void AES::rconWord(unsigned char a[4], unsigned int n) +void rconWord(unsigned char a[4], unsigned int n) { unsigned char strong = 1; - for (size_t i = 0; i < n-1; i++) + for (size_t i = 0; i < n - 1; i++) strong = xtime(strong); - + a[0] = strong; a[1] = a[2] = a[3] = 0; } /* Expands the key for AES encryption/decryption */ -void AES::keyExpansion(const unsigned char* key, unsigned char w[]) +void keyExpansion(const unsigned char* key, unsigned char w[]) { unsigned char temp[4], rcon[4]; unsigned int i = 0; - + //copy key to w array while (i < 4 * numWord) { - w[i] = key[i]; - i++; + w[i] = key[i]; + i++; } i = 4 * numWord; //main expansion loop - while (i < 4 * numBlocks * (numRound + 1)) { + while (i < 4 * NUM_BLOCKS * (numRound + 1)) { for (size_t k =4 , j = 0; k > 0; --k, ++j) temp[j] = w[i - k]; if (i / 4 % numWord == 0) { - rotWord(temp); - subWord(temp); - rconWord(rcon, i / (numWord * 4)); - - for (int i = 0; i < 4; i++) - temp[i] = temp[i] ^ rcon[i]; - - } - else if (numWord > 6 && i / 4 % numWord == 4) + rotWord(temp); + subWord(temp); + rconWord(rcon, i / (numWord * 4)); + + for (int i = 0; i < 4; i++) + temp[i] = temp[i] ^ rcon[i]; + } + else if (numWord > 6 && i / 4 % numWord == 4) subWord(temp); - for (int k = 0; k < 4; k++) - w[i + k] = w[i + k - 4 * numWord] ^ temp[k]; + for (int k = 0; k < 4; k++) + w[i + k] = w[i + k - 4 * numWord] ^ temp[k]; i += 4; } } -/* Applies the InvSubBytes transformation using the inverse S-box */ -void AES::invSubBytes(unsigned char state[4][numBlocks]) +/* Applies the InvSubBytes transformation using the inverse S-box */ +void invSubBytes(unsigned char state[4][NUM_BLOCKS]) { unsigned int i, j; unsigned char t; for (i = 0; i < 4; i++) - for (j = 0; j < numBlocks; j++) { + for (j = 0; j < NUM_BLOCKS; j++) { t = state[i][j]; state[i][j] = invSBox[t / 16][t % 16]; } } /* Applies the InvMixColumns transformation */ -void AES::invMixColumns(unsigned char state[4][numBlocks]) +void invMixColumns(unsigned char state[4][NUM_BLOCKS]) { - for (size_t i = 0; i < numBlocks; i++) { + for (size_t i = 0; i < NUM_BLOCKS; i++) { unsigned char a[4]; unsigned char b[4]; for (size_t j = 0; j < 4; j++) { a[j] = state[j][i]; b[j] = xtime(a[j]); } - state[0][i] = multiply(0x0e, a[0]) ^ multiply(0x0b, a[1]) ^ multiply(0x0d, a[2]) ^ multiply(0x09, a[3]); - state[1][i] = multiply(0x09, a[0]) ^ multiply(0x0e, a[1]) ^ multiply(0x0b, a[2]) ^ multiply(0x0d, a[3]); - state[2][i] = multiply(0x0d, a[0]) ^ multiply(0x09, a[1]) ^ multiply(0x0e, a[2]) ^ multiply(0x0b, a[3]); - state[3][i] = multiply(0x0b, a[0]) ^ multiply(0x0d, a[1]) ^ multiply(0x09, a[2]) ^ multiply(0x0e, a[3]); + state[0][i] = multiply(0x0e, a[0]) ^ multiply(0x0b, a[1]) ^ + multiply(0x0d, a[2]) ^ multiply(0x09, a[3]); + state[1][i] = multiply(0x09, a[0]) ^ multiply(0x0e, a[1]) ^ + multiply(0x0b, a[2]) ^ multiply(0x0d, a[3]); + state[2][i] = multiply(0x0d, a[0]) ^ multiply(0x09, a[1]) ^ + multiply(0x0e, a[2]) ^ multiply(0x0b, a[3]); + state[3][i] = multiply(0x0b, a[0]) ^ multiply(0x0d, a[1]) ^ + multiply(0x09, a[2]) ^ multiply(0x0e, a[3]); } } /* Applies the InvShiftRows transformation */ -void AES::invShiftRows(unsigned char state[4][numBlocks]) +void invShiftRows(unsigned char state[4][NUM_BLOCKS]) { for (size_t i = 0; i < 4; i++) { - unsigned char tmp[numBlocks]; - for (size_t k = 0; k < numBlocks; k++) - tmp[k] = state[i][(k - i + numBlocks) % numBlocks]; - memcpy(state[i], tmp, numBlocks * sizeof(unsigned char)); + unsigned char tmp[NUM_BLOCKS]; + for (size_t k = 0; k < NUM_BLOCKS; k++) + tmp[k] = state[i][(k - i + NUM_BLOCKS) % NUM_BLOCKS]; + memcpy(state[i], tmp, NUM_BLOCKS * sizeof(unsigned char)); } +} + +/** XORs two blocks of bytes a and b of length len, storing the result in c. */ +void xorBlocks(const unsigned char *a, const unsigned char *b, + unsigned char *c, unsigned int len) + { + for (unsigned int i = 0; i < len; i++) { + c[i] = a[i] ^ b[i]; + } } \ No newline at end of file diff --git a/tests/aes_tests.cpp b/tests/aes_tests.cpp index d00b4d5e..b66ff868 100644 --- a/tests/aes_tests.cpp +++ b/tests/aes_tests.cpp @@ -7,10 +7,17 @@ const unsigned int BLOCK_BYTES_LENGTH = 16 * sizeof(unsigned char); TEST(KeyLengths, KeyLength128) { unsigned char plain[BLOCK_BYTES_LENGTH] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - AES aes(AESKeyLength::AES_128); - unsigned char* key = aes.generateKey(AESKeyLength::AES_128); - unsigned char *encrypted = aes.encrypt(plain, BLOCK_BYTES_LENGTH, key); - unsigned char *decrypted = aes.decrypt(encrypted, BLOCK_BYTES_LENGTH, key); + unsigned char iv[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff}; + init(AESKeyLength::AES_128); + unsigned char* key = generateKey(AESKeyLength::AES_128); + unsigned char *encrypted; + unsigned int outLenEncrypted; + encrypt(plain, BLOCK_BYTES_LENGTH, key,encrypted, outLenEncrypted, iv); + unsigned char *decrypted; + unsigned int outLenDecrypted; + decrypt(encrypted, BLOCK_BYTES_LENGTH, key,decrypted, outLenDecrypted, iv); ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); delete[] encrypted; delete[] decrypted; @@ -20,10 +27,17 @@ TEST(KeyLengths, KeyLength192) { unsigned char plain[BLOCK_BYTES_LENGTH] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - AES aes(AESKeyLength::AES_192); - unsigned char* key = aes.generateKey(AESKeyLength::AES_192); - unsigned char *encrypted = aes.encrypt(plain, BLOCK_BYTES_LENGTH, key); - unsigned char *decrypted = aes.decrypt(encrypted, BLOCK_BYTES_LENGTH, key); + unsigned char iv[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff}; + init(AESKeyLength::AES_192); + unsigned char* key = generateKey(AESKeyLength::AES_192); + unsigned char *encrypted; + unsigned int outLenEncrypted; + encrypt(plain, BLOCK_BYTES_LENGTH, key,encrypted,outLenEncrypted,iv); + unsigned char *decrypted; + unsigned int outLenDecrypted; + decrypt(encrypted, BLOCK_BYTES_LENGTH, key,decrypted,outLenDecrypted,iv); ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); delete[] encrypted; delete[] decrypted; @@ -33,47 +47,75 @@ TEST(KeyLengths, KeyLength256) { unsigned char plain[BLOCK_BYTES_LENGTH] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - AES aes(AESKeyLength::AES_256); - unsigned char* key = aes.generateKey(AESKeyLength::AES_256); - unsigned char *encrypted = aes.encrypt(plain, BLOCK_BYTES_LENGTH, key); - unsigned char *decrypted = aes.decrypt(encrypted, BLOCK_BYTES_LENGTH, key); + unsigned char iv[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff}; + init(AESKeyLength::AES_256); + unsigned char* key = generateKey(AESKeyLength::AES_256); + unsigned char* encrypted; + unsigned int outLenEncrypted; + encrypt(plain, BLOCK_BYTES_LENGTH, key,encrypted,outLenEncrypted,iv); + unsigned char *decrypted ; + unsigned int outLenDecrypted; + decrypt(encrypted, BLOCK_BYTES_LENGTH, key, decrypted, outLenDecrypted, iv); ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); delete[] encrypted; delete[] decrypted; } // Tests for encryption and decryption of one block -TEST(ECB, EncryptDecryptOneBlock) +TEST(CBC, EncryptDecryptOneBlock) { unsigned char plain[BLOCK_BYTES_LENGTH] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - AES aes(AESKeyLength::AES_256); - unsigned char* key = aes.generateKey(AESKeyLength::AES_256); - unsigned char *encrypted = aes.encrypt(plain, BLOCK_BYTES_LENGTH, key); - unsigned char *decrypted = aes.decrypt(encrypted, BLOCK_BYTES_LENGTH, key); + unsigned char iv[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff}; + init(AESKeyLength::AES_256); + unsigned char* key = generateKey(AESKeyLength::AES_256); + unsigned char *encrypted; + unsigned int outLenEncrypted; + encrypt(plain, BLOCK_BYTES_LENGTH, key,encrypted,outLenEncrypted,iv); + unsigned char *decrypted; + unsigned int outLenDecrypted; + decrypt(encrypted, BLOCK_BYTES_LENGTH, key,decrypted,outLenDecrypted,iv); ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); delete[] encrypted; delete[] decrypted; } // Tests for encryption of one block with missing or extra bytes -TEST(ECB, OneBlockWithoutByteEncrypt) +TEST(CBC, OneBlockWithoutByteEncrypt) { unsigned char plain[15] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee}; // 15 bytes unsigned char key[16] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; - AES aes(AESKeyLength::AES_128); - ASSERT_THROW(aes.encrypt(plain, 15, key), std::length_error); // Expecting invalid_argument exception + unsigned char iv[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff}; + init(AESKeyLength::AES_128); + unsigned char* encrypted; + unsigned int outLen; + ASSERT_THROW(encrypt(plain, 15, key,encrypted,outLen,iv), std::length_error); // Expecting invalid_argument exception } -TEST(ECB, OneBlockExtraByteEncrypt) +TEST(CBC, OneBlockExtraByteEncrypt) { unsigned char plain[17] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, // 17 bytes 0x01}; // Extra byte unsigned char key[16] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; - AES aes(AESKeyLength::AES_128); - ASSERT_THROW(aes.encrypt(plain, 17, key), std::length_error); // Expecting invalid_argument exception + unsigned char iv[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff}; + init(AESKeyLength::AES_128); + unsigned char* encrypted; + unsigned int outLen; + ASSERT_THROW(encrypt(plain, 17, key, encrypted, outLen, iv), std::length_error); // Expecting invalid_argument exception +} +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); } \ No newline at end of file From 90cbf5448b5c7afaaa8b6e2dc7bf153fcb97925d Mon Sep 17 00:00:00 2001 From: MiryamW Date: Mon, 2 Sep 2024 11:43:58 +0300 Subject: [PATCH 05/21] HSM: Add SYCL support for AES operations and update CMake for conditional compilation --- CMakeLists.txt | 46 ++- include/aes.h | 152 ++++++--- src/aes.cpp | 813 ++++++++++++++++++++++++++++++++++++-------- tests/aes_tests.cpp | 108 ++---- 4 files changed, 843 insertions(+), 276 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8003a046..61b32b42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,45 @@ cmake_minimum_required(VERSION 3.10) project(MyTest) - -set(CMAKE_CXX_STANDARD 11) - -# Include the directory where AES.h is located +# Include directories include_directories(src) - +# Find GMP library +find_path(GMP_INCLUDE_DIR NAMES gmp.h) +find_library(GMP_LIBRARY NAMES gmp) +find_library(GMPXX_LIBRARY NAMES gmpxx) +if(NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARY OR NOT GMPXX_LIBRARY) + message(FATAL_ERROR "Could not find GMP or GMPXX libraries") +endif() +include_directories(${GMP_INCLUDE_DIR}) +# Find Google Test +find_package(GTest REQUIRED) # Add source files file(GLOB SOURCES "src/*.cpp") - +# Check if SYCL is enabled +option(USE_SYCL "Enable SYCL support" ON) +if(USE_SYCL) + # Set the icpx compiler with SYCL support + set(CMAKE_CXX_COMPILER icpx) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl") + # Add oneAPI include directories + include_directories(${CMAKE_SOURCE_DIR}/include /opt/intel/oneapi/compiler/latest/linux/include) + # Add oneAPI library directories + link_directories(/opt/intel/oneapi/compiler/latest/linux/lib) + message(STATUS "Compiling with SYCL support") + add_definitions(-DUSE_SYCL) + else() + message(STATUS "Compiling without SYCL support") + remove_definitions(-DUSE_SYCL) +endif() +# Add the executable for the tests add_executable(runTests tests/aes_tests.cpp ${SOURCES}) -target_link_libraries(runTests gtest gtest_main pthread) +# Link libraries +target_link_libraries(runTests + ${GMP_LIBRARY} + ${GMPXX_LIBRARY} + GTest::GTest + GTest::Main + pthread +) +# Enable testing +enable_testing() +gtest_discover_tests(runTests) \ No newline at end of file diff --git a/include/aes.h b/include/aes.h index 12556708..5c1fe77f 100644 --- a/include/aes.h +++ b/include/aes.h @@ -3,26 +3,41 @@ #include #include +#include #define NUM_BLOCKS 4 #define BLOCK_BYTES_LEN (4 * (NUM_BLOCKS) * sizeof(unsigned char)) + enum class AESKeyLength { AES_128, AES_192, AES_256 }; +struct AESData +{ + unsigned int numWord; + unsigned int numRound; + unsigned int keySize; +}; +static std::map aesKeyLengthData = { + { AESKeyLength::AES_128, {4, 10, 128} }, + { AESKeyLength::AES_192, {6, 12, 192} }, + { AESKeyLength::AES_256, {8, 14, 256} } +}; + void padMessage(unsigned char* &message, unsigned int& length, unsigned int& paddedLength); + void unpadMessage(unsigned char* message, unsigned int& length); void addRoundKey(unsigned char state[4][NUM_BLOCKS], unsigned char* roundKey); void checkLength(unsigned int length); - void encryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys); - void decryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys); + void encryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys, AESKeyLength keyLength); + void decryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys, AESKeyLength keyLength); void subBytes(unsigned char state[4][NUM_BLOCKS]); void invSubBytes(unsigned char state[4][NUM_BLOCKS]); void invShiftRows(unsigned char state[4][NUM_BLOCKS]); void invMixColumns(unsigned char state[4][NUM_BLOCKS]); void mixColumns(unsigned char state[4][NUM_BLOCKS]); void shiftRows(unsigned char state[4][NUM_BLOCKS]); - void keyExpansion(const unsigned char* key, unsigned char roundKeys[]); + void keyExpansion(const unsigned char* key, unsigned char roundKeys[], AESKeyLength keyLength); unsigned char xtime(unsigned char x); void rotWord(unsigned char word[4]); void subWord(unsigned char word[4]); @@ -31,56 +46,91 @@ enum class AESKeyLength void xorBlocks(const unsigned char *a, const unsigned char *b, unsigned char *c, unsigned int len); - // Inverse S-Box - const unsigned char invSBox[16][16] = { - {0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb}, - {0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb}, - {0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e}, - {0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25}, - {0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92}, - {0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84}, - {0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06}, - {0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b}, - {0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73}, - {0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e}, - {0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b}, - {0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4}, - {0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f}, - {0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef}, - {0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61}, - {0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d} - }; - - // S-Box - const unsigned char sBox[16][16] = { - {0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76}, - {0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0}, - {0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15}, - {0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75}, - {0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84}, - {0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf}, - {0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8}, - {0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2}, - {0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73}, - {0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb}, - {0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79}, - {0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08}, - {0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a}, - {0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e}, - {0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf}, - {0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16} - }; - - - void init(const AESKeyLength keyLength); +/*Inverse S-Box*/ +const unsigned char invSBox[16][16] = { + {0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, + 0x81, 0xf3, 0xd7, 0xfb}, + {0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, + 0xc4, 0xde, 0xe9, 0xcb}, + {0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, + 0x42, 0xfa, 0xc3, 0x4e}, + {0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, + 0x6d, 0x8b, 0xd1, 0x25}, + {0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, + 0x5d, 0x65, 0xb6, 0x92}, + {0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, + 0xa7, 0x8d, 0x9d, 0x84}, + {0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, + 0xb8, 0xb3, 0x45, 0x06}, + {0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, + 0x01, 0x13, 0x8a, 0x6b}, + {0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, + 0xf0, 0xb4, 0xe6, 0x73}, + {0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, + 0x1c, 0x75, 0xdf, 0x6e}, + {0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, + 0xaa, 0x18, 0xbe, 0x1b}, + {0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, + 0x78, 0xcd, 0x5a, 0xf4}, + {0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, + 0x27, 0x80, 0xec, 0x5f}, + {0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, + 0x93, 0xc9, 0x9c, 0xef}, + {0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, + 0x83, 0x53, 0x99, 0x61}, + {0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, + 0x55, 0x21, 0x0c, 0x7d}}; - // Encrypt the input data using the provided key - void encrypt(const unsigned char in[], unsigned int inLen, unsigned char* key, unsigned char* &out, unsigned int &outLen, const unsigned char *iv); +/*S-Box*/ +const unsigned char sBox[16][16] = { + {0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, + 0xfe, 0xd7, 0xab, 0x76}, + {0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, + 0x9c, 0xa4, 0x72, 0xc0}, + {0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, + 0x71, 0xd8, 0x31, 0x15}, + {0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, + 0xeb, 0x27, 0xb2, 0x75}, + {0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, + 0x29, 0xe3, 0x2f, 0x84}, + {0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, + 0x4a, 0x4c, 0x58, 0xcf}, + {0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, + 0x50, 0x3c, 0x9f, 0xa8}, + {0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, + 0x10, 0xff, 0xf3, 0xd2}, + {0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, + 0x64, 0x5d, 0x19, 0x73}, + {0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, + 0xde, 0x5e, 0x0b, 0xdb}, + {0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, + 0x91, 0x95, 0xe4, 0x79}, + {0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, + 0x65, 0x7a, 0xae, 0x08}, + {0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, + 0x4b, 0xbd, 0x8b, 0x8a}, + {0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, + 0x86, 0xc1, 0x1d, 0x9e}, + {0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, + 0xce, 0x55, 0x28, 0xdf}, + {0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, + 0xb0, 0x54, 0xbb, 0x16}}; - // Decrypt the input data using the provided key - void decrypt(const unsigned char in[], unsigned int inLen, unsigned char* key, unsigned char* &out, unsigned int &outLen, const unsigned char *iv); - //Generate new ranom key; - unsigned char* generateKey(AESKeyLength keyLength); +/*Encrypt the input data using the provided key*/ +void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, AESKeyLength keyLength); +void encryptAES(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen ,AESKeyLength keyLength); +/*Decrypt the input data using the provided key*/ +void decrypt(const unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, AESKeyLength keyLength); + +void decryptAES(const unsigned char in[], unsigned int inLen, + unsigned char *key, unsigned char *&out, unsigned int &outLen, AESKeyLength keyLength); +/*Generate new ranom key*/ +unsigned char *generateKey(AESKeyLength keyLength); #endif \ No newline at end of file diff --git a/src/aes.cpp b/src/aes.cpp index d339ce62..3f38d2b5 100644 --- a/src/aes.cpp +++ b/src/aes.cpp @@ -1,60 +1,74 @@ #include "../include/aes.h" #include #include +#include +#ifdef USE_SYCL +#include +#include +#include +#include +#include +#include +using namespace cl::sycl; +#endif -unsigned int numWord; -unsigned int numRound; -unsigned int keySize; -AESKeyLength keyLength; +void generateRandomIV(unsigned char* iv) +{ + std::random_device rd; + std::mt19937 gen(rd()); + std::uniform_int_distribution<> dis(0, 255); + for (unsigned int i = 0; i < 16; i++) + iv[i] = static_cast(dis(gen)); +} -/* - Constructor for AES class - Initializes the number of words (numWord) and number of rounds (numRound) - based on the provided AES key length (128, 192, or 256 bits). -*/ -void init(const AESKeyLength keyLengthUser) -{ - keyLength = keyLengthUser; - switch (keyLength) { - case AESKeyLength::AES_128: - numWord = 4; - numRound = 10; - break; - case AESKeyLength::AES_192: - numWord = 6; - numRound = 12; - break; - case AESKeyLength::AES_256: - numWord = 8; - numRound = 14; - break; - } +/** + @brief Pads the input message to ensure it is a multiple of the block size. + @param message The message to be padded. + @param length The original length of the message. + @param paddedLength The length of the padded message. + */ +void padMessage(unsigned char *&message, unsigned int &length, + unsigned int &paddedLength) +{ + size_t originalLength = length; + + paddedLength = + ((originalLength + BLOCK_BYTES_LEN - 1) / BLOCK_BYTES_LEN) * BLOCK_BYTES_LEN; + unsigned char *paddedMessage = new unsigned char[paddedLength]; + + memcpy(paddedMessage, message, originalLength); + + unsigned char paddingValue = + static_cast(paddedLength - originalLength); + for (size_t i = originalLength; i < paddedLength; i++) + paddedMessage[i] = paddingValue; + + message = paddedMessage; + length = paddedLength; } -/* -Generates a random AES key of the specified length -`keyLength` - length of the key (128, 192, or 256 bits) -Returns a pointer to the generated key. +/** + @brief Removes padding from the message. + @param message The padded message. + @param length The length of the padded message, which will be updated to the unpadded length. */ -unsigned char* generateKey(AESKeyLength keyLength) -{ - int keySize; - switch (keyLength) { - case AESKeyLength::AES_128: - keySize = 16; - break; - case AESKeyLength::AES_192: - keySize = 24; - break; - case AESKeyLength::AES_256: - keySize = 32; - break; - default: - throw std::invalid_argument("Invalid AES key length"); - } +void unpadMessage(unsigned char *message, unsigned int &length) +{ + size_t originalLength = length; + unsigned char paddingValue = message[originalLength - 1]; + length = originalLength - paddingValue; +} + +/** + @brief Generates a random AES key of the specified length. + @param keyLength The length of the key (128, 192, or 256 bits). + @return A pointer to the generated key. + */ +unsigned char *generateKey(AESKeyLength keyLength) +{ // Allocate memory for the key - unsigned char *key = new unsigned char[keySize]; + unsigned char *key = new unsigned char[aesKeyLengthData[keyLength].keySize]; // Initialize a random device and a random number generator std::random_device rd; @@ -62,94 +76,602 @@ unsigned char* generateKey(AESKeyLength keyLength) std::uniform_int_distribution dis(0, 255); // Fill the key with random bytes - for (int i = 0; i < keySize; i++) + for (int i = 0; i < aesKeyLengthData[keyLength].keySize; i++) key[i] = dis(gen); return key; } -/* - Encrypts the input data using the provided key. - `in` - input data to be encrypted - `inLen` - length of the input data - `key` - encryption key - Returns a pointer to the encrypted data. +/** + @brief Encrypts a message using AES. + @param in The input message to be encrypted. + @param inLen The length of the input message. + @param key The encryption key. + @param out The encrypted output message. + @param outLen The length of the encrypted message. */ -void encrypt(const unsigned char in[], unsigned int inLen, unsigned char* key, unsigned char* &out, unsigned int &outLen, const unsigned char *iv) +void encryptAES(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, AESKeyLength keyLength) +{ + unsigned char *iv = new unsigned char[16]; + generateRandomIV(iv); + encrypt(in, inLen, key, out, outLen, iv, keyLength); + unsigned char *newOut = new unsigned char[outLen + 16]; + memcpy(newOut, out, outLen); + memcpy(newOut + outLen, iv, 16); + delete[] out; + out = newOut; + outLen += 16; +} + +/** + @brief Decrypts a message using AES. + @param in The input message to be decrypted. + @param inLen The length of the input message. + @param key The decryption key. + @param out The decrypted output message. + @param outLen The length of the decrypted message. + */ +void decryptAES(const unsigned char in[], unsigned int inLen, + unsigned char *key, unsigned char *&out, unsigned int &outLen, AESKeyLength keyLength) +{ + unsigned int messageLen = inLen - 16; + decrypt(in, messageLen, key, out, outLen, in + messageLen, keyLength); +} + +/** + @brief Decrypts a message block using the provided key and IV. + @param in The input message block to be decrypted. + @param inLen The length of the input block. + @param key The decryption key. + @param out The decrypted output block. + @param outLen The length of the decrypted block. + @param iv The initialization vector. + */ +void decrypt(const unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv,AESKeyLength keyLength) { checkLength(inLen); unsigned char block[BLOCK_BYTES_LEN]; outLen = inLen; out = new unsigned char[outLen]; - unsigned char* roundKeys = new unsigned char[(numRound + 1) * NUM_BLOCKS * 4]; - keyExpansion(key, roundKeys); + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + keyExpansion(key, roundKeys, keyLength); memcpy(block, iv, BLOCK_BYTES_LEN); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN){ - xorBlocks(block, in + i, block, BLOCK_BYTES_LEN); - encryptBlock(block, out + i, roundKeys); - memcpy(block, out + i, BLOCK_BYTES_LEN); + + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + decryptBlock(in + i, out + i, roundKeys, keyLength); + xorBlocks(block, out + i, out + i, BLOCK_BYTES_LEN); + memcpy(block, in + i, BLOCK_BYTES_LEN); } + unpadMessage(out, outLen); delete[] roundKeys; } -/* - Decrypts the input data using the provided key. - `in` - input data to be decrypted - `inLen` - length of the input data -`key` - decryption key -*/ -void decrypt(const unsigned char in[], unsigned int inLen, unsigned char* key, unsigned char* &out, unsigned int &outLen, const unsigned char *iv) +/** + @brief Encrypts a message block using the provided key and IV. + @param in The input message block to be encrypted. + @param inLen The length of the input block. + @param key The encryption key. + @param out The encrypted output block. + @param outLen The length of the encrypted block. + @param iv The initialization vector. + */ +void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) { - checkLength(inLen); + padMessage(in, inLen, outLen); unsigned char block[BLOCK_BYTES_LEN]; - outLen = inLen; out = new unsigned char[outLen]; - unsigned char* roundKeys = new unsigned char[(numRound + 1) * NUM_BLOCKS * 4]; - keyExpansion(key, roundKeys); + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + keyExpansion(key, roundKeys, keyLength); memcpy(block, iv, BLOCK_BYTES_LEN); - - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN){ - decryptBlock(in + i, out + i, roundKeys); - xorBlocks(block, out + i, out + i, BLOCK_BYTES_LEN); - memcpy(block, in + i, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + xorBlocks(block, in + i, block, BLOCK_BYTES_LEN); + encryptBlock(block, out + i, roundKeys, keyLength); + memcpy(block, out + i, BLOCK_BYTES_LEN); } delete[] roundKeys; } -/* - Checks if the input length is a multiple of the block length. - Throws an exception if the length is invalid. -*/ -void checkLength(unsigned int len) +/** + @brief Checks if the input length is a multiple of the block length. + @param len The length of the input data. + @throws std::length_error if the length is not a multiple of the block length. + */ +void checkLength(unsigned int len) { - if (len % BLOCK_BYTES_LEN != 0) - throw std::length_error("Plaintext length must be divisible by " + - std::to_string(BLOCK_BYTES_LEN)); + if (len % BLOCK_BYTES_LEN != 0) + throw std::length_error("Plaintext length must be divisible by " + + std::to_string(BLOCK_BYTES_LEN)); } +#ifdef USE_SYCL + +/** + @brief Encrypts a single block of data using SYCL. + @param in The input block to be encrypted. + @param out The output block to store the encrypted data. + @param roundKeys The expanded key for encryption. + */ +void encryptBlock(const unsigned char in[], unsigned char out[], + unsigned char *roundKeys, AESKeyLength keyLength) +{ + queue queue; + // State array initialization + unsigned char state[4][NUM_BLOCKS]; + + // Buffers for SYCL + buffer in_buf(in, range<1>(4 * NUM_BLOCKS)); + buffer state_buf( + reinterpret_cast(state), + range<1>(4 * NUM_BLOCKS)); + buffer roundKeys_buf( + roundKeys, range<1>(4 * (aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS)); + buffer out_buf(out, range<1>(4 * NUM_BLOCKS)); + + // Initialize state array with input block + queue.submit([&](handler &handler) { + auto in_acc = in_buf.get_access(handler); + auto state_acc = state_buf.get_access(handler); + handler.parallel_for(range<1>(4 * NUM_BLOCKS), [=](id<1> idx) { + unsigned int i = idx % 4; // Row + unsigned int j = idx / 4; // Column + state_acc[i * NUM_BLOCKS + j] = in_acc[i + 4 * j]; + }); + }).wait(); + + // Initial round key addition + addRoundKey(state, roundKeys); + + // Main rounds + for (unsigned int round = 1; round < aesKeyLengthData[keyLength].numRound; round++) { + subBytes(state); + shiftRows(state); + mixColumns(state); + addRoundKey(state, roundKeys + round * 4 * NUM_BLOCKS); + } + + // Final round + subBytes(state); + shiftRows(state); + addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * 4 * NUM_BLOCKS); + + // Copy state array to output block + queue.submit([&](handler &handler) { + auto state_acc = state_buf.get_access(handler); + auto out_acc = out_buf.get_access(handler); + handler.parallel_for(range<1>(4 * NUM_BLOCKS), [=](id<1> idx) { + unsigned int i = idx % 4; // Row + unsigned int j = idx / 4; // Column + out_acc[i + 4 * j] = state_acc[i * NUM_BLOCKS + j]; + }); + }).wait(); +} + +/** + @brief Decrypts a single block of data using SYCL. + Uses SYCL to perform AES decryption on the input block and stores the result in the output block. + @param in Input block to be decrypted. + @param[out] out Output block to store the decrypted data. + @param roundKeys Expanded key for decryption. + */ +void decryptBlock(const unsigned char in[], unsigned char out[], + unsigned char *roundKeys, AESKeyLength keyLength) +{ + unsigned char state[4][NUM_BLOCKS]; + unsigned int i, j, round; + + // Initialize state array with input block + for (i = 0; i < 4; i++) + for (j = 0; j < NUM_BLOCKS; j++) + state[i][j] = in[i + 4 * j]; + + // Initial round key addition + addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * 4 * NUM_BLOCKS); + + // Main rounds + for (round = aesKeyLengthData[keyLength].numRound - 1; round >= 1; round--) { + invSubBytes(state); + invShiftRows(state); + addRoundKey(state, roundKeys + round * 4 * NUM_BLOCKS); + invMixColumns(state); + } + + // Final round + invSubBytes(state); + invShiftRows(state); + addRoundKey(state, roundKeys); + + // Copy state array to output block + for (i = 0; i < 4; i++) + for (j = 0; j < NUM_BLOCKS; j++) + out[i + 4 * j] = state[i][j]; +} + +/** + @brief Multiplies a byte by x in GF(2^8). + Multiplies the input byte by 2 in GF(2^8) and applies the irreducible polynomial if necessary. + @param b Input byte. + @return Result of the multiplication. + */ + unsigned char xtime(unsigned char b) +{ + return (b << 1) ^ (((b >> 7) & 1) * 0x1b); +} + +/** + @brief Multiplies two bytes in GF(2^8). + Multiplies two bytes using the Galois field (GF) arithmetic. + @param x First byte. + @param y Second byte. + @return Result of the multiplication. + */ + unsigned char multiply(unsigned char x, unsigned char y) +{ + unsigned char result = 0; + unsigned char temp = y; + for (int i = 0; i < 8; i++) { + if (x & 1) + result ^= temp; + bool carry = temp & 0x80; + temp <<= 1; + if (carry) + temp ^= 0x1b; + x >>= 1; + } + return result; +} + +/** + @brief Applies the SubBytes transformation using SYCL. + Substitutes bytes in the state array using the S-box. + @param state 2D array representing the state of the AES block. + */ +void subBytes(unsigned char state[4][NUM_BLOCKS]) +{ + queue queue; + buffer stateBuffer(state[0], + range<2>(4, NUM_BLOCKS)); + buffer sBoxBuffer(sBox[0], range<2>(16, 16)); + queue.submit([&](handler &handler) { + auto stateAcc = + stateBuffer.get_access(handler); + auto sBoxAcc = sBoxBuffer.get_access(handler); + handler.parallel_for( + range<2>(4, NUM_BLOCKS), [=](id<2> id) { + size_t i = id[0]; + size_t j = id[1]; + stateAcc[i][j] = sBoxAcc[state[i][j] / 16][state[i][j] % 16]; + }); + }).wait(); +} + +/** + @brief Applies the ShiftRows transformation using SYCL. + Shifts the rows of the state array in the AES block. + @param state 2D array representing the state of the AES block. + */ +void shiftRows(unsigned char state[4][NUM_BLOCKS]) +{ + queue queue; + queue.submit([&](handler &handler) { + handler.parallel_for(range<1>(4), [=](id<1> i) { + unsigned char tmp[NUM_BLOCKS]; + for (size_t k = 0; k < NUM_BLOCKS; k++) + tmp[k] = state[i][(k + i) % NUM_BLOCKS]; + for (size_t k = 0; k < NUM_BLOCKS; k++) + state[i][k] = tmp[k]; + }); + }).wait(); +} + +/** + @brief Applies the MixColumns transformation using SYCL. + Mixes the columns of the state array in the AES block. + @param state 2D array representing the state of the AES block. + */ +void mixColumns(unsigned char state[4][NUM_BLOCKS]) +{ + queue queue; + + queue.parallel_for(range<1>(4), [=](id<1> idx) { + size_t i = idx[0]; + unsigned char a[4]; + unsigned char b[4]; + + for (size_t j = 0; j < 4; j++) { + a[j] = state[j][i]; + b[j] = xtime(state[j][i]); + } + + state[0][i] = b[0] ^ a[1] ^ b[1] ^ a[2] ^ a[3]; + state[1][i] = a[0] ^ b[1] ^ a[2] ^ b[2] ^ a[3]; + state[2][i] = a[0] ^ a[1] ^ b[2] ^ a[3] ^ b[3]; + state[3][i] = b[0] ^ a[0] ^ a[1] ^ a[2] ^ b[3]; + }).wait(); +} + +/** + @brief Applies the AddRoundKey transformation using SYCL. + XORs the state array with the round key in the AES block. + @param state 2D array representing the state of the AES block. + @param roundKey Round key to be XORed with the state array. + */ +void addRoundKey(unsigned char state[4][NUM_BLOCKS], unsigned char *roundKey) +{ + queue queue; + buffer stateBuffer(state[0], + range<2>(4, NUM_BLOCKS)); + buffer roundKeyBuffer( + roundKey, range<1>(4 * NUM_BLOCKS)); + + queue.submit([&](handler &handler) { + auto stateAcc = + stateBuffer.get_access(handler); + auto roundKeyAcc = + roundKeyBuffer.get_access(handler); + + handler.parallel_for( + range<2>(4, NUM_BLOCKS), [=](id<2> id) { + size_t i = id[0]; + size_t j = id[1]; + stateAcc[i][j] ^= roundKeyAcc[i + 4 * j]; + }); + }).wait(); +} + +/** + @brief Applies the SubWord transformation using SYCL. + Substitutes bytes in a word using the S-box. + @param a Array representing the word to be transformed. + */ +void subWord(unsigned char a[4]) +{ + queue queue; + buffer aBuffer(a, range<1>(4)); + buffer sBoxBuffer(sBox[0], range<2>(16, 16)); + + queue.submit([&](handler &handler) { + auto aAcc = aBuffer.get_access(handler); + auto sBoxAcc = sBoxBuffer.get_access(handler); + + handler.parallel_for( + range<1>(4), [=](id<1> id) { + size_t i = id[0]; + aAcc[i] = sBoxAcc[aAcc[i] / 16][aAcc[i] % 16]; + }); + }).wait(); +} + +/** + @brief Rotates a word (4 bytes) using SYCL. + Performs a circular rotation of a word. + @param word Pointer to the word to be rotated. + */ +void rotWord(unsigned char *word) +{ + queue queue; + buffer wordBuffer(word, range<1>(4)); + + queue.submit([&](handler &handler) { + auto wordAcc = + wordBuffer.get_access(handler); + + handler.single_task([=]() { + unsigned char temp = wordAcc[0]; + wordAcc[0] = wordAcc[1]; + wordAcc[1] = wordAcc[2]; + wordAcc[2] = wordAcc[3]; + wordAcc[3] = temp; + }); + }).wait(); +} + +/** + @brief Applies the Rcon transformation using SYCL. + Generates the Rcon value for key expansion based on the round number. + @param a Array to store the Rcon value. + @param n Round number. + */ +void rconWord(unsigned char a[4], unsigned int n) +{ + queue queue; + unsigned char strong = 1; + for (size_t i = 0; i < n - 1; i++) + strong = xtime(strong); + + queue.parallel_for(range<1>(4), [=](id<1> idx) { + size_t i = idx[0]; + if (i == 0) { + a[i] = strong; + } + else { + a[i] = 0; + } + }).wait(); +} + +/** + @brief Expands the AES key for encryption/decryption using SYCL. + Generates the round keys from the original key. + @param key Original AES key. + @param w Output array to store the expanded key. + */ +void keyExpansion(const unsigned char *key, unsigned char w[], AESKeyLength keyLength) +{ + queue queue; + unsigned int numWordLocal = aesKeyLengthData[keyLength].numWord; + + unsigned int NUM_BLOCKSLocal = NUM_BLOCKS; + unsigned int numRoundLocal = aesKeyLengthData[keyLength].numRound; + // Copy the initial key to the output array + queue.submit([&](handler &handler) { + handler.parallel_for(range<1>(4 * numWordLocal), + [=](id<1> idx) { w[idx] = key[idx]; }); + }).wait(); + + unsigned int i = 4 * numWordLocal; + + while (i < 4 * NUM_BLOCKSLocal * (numRoundLocal + 1)) { + unsigned char temp[4]; + buffer temp_buf(temp, range<1>(4)); + + queue.submit([&](handler &handler) { + auto temp_acc = + temp_buf.get_access(handler); + handler.parallel_for(range<1>(4), [=](id<1> idx) { + temp_acc[idx] = w[i - 4 + idx]; + }); + }).wait(); + + if (i / 4 % numWordLocal == 0) { + // Use SYCL to execute rotWord and subWord + rotWord(temp); + subWord(temp); + unsigned char rcon[4]; + rconWord(rcon, i / (numWordLocal * 4)); + + for (int k = 0; k < 4; k++) + temp[k] ^= rcon[k]; + } + else if (numWordLocal > 6 && i / 4 % numWordLocal == 4) + subWord(temp); + + queue.submit([&](handler &handler) { + auto temp_acc = + temp_buf.get_access(handler); + handler.parallel_for(range<1>(4), [=](id<1> idx) { + w[i + idx] = w[i + idx - 4 * numWordLocal] ^ temp_acc[idx]; + }); + }).wait(); + + i += 4; + } +} + +/** + Applies the InvSubBytes transformation using the inverse S-box. + This function replaces each byte in the state matrix with its + corresponding byte from the inverse S-box. + @param state 4xN matrix of state bytes to be transformed. + */ +void invSubBytes(unsigned char state[4][NUM_BLOCKS]) +{ + queue queue; + buffer stateBuffer(state[0], + range<2>(4, NUM_BLOCKS)); + buffer invSBoxBuffer(invSBox[0], + range<2>(16, 16)); + + queue.submit([&](handler &handler) { + auto stateAcc = + stateBuffer.get_access(handler); + auto invSBoxAcc = + invSBoxBuffer.get_access(handler); + + handler.parallel_for( + range<2>(4, NUM_BLOCKS), [=](id<2> id) { + size_t i = id[0]; + size_t j = id[1]; + stateAcc[i][j] = + invSBoxAcc[state[i][j] / 16][state[i][j] % 16]; + }); + }).wait(); +} + +/*Applies the InvMixColumns transformation*/ +void invMixColumns(unsigned char state[4][NUM_BLOCKS]) +{ + queue queue; + queue.parallel_for(range<1>(NUM_BLOCKS), [=](id<1> idx) { + size_t i = idx[0]; + unsigned char a[4]; + unsigned char b[4]; + + for (size_t j = 0; j < 4; j++) { + a[j] = state[j][i]; + b[j] = xtime(a[j]); + } + + state[0][i] = multiply(0x0e, a[0]) ^ multiply(0x0b, a[1]) ^ + multiply(0x0d, a[2]) ^ multiply(0x09, a[3]); + state[1][i] = multiply(0x09, a[0]) ^ multiply(0x0e, a[1]) ^ + multiply(0x0b, a[2]) ^ multiply(0x0d, a[3]); + state[2][i] = multiply(0x0d, a[0]) ^ multiply(0x09, a[1]) ^ + multiply(0x0e, a[2]) ^ multiply(0x0b, a[3]); + state[3][i] = multiply(0x0b, a[0]) ^ multiply(0x0d, a[1]) ^ + multiply(0x09, a[2]) ^ multiply(0x0e, a[3]); + }).wait(); +} + +/** + Applies the InvShiftRows transformation. + This function performs a cyclic shift of the rows in the state matrix + in the reverse direction for decryption. + @param state 4xN matrix of state bytes to be transformed. + */ +void invShiftRows(unsigned char state[4][NUM_BLOCKS]) +{ + queue queue; + queue.submit([&](handler &handler) { + handler.parallel_for(range<1>(4), [=](id<1> i) { + unsigned char tmp[NUM_BLOCKS]; + for (size_t k = 0; k < NUM_BLOCKS; k++) + tmp[k] = state[i][(k - i + NUM_BLOCKS) % NUM_BLOCKS]; + for (size_t k = 0; k < NUM_BLOCKS; k++) + state[i][k] = tmp[k]; + }); + }).wait(); +} + +/** XORs two blocks of bytes a and b of length len, storing the result in c. */ +void xorBlocks(const unsigned char *a, const unsigned char *b, unsigned char *c, + unsigned int len) +{ + queue queue; + + buffer bufA(a, range<1>(len)); + buffer bufB(b, range<1>(len)); + buffer bufC(c, range<1>(len)); + + queue.submit([&](handler &handler) { + auto accA = bufA.get_access(handler); + auto accB = bufB.get_access(handler); + auto accC = bufC.get_access(handler); + + handler.parallel_for(range<1>(len), + [=](id<1> idx) { accC[idx] = accA[idx] ^ accB[idx]; }); + }).wait(); +} + +#else /* Encrypts a single block of data. `in` - input block to be encrypted `out` - output block to store the encrypted data `roundKeys` - expanded key for encryption */ -void encryptBlock(const unsigned char in[],unsigned char out[], unsigned char* roundKeys) +void encryptBlock(const unsigned char in[], unsigned char out[], + unsigned char *roundKeys, AESKeyLength keyLength) { unsigned char state[4][NUM_BLOCKS]; unsigned int i, j, round; // Initialize state array with input block - for (i = 0; i < 4; i++) - for (j = 0; j < NUM_BLOCKS; j++) + for (i = 0; i < 4; i++) + for (j = 0; j < NUM_BLOCKS; j++) state[i][j] = in[i + 4 * j]; // Initial round key addition addRoundKey(state, roundKeys); // Main rounds - for (round = 1; round < numRound; round++) { + for (round = 1; round < aesKeyLengthData[keyLength].numRound; round++) { subBytes(state); shiftRows(state); mixColumns(state); @@ -159,12 +681,12 @@ void encryptBlock(const unsigned char in[],unsigned char out[], unsigned char* r // Final round subBytes(state); shiftRows(state); - addRoundKey(state, roundKeys + numRound * 4 * NUM_BLOCKS); - + addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * 4 * NUM_BLOCKS); + // Copy state array to output block - for (i = 0; i < 4; i++) - for (j = 0; j < NUM_BLOCKS; j++) - out[i + 4 * j] = state[i][j]; + for (i = 0; i < 4; i++) + for (j = 0; j < NUM_BLOCKS; j++) + out[i + 4 * j] = state[i][j]; } /* @@ -173,7 +695,8 @@ void encryptBlock(const unsigned char in[],unsigned char out[], unsigned char* r `out` - output block to store the decrypted data `roundKeys` - expanded key for decryption */ -void decryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys) +void decryptBlock(const unsigned char in[], unsigned char out[], + unsigned char *roundKeys, AESKeyLength keyLength) { unsigned char state[4][NUM_BLOCKS]; unsigned int i, j, round; @@ -184,10 +707,10 @@ void decryptBlock(const unsigned char in[], unsigned char out[], unsigned char* state[i][j] = in[i + 4 * j]; // Initial round key addition - addRoundKey(state, roundKeys + numRound * 4 * NUM_BLOCKS); + addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * 4 * NUM_BLOCKS); // Main rounds - for (round = numRound - 1; round >= 1; round--) { + for (round = aesKeyLengthData[keyLength].numRound - 1; round >= 1; round--) { invSubBytes(state); invShiftRows(state); addRoundKey(state, roundKeys + round * 4 * NUM_BLOCKS); @@ -205,14 +728,14 @@ void decryptBlock(const unsigned char in[], unsigned char out[], unsigned char* out[i + 4 * j] = state[i][j]; } -/* Multiplies a byte by x in GF(2^8) */ -unsigned char xtime(unsigned char b) +/*Multiplies a byte by x in GF(2^8)*/ +unsigned char xtime(unsigned char b) { return (b << 1) ^ (((b >> 7) & 1) * 0x1b); } -/* Multiplies two bytes in GF(2^8) */ -unsigned char multiply(unsigned char x, unsigned char y) +/*Multiplies two bytes in GF(2^8)*/ +unsigned char multiply(unsigned char x, unsigned char y) { unsigned char result = 0; unsigned char temp = y; @@ -228,7 +751,7 @@ unsigned char multiply(unsigned char x, unsigned char y) return result; } -/* Apply SubBytes transformation using the S-box */ +/*Apply SubBytes transformation using the S-box*/ void subBytes(unsigned char state[4][NUM_BLOCKS]) { for (size_t i = 0; i < 4; i++) @@ -236,10 +759,10 @@ void subBytes(unsigned char state[4][NUM_BLOCKS]) state[i][j] = sBox[state[i][j] / 16][state[i][j] % 16]; } -/* ShiftRows transformation */ -void shiftRows(unsigned char state[4][NUM_BLOCKS]) +/*ShiftRows transformation*/ +void shiftRows(unsigned char state[4][NUM_BLOCKS]) { - for (size_t i = 0; i < 4; i++) { + for (size_t i = 0; i < 4; i++) { unsigned char tmp[NUM_BLOCKS]; for (size_t k = 0; k < NUM_BLOCKS; k++) tmp[k] = state[i][(k + i) % NUM_BLOCKS]; @@ -247,8 +770,8 @@ void shiftRows(unsigned char state[4][NUM_BLOCKS]) } } -/* MixColumns transformation */ -void mixColumns(unsigned char state[4][NUM_BLOCKS]) +/*MixColumns transformation*/ +void mixColumns(unsigned char state[4][NUM_BLOCKS]) { for (size_t i = 0; i < 4; i++) { unsigned char a[4]; @@ -264,8 +787,8 @@ void mixColumns(unsigned char state[4][NUM_BLOCKS]) } } -/* AddRoundKey transformation */ -void addRoundKey(unsigned char state[4][NUM_BLOCKS], unsigned char *key) +/*AddRoundKey transformation*/ +void addRoundKey(unsigned char state[4][NUM_BLOCKS], unsigned char *key) { unsigned int i, j; for (i = 0; i < 4; i++) @@ -273,15 +796,15 @@ void addRoundKey(unsigned char state[4][NUM_BLOCKS], unsigned char *key) state[i][j] = state[i][j] ^ key[i + 4 * j]; } -/* Applies the SubWord transformation using the S-box */ -void subWord(unsigned char a[4]) +/*Applies the SubWord transformation using the S-box*/ +void subWord(unsigned char a[4]) { for (size_t i = 0; i < 4; i++) a[i] = sBox[a[i] / 16][a[i] % 16]; } -/* Rotates a word (4 bytes) */ -void rotWord(unsigned char a[4]) +/*Rotates a word (4 bytes)*/ +void rotWord(unsigned char a[4]) { unsigned char first = a[0]; for (size_t i = 0; i < 3; i++) @@ -289,8 +812,8 @@ void rotWord(unsigned char a[4]) a[3] = first; } -/* Applies the Rcon transformation */ -void rconWord(unsigned char a[4], unsigned int n) +/*Applies the Rcon transformation*/ +void rconWord(unsigned char a[4], unsigned int n) { unsigned char strong = 1; for (size_t i = 0; i < n - 1; i++) @@ -300,57 +823,56 @@ void rconWord(unsigned char a[4], unsigned int n) a[1] = a[2] = a[3] = 0; } -/* Expands the key for AES encryption/decryption */ -void keyExpansion(const unsigned char* key, unsigned char w[]) +/*Expands the key for AES encryption/decryption*/ +void keyExpansion(const unsigned char *key, unsigned char w[], AESKeyLength keyLength) { unsigned char temp[4], rcon[4]; unsigned int i = 0; //copy key to w array - while (i < 4 * numWord) { + while (i < 4 * aesKeyLengthData[keyLength].numWord) { w[i] = key[i]; i++; } - i = 4 * numWord; + i = 4 * aesKeyLengthData[keyLength].numWord; //main expansion loop - while (i < 4 * NUM_BLOCKS * (numRound + 1)) { - - for (size_t k =4 , j = 0; k > 0; --k, ++j) + while (i < 4 * NUM_BLOCKS * (aesKeyLengthData[keyLength].numRound + 1)) { + for (size_t k = 4, j = 0; k > 0; --k, ++j) temp[j] = w[i - k]; - if (i / 4 % numWord == 0) { + if (i / 4 % aesKeyLengthData[keyLength].numWord == 0) { rotWord(temp); subWord(temp); - rconWord(rcon, i / (numWord * 4)); + rconWord(rcon, i / (aesKeyLengthData[keyLength].numWord * 4)); for (int i = 0; i < 4; i++) temp[i] = temp[i] ^ rcon[i]; } - else if (numWord > 6 && i / 4 % numWord == 4) + else if (aesKeyLengthData[keyLength].numWord > 6 && i / 4 % aesKeyLengthData[keyLength].numWord == 4) subWord(temp); for (int k = 0; k < 4; k++) - w[i + k] = w[i + k - 4 * numWord] ^ temp[k]; + w[i + k] = w[i + k - 4 * aesKeyLengthData[keyLength].numWord] ^ temp[k]; i += 4; } } -/* Applies the InvSubBytes transformation using the inverse S-box */ -void invSubBytes(unsigned char state[4][NUM_BLOCKS]) +/*Applies the InvSubBytes transformation using the inverse S-box*/ +void invSubBytes(unsigned char state[4][NUM_BLOCKS]) { - unsigned int i, j; - unsigned char t; - for (i = 0; i < 4; i++) - for (j = 0; j < NUM_BLOCKS; j++) { - t = state[i][j]; - state[i][j] = invSBox[t / 16][t % 16]; - } + unsigned int i, j; + unsigned char t; + for (i = 0; i < 4; i++) + for (j = 0; j < NUM_BLOCKS; j++) { + t = state[i][j]; + state[i][j] = invSBox[t / 16][t % 16]; + } } -/* Applies the InvMixColumns transformation */ +/*Applies the InvMixColumns transformation*/ void invMixColumns(unsigned char state[4][NUM_BLOCKS]) { for (size_t i = 0; i < NUM_BLOCKS; i++) { @@ -371,10 +893,10 @@ void invMixColumns(unsigned char state[4][NUM_BLOCKS]) } } -/* Applies the InvShiftRows transformation */ +/*Applies the InvShiftRows transformation*/ void invShiftRows(unsigned char state[4][NUM_BLOCKS]) { - for (size_t i = 0; i < 4; i++) { + for (size_t i = 0; i < 4; i++) { unsigned char tmp[NUM_BLOCKS]; for (size_t k = 0; k < NUM_BLOCKS; k++) tmp[k] = state[i][(k - i + NUM_BLOCKS) % NUM_BLOCKS]; @@ -383,10 +905,11 @@ void invShiftRows(unsigned char state[4][NUM_BLOCKS]) } /** XORs two blocks of bytes a and b of length len, storing the result in c. */ -void xorBlocks(const unsigned char *a, const unsigned char *b, - unsigned char *c, unsigned int len) - { - for (unsigned int i = 0; i < len; i++) { - c[i] = a[i] ^ b[i]; - } -} \ No newline at end of file +void xorBlocks(const unsigned char *a, const unsigned char *b, unsigned char *c, + unsigned int len) +{ + for (unsigned int i = 0; i < len; i++) { + c[i] = a[i] ^ b[i]; + } +} +#endif diff --git a/tests/aes_tests.cpp b/tests/aes_tests.cpp index b66ff868..5927f6f4 100644 --- a/tests/aes_tests.cpp +++ b/tests/aes_tests.cpp @@ -1,23 +1,22 @@ -#include +#include #include "gtest/gtest.h" #include "../include/aes.h" const unsigned int BLOCK_BYTES_LENGTH = 16 * sizeof(unsigned char); -// Tests for different key lengths +/*Tests for different key lengths*/ TEST(KeyLengths, KeyLength128) { - unsigned char plain[BLOCK_BYTES_LENGTH] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - unsigned char iv[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff}; - init(AESKeyLength::AES_128); - unsigned char* key = generateKey(AESKeyLength::AES_128); + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char *key = generateKey(AESKeyLength::AES_128); unsigned char *encrypted; unsigned int outLenEncrypted; - encrypt(plain, BLOCK_BYTES_LENGTH, key,encrypted, outLenEncrypted, iv); + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_128); unsigned char *decrypted; unsigned int outLenDecrypted; - decrypt(encrypted, BLOCK_BYTES_LENGTH, key,decrypted, outLenDecrypted, iv); + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_128); ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); delete[] encrypted; delete[] decrypted; @@ -25,19 +24,17 @@ TEST(KeyLengths, KeyLength128) TEST(KeyLengths, KeyLength192) { - unsigned char plain[BLOCK_BYTES_LENGTH] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - unsigned char iv[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff}; - init(AESKeyLength::AES_192); - unsigned char* key = generateKey(AESKeyLength::AES_192); + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char *key = generateKey(AESKeyLength::AES_192); unsigned char *encrypted; unsigned int outLenEncrypted; - encrypt(plain, BLOCK_BYTES_LENGTH, key,encrypted,outLenEncrypted,iv); + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_192); unsigned char *decrypted; unsigned int outLenDecrypted; - decrypt(encrypted, BLOCK_BYTES_LENGTH, key,decrypted,outLenDecrypted,iv); + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_192); ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); delete[] encrypted; delete[] decrypted; @@ -45,77 +42,42 @@ TEST(KeyLengths, KeyLength192) TEST(KeyLengths, KeyLength256) { - unsigned char plain[BLOCK_BYTES_LENGTH] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - unsigned char iv[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff}; - init(AESKeyLength::AES_256); - unsigned char* key = generateKey(AESKeyLength::AES_256); - unsigned char* encrypted; + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char *key = generateKey(AESKeyLength::AES_256); + unsigned char *encrypted; unsigned int outLenEncrypted; - encrypt(plain, BLOCK_BYTES_LENGTH, key,encrypted,outLenEncrypted,iv); - unsigned char *decrypted ; + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_256); + unsigned char *decrypted; unsigned int outLenDecrypted; - decrypt(encrypted, BLOCK_BYTES_LENGTH, key, decrypted, outLenDecrypted, iv); + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256); ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); delete[] encrypted; delete[] decrypted; } - -// Tests for encryption and decryption of one block +/*Tests for encryption and decryption with non 16 multiply length*/ TEST(CBC, EncryptDecryptOneBlock) { - unsigned char plain[BLOCK_BYTES_LENGTH] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - unsigned char iv[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff}; - init(AESKeyLength::AES_256); - unsigned char* key = generateKey(AESKeyLength::AES_256); + unsigned char plain[18] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, + 0xcc, 0xdd, 0xee, 0xff, 0xef, 0x03}; + + unsigned char *key = generateKey(AESKeyLength::AES_256); unsigned char *encrypted; unsigned int outLenEncrypted; - encrypt(plain, BLOCK_BYTES_LENGTH, key,encrypted,outLenEncrypted,iv); + encryptAES(plain, 17, key, encrypted, outLenEncrypted, AESKeyLength::AES_256); unsigned char *decrypted; unsigned int outLenDecrypted; - decrypt(encrypted, BLOCK_BYTES_LENGTH, key,decrypted,outLenDecrypted,iv); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256); + ASSERT_FALSE(memcmp(plain, decrypted, 17)); delete[] encrypted; delete[] decrypted; } -// Tests for encryption of one block with missing or extra bytes -TEST(CBC, OneBlockWithoutByteEncrypt) +int main(int argc, char **argv) { - unsigned char plain[15] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee}; // 15 bytes - unsigned char key[16] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; - unsigned char iv[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff}; - init(AESKeyLength::AES_128); - unsigned char* encrypted; - unsigned int outLen; - ASSERT_THROW(encrypt(plain, 15, key,encrypted,outLen,iv), std::length_error); // Expecting invalid_argument exception -} - -TEST(CBC, OneBlockExtraByteEncrypt) -{ - unsigned char plain[17] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, // 17 bytes - 0x01}; // Extra byte - unsigned char key[16] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; - unsigned char iv[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff}; - init(AESKeyLength::AES_128); - unsigned char* encrypted; - unsigned int outLen; - ASSERT_THROW(encrypt(plain, 17, key, encrypted, outLen, iv), std::length_error); // Expecting invalid_argument exception -} -int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } \ No newline at end of file From 2a1bbd4823ceb400700ac755ed41d12a5067cc68 Mon Sep 17 00:00:00 2001 From: rut-git Date: Tue, 3 Sep 2024 12:10:33 +0300 Subject: [PATCH 06/21] HSM: Add support for additional chaining modes --- CMakeLists.txt | 11 +- include/aes.h | 94 ++++++-- src/aes.cpp | 560 ++++++++++++++++++++++++++++++++------------ tests/aes_tests.cpp | 314 +++++++++++++++++++++++-- 4 files changed, 777 insertions(+), 202 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61b32b42..a370df95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,14 +2,7 @@ cmake_minimum_required(VERSION 3.10) project(MyTest) # Include directories include_directories(src) -# Find GMP library -find_path(GMP_INCLUDE_DIR NAMES gmp.h) -find_library(GMP_LIBRARY NAMES gmp) -find_library(GMPXX_LIBRARY NAMES gmpxx) -if(NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARY OR NOT GMPXX_LIBRARY) - message(FATAL_ERROR "Could not find GMP or GMPXX libraries") -endif() -include_directories(${GMP_INCLUDE_DIR}) + # Find Google Test find_package(GTest REQUIRED) # Add source files @@ -34,8 +27,6 @@ endif() add_executable(runTests tests/aes_tests.cpp ${SOURCES}) # Link libraries target_link_libraries(runTests - ${GMP_LIBRARY} - ${GMPXX_LIBRARY} GTest::GTest GTest::Main pthread diff --git a/include/aes.h b/include/aes.h index 5c1fe77f..838895e5 100644 --- a/include/aes.h +++ b/include/aes.h @@ -1,11 +1,21 @@ #ifndef _AES_H_ #define _AES_H_ - +#include #include #include +#include #include +#define AES_STATE_ROWS 4 #define NUM_BLOCKS 4 -#define BLOCK_BYTES_LEN (4 * (NUM_BLOCKS) * sizeof(unsigned char)) +#define BLOCK_BYTES_LEN (AES_STATE_ROWS * (NUM_BLOCKS) * sizeof(unsigned char)) + +enum AESChainingMode { + ECB, /*Electronic Codebook*/ + CBC, /*Cipher Block Chaining*/ + CFB, /*Cipher Feedback*/ + OFB, /*Output Feedback*/ + CTR /*Counter*/ +}; enum class AESKeyLength { @@ -13,12 +23,15 @@ enum class AESKeyLength AES_192, AES_256 }; + struct AESData { unsigned int numWord; unsigned int numRound; unsigned int keySize; }; + +typedef std::function EncryptDecryptFunc; static std::map aesKeyLengthData = { { AESKeyLength::AES_128, {4, 10, 128} }, { AESKeyLength::AES_192, {6, 12, 192} }, @@ -27,21 +40,21 @@ static std::map aesKeyLengthData = { void padMessage(unsigned char* &message, unsigned int& length, unsigned int& paddedLength); void unpadMessage(unsigned char* message, unsigned int& length); - void addRoundKey(unsigned char state[4][NUM_BLOCKS], unsigned char* roundKey); + void addRoundKey(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS], unsigned char* roundKey); void checkLength(unsigned int length); void encryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys, AESKeyLength keyLength); void decryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys, AESKeyLength keyLength); - void subBytes(unsigned char state[4][NUM_BLOCKS]); - void invSubBytes(unsigned char state[4][NUM_BLOCKS]); - void invShiftRows(unsigned char state[4][NUM_BLOCKS]); - void invMixColumns(unsigned char state[4][NUM_BLOCKS]); - void mixColumns(unsigned char state[4][NUM_BLOCKS]); - void shiftRows(unsigned char state[4][NUM_BLOCKS]); + void subBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); + void invSubBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); + void invShiftRows(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); + void invMixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); + void mixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); + void shiftRows(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); void keyExpansion(const unsigned char* key, unsigned char roundKeys[], AESKeyLength keyLength); unsigned char xtime(unsigned char x); - void rotWord(unsigned char word[4]); - void subWord(unsigned char word[4]); - void rconWord(unsigned char rcon[4], unsigned int n); + void rotWord(unsigned char word[AES_STATE_ROWS]); + void subWord(unsigned char word[AES_STATE_ROWS]); + void rconWord(unsigned char rcon[AES_STATE_ROWS], unsigned int n); unsigned char multiply(unsigned char x, unsigned char y); void xorBlocks(const unsigned char *a, const unsigned char *b, unsigned char *c, unsigned int len); @@ -116,21 +129,54 @@ const unsigned char sBox[16][16] = { {0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16}}; -/*Encrypt the input data using the provided key*/ -void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +void encryptECB(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, AESKeyLength keyLength); +void encryptCBC(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, AESKeyLength keyLength); +void encryptCFB(unsigned char in[], unsigned int inLen, unsigned char *key, unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength); +void encryptOFB(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength); +void encryptCTR(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength); void encryptAES(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen ,AESKeyLength keyLength); - -/*Decrypt the input data using the provided key*/ -void decrypt(const unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen ,AESKeyLength keyLength, AESChainingMode chainingMode); +void decryptECB(const unsigned char in[], unsigned int inLen, unsigned char *key, unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength); - -void decryptAES(const unsigned char in[], unsigned int inLen, - unsigned char *key, unsigned char *&out, unsigned int &outLen, AESKeyLength keyLength); - -/*Generate new ranom key*/ +void decryptCBC(const unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, AESKeyLength keyLength); +void decryptCFB(const unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, AESKeyLength keyLength); +void decryptOFB(const unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, AESKeyLength keyLength); +void decryptCTR(const unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, AESKeyLength keyLength); +void decryptAES(unsigned char in[], unsigned int inLen, + unsigned char *key, unsigned char *&out, unsigned int &outLen, AESKeyLength keyLength, AESChainingMode chainingMode); unsigned char *generateKey(AESKeyLength keyLength); -#endif \ No newline at end of file + +static std::map encryptFunctions = { + {ECB, encryptECB}, + {CBC, encryptCBC}, + {CFB, encryptCFB}, + {OFB, encryptOFB}, + {CTR, encryptCTR} +}; + +static std::map decryptFunctions = { + {ECB, decryptECB}, + {CBC, decryptCBC}, + {CFB, decryptCFB}, + {OFB, decryptOFB}, + {CTR, decryptCTR} +}; + +#endif diff --git a/src/aes.cpp b/src/aes.cpp index 3f38d2b5..47f1c3fc 100644 --- a/src/aes.cpp +++ b/src/aes.cpp @@ -1,7 +1,9 @@ #include "../include/aes.h" +#include #include #include #include + #ifdef USE_SYCL #include #include @@ -12,6 +14,16 @@ using namespace cl::sycl; #endif +/** + @brief Generates a random Initialization Vector (IV) for cryptographic purposes. + This function generates a 16-byte random IV, which is commonly used in cryptographic algorithms + such as AES (Advanced Encryption Standard) in CBC (Cipher Block Chaining) mode. + The IV ensures that the same plaintext block will result in a different ciphertext block + when encrypted with the same key. + @param iv Pointer to an array of 16 unsigned char (bytes) where the generated IV will be stored. + @note The function uses the C++ standard library's random number generator to produce + a uniformly distributed sequence of bytes. + */ void generateRandomIV(unsigned char* iv) { std::random_device rd; @@ -31,9 +43,7 @@ void padMessage(unsigned char *&message, unsigned int &length, unsigned int &paddedLength) { size_t originalLength = length; - - paddedLength = - ((originalLength + BLOCK_BYTES_LEN - 1) / BLOCK_BYTES_LEN) * BLOCK_BYTES_LEN; + paddedLength =((originalLength + BLOCK_BYTES_LEN - 1) / BLOCK_BYTES_LEN) * BLOCK_BYTES_LEN; unsigned char *paddedMessage = new unsigned char[paddedLength]; memcpy(paddedMessage, message, originalLength); @@ -66,7 +76,6 @@ void unpadMessage(unsigned char *message, unsigned int &length) */ unsigned char *generateKey(AESKeyLength keyLength) { - // Allocate memory for the key unsigned char *key = new unsigned char[aesKeyLengthData[keyLength].keySize]; @@ -91,11 +100,16 @@ unsigned char *generateKey(AESKeyLength keyLength) @param outLen The length of the encrypted message. */ void encryptAES(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, AESKeyLength keyLength) + unsigned char *&out, unsigned int &outLen, AESKeyLength keyLength, AESChainingMode chainingMode) { - unsigned char *iv = new unsigned char[16]; + if(chainingMode == ECB) { + encryptFunctions[chainingMode](in, inLen, key, out, outLen, nullptr, keyLength); + return; + } + unsigned char *iv; + iv = new unsigned char[16]; generateRandomIV(iv); - encrypt(in, inLen, key, out, outLen, iv, keyLength); + encryptFunctions[chainingMode](in, inLen, key, out, outLen, iv, keyLength); unsigned char *newOut = new unsigned char[outLen + 16]; memcpy(newOut, out, outLen); memcpy(newOut + outLen, iv, 16); @@ -112,23 +126,169 @@ void encryptAES(unsigned char in[], unsigned int inLen, unsigned char *key, @param out The decrypted output message. @param outLen The length of the decrypted message. */ -void decryptAES(const unsigned char in[], unsigned int inLen, - unsigned char *key, unsigned char *&out, unsigned int &outLen, AESKeyLength keyLength) +void decryptAES(unsigned char in[], unsigned int inLen, + unsigned char *key, unsigned char *&out, unsigned int &outLen, AESKeyLength keyLength, AESChainingMode chainingMode) { - unsigned int messageLen = inLen - 16; - decrypt(in, messageLen, key, out, outLen, in + messageLen, keyLength); + if(chainingMode != ECB){ + unsigned int messageLen = inLen - 16; + decryptFunctions[chainingMode](in, messageLen, key, out, outLen, in + messageLen, keyLength); + + return; + } + + decryptFunctions[chainingMode](in, inLen, key, out, outLen, NULL, keyLength); + } /** - @brief Decrypts a message block using the provided key and IV. - @param in The input message block to be decrypted. - @param inLen The length of the input block. - @param key The decryption key. - @param out The decrypted output block. - @param outLen The length of the decrypted block. - @param iv The initialization vector. + Encrypts data using AES in CBC mode. + @param in Input data. + @param inLen Length of input data. + @param key Encryption key. + @param[out] out Encrypted output data. + @param[out] outLen Length of encrypted data. + @param iv Initialization vector. + @param keyLength AES key length (128, 192, 256 bits). + */ +void encryptCBC(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) +{ + padMessage(in, inLen, outLen); + unsigned char block[BLOCK_BYTES_LEN]; + out = new unsigned char[outLen]; + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; + keyExpansion(key, roundKeys, keyLength); + memcpy(block, iv, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + xorBlocks(block, in + i, block, BLOCK_BYTES_LEN); + encryptBlock(block, out + i, roundKeys, keyLength); + memcpy(block, out + i, BLOCK_BYTES_LEN); + } + delete[] roundKeys; +} + +/** + Encrypts data using AES in ECB mode. + @param in Input data. + @param inLen Length of input data. + @param key Encryption key. + @param[out] out Encrypted output data. + @param[out] outLen Length of encrypted data. + @param iv Initialization vector (unused in ECB mode). + @param keyLength AES key length (128, 192, 256 bits). + */ +void encryptECB(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen,const unsigned char *iv, AESKeyLength keyLength) +{ + padMessage(in, inLen, outLen); + unsigned char block[BLOCK_BYTES_LEN]; + out = new unsigned char[outLen]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; + keyExpansion(key, roundKeys, keyLength); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + memcpy(block, in + i, BLOCK_BYTES_LEN); + encryptBlock(block, out + i, roundKeys, keyLength); + } + delete[] roundKeys; +} + +/** + Encrypts data using AES in OFB mode. + @param in Input data. + @param inLen Length of input data. + @param key Encryption key. + @param[out] out Encrypted output data. + @param[out] outLen Length of encrypted data. + @param iv Initialization vector. + @param keyLength AES key length (128, 192, 256 bits). + */ +void encryptOFB(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) +{ + padMessage(in, inLen, outLen); + unsigned char block[BLOCK_BYTES_LEN]; + out = new unsigned char[outLen]; + unsigned char feedback[BLOCK_BYTES_LEN]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; + keyExpansion(key, roundKeys, keyLength); + memcpy(feedback, iv, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + encryptBlock(feedback, block, roundKeys, keyLength); + xorBlocks(block, in + i, out+i, BLOCK_BYTES_LEN); + memcpy(feedback, block, BLOCK_BYTES_LEN); + } + delete[] roundKeys; +} + +/** + Encrypts data using AES in CFB mode. + @param in Input data. + @param inLen Length of input data. + @param key Encryption key. + @param[out] out Encrypted output data. + @param[out] outLen Length of encrypted data. + @param iv Initialization vector. + @param keyLength AES key length (128, 192, 256 bits). */ -void decrypt(const unsigned char in[], unsigned int inLen, unsigned char *key, +void encryptCFB(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) +{ + padMessage(in, inLen, outLen); + unsigned char block[BLOCK_BYTES_LEN]; + out = new unsigned char[outLen]; + unsigned char feedback[BLOCK_BYTES_LEN]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; + keyExpansion(key, roundKeys, keyLength); + memcpy(feedback, iv, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + encryptBlock(feedback, block, roundKeys, keyLength); + xorBlocks(block, in + i, out+i, BLOCK_BYTES_LEN); + memcpy(feedback, out + i, BLOCK_BYTES_LEN); + } + delete[] roundKeys; +} + +/** + Encrypts data using AES in CTR mode. + @param in Input data. + @param inLen Length of input data. + @param key Encryption key. + @param[out] out Encrypted output data. + @param[out] outLen Length of encrypted data. + @param iv Initialization vector. + @param keyLength AES key length (128, 192, 256 bits). + */ +void encryptCTR(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) +{ + padMessage(in, inLen, outLen); + unsigned char block[BLOCK_BYTES_LEN]; + out = new unsigned char[outLen]; + unsigned char counter[BLOCK_BYTES_LEN]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; + keyExpansion(key, roundKeys, keyLength); + memcpy(counter, iv, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + encryptBlock(counter, block, roundKeys, keyLength); + xorBlocks(block, in + i, out+i, BLOCK_BYTES_LEN); + for (int j = BLOCK_BYTES_LEN - 1; j >= 0; --j) + if (++counter[j]) break; + } + delete[] roundKeys; +} + +/** + Decrypts data using AES in CBC mode. + @param in Encrypted input data. + @param inLen Length of input data. + @param key Decryption key. + @param[out] out Decrypted output data. + @param[out] outLen Length of decrypted data. + @param iv Initialization vector. + @param keyLength AES key length (128, 192, 256 bits). + */ +void decryptCBC(const unsigned char in[], unsigned int inLen, unsigned char *key, unsigned char *&out, unsigned int &outLen, const unsigned char *iv,AESKeyLength keyLength) { checkLength(inLen); @@ -136,45 +296,132 @@ void decrypt(const unsigned char in[], unsigned int inLen, unsigned char *key, outLen = inLen; out = new unsigned char[outLen]; unsigned char *roundKeys = - new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; keyExpansion(key, roundKeys, keyLength); memcpy(block, iv, BLOCK_BYTES_LEN); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { decryptBlock(in + i, out + i, roundKeys, keyLength); xorBlocks(block, out + i, out + i, BLOCK_BYTES_LEN); memcpy(block, in + i, BLOCK_BYTES_LEN); } - unpadMessage(out, outLen); delete[] roundKeys; } /** - @brief Encrypts a message block using the provided key and IV. - @param in The input message block to be encrypted. - @param inLen The length of the input block. - @param key The encryption key. - @param out The encrypted output block. - @param outLen The length of the encrypted block. - @param iv The initialization vector. + Decrypts data using AES in ECB mode. + @param in Encrypted input data. + @param inLen Length of input data. + @param key Decryption key. + @param[out] out Decrypted output data. + @param[out] outLen Length of decrypted data. + @param iv Initialization vector (unused in ECB mode). + @param keyLength AES key length (128, 192, 256 bits). */ -void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) +void decryptECB(const unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen,const unsigned char *iv, AESKeyLength keyLength) { - padMessage(in, inLen, outLen); + checkLength(inLen); + outLen = inLen; + out = new unsigned char[outLen]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; + keyExpansion(key, roundKeys, keyLength); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) + decryptBlock(in + i, out + i, roundKeys, keyLength); + unpadMessage(out, outLen); + delete[] roundKeys; +} + +/** + Decrypts data using AES in OFB mode. + @param in Encrypted input data. + @param inLen Length of input data. + @param key Decryption key. + @param[out] out Decrypted output data. + @param[out] outLen Length of decrypted data. + @param iv Initialization vector. + @param keyLength AES key length (128, 192, 256 bits). + */ +void decryptOFB(const unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) +{ + checkLength(inLen); unsigned char block[BLOCK_BYTES_LEN]; + outLen = inLen; out = new unsigned char[outLen]; - unsigned char *roundKeys = - new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + unsigned char feedback[BLOCK_BYTES_LEN]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; keyExpansion(key, roundKeys, keyLength); - memcpy(block, iv, BLOCK_BYTES_LEN); + memcpy(feedback, iv, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { - xorBlocks(block, in + i, block, BLOCK_BYTES_LEN); - encryptBlock(block, out + i, roundKeys, keyLength); - memcpy(block, out + i, BLOCK_BYTES_LEN); + encryptBlock(feedback, block, roundKeys, keyLength); + // Copy only the amount of data needed for the current block + unsigned int blockLen = (i + BLOCK_BYTES_LEN <= outLen) ? BLOCK_BYTES_LEN : (outLen - i); + xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); + // Update feedback to be used for the next block + memcpy(feedback, block, BLOCK_BYTES_LEN); } + delete[] roundKeys; +} +/** + Decrypts data using AES in CFB mode. + @param in Encrypted input data. + @param inLen Length of input data. + @param key Decryption key. + @param[out] out Decrypted output data. + @param[out] outLen Length of decrypted data. + @param iv Initialization vector. + @param keyLength AES key length (128, 192, 256 bits). + */ +void decryptCFB(const unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) +{ + checkLength(inLen); + unsigned char block[BLOCK_BYTES_LEN]; + outLen = inLen; + out = new unsigned char[outLen]; + unsigned char feedback[BLOCK_BYTES_LEN]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; + keyExpansion(key, roundKeys, keyLength); + memcpy(feedback, iv, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + encryptBlock(feedback, block, roundKeys, keyLength); + xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); + memcpy(feedback, in + i, BLOCK_BYTES_LEN); + } + delete[] roundKeys; +} + +/** + Decrypts data using AES in CTR mode. + @param in Encrypted input data. + @param inLen Length of input data. + @param key Decryption key. + @param[out] out Decrypted output data. + @param[out] outLen Length of decrypted data. + @param iv Initialization vector. + @param keyLength AES key length (128, 192, 256 bits). + */ +void decryptCTR(const unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) +{ + checkLength(inLen); + unsigned char block[BLOCK_BYTES_LEN]; + outLen = inLen; + out = new unsigned char[outLen]; + unsigned char counter[BLOCK_BYTES_LEN]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; + keyExpansion(key, roundKeys, keyLength); + memcpy(counter, iv, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + encryptBlock(counter, block, roundKeys, keyLength); + xorBlocks(block, in + i, out+i, BLOCK_BYTES_LEN); + for (int j = BLOCK_BYTES_LEN - 1; j >= 0; --j) { + if (++counter[j]) break; + } + } delete[] roundKeys; } @@ -203,25 +450,27 @@ void encryptBlock(const unsigned char in[], unsigned char out[], { queue queue; // State array initialization - unsigned char state[4][NUM_BLOCKS]; + unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]; // Buffers for SYCL - buffer in_buf(in, range<1>(4 * NUM_BLOCKS)); + buffer in_buf(in, range<1>(AES_STATE_ROWS * NUM_BLOCKS)); buffer state_buf( reinterpret_cast(state), - range<1>(4 * NUM_BLOCKS)); + range<1>(AES_STATE_ROWS * NUM_BLOCKS)); buffer roundKeys_buf( - roundKeys, range<1>(4 * (aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS)); - buffer out_buf(out, range<1>(4 * NUM_BLOCKS)); + roundKeys, range<1>(AES_STATE_ROWS * (aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS)); + buffer out_buf(out, range<1>(AES_STATE_ROWS * NUM_BLOCKS)); // Initialize state array with input block queue.submit([&](handler &handler) { auto in_acc = in_buf.get_access(handler); auto state_acc = state_buf.get_access(handler); - handler.parallel_for(range<1>(4 * NUM_BLOCKS), [=](id<1> idx) { - unsigned int i = idx % 4; // Row - unsigned int j = idx / 4; // Column - state_acc[i * NUM_BLOCKS + j] = in_acc[i + 4 * j]; + handler.parallel_for(range<1>(AES_STATE_ROWS * NUM_BLOCKS), [=](id<1> idx) { + // Row + unsigned int i = idx % AES_STATE_ROWS; + // Column + unsigned int j = idx / AES_STATE_ROWS; + state_acc[i * NUM_BLOCKS + j] = in_acc[i + AES_STATE_ROWS * j]; }); }).wait(); @@ -233,22 +482,22 @@ void encryptBlock(const unsigned char in[], unsigned char out[], subBytes(state); shiftRows(state); mixColumns(state); - addRoundKey(state, roundKeys + round * 4 * NUM_BLOCKS); + addRoundKey(state, roundKeys + round * AES_STATE_ROWS * NUM_BLOCKS); } // Final round subBytes(state); shiftRows(state); - addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * 4 * NUM_BLOCKS); + addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * AES_STATE_ROWS * NUM_BLOCKS); // Copy state array to output block queue.submit([&](handler &handler) { auto state_acc = state_buf.get_access(handler); auto out_acc = out_buf.get_access(handler); - handler.parallel_for(range<1>(4 * NUM_BLOCKS), [=](id<1> idx) { - unsigned int i = idx % 4; // Row - unsigned int j = idx / 4; // Column - out_acc[i + 4 * j] = state_acc[i * NUM_BLOCKS + j]; + handler.parallel_for(range<1>(AES_STATE_ROWS * NUM_BLOCKS), [=](id<1> idx) { + unsigned int i = idx % AES_STATE_ROWS; // Row + unsigned int j = idx / AES_STATE_ROWS; // Column + out_acc[i + AES_STATE_ROWS * j] = state_acc[i * NUM_BLOCKS + j]; }); }).wait(); } @@ -263,22 +512,22 @@ void encryptBlock(const unsigned char in[], unsigned char out[], void decryptBlock(const unsigned char in[], unsigned char out[], unsigned char *roundKeys, AESKeyLength keyLength) { - unsigned char state[4][NUM_BLOCKS]; + unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]; unsigned int i, j, round; // Initialize state array with input block - for (i = 0; i < 4; i++) + for (i = 0; i < AES_STATE_ROWS; i++) for (j = 0; j < NUM_BLOCKS; j++) - state[i][j] = in[i + 4 * j]; + state[i][j] = in[i + AES_STATE_ROWS * j]; // Initial round key addition - addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * 4 * NUM_BLOCKS); + addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * AES_STATE_ROWS * NUM_BLOCKS); // Main rounds for (round = aesKeyLengthData[keyLength].numRound - 1; round >= 1; round--) { invSubBytes(state); invShiftRows(state); - addRoundKey(state, roundKeys + round * 4 * NUM_BLOCKS); + addRoundKey(state, roundKeys + round * AES_STATE_ROWS * NUM_BLOCKS); invMixColumns(state); } @@ -288,9 +537,9 @@ void decryptBlock(const unsigned char in[], unsigned char out[], addRoundKey(state, roundKeys); // Copy state array to output block - for (i = 0; i < 4; i++) + for (i = 0; i < AES_STATE_ROWS; i++) for (j = 0; j < NUM_BLOCKS; j++) - out[i + 4 * j] = state[i][j]; + out[i + AES_STATE_ROWS * j] = state[i][j]; } /** @@ -324,6 +573,7 @@ void decryptBlock(const unsigned char in[], unsigned char out[], temp ^= 0x1b; x >>= 1; } + return result; } @@ -332,18 +582,18 @@ void decryptBlock(const unsigned char in[], unsigned char out[], Substitutes bytes in the state array using the S-box. @param state 2D array representing the state of the AES block. */ -void subBytes(unsigned char state[4][NUM_BLOCKS]) +void subBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { queue queue; buffer stateBuffer(state[0], - range<2>(4, NUM_BLOCKS)); + range<2>(AES_STATE_ROWS, NUM_BLOCKS)); buffer sBoxBuffer(sBox[0], range<2>(16, 16)); queue.submit([&](handler &handler) { auto stateAcc = stateBuffer.get_access(handler); auto sBoxAcc = sBoxBuffer.get_access(handler); handler.parallel_for( - range<2>(4, NUM_BLOCKS), [=](id<2> id) { + range<2>(AES_STATE_ROWS, NUM_BLOCKS), [=](id<2> id) { size_t i = id[0]; size_t j = id[1]; stateAcc[i][j] = sBoxAcc[state[i][j] / 16][state[i][j] % 16]; @@ -356,11 +606,11 @@ void subBytes(unsigned char state[4][NUM_BLOCKS]) Shifts the rows of the state array in the AES block. @param state 2D array representing the state of the AES block. */ -void shiftRows(unsigned char state[4][NUM_BLOCKS]) +void shiftRows(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { queue queue; queue.submit([&](handler &handler) { - handler.parallel_for(range<1>(4), [=](id<1> i) { + handler.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> i) { unsigned char tmp[NUM_BLOCKS]; for (size_t k = 0; k < NUM_BLOCKS; k++) tmp[k] = state[i][(k + i) % NUM_BLOCKS]; @@ -375,16 +625,16 @@ void shiftRows(unsigned char state[4][NUM_BLOCKS]) Mixes the columns of the state array in the AES block. @param state 2D array representing the state of the AES block. */ -void mixColumns(unsigned char state[4][NUM_BLOCKS]) +void mixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { queue queue; - queue.parallel_for(range<1>(4), [=](id<1> idx) { + queue.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> idx) { size_t i = idx[0]; - unsigned char a[4]; - unsigned char b[4]; + unsigned char a[AES_STATE_ROWS]; + unsigned char b[AES_STATE_ROWS]; - for (size_t j = 0; j < 4; j++) { + for (size_t j = 0; j < AES_STATE_ROWS; j++) { a[j] = state[j][i]; b[j] = xtime(state[j][i]); } @@ -402,13 +652,13 @@ void mixColumns(unsigned char state[4][NUM_BLOCKS]) @param state 2D array representing the state of the AES block. @param roundKey Round key to be XORed with the state array. */ -void addRoundKey(unsigned char state[4][NUM_BLOCKS], unsigned char *roundKey) +void addRoundKey(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS], unsigned char *roundKey) { queue queue; buffer stateBuffer(state[0], - range<2>(4, NUM_BLOCKS)); + range<2>(AES_STATE_ROWS, NUM_BLOCKS)); buffer roundKeyBuffer( - roundKey, range<1>(4 * NUM_BLOCKS)); + roundKey, range<1>(AES_STATE_ROWS * NUM_BLOCKS)); queue.submit([&](handler &handler) { auto stateAcc = @@ -417,10 +667,10 @@ void addRoundKey(unsigned char state[4][NUM_BLOCKS], unsigned char *roundKey) roundKeyBuffer.get_access(handler); handler.parallel_for( - range<2>(4, NUM_BLOCKS), [=](id<2> id) { + range<2>(AES_STATE_ROWS, NUM_BLOCKS), [=](id<2> id) { size_t i = id[0]; size_t j = id[1]; - stateAcc[i][j] ^= roundKeyAcc[i + 4 * j]; + stateAcc[i][j] ^= roundKeyAcc[i + AES_STATE_ROWS * j]; }); }).wait(); } @@ -430,10 +680,10 @@ void addRoundKey(unsigned char state[4][NUM_BLOCKS], unsigned char *roundKey) Substitutes bytes in a word using the S-box. @param a Array representing the word to be transformed. */ -void subWord(unsigned char a[4]) +void subWord(unsigned char a[AES_STATE_ROWS]) { queue queue; - buffer aBuffer(a, range<1>(4)); + buffer aBuffer(a, range<1>(AES_STATE_ROWS)); buffer sBoxBuffer(sBox[0], range<2>(16, 16)); queue.submit([&](handler &handler) { @@ -441,7 +691,7 @@ void subWord(unsigned char a[4]) auto sBoxAcc = sBoxBuffer.get_access(handler); handler.parallel_for( - range<1>(4), [=](id<1> id) { + range<1>(AES_STATE_ROWS), [=](id<1> id) { size_t i = id[0]; aAcc[i] = sBoxAcc[aAcc[i] / 16][aAcc[i] % 16]; }); @@ -456,7 +706,7 @@ void subWord(unsigned char a[4]) void rotWord(unsigned char *word) { queue queue; - buffer wordBuffer(word, range<1>(4)); + buffer wordBuffer(word, range<1>(AES_STATE_ROWS)); queue.submit([&](handler &handler) { auto wordAcc = @@ -478,14 +728,14 @@ void rotWord(unsigned char *word) @param a Array to store the Rcon value. @param n Round number. */ -void rconWord(unsigned char a[4], unsigned int n) +void rconWord(unsigned char a[AES_STATE_ROWS], unsigned int n) { queue queue; unsigned char strong = 1; for (size_t i = 0; i < n - 1; i++) strong = xtime(strong); - queue.parallel_for(range<1>(4), [=](id<1> idx) { + queue.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> idx) { size_t i = idx[0]; if (i == 0) { a[i] = strong; @@ -511,42 +761,42 @@ void keyExpansion(const unsigned char *key, unsigned char w[], AESKeyLength keyL unsigned int numRoundLocal = aesKeyLengthData[keyLength].numRound; // Copy the initial key to the output array queue.submit([&](handler &handler) { - handler.parallel_for(range<1>(4 * numWordLocal), + handler.parallel_for(range<1>(AES_STATE_ROWS * numWordLocal), [=](id<1> idx) { w[idx] = key[idx]; }); }).wait(); - unsigned int i = 4 * numWordLocal; + unsigned int i = AES_STATE_ROWS * numWordLocal; - while (i < 4 * NUM_BLOCKSLocal * (numRoundLocal + 1)) { - unsigned char temp[4]; - buffer temp_buf(temp, range<1>(4)); + while (i < AES_STATE_ROWS * NUM_BLOCKSLocal * (numRoundLocal + 1)) { + unsigned char temp[AES_STATE_ROWS]; + buffer temp_buf(temp, range<1>(AES_STATE_ROWS)); queue.submit([&](handler &handler) { auto temp_acc = temp_buf.get_access(handler); - handler.parallel_for(range<1>(4), [=](id<1> idx) { - temp_acc[idx] = w[i - 4 + idx]; + handler.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> idx) { + temp_acc[idx] = w[i - AES_STATE_ROWS + idx]; }); }).wait(); - if (i / 4 % numWordLocal == 0) { + if (i / AES_STATE_ROWS % numWordLocal == 0) { // Use SYCL to execute rotWord and subWord rotWord(temp); subWord(temp); - unsigned char rcon[4]; - rconWord(rcon, i / (numWordLocal * 4)); + unsigned char rcon[AES_STATE_ROWS]; + rconWord(rcon, i / (numWordLocal * AES_STATE_ROWS)); - for (int k = 0; k < 4; k++) + for (int k = 0; k < AES_STATE_ROWS; k++) temp[k] ^= rcon[k]; } - else if (numWordLocal > 6 && i / 4 % numWordLocal == 4) + else if (numWordLocal > 6 && i / AES_STATE_ROWS % numWordLocal == 4) subWord(temp); queue.submit([&](handler &handler) { auto temp_acc = temp_buf.get_access(handler); - handler.parallel_for(range<1>(4), [=](id<1> idx) { - w[i + idx] = w[i + idx - 4 * numWordLocal] ^ temp_acc[idx]; + handler.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> idx) { + w[i + idx] = w[i + idx - AES_STATE_ROWS * numWordLocal] ^ temp_acc[idx]; }); }).wait(); @@ -560,11 +810,11 @@ void keyExpansion(const unsigned char *key, unsigned char w[], AESKeyLength keyL corresponding byte from the inverse S-box. @param state 4xN matrix of state bytes to be transformed. */ -void invSubBytes(unsigned char state[4][NUM_BLOCKS]) +void invSubBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { queue queue; buffer stateBuffer(state[0], - range<2>(4, NUM_BLOCKS)); + range<2>(AES_STATE_ROWS, NUM_BLOCKS)); buffer invSBoxBuffer(invSBox[0], range<2>(16, 16)); @@ -575,7 +825,7 @@ void invSubBytes(unsigned char state[4][NUM_BLOCKS]) invSBoxBuffer.get_access(handler); handler.parallel_for( - range<2>(4, NUM_BLOCKS), [=](id<2> id) { + range<2>(AES_STATE_ROWS, NUM_BLOCKS), [=](id<2> id) { size_t i = id[0]; size_t j = id[1]; stateAcc[i][j] = @@ -585,15 +835,15 @@ void invSubBytes(unsigned char state[4][NUM_BLOCKS]) } /*Applies the InvMixColumns transformation*/ -void invMixColumns(unsigned char state[4][NUM_BLOCKS]) +void invMixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { queue queue; queue.parallel_for(range<1>(NUM_BLOCKS), [=](id<1> idx) { size_t i = idx[0]; - unsigned char a[4]; - unsigned char b[4]; + unsigned char a[AES_STATE_ROWS]; + unsigned char b[AES_STATE_ROWS]; - for (size_t j = 0; j < 4; j++) { + for (size_t j = 0; j < AES_STATE_ROWS; j++) { a[j] = state[j][i]; b[j] = xtime(a[j]); } @@ -615,11 +865,11 @@ void invMixColumns(unsigned char state[4][NUM_BLOCKS]) in the reverse direction for decryption. @param state 4xN matrix of state bytes to be transformed. */ -void invShiftRows(unsigned char state[4][NUM_BLOCKS]) +void invShiftRows(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { queue queue; queue.submit([&](handler &handler) { - handler.parallel_for(range<1>(4), [=](id<1> i) { + handler.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> i) { unsigned char tmp[NUM_BLOCKS]; for (size_t k = 0; k < NUM_BLOCKS; k++) tmp[k] = state[i][(k - i + NUM_BLOCKS) % NUM_BLOCKS]; @@ -650,6 +900,7 @@ void xorBlocks(const unsigned char *a, const unsigned char *b, unsigned char *c, } #else + /* Encrypts a single block of data. `in` - input block to be encrypted @@ -659,13 +910,13 @@ void xorBlocks(const unsigned char *a, const unsigned char *b, unsigned char *c, void encryptBlock(const unsigned char in[], unsigned char out[], unsigned char *roundKeys, AESKeyLength keyLength) { - unsigned char state[4][NUM_BLOCKS]; + unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]; unsigned int i, j, round; // Initialize state array with input block - for (i = 0; i < 4; i++) + for (i = 0; i < AES_STATE_ROWS; i++) for (j = 0; j < NUM_BLOCKS; j++) - state[i][j] = in[i + 4 * j]; + state[i][j] = in[i + AES_STATE_ROWS * j]; // Initial round key addition addRoundKey(state, roundKeys); @@ -675,18 +926,18 @@ void encryptBlock(const unsigned char in[], unsigned char out[], subBytes(state); shiftRows(state); mixColumns(state); - addRoundKey(state, roundKeys + round * 4 * NUM_BLOCKS); + addRoundKey(state, roundKeys + round * AES_STATE_ROWS * NUM_BLOCKS); } // Final round subBytes(state); shiftRows(state); - addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * 4 * NUM_BLOCKS); + addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * AES_STATE_ROWS * NUM_BLOCKS); // Copy state array to output block - for (i = 0; i < 4; i++) + for (i = 0; i < AES_STATE_ROWS; i++) for (j = 0; j < NUM_BLOCKS; j++) - out[i + 4 * j] = state[i][j]; + out[i + AES_STATE_ROWS * j] = state[i][j]; } /* @@ -698,22 +949,22 @@ void encryptBlock(const unsigned char in[], unsigned char out[], void decryptBlock(const unsigned char in[], unsigned char out[], unsigned char *roundKeys, AESKeyLength keyLength) { - unsigned char state[4][NUM_BLOCKS]; + unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]; unsigned int i, j, round; // Initialize state array with input block - for (i = 0; i < 4; i++) + for (i = 0; i < AES_STATE_ROWS; i++) for (j = 0; j < NUM_BLOCKS; j++) - state[i][j] = in[i + 4 * j]; + state[i][j] = in[i + AES_STATE_ROWS * j]; // Initial round key addition - addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * 4 * NUM_BLOCKS); + addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * AES_STATE_ROWS * NUM_BLOCKS); // Main rounds for (round = aesKeyLengthData[keyLength].numRound - 1; round >= 1; round--) { invSubBytes(state); invShiftRows(state); - addRoundKey(state, roundKeys + round * 4 * NUM_BLOCKS); + addRoundKey(state, roundKeys + round * AES_STATE_ROWS * NUM_BLOCKS); invMixColumns(state); } @@ -723,9 +974,9 @@ void decryptBlock(const unsigned char in[], unsigned char out[], addRoundKey(state, roundKeys); // Copy state array to output block - for (i = 0; i < 4; i++) + for (i = 0; i < AES_STATE_ROWS; i++) for (j = 0; j < NUM_BLOCKS; j++) - out[i + 4 * j] = state[i][j]; + out[i + AES_STATE_ROWS * j] = state[i][j]; } /*Multiplies a byte by x in GF(2^8)*/ @@ -748,21 +999,22 @@ unsigned char multiply(unsigned char x, unsigned char y) temp ^= 0x1b; x >>= 1; } + return result; } /*Apply SubBytes transformation using the S-box*/ -void subBytes(unsigned char state[4][NUM_BLOCKS]) +void subBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { - for (size_t i = 0; i < 4; i++) + for (size_t i = 0; i < AES_STATE_ROWS; i++) for (size_t j = 0; j < NUM_BLOCKS; j++) state[i][j] = sBox[state[i][j] / 16][state[i][j] % 16]; } /*ShiftRows transformation*/ -void shiftRows(unsigned char state[4][NUM_BLOCKS]) +void shiftRows(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { - for (size_t i = 0; i < 4; i++) { + for (size_t i = 0; i < AES_STATE_ROWS; i++) { unsigned char tmp[NUM_BLOCKS]; for (size_t k = 0; k < NUM_BLOCKS; k++) tmp[k] = state[i][(k + i) % NUM_BLOCKS]; @@ -771,12 +1023,12 @@ void shiftRows(unsigned char state[4][NUM_BLOCKS]) } /*MixColumns transformation*/ -void mixColumns(unsigned char state[4][NUM_BLOCKS]) +void mixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { - for (size_t i = 0; i < 4; i++) { - unsigned char a[4]; - unsigned char b[4]; - for (size_t j = 0; j < 4; j++) { + for (size_t i = 0; i < AES_STATE_ROWS; i++) { + unsigned char a[AES_STATE_ROWS]; + unsigned char b[AES_STATE_ROWS]; + for (size_t j = 0; j < AES_STATE_ROWS; j++) { a[j] = state[j][i]; b[j] = xtime(state[j][i]); } @@ -788,23 +1040,23 @@ void mixColumns(unsigned char state[4][NUM_BLOCKS]) } /*AddRoundKey transformation*/ -void addRoundKey(unsigned char state[4][NUM_BLOCKS], unsigned char *key) +void addRoundKey(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS], unsigned char *key) { unsigned int i, j; - for (i = 0; i < 4; i++) + for (i = 0; i < AES_STATE_ROWS; i++) for (j = 0; j < NUM_BLOCKS; j++) - state[i][j] = state[i][j] ^ key[i + 4 * j]; + state[i][j] = state[i][j] ^ key[i + AES_STATE_ROWS * j]; } /*Applies the SubWord transformation using the S-box*/ -void subWord(unsigned char a[4]) +void subWord(unsigned char a[AES_STATE_ROWS]) { - for (size_t i = 0; i < 4; i++) + for (size_t i = 0; i < AES_STATE_ROWS; i++) a[i] = sBox[a[i] / 16][a[i] % 16]; } /*Rotates a word (4 bytes)*/ -void rotWord(unsigned char a[4]) +void rotWord(unsigned char a[AES_STATE_ROWS]) { unsigned char first = a[0]; for (size_t i = 0; i < 3; i++) @@ -813,7 +1065,7 @@ void rotWord(unsigned char a[4]) } /*Applies the Rcon transformation*/ -void rconWord(unsigned char a[4], unsigned int n) +void rconWord(unsigned char a[AES_STATE_ROWS], unsigned int n) { unsigned char strong = 1; for (size_t i = 0; i < n - 1; i++) @@ -826,46 +1078,45 @@ void rconWord(unsigned char a[4], unsigned int n) /*Expands the key for AES encryption/decryption*/ void keyExpansion(const unsigned char *key, unsigned char w[], AESKeyLength keyLength) { - unsigned char temp[4], rcon[4]; + unsigned char temp[AES_STATE_ROWS], rcon[AES_STATE_ROWS]; unsigned int i = 0; //copy key to w array - while (i < 4 * aesKeyLengthData[keyLength].numWord) { + while (i < AES_STATE_ROWS * aesKeyLengthData[keyLength].numWord) { w[i] = key[i]; i++; } - i = 4 * aesKeyLengthData[keyLength].numWord; + i = AES_STATE_ROWS * aesKeyLengthData[keyLength].numWord; //main expansion loop - while (i < 4 * NUM_BLOCKS * (aesKeyLengthData[keyLength].numRound + 1)) { - for (size_t k = 4, j = 0; k > 0; --k, ++j) + while (i < AES_STATE_ROWS * NUM_BLOCKS * (aesKeyLengthData[keyLength].numRound + 1)) { + for (size_t k = AES_STATE_ROWS, j = 0; k > 0; --k, ++j) temp[j] = w[i - k]; - if (i / 4 % aesKeyLengthData[keyLength].numWord == 0) { + if (i / AES_STATE_ROWS % aesKeyLengthData[keyLength].numWord == 0) { rotWord(temp); subWord(temp); - rconWord(rcon, i / (aesKeyLengthData[keyLength].numWord * 4)); - - for (int i = 0; i < 4; i++) + rconWord(rcon, i / (aesKeyLengthData[keyLength].numWord * AES_STATE_ROWS)); + for (int i = 0; i < AES_STATE_ROWS; i++) temp[i] = temp[i] ^ rcon[i]; } - else if (aesKeyLengthData[keyLength].numWord > 6 && i / 4 % aesKeyLengthData[keyLength].numWord == 4) + else if (aesKeyLengthData[keyLength].numWord > 6 && i / AES_STATE_ROWS % aesKeyLengthData[keyLength].numWord == 4) subWord(temp); - for (int k = 0; k < 4; k++) - w[i + k] = w[i + k - 4 * aesKeyLengthData[keyLength].numWord] ^ temp[k]; + for (int k = 0; k < AES_STATE_ROWS; k++) + w[i + k] = w[i + k - AES_STATE_ROWS * aesKeyLengthData[keyLength].numWord] ^ temp[k]; i += 4; } } /*Applies the InvSubBytes transformation using the inverse S-box*/ -void invSubBytes(unsigned char state[4][NUM_BLOCKS]) +void invSubBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { unsigned int i, j; unsigned char t; - for (i = 0; i < 4; i++) + for (i = 0; i < AES_STATE_ROWS; i++) for (j = 0; j < NUM_BLOCKS; j++) { t = state[i][j]; state[i][j] = invSBox[t / 16][t % 16]; @@ -873,12 +1124,12 @@ void invSubBytes(unsigned char state[4][NUM_BLOCKS]) } /*Applies the InvMixColumns transformation*/ -void invMixColumns(unsigned char state[4][NUM_BLOCKS]) +void invMixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { for (size_t i = 0; i < NUM_BLOCKS; i++) { - unsigned char a[4]; - unsigned char b[4]; - for (size_t j = 0; j < 4; j++) { + unsigned char a[AES_STATE_ROWS]; + unsigned char b[AES_STATE_ROWS]; + for (size_t j = 0; j < AES_STATE_ROWS; j++) { a[j] = state[j][i]; b[j] = xtime(a[j]); } @@ -894,9 +1145,9 @@ void invMixColumns(unsigned char state[4][NUM_BLOCKS]) } /*Applies the InvShiftRows transformation*/ -void invShiftRows(unsigned char state[4][NUM_BLOCKS]) +void invShiftRows(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { - for (size_t i = 0; i < 4; i++) { + for (size_t i = 0; i < AES_STATE_ROWS; i++) { unsigned char tmp[NUM_BLOCKS]; for (size_t k = 0; k < NUM_BLOCKS; k++) tmp[k] = state[i][(k - i + NUM_BLOCKS) % NUM_BLOCKS]; @@ -912,4 +1163,5 @@ void xorBlocks(const unsigned char *a, const unsigned char *b, unsigned char *c, c[i] = a[i] ^ b[i]; } } + #endif diff --git a/tests/aes_tests.cpp b/tests/aes_tests.cpp index 5927f6f4..79efe0bf 100644 --- a/tests/aes_tests.cpp +++ b/tests/aes_tests.cpp @@ -3,8 +3,7 @@ #include "../include/aes.h" const unsigned int BLOCK_BYTES_LENGTH = 16 * sizeof(unsigned char); -/*Tests for different key lengths*/ -TEST(KeyLengths, KeyLength128) +TEST(KeyLengths, KeyLength128_CBC) { unsigned char plain[BLOCK_BYTES_LENGTH] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, @@ -13,16 +12,16 @@ TEST(KeyLengths, KeyLength128) unsigned char *key = generateKey(AESKeyLength::AES_128); unsigned char *encrypted; unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_128); + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_128,AESChainingMode::CBC); unsigned char *decrypted; unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_128); + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_128,AESChainingMode::CBC); ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); delete[] encrypted; delete[] decrypted; } -TEST(KeyLengths, KeyLength192) +TEST(KeyLengths, KeyLength192_CBC) { unsigned char plain[BLOCK_BYTES_LENGTH] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, @@ -31,16 +30,16 @@ TEST(KeyLengths, KeyLength192) unsigned char *key = generateKey(AESKeyLength::AES_192); unsigned char *encrypted; unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_192); + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_192,AESChainingMode::CBC); unsigned char *decrypted; unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_192); + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_192,AESChainingMode::CBC); ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); delete[] encrypted; delete[] decrypted; } -TEST(KeyLengths, KeyLength256) +TEST(KeyLengths, KeyLength256_CBC) { unsigned char plain[BLOCK_BYTES_LENGTH] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, @@ -49,16 +48,160 @@ TEST(KeyLengths, KeyLength256) unsigned char *key = generateKey(AESKeyLength::AES_256); unsigned char *encrypted; unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_256); + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_256,AESChainingMode::CBC); unsigned char *decrypted; unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256); + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256,AESChainingMode::CBC); ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); delete[] encrypted; delete[] decrypted; } -/*Tests for encryption and decryption with non 16 multiply length*/ -TEST(CBC, EncryptDecryptOneBlock) + +TEST(CBC, EncryptDecryptOneBlock_CBC) +{ + unsigned char plain[18] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, + 0xcc, 0xdd, 0xee, 0xff, 0xef, 0x03}; + + unsigned char *key = generateKey(AESKeyLength::AES_256); + unsigned char *encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, 17, key, encrypted, outLenEncrypted, AESKeyLength::AES_256,AESChainingMode::CBC); + unsigned char *decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256,AESChainingMode::CBC); + ASSERT_FALSE(memcmp(plain, decrypted, 17)); + delete[] encrypted; + delete[] decrypted; +} + +TEST(KeyLengths, KeyLength128_CTR) +{ + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char *key = generateKey(AESKeyLength::AES_128); + unsigned char *encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_128, AESChainingMode::CTR); + unsigned char *decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_128, AESChainingMode::CTR); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; +} + +TEST(KeyLengths, KeyLength192_CTR) +{ + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char *key = generateKey(AESKeyLength::AES_192); + unsigned char *encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_192, AESChainingMode::CTR); + unsigned char *decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_192, AESChainingMode::CTR); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; +} + +TEST(KeyLengths, KeyLength256_CTR) +{ + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char *key = generateKey(AESKeyLength::AES_256); + unsigned char *encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::CTR); + unsigned char *decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::CTR); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; +} + +TEST(CTR, EncryptDecryptOneBlock_CTR) +{ + unsigned char plain[18] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, + 0xcc, 0xdd, 0xee, 0xff, 0xef, 0x03}; + + unsigned char *key = generateKey(AESKeyLength::AES_256); + unsigned char *encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, 17, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::CTR); + unsigned char *decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::CTR); + ASSERT_FALSE(memcmp(plain, decrypted, 17)); + delete[] encrypted; + delete[] decrypted; +} + +TEST(KeyLengths, KeyLength128_ECB) +{ + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char *key = generateKey(AESKeyLength::AES_128); + unsigned char *encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_128, AESChainingMode::ECB); + unsigned char *decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_128, AESChainingMode::ECB); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; +} + +TEST(KeyLengths, KeyLength192_ECB) +{ + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char *key = generateKey(AESKeyLength::AES_192); + unsigned char *encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_192, AESChainingMode::ECB); + unsigned char *decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_192, AESChainingMode::ECB); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; +} + +TEST(KeyLengths, KeyLength256_ECB) +{ + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char *key = generateKey(AESKeyLength::AES_256); + unsigned char *encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::ECB); + unsigned char *decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::ECB); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; +} + +TEST(ECB, EncryptDecryptOneBlock_ECB) { unsigned char plain[18] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, @@ -67,15 +210,158 @@ TEST(CBC, EncryptDecryptOneBlock) unsigned char *key = generateKey(AESKeyLength::AES_256); unsigned char *encrypted; unsigned int outLenEncrypted; - encryptAES(plain, 17, key, encrypted, outLenEncrypted, AESKeyLength::AES_256); + encryptAES(plain, 17, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::ECB); unsigned char *decrypted; unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256); + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::ECB); + ASSERT_FALSE(memcmp(plain, decrypted, 17)); + delete[] encrypted; + delete[] decrypted; +} + +TEST(KeyLengths, KeyLength128_CFB) { + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char* key = generateKey(AESKeyLength::AES_128); + unsigned char* encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_128, AESChainingMode::CFB); + unsigned char* decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_128, AESChainingMode::CFB); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; + delete[] key; +} + +TEST(KeyLengths, KeyLength192_CFB) { + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char* key = generateKey(AESKeyLength::AES_192); + unsigned char* encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_192, AESChainingMode::CFB); + unsigned char* decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_192, AESChainingMode::CFB); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; + delete[] key; +} + +TEST(KeyLengths, KeyLength256_CFB) { + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char* key = generateKey(AESKeyLength::AES_256); + unsigned char* encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::CFB); + unsigned char* decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::CFB); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; + delete[] key; +} + +TEST(CFB, EncryptDecryptOneBlock) { + unsigned char plain[18] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, + 0xcc, 0xdd, 0xee, 0xff, 0xef, 0x03}; + + unsigned char* key = generateKey(AESKeyLength::AES_256); + unsigned char* encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, 17, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::CFB); + unsigned char* decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::CFB); ASSERT_FALSE(memcmp(plain, decrypted, 17)); delete[] encrypted; delete[] decrypted; + delete[] key; +} + +TEST( KeyLengths, KeyLength128_OFB) { + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char* key = generateKey(AESKeyLength::AES_128); + unsigned char* encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_128, AESChainingMode::OFB); + unsigned char* decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_128, AESChainingMode::OFB); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; + delete[] key; +} + +TEST(KeyLengths, KeyLength192_OFB) { + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char* key = generateKey(AESKeyLength::AES_192); + unsigned char* encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_192, AESChainingMode::OFB); + unsigned char* decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_192, AESChainingMode::OFB); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; + delete[] key; +} + +TEST( KeyLengths, KeyLength256_OFB) { + unsigned char plain[BLOCK_BYTES_LENGTH] = { + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + + unsigned char* key = generateKey(AESKeyLength::AES_256); + unsigned char* encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::OFB); + unsigned char* decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::OFB); + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); + delete[] encrypted; + delete[] decrypted; + delete[] key; } +TEST( OFB, EncryptDecryptOneBlock) { + unsigned char plain[18] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, + 0xcc, 0xdd, 0xee, 0xff, 0xef, 0x03}; + + unsigned char* key = generateKey(AESKeyLength::AES_256); + unsigned char* encrypted; + unsigned int outLenEncrypted; + encryptAES(plain, 17, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::OFB); + unsigned char* decrypted; + unsigned int outLenDecrypted; + decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::OFB); + ASSERT_FALSE(memcmp(plain, decrypted, 17)); + delete[] encrypted; + delete[] decrypted; + delete[] key; +} int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); From ae005a74875304c58dc318d3eefa09d774c9bee3 Mon Sep 17 00:00:00 2001 From: MiryamW Date: Sun, 8 Sep 2024 10:16:15 +0300 Subject: [PATCH 07/21] HSM: Add Streaming blocks support --- CMakeLists.txt | 17 +- include/aes.h | 51 +---- include/aes_stream.h | 162 +++++++++++++++ include/aes_stream_factory.h | 151 ++++++++++++++ src/aes.cpp | 343 +------------------------------ src/aes_cbc.cpp | 71 +++++++ src/aes_cfb.cpp | 81 ++++++++ src/aes_ctr.cpp | 82 ++++++++ src/aes_ecb.cpp | 52 +++++ src/aes_ofb.cpp | 90 ++++++++ tests/aes_tests.cpp | 388 +++++++---------------------------- 11 files changed, 781 insertions(+), 707 deletions(-) create mode 100644 include/aes_stream.h create mode 100644 include/aes_stream_factory.h create mode 100644 src/aes_cbc.cpp create mode 100644 src/aes_cfb.cpp create mode 100644 src/aes_ctr.cpp create mode 100644 src/aes_ecb.cpp create mode 100644 src/aes_ofb.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index a370df95..ca0f3b5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.10) project(MyTest) # Include directories include_directories(src) - # Find Google Test find_package(GTest REQUIRED) # Add source files @@ -23,14 +22,16 @@ if(USE_SYCL) message(STATUS "Compiling without SYCL support") remove_definitions(-DUSE_SYCL) endif() +# Add debug flags +set(CMAKE_BUILD_TYPE Debug) # Add the executable for the tests -add_executable(runTests tests/aes_tests.cpp ${SOURCES}) +add_executable(runTests + tests/aes_tests.cpp ${SOURCES}) # Link libraries target_link_libraries(runTests - GTest::GTest - GTest::Main - pthread + gtest gtest_main pthread +) +# Optional: Output directory for the executable +set_target_properties(runTests PROPERTIES + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} ) -# Enable testing -enable_testing() -gtest_discover_tests(runTests) \ No newline at end of file diff --git a/include/aes.h b/include/aes.h index 838895e5..13ef6a91 100644 --- a/include/aes.h +++ b/include/aes.h @@ -31,7 +31,7 @@ struct AESData unsigned int keySize; }; -typedef std::function EncryptDecryptFunc; +typedef std::function EncryptDecryptFunc; static std::map aesKeyLengthData = { { AESKeyLength::AES_128, {4, 10, 128} }, { AESKeyLength::AES_192, {6, 12, 192} }, @@ -58,6 +58,7 @@ static std::map aesKeyLengthData = { unsigned char multiply(unsigned char x, unsigned char y); void xorBlocks(const unsigned char *a, const unsigned char *b, unsigned char *c, unsigned int len); + void generateRandomIV(unsigned char* iv); /*Inverse S-Box*/ const unsigned char invSBox[16][16] = { @@ -129,54 +130,6 @@ const unsigned char sBox[16][16] = { {0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16}}; -void encryptECB(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, - const unsigned char *iv, AESKeyLength keyLength); -void encryptCBC(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, - const unsigned char *iv, AESKeyLength keyLength); -void encryptCFB(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, - const unsigned char *iv, AESKeyLength keyLength); -void encryptOFB(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength); -void encryptCTR(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength); -void encryptAES(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen ,AESKeyLength keyLength, AESChainingMode chainingMode); -void decryptECB(const unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, - const unsigned char *iv, AESKeyLength keyLength); -void decryptCBC(const unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, - const unsigned char *iv, AESKeyLength keyLength); -void decryptCFB(const unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, - const unsigned char *iv, AESKeyLength keyLength); -void decryptOFB(const unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, - const unsigned char *iv, AESKeyLength keyLength); -void decryptCTR(const unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, - const unsigned char *iv, AESKeyLength keyLength); -void decryptAES(unsigned char in[], unsigned int inLen, - unsigned char *key, unsigned char *&out, unsigned int &outLen, AESKeyLength keyLength, AESChainingMode chainingMode); unsigned char *generateKey(AESKeyLength keyLength); -static std::map encryptFunctions = { - {ECB, encryptECB}, - {CBC, encryptCBC}, - {CFB, encryptCFB}, - {OFB, encryptOFB}, - {CTR, encryptCTR} -}; - -static std::map decryptFunctions = { - {ECB, decryptECB}, - {CBC, decryptCBC}, - {CFB, decryptCFB}, - {OFB, decryptOFB}, - {CTR, decryptCTR} -}; - #endif diff --git a/include/aes_stream.h b/include/aes_stream.h new file mode 100644 index 00000000..e754fd27 --- /dev/null +++ b/include/aes_stream.h @@ -0,0 +1,162 @@ +#include "aes.h" +#include +#include +#include + +class StreamAES +{ + public: + + unsigned char* iv; + unsigned char* lastBlock; + AESKeyLength keyLength; + unsigned char* key; + unsigned char* lastData; + + StreamAES():iv(new unsigned char[16]){}; + /** + @brief Encrypts the initial block of data using AES in CBC mode. + + This function generates a random initialization vector (IV) and then + encrypts the given block of data. The encrypted data and the IV are + concatenated and stored in the output buffer. + + @param block Input data block to encrypt. + @param inLen Length of the input data block. + @param[out] out Pointer to the output buffer where encrypted data will be stored. + @param[out] outLen Length of the encrypted output data. + @param key Encryption key. + @param keyLength Length of the AES key (128, 192, or 256 bits). +*/ +virtual void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) = 0; + +/** + @brief Continues encryption of data using AES in CBC mode. + + This function continues the encryption process for the given block of data + using the last encrypted block as the IV. + + @param block Input data block to encrypt. + @param inLen Length of the input data block. + @param[out] out Pointer to the output buffer where encrypted data will be stored. + @param[out] outLen Length of the encrypted output data. + */ +virtual void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen) = 0; + +/** + @brief Decrypts the initial block of data using AES in CBC mode. + + This function extracts the initialization vector (IV) from the end of the + input data block and then decrypts the given block of data. The decrypted + data is stored in the output buffer. + + @param block Encrypted input data block to decrypt. + @param inLen Length of the encrypted input data block. + @param[out] out Pointer to the output buffer where decrypted data will be stored. + @param[out] outLen Length of the decrypted output data. + @param key Decryption key. + @param keyLength Length of the AES key (128, 192, or 256 bits). + */ +virtual void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength) = 0; + +/** + @brief Continues decryption of data using AES in CBC mode. + + This function continues the decryption process for the given block of data + using the last decrypted block as the IV. + + @param block Encrypted input data block to decrypt. + @param inLen Length of the encrypted input data block. + @param[out] out Pointer to the output buffer where decrypted data will be stored. + @param[out] outLen Length of the decrypted output data. + */ +virtual void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen) = 0; + +/** + Decrypts data using AES in CBC mode. + @param in Encrypted input data. + @param inLen Length of input data. + @param key Decryption key. + @param[out] out Decrypted output data. + @param[out] outLen Length of decrypted data. + @param iv Initialization vector. + @param keyLength AES key length (128, 192, 256 bits). + */ +virtual void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) = 0; +/** + Encrypts data using AES. + @param in Input data. + @param inLen Length of input data. + @param key Encryption key. + @param[out] out Encrypted output data. + @param[out] outLen Length of encrypted data. + @param iv Initialization vector. + @param keyLength AES key length (128, 192, 256 bits). + */ +virtual void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) = 0; + +}; + +class AESEcb:public StreamAES +{ + void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); + void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); + void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); + void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); + void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +}; + +class AESCbc:public StreamAES +{ + void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); + void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); + void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); + void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); + void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +}; + +class AESCfb:public StreamAES +{ + void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); + void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); + void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); + void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); + void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +}; + +class AESOfb:public StreamAES +{ + void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); + void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); + void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); + void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); + void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +}; + +class AESCtr:public StreamAES +{ + void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); + void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); + void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); + void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); + void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +}; + + diff --git a/include/aes_stream_factory.h b/include/aes_stream_factory.h new file mode 100644 index 00000000..104ec83a --- /dev/null +++ b/include/aes_stream_factory.h @@ -0,0 +1,151 @@ +#include "aes.h" +#include "aes_stream.h" +#include +#include + +/** + * @brief Abstract factory class for creating StreamAES objects. + */ +class StreamAESFactory +{ + public: + /** + * @brief Creates a new StreamAES object. + * + * @return A pointer to the newly created StreamAES object. + */ + virtual StreamAES* create() const = 0; +}; + +/** + * @brief Factory class for creating AESEcb objects. + */ +class AESEcbFactory : public StreamAESFactory +{ + public: + /** + * @brief Creates a new AESEcb object. + * + * @return A pointer to the newly created AESEcb object. + */ + StreamAES* create() const override + { + return new AESEcb(); + } +}; + +/** + * @brief Factory class for creating AESCbc objects. + */ +class AESCbcFactory : public StreamAESFactory +{ + public: + /** + * @brief Creates a new AESCbc object. + * + * @return A pointer to the newly created AESCbc object. + */ + StreamAES* create() const override + { + return new AESCbc(); + } +}; + +/** + * @brief Factory class for creating AESCfb objects. + */ +class AESCfbFactory : public StreamAESFactory +{ + public: + /** + * @brief Creates a new AESCfb object. + * + * @return A pointer to the newly created AESCfb object. + */ + StreamAES* create() const override + { + return new AESCfb(); + } +}; + +/** + * @brief Factory class for creating AESOfb objects. + */ +class AESOfbFactory : public StreamAESFactory +{ + public: + /** + * @brief Creates a new AESOfb object. + * + * @return A pointer to the newly created AESOfb object. + */ + StreamAES* create() const override + { + return new AESOfb(); + } +}; + +/** + * @brief Factory class for creating AESCtr objects. + */ +class AESCtrFactory : public StreamAESFactory +{ + public: + /** + * @brief Creates a new AESCtr object. + * + * @return A pointer to the newly created AESCtr object. + */ + StreamAES* create() const override + { + return new AESCtr(); + } +}; + +/** + * @brief Singleton class for managing StreamAESFactory instances. + */ +class FactoryManager +{ + public: + /** + * @brief Gets the singleton instance of FactoryManager. + * + * @return The singleton instance of FactoryManager. + */ + static FactoryManager& getInstance() + { + static FactoryManager instance; + return instance; + } + + /** + * @brief Creates a StreamAES object based on the specified AESChainingMode. + * + * @param type The AES chaining mode. + * @return A pointer to the newly created StreamAES object. + */ + StreamAES* create(const AESChainingMode& type) const + { + auto it = factories.find(type); + if (it != factories.end()) + return it->second->create(); + + return nullptr; + } + + private: + std::map factories = + { + {AESChainingMode::ECB, new AESEcbFactory()}, + {AESChainingMode::CBC, new AESCbcFactory()}, + {AESChainingMode::CFB, new AESCfbFactory()}, + {AESChainingMode::OFB, new AESOfbFactory()}, + {AESChainingMode::CTR, new AESCtrFactory()} + }; + + /** + * @brief Private constructor for singleton pattern. + */ + FactoryManager() {} +}; diff --git a/src/aes.cpp b/src/aes.cpp index 47f1c3fc..fd1f412b 100644 --- a/src/aes.cpp +++ b/src/aes.cpp @@ -43,7 +43,11 @@ void padMessage(unsigned char *&message, unsigned int &length, unsigned int &paddedLength) { size_t originalLength = length; - paddedLength =((originalLength + BLOCK_BYTES_LEN - 1) / BLOCK_BYTES_LEN) * BLOCK_BYTES_LEN; + + paddedLength = + ((originalLength + BLOCK_BYTES_LEN - 1) / BLOCK_BYTES_LEN) * BLOCK_BYTES_LEN; + if(paddedLength == originalLength) + paddedLength += BLOCK_BYTES_LEN; unsigned char *paddedMessage = new unsigned char[paddedLength]; memcpy(paddedMessage, message, originalLength); @@ -91,340 +95,6 @@ unsigned char *generateKey(AESKeyLength keyLength) return key; } -/** - @brief Encrypts a message using AES. - @param in The input message to be encrypted. - @param inLen The length of the input message. - @param key The encryption key. - @param out The encrypted output message. - @param outLen The length of the encrypted message. - */ -void encryptAES(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, AESKeyLength keyLength, AESChainingMode chainingMode) -{ - if(chainingMode == ECB) { - encryptFunctions[chainingMode](in, inLen, key, out, outLen, nullptr, keyLength); - return; - } - unsigned char *iv; - iv = new unsigned char[16]; - generateRandomIV(iv); - encryptFunctions[chainingMode](in, inLen, key, out, outLen, iv, keyLength); - unsigned char *newOut = new unsigned char[outLen + 16]; - memcpy(newOut, out, outLen); - memcpy(newOut + outLen, iv, 16); - delete[] out; - out = newOut; - outLen += 16; -} - -/** - @brief Decrypts a message using AES. - @param in The input message to be decrypted. - @param inLen The length of the input message. - @param key The decryption key. - @param out The decrypted output message. - @param outLen The length of the decrypted message. - */ -void decryptAES(unsigned char in[], unsigned int inLen, - unsigned char *key, unsigned char *&out, unsigned int &outLen, AESKeyLength keyLength, AESChainingMode chainingMode) -{ - if(chainingMode != ECB){ - unsigned int messageLen = inLen - 16; - decryptFunctions[chainingMode](in, messageLen, key, out, outLen, in + messageLen, keyLength); - - return; - } - - decryptFunctions[chainingMode](in, inLen, key, out, outLen, NULL, keyLength); - -} - -/** - Encrypts data using AES in CBC mode. - @param in Input data. - @param inLen Length of input data. - @param key Encryption key. - @param[out] out Encrypted output data. - @param[out] outLen Length of encrypted data. - @param iv Initialization vector. - @param keyLength AES key length (128, 192, 256 bits). - */ -void encryptCBC(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) -{ - padMessage(in, inLen, outLen); - unsigned char block[BLOCK_BYTES_LEN]; - out = new unsigned char[outLen]; - unsigned char *roundKeys = - new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; - keyExpansion(key, roundKeys, keyLength); - memcpy(block, iv, BLOCK_BYTES_LEN); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { - xorBlocks(block, in + i, block, BLOCK_BYTES_LEN); - encryptBlock(block, out + i, roundKeys, keyLength); - memcpy(block, out + i, BLOCK_BYTES_LEN); - } - delete[] roundKeys; -} - -/** - Encrypts data using AES in ECB mode. - @param in Input data. - @param inLen Length of input data. - @param key Encryption key. - @param[out] out Encrypted output data. - @param[out] outLen Length of encrypted data. - @param iv Initialization vector (unused in ECB mode). - @param keyLength AES key length (128, 192, 256 bits). - */ -void encryptECB(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen,const unsigned char *iv, AESKeyLength keyLength) -{ - padMessage(in, inLen, outLen); - unsigned char block[BLOCK_BYTES_LEN]; - out = new unsigned char[outLen]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; - keyExpansion(key, roundKeys, keyLength); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { - memcpy(block, in + i, BLOCK_BYTES_LEN); - encryptBlock(block, out + i, roundKeys, keyLength); - } - delete[] roundKeys; -} - -/** - Encrypts data using AES in OFB mode. - @param in Input data. - @param inLen Length of input data. - @param key Encryption key. - @param[out] out Encrypted output data. - @param[out] outLen Length of encrypted data. - @param iv Initialization vector. - @param keyLength AES key length (128, 192, 256 bits). - */ -void encryptOFB(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) -{ - padMessage(in, inLen, outLen); - unsigned char block[BLOCK_BYTES_LEN]; - out = new unsigned char[outLen]; - unsigned char feedback[BLOCK_BYTES_LEN]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; - keyExpansion(key, roundKeys, keyLength); - memcpy(feedback, iv, BLOCK_BYTES_LEN); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { - encryptBlock(feedback, block, roundKeys, keyLength); - xorBlocks(block, in + i, out+i, BLOCK_BYTES_LEN); - memcpy(feedback, block, BLOCK_BYTES_LEN); - } - delete[] roundKeys; -} - -/** - Encrypts data using AES in CFB mode. - @param in Input data. - @param inLen Length of input data. - @param key Encryption key. - @param[out] out Encrypted output data. - @param[out] outLen Length of encrypted data. - @param iv Initialization vector. - @param keyLength AES key length (128, 192, 256 bits). - */ -void encryptCFB(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) -{ - padMessage(in, inLen, outLen); - unsigned char block[BLOCK_BYTES_LEN]; - out = new unsigned char[outLen]; - unsigned char feedback[BLOCK_BYTES_LEN]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; - keyExpansion(key, roundKeys, keyLength); - memcpy(feedback, iv, BLOCK_BYTES_LEN); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { - encryptBlock(feedback, block, roundKeys, keyLength); - xorBlocks(block, in + i, out+i, BLOCK_BYTES_LEN); - memcpy(feedback, out + i, BLOCK_BYTES_LEN); - } - delete[] roundKeys; -} - -/** - Encrypts data using AES in CTR mode. - @param in Input data. - @param inLen Length of input data. - @param key Encryption key. - @param[out] out Encrypted output data. - @param[out] outLen Length of encrypted data. - @param iv Initialization vector. - @param keyLength AES key length (128, 192, 256 bits). - */ -void encryptCTR(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) -{ - padMessage(in, inLen, outLen); - unsigned char block[BLOCK_BYTES_LEN]; - out = new unsigned char[outLen]; - unsigned char counter[BLOCK_BYTES_LEN]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; - keyExpansion(key, roundKeys, keyLength); - memcpy(counter, iv, BLOCK_BYTES_LEN); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { - encryptBlock(counter, block, roundKeys, keyLength); - xorBlocks(block, in + i, out+i, BLOCK_BYTES_LEN); - for (int j = BLOCK_BYTES_LEN - 1; j >= 0; --j) - if (++counter[j]) break; - } - delete[] roundKeys; -} - -/** - Decrypts data using AES in CBC mode. - @param in Encrypted input data. - @param inLen Length of input data. - @param key Decryption key. - @param[out] out Decrypted output data. - @param[out] outLen Length of decrypted data. - @param iv Initialization vector. - @param keyLength AES key length (128, 192, 256 bits). - */ -void decryptCBC(const unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv,AESKeyLength keyLength) -{ - checkLength(inLen); - unsigned char block[BLOCK_BYTES_LEN]; - outLen = inLen; - out = new unsigned char[outLen]; - unsigned char *roundKeys = - new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; - keyExpansion(key, roundKeys, keyLength); - memcpy(block, iv, BLOCK_BYTES_LEN); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { - decryptBlock(in + i, out + i, roundKeys, keyLength); - xorBlocks(block, out + i, out + i, BLOCK_BYTES_LEN); - memcpy(block, in + i, BLOCK_BYTES_LEN); - } - unpadMessage(out, outLen); - delete[] roundKeys; -} - -/** - Decrypts data using AES in ECB mode. - @param in Encrypted input data. - @param inLen Length of input data. - @param key Decryption key. - @param[out] out Decrypted output data. - @param[out] outLen Length of decrypted data. - @param iv Initialization vector (unused in ECB mode). - @param keyLength AES key length (128, 192, 256 bits). - */ -void decryptECB(const unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen,const unsigned char *iv, AESKeyLength keyLength) -{ - checkLength(inLen); - outLen = inLen; - out = new unsigned char[outLen]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; - keyExpansion(key, roundKeys, keyLength); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) - decryptBlock(in + i, out + i, roundKeys, keyLength); - unpadMessage(out, outLen); - delete[] roundKeys; -} - -/** - Decrypts data using AES in OFB mode. - @param in Encrypted input data. - @param inLen Length of input data. - @param key Decryption key. - @param[out] out Decrypted output data. - @param[out] outLen Length of decrypted data. - @param iv Initialization vector. - @param keyLength AES key length (128, 192, 256 bits). - */ -void decryptOFB(const unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) -{ - checkLength(inLen); - unsigned char block[BLOCK_BYTES_LEN]; - outLen = inLen; - out = new unsigned char[outLen]; - unsigned char feedback[BLOCK_BYTES_LEN]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; - keyExpansion(key, roundKeys, keyLength); - memcpy(feedback, iv, BLOCK_BYTES_LEN); - - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { - encryptBlock(feedback, block, roundKeys, keyLength); - // Copy only the amount of data needed for the current block - unsigned int blockLen = (i + BLOCK_BYTES_LEN <= outLen) ? BLOCK_BYTES_LEN : (outLen - i); - xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); - // Update feedback to be used for the next block - memcpy(feedback, block, BLOCK_BYTES_LEN); - } - delete[] roundKeys; -} - -/** - Decrypts data using AES in CFB mode. - @param in Encrypted input data. - @param inLen Length of input data. - @param key Decryption key. - @param[out] out Decrypted output data. - @param[out] outLen Length of decrypted data. - @param iv Initialization vector. - @param keyLength AES key length (128, 192, 256 bits). - */ -void decryptCFB(const unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) -{ - checkLength(inLen); - unsigned char block[BLOCK_BYTES_LEN]; - outLen = inLen; - out = new unsigned char[outLen]; - unsigned char feedback[BLOCK_BYTES_LEN]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; - keyExpansion(key, roundKeys, keyLength); - memcpy(feedback, iv, BLOCK_BYTES_LEN); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { - encryptBlock(feedback, block, roundKeys, keyLength); - xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); - memcpy(feedback, in + i, BLOCK_BYTES_LEN); - } - delete[] roundKeys; -} - -/** - Decrypts data using AES in CTR mode. - @param in Encrypted input data. - @param inLen Length of input data. - @param key Decryption key. - @param[out] out Decrypted output data. - @param[out] outLen Length of decrypted data. - @param iv Initialization vector. - @param keyLength AES key length (128, 192, 256 bits). - */ -void decryptCTR(const unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, AESKeyLength keyLength) -{ - checkLength(inLen); - unsigned char block[BLOCK_BYTES_LEN]; - outLen = inLen; - out = new unsigned char[outLen]; - unsigned char counter[BLOCK_BYTES_LEN]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; - keyExpansion(key, roundKeys, keyLength); - memcpy(counter, iv, BLOCK_BYTES_LEN); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { - encryptBlock(counter, block, roundKeys, keyLength); - xorBlocks(block, in + i, out+i, BLOCK_BYTES_LEN); - for (int j = BLOCK_BYTES_LEN - 1; j >= 0; --j) { - if (++counter[j]) break; - } - } - delete[] roundKeys; -} - /** @brief Checks if the input length is a multiple of the block length. @param len The length of the input data. @@ -951,7 +621,8 @@ void decryptBlock(const unsigned char in[], unsigned char out[], { unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]; unsigned int i, j, round; - + for(int i =0; i< 4 * NUM_BLOCKS; i++) + std::cout< lastBlock = out; + this -> key = key; + this -> keyLength = keyLength; + + outLen += 16; +} + +void AESCbc::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) +{ + encrypt(block, inLen, key,out, outLen, lastBlock, nullptr, keyLength); +} + +void AESCbc::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) +{ + this-> iv = block + inLen - 16; + decrypt(block, inLen - 16, key, out, outLen, block + inLen - 16, nullptr, keyLength); + this-> lastBlock = out; +} + +void AESCbc::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) +{ + decrypt(block, inLen , key, out, outLen, lastBlock,nullptr, keyLength); +} + +void AESCbc::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) +{ + padMessage(in, inLen, outLen); + unsigned char block[BLOCK_BYTES_LEN]; + out = new unsigned char[outLen]; + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + keyExpansion(key, roundKeys, keyLength); + memcpy(block, iv, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + xorBlocks(block, in + i, block, BLOCK_BYTES_LEN); + encryptBlock(block, out + i, roundKeys, keyLength); + memcpy(block, out + i, BLOCK_BYTES_LEN); + } + delete[] roundKeys; +} + +void AESCbc::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) +{ + checkLength(inLen); + unsigned char block[BLOCK_BYTES_LEN]; + outLen = inLen; + out = new unsigned char[outLen]; + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + keyExpansion(key, roundKeys, keyLength); + memcpy(block, iv, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + decryptBlock(in + i, out + i, roundKeys, keyLength); + xorBlocks(block, out + i, out + i, BLOCK_BYTES_LEN); + memcpy(block, in + i, BLOCK_BYTES_LEN); + } + unpadMessage(out, outLen); + delete[] roundKeys; +} \ No newline at end of file diff --git a/src/aes_cfb.cpp b/src/aes_cfb.cpp new file mode 100644 index 00000000..6f1bb11f --- /dev/null +++ b/src/aes_cfb.cpp @@ -0,0 +1,81 @@ +#include "../include/aes_stream.h" + +void AESCfb::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) +{ + generateRandomIV(iv); + encrypt(block, inLen, key, out, outLen, iv,nullptr, keyLength); + unsigned char *newOut = new unsigned char[outLen + 16]; + memcpy(newOut, out, outLen); + memcpy(newOut + outLen, iv, 16); + out = newOut; + this -> lastBlock = out; + this -> key = key; + this -> keyLength = keyLength; + + outLen += 16; +} + +void AESCfb::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) +{ + encrypt(block, inLen, key,out, outLen, lastBlock, nullptr, keyLength); +} + +void AESCfb::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) +{ + this-> iv = block + inLen - 16; + decrypt(block, inLen - 16, key, out, outLen, block + inLen - 16, nullptr, keyLength); + this-> lastBlock = out; +} + +void AESCfb::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) +{ + decrypt(block, inLen , key, out, outLen, lastBlock,nullptr, keyLength); +} + +void AESCfb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) +{ + padMessage(in, inLen, outLen); + unsigned char block[BLOCK_BYTES_LEN]; + out = new unsigned char[outLen]; + unsigned char feedback[BLOCK_BYTES_LEN]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + keyExpansion(key, roundKeys, keyLength); + memcpy(feedback, iv, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + encryptBlock(feedback, block, roundKeys, keyLength); + xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); + memcpy(feedback, out + i, BLOCK_BYTES_LEN); + } + delete[] roundKeys; +} + +/** + Decrypts data using AES in CFB mode. + @param in Encrypted input data. + @param inLen Length of input data. + @param key Decryption key. + @param[out] out Decrypted output data. + @param[out] outLen Length of decrypted data. + @param iv Initialization vector. + @param keyLength AES key length (128, 192, 256 bits). + */ +void AESCfb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) +{ + checkLength(inLen); + unsigned char block[BLOCK_BYTES_LEN]; + outLen = inLen; + out = new unsigned char[outLen]; + unsigned char feedback[BLOCK_BYTES_LEN]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + keyExpansion(key, roundKeys, keyLength); + memcpy(feedback, iv, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + encryptBlock(feedback, block, roundKeys, keyLength); + xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); + memcpy(feedback, in + i, BLOCK_BYTES_LEN); + } + unpadMessage(out, outLen); + delete[] roundKeys; +} \ No newline at end of file diff --git a/src/aes_ctr.cpp b/src/aes_ctr.cpp new file mode 100644 index 00000000..7757c49f --- /dev/null +++ b/src/aes_ctr.cpp @@ -0,0 +1,82 @@ +#include "../include/aes_stream.h" + +void AESCtr::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) +{ + unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; + generateRandomIV(iv); + memcpy(lastData, iv, BLOCK_BYTES_LEN); + encrypt(block, inLen, key, out, outLen, iv, lastData, keyLength); + unsigned char *newOut = new unsigned char[outLen + 16]; + memcpy(newOut, out, outLen); + memcpy(newOut + outLen, iv, 16); + out = newOut; + this -> lastBlock = out; + this -> key = key; + this -> keyLength = keyLength; + this-> lastData = lastData; + outLen += 16; +} + +void AESCtr::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) +{ + encrypt(block, inLen, key,out, outLen, lastBlock, lastData, keyLength); +} + +void AESCtr::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) +{ + unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; + memcpy(lastData, iv, BLOCK_BYTES_LEN); + this-> iv = block + inLen - 16; + decrypt(block, inLen - 16, key, out, outLen, block + inLen - 16, lastData, keyLength); + this-> lastBlock = out; + this->lastData = lastData; +} + +void AESCtr::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) +{ + decrypt(block, inLen , key, out, outLen, lastBlock, lastData, keyLength); +} + +void AESCtr::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) +{ + padMessage(in, inLen, outLen); + unsigned char block[BLOCK_BYTES_LEN]; + out = new unsigned char[outLen]; + unsigned char counter[BLOCK_BYTES_LEN]; + memcpy(counter, lastData, BLOCK_BYTES_LEN); + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + keyExpansion(key, roundKeys, keyLength); + memcpy(counter, lastData, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + encryptBlock(counter, block, roundKeys, keyLength); + xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); + for (int j = BLOCK_BYTES_LEN - 1; j >= 0; --j) + if (++counter[j]) break; + memcpy(lastData, counter,BLOCK_BYTES_LEN); + } + delete[] roundKeys; +} + +void AESCtr::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) +{ + checkLength(inLen); + unsigned char block[BLOCK_BYTES_LEN]; + outLen = inLen; + out = new unsigned char[outLen]; + unsigned char counter[BLOCK_BYTES_LEN]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + keyExpansion(key, roundKeys, keyLength); + memcpy(counter, lastData, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + encryptBlock(counter, block, roundKeys, keyLength); + xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); + for (int j = BLOCK_BYTES_LEN - 1; j >= 0; --j) + if (++counter[j]) break; + + memcpy(lastData, counter,BLOCK_BYTES_LEN); + } + unpadMessage(out, outLen); + delete[] roundKeys; +} \ No newline at end of file diff --git a/src/aes_ecb.cpp b/src/aes_ecb.cpp new file mode 100644 index 00000000..b663aeba --- /dev/null +++ b/src/aes_ecb.cpp @@ -0,0 +1,52 @@ +#include "../include/aes_stream.h" + +void AESEcb::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) +{ + encrypt(block, inLen, key, out, outLen, nullptr,nullptr, keyLength); + this -> key = key; + this -> keyLength = keyLength; +} + +void AESEcb::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) +{ + encrypt(block, inLen, key,out, outLen, nullptr, nullptr, keyLength); +} + +void AESEcb::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) +{ + decrypt(block, inLen , key, out, outLen, nullptr, nullptr, keyLength); +} + +void AESEcb::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) +{ + decrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); +} + +void AESEcb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen,const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) +{ + padMessage(in, inLen, outLen); + unsigned char block[BLOCK_BYTES_LEN]; + out = new unsigned char[outLen]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + keyExpansion(key, roundKeys, keyLength); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + memcpy(block, in + i, BLOCK_BYTES_LEN); + encryptBlock(block, out + i, roundKeys, keyLength); + } + delete[] roundKeys; +} + +void AESEcb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen,const unsigned char *iv, unsigned char *lastData,AESKeyLength keyLength) +{ + checkLength(inLen); + outLen = inLen; + out = new unsigned char[outLen]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + keyExpansion(key, roundKeys, keyLength); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) + decryptBlock(in + i, out + i, roundKeys, keyLength); + unpadMessage(out, outLen); + delete[] roundKeys; +} \ No newline at end of file diff --git a/src/aes_ofb.cpp b/src/aes_ofb.cpp new file mode 100644 index 00000000..489eb5ae --- /dev/null +++ b/src/aes_ofb.cpp @@ -0,0 +1,90 @@ +#include "../include/aes_stream.h" + +void AESOfb::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) +{ + unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; + generateRandomIV(iv); + memcpy(lastData, iv, BLOCK_BYTES_LEN); + encrypt(block, inLen, key, out, outLen, iv,lastData, keyLength); + unsigned char *newOut = new unsigned char[outLen + 16]; + memcpy(newOut, out, outLen); + memcpy(newOut + outLen, iv, 16); + out = newOut; + this -> lastBlock = out; + this -> key = key; + this -> keyLength = keyLength; + this-> lastData = lastData; + outLen += 16; +} + +void AESOfb::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) +{ + encrypt(block, inLen, key,out, outLen, lastBlock, lastData, keyLength); +} + +void AESOfb::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) +{ + unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; + memcpy(lastData, iv, BLOCK_BYTES_LEN); + this-> iv = block + inLen - 16; + decrypt(block, inLen - 16, key, out, outLen, block + inLen - 16, lastData, keyLength); + this-> lastBlock = out; + this->lastData = lastData; +} + +void AESOfb::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) +{ + decrypt(block, inLen , key, out, outLen, lastBlock, lastData, keyLength); +} + +void AESOfb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) +{ + padMessage(in, inLen, outLen); + unsigned char block[BLOCK_BYTES_LEN]; + out = new unsigned char[outLen]; + unsigned char feedback[BLOCK_BYTES_LEN]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + keyExpansion(key, roundKeys, keyLength); + if(lastData) + memcpy(feedback, lastData, BLOCK_BYTES_LEN); + else + memcpy(feedback, iv, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + encryptBlock(feedback, block, roundKeys, keyLength); + for (unsigned int j = 0; j < BLOCK_BYTES_LEN; ++j) + out[i + j] = in[i + j] ^ block[j]; + memcpy(feedback, block, BLOCK_BYTES_LEN); + memcpy(lastData, feedback, BLOCK_BYTES_LEN); + } + delete[] roundKeys; +} + +void AESOfb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) +{ + checkLength(inLen); + unsigned char block[BLOCK_BYTES_LEN]; + outLen = inLen; + out = new unsigned char[outLen]; + unsigned char feedback[BLOCK_BYTES_LEN]; + unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + keyExpansion(key, roundKeys, keyLength); + if(lastData) + memcpy(feedback, lastData, BLOCK_BYTES_LEN); + else + memcpy(feedback, iv, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + encryptBlock(feedback, block, roundKeys, keyLength); + // Copy only the amount of data needed for the current block + unsigned int blockLen = (i + BLOCK_BYTES_LEN <= outLen) ? BLOCK_BYTES_LEN : (outLen - i); + for (unsigned int j = 0; j < blockLen; ++j) + out[i + j] = in[i + j] ^ block[j]; + // Update feedback to be used for the next block + memcpy(feedback, block, BLOCK_BYTES_LEN); + memcpy(lastData, feedback, BLOCK_BYTES_LEN); + + } + unpadMessage(out, outLen); + delete[] roundKeys; +} \ No newline at end of file diff --git a/tests/aes_tests.cpp b/tests/aes_tests.cpp index 79efe0bf..7fdfdacb 100644 --- a/tests/aes_tests.cpp +++ b/tests/aes_tests.cpp @@ -1,369 +1,129 @@ #include #include "gtest/gtest.h" #include "../include/aes.h" +#include "../include/aes_stream_factory.h" // Assuming this is where your FactoryManager is defined + const unsigned int BLOCK_BYTES_LENGTH = 16 * sizeof(unsigned char); -TEST(KeyLengths, KeyLength128_CBC) -{ +/* Helper function to setup encryption and decryption */ +void testEncryptionDecryption(AESChainingMode mode, AESKeyLength keyLength) { unsigned char plain[BLOCK_BYTES_LENGTH] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff + }; + unsigned char plain2[BLOCK_BYTES_LENGTH] = { + 0x00, 0x10, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x78, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff + }; + + // Create a factory instance + StreamAES* streamAES = FactoryManager::getInstance().create(mode); + ASSERT_NE(streamAES, nullptr); + + unsigned char* key = generateKey(keyLength); + unsigned char* encrypted = nullptr; + unsigned char* encrypted2 = nullptr; + unsigned int outLenEncrypted = 0; + unsigned int outLenEncrypted2 = 0; + + streamAES->encryptStart(plain, BLOCK_BYTES_LENGTH, encrypted, outLenEncrypted, key, keyLength); + streamAES->encryptContinue(plain2, BLOCK_BYTES_LENGTH, encrypted2, outLenEncrypted2); + + unsigned char* decrypted = nullptr; + unsigned char* decrypted2 = nullptr; + unsigned int outLenDecrypted = 0; + unsigned int outLenDecrypted2 = 0; + + streamAES->decryptStart(encrypted, outLenEncrypted, decrypted, outLenDecrypted, key, keyLength); + streamAES->decryptContinue(encrypted2, outLenEncrypted2, decrypted2, outLenDecrypted2); - unsigned char *key = generateKey(AESKeyLength::AES_128); - unsigned char *encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_128,AESChainingMode::CBC); - unsigned char *decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_128,AESChainingMode::CBC); ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); delete[] encrypted; + delete[] encrypted2; delete[] decrypted; + delete[] decrypted2; + // delete streamAES; } - -TEST(KeyLengths, KeyLength192_CBC) +TEST(KeyLengths, KeyLength128_ECB) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - - unsigned char *key = generateKey(AESKeyLength::AES_192); - unsigned char *encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_192,AESChainingMode::CBC); - unsigned char *decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_192,AESChainingMode::CBC); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] decrypted; + testEncryptionDecryption(AESChainingMode::ECB, AESKeyLength::AES_128); } -TEST(KeyLengths, KeyLength256_CBC) +TEST(KeyLengths, KeyLength128_CBC) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - - unsigned char *key = generateKey(AESKeyLength::AES_256); - unsigned char *encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_256,AESChainingMode::CBC); - unsigned char *decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256,AESChainingMode::CBC); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] decrypted; + testEncryptionDecryption(AESChainingMode::CBC, AESKeyLength::AES_128); } -TEST(CBC, EncryptDecryptOneBlock_CBC) +TEST(KeyLengths, KeyLength128_CFB) { - unsigned char plain[18] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, - 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, - 0xcc, 0xdd, 0xee, 0xff, 0xef, 0x03}; - - unsigned char *key = generateKey(AESKeyLength::AES_256); - unsigned char *encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, 17, key, encrypted, outLenEncrypted, AESKeyLength::AES_256,AESChainingMode::CBC); - unsigned char *decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256,AESChainingMode::CBC); - ASSERT_FALSE(memcmp(plain, decrypted, 17)); - delete[] encrypted; - delete[] decrypted; + testEncryptionDecryption(AESChainingMode::CFB, AESKeyLength::AES_128); } -TEST(KeyLengths, KeyLength128_CTR) +TEST(KeyLengths, KeyLength128_OFB) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - - unsigned char *key = generateKey(AESKeyLength::AES_128); - unsigned char *encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_128, AESChainingMode::CTR); - unsigned char *decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_128, AESChainingMode::CTR); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] decrypted; + testEncryptionDecryption(AESChainingMode::OFB, AESKeyLength::AES_128); } -TEST(KeyLengths, KeyLength192_CTR) +TEST(KeyLengths, KeyLength128_CTR) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - - unsigned char *key = generateKey(AESKeyLength::AES_192); - unsigned char *encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_192, AESChainingMode::CTR); - unsigned char *decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_192, AESChainingMode::CTR); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] decrypted; + testEncryptionDecryption(AESChainingMode::CTR, AESKeyLength::AES_128); } -TEST(KeyLengths, KeyLength256_CTR) +TEST(KeyLengths, KeyLength192_ECB) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - - unsigned char *key = generateKey(AESKeyLength::AES_256); - unsigned char *encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::CTR); - unsigned char *decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::CTR); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] decrypted; + testEncryptionDecryption(AESChainingMode::ECB, AESKeyLength::AES_192); } -TEST(CTR, EncryptDecryptOneBlock_CTR) +TEST(KeyLengths, KeyLength192_CBC) { - unsigned char plain[18] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, - 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, - 0xcc, 0xdd, 0xee, 0xff, 0xef, 0x03}; - - unsigned char *key = generateKey(AESKeyLength::AES_256); - unsigned char *encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, 17, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::CTR); - unsigned char *decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::CTR); - ASSERT_FALSE(memcmp(plain, decrypted, 17)); - delete[] encrypted; - delete[] decrypted; + testEncryptionDecryption(AESChainingMode::CBC, AESKeyLength::AES_192); } -TEST(KeyLengths, KeyLength128_ECB) +TEST(KeyLengths, KeyLength192_CFB) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - - unsigned char *key = generateKey(AESKeyLength::AES_128); - unsigned char *encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_128, AESChainingMode::ECB); - unsigned char *decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_128, AESChainingMode::ECB); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] decrypted; + testEncryptionDecryption(AESChainingMode::CFB, AESKeyLength::AES_192); } -TEST(KeyLengths, KeyLength192_ECB) +TEST(KeyLengths, KeyLength192_OFB) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - - unsigned char *key = generateKey(AESKeyLength::AES_192); - unsigned char *encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_192, AESChainingMode::ECB); - unsigned char *decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_192, AESChainingMode::ECB); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] decrypted; + testEncryptionDecryption(AESChainingMode::OFB, AESKeyLength::AES_192); } -TEST(KeyLengths, KeyLength256_ECB) +TEST(KeyLengths, KeyLength192_CTR) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - - unsigned char *key = generateKey(AESKeyLength::AES_256); - unsigned char *encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::ECB); - unsigned char *decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::ECB); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] decrypted; + testEncryptionDecryption(AESChainingMode::CTR, AESKeyLength::AES_192); } -TEST(ECB, EncryptDecryptOneBlock_ECB) +TEST(KeyLengths, KeyLength256_ECB) { - unsigned char plain[18] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, - 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, - 0xcc, 0xdd, 0xee, 0xff, 0xef, 0x03}; - - unsigned char *key = generateKey(AESKeyLength::AES_256); - unsigned char *encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, 17, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::ECB); - unsigned char *decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::ECB); - ASSERT_FALSE(memcmp(plain, decrypted, 17)); - delete[] encrypted; - delete[] decrypted; -} - -TEST(KeyLengths, KeyLength128_CFB) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - - unsigned char* key = generateKey(AESKeyLength::AES_128); - unsigned char* encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_128, AESChainingMode::CFB); - unsigned char* decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_128, AESChainingMode::CFB); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] decrypted; - delete[] key; + testEncryptionDecryption(AESChainingMode::ECB, AESKeyLength::AES_256); } -TEST(KeyLengths, KeyLength192_CFB) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - - unsigned char* key = generateKey(AESKeyLength::AES_192); - unsigned char* encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_192, AESChainingMode::CFB); - unsigned char* decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_192, AESChainingMode::CFB); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] decrypted; - delete[] key; -} - -TEST(KeyLengths, KeyLength256_CFB) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - - unsigned char* key = generateKey(AESKeyLength::AES_256); - unsigned char* encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::CFB); - unsigned char* decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::CFB); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] decrypted; - delete[] key; +TEST(KeyLengths, KeyLength256_CBC) +{ + testEncryptionDecryption(AESChainingMode::CBC, AESKeyLength::AES_256); } -TEST(CFB, EncryptDecryptOneBlock) { - unsigned char plain[18] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, - 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, - 0xcc, 0xdd, 0xee, 0xff, 0xef, 0x03}; - - unsigned char* key = generateKey(AESKeyLength::AES_256); - unsigned char* encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, 17, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::CFB); - unsigned char* decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::CFB); - ASSERT_FALSE(memcmp(plain, decrypted, 17)); - delete[] encrypted; - delete[] decrypted; - delete[] key; +TEST(KeyLengths, KeyLength256_CFB) +{ + testEncryptionDecryption(AESChainingMode::CFB, AESKeyLength::AES_256); } -TEST( KeyLengths, KeyLength128_OFB) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - - unsigned char* key = generateKey(AESKeyLength::AES_128); - unsigned char* encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_128, AESChainingMode::OFB); - unsigned char* decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_128, AESChainingMode::OFB); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] decrypted; - delete[] key; +TEST(KeyLengths, KeyLength256_OFB) +{ + testEncryptionDecryption(AESChainingMode::OFB, AESKeyLength::AES_256); } -TEST(KeyLengths, KeyLength192_OFB) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; - - unsigned char* key = generateKey(AESKeyLength::AES_192); - unsigned char* encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_192, AESChainingMode::OFB); - unsigned char* decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_192, AESChainingMode::OFB); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] decrypted; - delete[] key; +TEST(KeyLengths, KeyLength256_CTR) +{ + testEncryptionDecryption(AESChainingMode::CTR, AESKeyLength::AES_256); } -TEST( KeyLengths, KeyLength256_OFB) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; +int main() { + // Register factories + FactoryManager& manager = FactoryManager::getInstance(); - unsigned char* key = generateKey(AESKeyLength::AES_256); - unsigned char* encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, BLOCK_BYTES_LENGTH, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::OFB); - unsigned char* decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::OFB); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] decrypted; - delete[] key; -} - -TEST( OFB, EncryptDecryptOneBlock) { - unsigned char plain[18] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, - 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, - 0xcc, 0xdd, 0xee, 0xff, 0xef, 0x03}; - - unsigned char* key = generateKey(AESKeyLength::AES_256); - unsigned char* encrypted; - unsigned int outLenEncrypted; - encryptAES(plain, 17, key, encrypted, outLenEncrypted, AESKeyLength::AES_256, AESChainingMode::OFB); - unsigned char* decrypted; - unsigned int outLenDecrypted; - decryptAES(encrypted, outLenEncrypted, key, decrypted, outLenDecrypted, AESKeyLength::AES_256, AESChainingMode::OFB); - ASSERT_FALSE(memcmp(plain, decrypted, 17)); - delete[] encrypted; - delete[] decrypted; - delete[] key; -} -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); + // Now run your tests + ::testing::InitGoogleTest(); return RUN_ALL_TESTS(); -} \ No newline at end of file +} From 8f665d9fa116c2280bd7851fdda0cb16f4a6a2d4 Mon Sep 17 00:00:00 2001 From: rut-git Date: Sun, 8 Sep 2024 11:52:21 +0300 Subject: [PATCH 08/21] HSM: Add threading support to functions for improved performance and concurrency --- src/aes_ctr.cpp | 168 ++++++++++++++++++++++++++++++++++++++++-------- src/aes_ecb.cpp | 96 +++++++++++++++++++++++++-- 2 files changed, 232 insertions(+), 32 deletions(-) diff --git a/src/aes_ctr.cpp b/src/aes_ctr.cpp index 7757c49f..55d9303a 100644 --- a/src/aes_ctr.cpp +++ b/src/aes_ctr.cpp @@ -1,4 +1,130 @@ #include "../include/aes_stream.h" +#include +#include +#include +#include + +/** + Encrypts a single block of data using AES in CTR mode. + This function handles the encryption of a single block in CTR (Counter) mode. + It computes the counter value based on the given initialization vector (IV) and + block index, encrypts the counter, and then XORs the encrypted counter with the + input block to produce the output block. + @param input Pointer to the input block of plaintext data (BLOCK_BYTES_LEN bytes). + @param output Pointer to the output block where the encrypted ciphertext will be stored (BLOCK_BYTES_LEN bytes). + @param roundKeys Pointer to the array of round keys used for AES encryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + @param iv Pointer to the initialization vector (IV) used for the counter. + @param blockIndex The index of the current block to be encrypted, used to compute the counter value. + */ +void encryptBlockThreadedCTR(const unsigned char* input, unsigned char* output, unsigned char* roundKeys, + AESKeyLength keyLength, const unsigned char* lastData, unsigned int blockIndex) +{ + unsigned char block[BLOCK_BYTES_LEN]; + unsigned char counter[BLOCK_BYTES_LEN]; + + memcpy(counter, lastData, BLOCK_BYTES_LEN); + + for (int j = BLOCK_BYTES_LEN - 1, k = blockIndex; j >= 0; --j) { + counter[j] += (k % 256); + if (counter[j] != 0) break; + k /= 256; + } + + encryptBlock(counter, block, roundKeys, keyLength); + + xorBlocks(block, input, output, BLOCK_BYTES_LEN); +} + +/** + Encrypts multiple blocks of data using AES in CTR mode with multithreading. + This function divides the input plaintext into blocks and encrypts each block + in parallel using multiple threads in CTR (Counter) mode. The function ensures + that each block is encrypted using AES with a counter value derived from the + initialization vector (IV) and block index, and all threads are joined before completing. + @param plaintext Pointer to the input plaintext data to be encrypted. + @param ciphertext Pointer to the buffer where the encrypted ciphertext will be stored. + @param length The total length of the plaintext data (must be a multiple of BLOCK_BYTES_LEN). + @param roundKeys Pointer to the array of round keys used for AES encryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + @param iv Pointer to the initialization vector (IV) used for the counter. + */ +void encryptCTRMultithreaded(const unsigned char* plaintext, unsigned char* ciphertext, unsigned int length, + unsigned char* roundKeys, AESKeyLength keyLength, const unsigned char* lastData) +{ + unsigned int numBlocks = length / BLOCK_BYTES_LEN; + std::vector threads; + + for (unsigned int i = 0; i < numBlocks; ++i) { + threads.push_back(std::thread(encryptBlockThreadedCTR, &plaintext[i * BLOCK_BYTES_LEN], + &ciphertext[i * BLOCK_BYTES_LEN], roundKeys, keyLength, lastData, i)); + } + + for (auto& th : threads) { + th.join(); + } +} + +/** + Decrypts a single block of data using AES in CTR mode. + This function handles the decryption of a single block in CTR (Counter) mode. + It computes the counter value based on the given initialization vector (IV) and + block index, encrypts the counter, and then XORs the encrypted counter with the + input block to produce the output block. + @param input Pointer to the input block of ciphertext data (BLOCK_BYTES_LEN bytes). + @param output Pointer to the output block where the decrypted plaintext will be stored (BLOCK_BYTES_LEN bytes). + @param roundKeys Pointer to the array of round keys used for AES encryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + @param iv Pointer to the initialization vector (IV) used for the counter. + @param blockIndex The index of the current block to be decrypted, used to compute the counter value. + */ +void decryptBlockThreadedCTR(const unsigned char* input, unsigned char* output, unsigned char* roundKeys, + AESKeyLength keyLength, const unsigned char* lastData, unsigned int blockIndex) +{ + unsigned char block[BLOCK_BYTES_LEN]; + unsigned char counter[BLOCK_BYTES_LEN]; + + memcpy(counter, lastData, BLOCK_BYTES_LEN); + + for (int j = BLOCK_BYTES_LEN - 1, k = blockIndex; j >= 0; --j) { + counter[j] += (k % 256); + if (counter[j] != 0) break; + k /= 256; + } + + encryptBlock(counter, block, roundKeys, keyLength); + + xorBlocks(block, input, output, BLOCK_BYTES_LEN); +} + +/** + Decrypts multiple blocks of data using AES in CTR mode with multithreading. + This function divides the input ciphertext into blocks and decrypts each block + in parallel using multiple threads in CTR (Counter) mode. The function ensures + that each block is decrypted using AES with a counter value derived from the + initialization vector (IV) and block index, and all threads are joined before completing. + @param ciphertext Pointer to the input ciphertext data to be decrypted. + @param plaintext Pointer to the buffer where the decrypted plaintext will be stored. + @param length The total length of the ciphertext data (must be a multiple of BLOCK_BYTES_LEN). + @param roundKeys Pointer to the array of round keys used for AES encryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + @param iv Pointer to the initialization vector (IV) used for the counter. + */ +void decryptCTRMultithreaded(const unsigned char* ciphertext, unsigned char* plaintext, unsigned int length, + unsigned char* roundKeys, AESKeyLength keyLength, const unsigned char* lastData) +{ + unsigned int numBlocks = length / BLOCK_BYTES_LEN; + std::vector threads; + + for (unsigned int i = 0; i < numBlocks; ++i) { + threads.push_back(std::thread(decryptBlockThreadedCTR, &ciphertext[i * BLOCK_BYTES_LEN], + &plaintext[i * BLOCK_BYTES_LEN], roundKeys, keyLength, lastData, i)); + } + + for (auto& th : threads) { + th.join(); + } +} void AESCtr::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) { @@ -40,43 +166,29 @@ void AESCtr::decryptContinue(unsigned char block[], unsigned int inLen, unsigned void AESCtr::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) { + padMessage(in, inLen, outLen); - unsigned char block[BLOCK_BYTES_LEN]; out = new unsigned char[outLen]; - unsigned char counter[BLOCK_BYTES_LEN]; - memcpy(counter, lastData, BLOCK_BYTES_LEN); - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + + unsigned char* roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; keyExpansion(key, roundKeys, keyLength); - memcpy(counter, lastData, BLOCK_BYTES_LEN); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { - encryptBlock(counter, block, roundKeys, keyLength); - xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); - for (int j = BLOCK_BYTES_LEN - 1; j >= 0; --j) - if (++counter[j]) break; - memcpy(lastData, counter,BLOCK_BYTES_LEN); - } - delete[] roundKeys; + + encryptCTRMultithreaded(in, out, outLen, roundKeys, keyLength, iv); + + delete[] roundKeys; } void AESCtr::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) { - checkLength(inLen); - unsigned char block[BLOCK_BYTES_LEN]; + checkLength(inLen); outLen = inLen; out = new unsigned char[outLen]; - unsigned char counter[BLOCK_BYTES_LEN]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + + unsigned char* roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; keyExpansion(key, roundKeys, keyLength); - memcpy(counter, lastData, BLOCK_BYTES_LEN); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { - encryptBlock(counter, block, roundKeys, keyLength); - xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); - for (int j = BLOCK_BYTES_LEN - 1; j >= 0; --j) - if (++counter[j]) break; - memcpy(lastData, counter,BLOCK_BYTES_LEN); - } - unpadMessage(out, outLen); - delete[] roundKeys; -} \ No newline at end of file + decryptCTRMultithreaded(in, out, outLen, roundKeys, keyLength, iv); + + delete[] roundKeys; +} diff --git a/src/aes_ecb.cpp b/src/aes_ecb.cpp index b663aeba..2909e8e7 100644 --- a/src/aes_ecb.cpp +++ b/src/aes_ecb.cpp @@ -1,4 +1,92 @@ #include "../include/aes_stream.h" +#include +#include +#include +#include + +/** + Encrypts a single block of data using AES in ECB mode. + This function wraps the `encryptBlock` function to allow it to be used + in a threaded context. It performs AES encryption on a single block of + plaintext using the provided round keys and key length. + @param in Pointer to the input block of plaintext data (BLOCK_BYTES_LEN bytes). + @param out Pointer to the output block where the encrypted ciphertext will be stored (BLOCK_BYTES_LEN bytes). + @param roundKeys Pointer to the array of round keys used for AES encryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + */ +void encryptBlockThreadedECB(const unsigned char in[], unsigned char out[], unsigned char* roundKeys, AESKeyLength keyLength) +{ + encryptBlock(in, out, roundKeys, keyLength); +} + +/** + Encrypts multiple blocks of data using AES in ECB mode with multithreading. + This function divides the input plaintext into blocks and encrypts each block + in parallel using multiple threads. The function ensures that each block is + encrypted using AES in ECB mode, and all threads are joined before completing. + @param plaintext Pointer to the input plaintext data to be encrypted. + @param ciphertext Pointer to the buffer where the encrypted ciphertext will be stored. + @param length The total length of the plaintext data (must be a multiple of BLOCK_BYTES_LEN). + @param roundKeys Pointer to the array of round keys used for AES encryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + */ +void encryptECBMultithreaded(const unsigned char* plaintext, unsigned char* ciphertext, unsigned int length, unsigned char* roundKeys, AESKeyLength keyLength) +{ + unsigned int numBlocks = length / BLOCK_BYTES_LEN; + std::vector threads; + + for (unsigned int i = 0; i < numBlocks; ++i) { + threads.push_back(std::thread(encryptBlockThreadedECB, &plaintext[i * BLOCK_BYTES_LEN], &ciphertext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); + } + + for (auto& th : threads) { + th.join(); + } +} + +/** + Decrypts a single block of data using AES in ECB mode. + This function wraps the `decryptBlock` function to allow it to be used + in a threaded context. It performs AES decryption on a single block of + ciphertext using the provided round keys and key length. + @param input Pointer to the input block of ciphertext data (BLOCK_BYTES_LEN bytes). + @param output Pointer to the output block where the decrypted plaintext will be stored (BLOCK_BYTES_LEN bytes). + @param roundKeys Pointer to the array of round keys used for AES decryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + */ +void decryptBlockThreadedECB(const unsigned char* input, unsigned char* output, unsigned char* roundKeys, + AESKeyLength keyLength) +{ + decryptBlock(input, output, roundKeys, keyLength); +} + +/** + Decrypts multiple blocks of data using AES in ECB mode with multithreading. + This function divides the input ciphertext into blocks and decrypts each block + in parallel using multiple threads in ECB (Electronic Codebook) mode. The function + ensures that each block is decrypted using AES with the provided round keys, and + all threads are joined before completing. + @param ciphertext Pointer to the input ciphertext data to be decrypted. + @param plaintext Pointer to the buffer where the decrypted plaintext will be stored. + @param length The total length of the ciphertext data (must be a multiple of BLOCK_BYTES_LEN). + @param roundKeys Pointer to the array of round keys used for AES decryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + */ +void decryptECBMultithreaded(const unsigned char* ciphertext, unsigned char* plaintext, unsigned int length, + unsigned char* roundKeys, AESKeyLength keyLength) +{ + unsigned int numBlocks = length / BLOCK_BYTES_LEN; + std::vector threads; + + for (unsigned int i = 0; i < numBlocks; ++i) { + threads.push_back(std::thread(decryptBlockThreadedECB, &ciphertext[i * BLOCK_BYTES_LEN], + &plaintext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); + } + + for (auto& th : threads) { + th.join(); + } +} void AESEcb::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) { @@ -32,7 +120,7 @@ void AESEcb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, keyExpansion(key, roundKeys, keyLength); for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { memcpy(block, in + i, BLOCK_BYTES_LEN); - encryptBlock(block, out + i, roundKeys, keyLength); + encryptECBMultithreaded(block, out + i, BLOCK_BYTES_LEN, roundKeys, keyLength); } delete[] roundKeys; } @@ -46,7 +134,7 @@ void AESEcb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) - decryptBlock(in + i, out + i, roundKeys, keyLength); - unpadMessage(out, outLen); + decryptECBMultithreaded(in, out, outLen, roundKeys, keyLength); + unpadMessage(out, outLen); delete[] roundKeys; -} \ No newline at end of file +} From c3dc0e56588f6a4cf003b8a0445bfd4ed01add04 Mon Sep 17 00:00:00 2001 From: rut-git Date: Mon, 2 Sep 2024 18:15:11 +0300 Subject: [PATCH 09/21] HSM: Add SYCL support for ECC operations and update CMake for conditional compilation --- CMakeLists.txt | 31 ++++++--- include/ecc.h | 39 +++++++++++- src/ecc.cpp | 152 +++++++++++++++++++++++++++----------------- tests/ecc_tests.cpp | 14 ---- 4 files changed, 151 insertions(+), 85 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca0f3b5a..d68c536c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,19 +1,35 @@ cmake_minimum_required(VERSION 3.10) project(MyTest) + # Include directories include_directories(src) + +# Find GMP library +find_path(GMP_INCLUDE_DIR NAMES gmp.h) +find_library(GMP_LIBRARY NAMES gmp) +find_library(GMPXX_LIBRARY NAMES gmpxx) +if(NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARY OR NOT GMPXX_LIBRARY) + message(FATAL_ERROR "Could not find GMP or GMPXX libraries") +endif() +include_directories(${GMP_INCLUDE_DIR}) + # Find Google Test find_package(GTest REQUIRED) + # Add source files file(GLOB SOURCES "src/*.cpp") + # Check if SYCL is enabled -option(USE_SYCL "Enable SYCL support" ON) +option(USE_SYCL "Enable SYCL support" OFF) + if(USE_SYCL) # Set the icpx compiler with SYCL support set(CMAKE_CXX_COMPILER icpx) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl") + # Add oneAPI include directories include_directories(${CMAKE_SOURCE_DIR}/include /opt/intel/oneapi/compiler/latest/linux/include) + # Add oneAPI library directories link_directories(/opt/intel/oneapi/compiler/latest/linux/lib) message(STATUS "Compiling with SYCL support") @@ -22,16 +38,13 @@ if(USE_SYCL) message(STATUS "Compiling without SYCL support") remove_definitions(-DUSE_SYCL) endif() -# Add debug flags -set(CMAKE_BUILD_TYPE Debug) + # Add the executable for the tests -add_executable(runTests - tests/aes_tests.cpp ${SOURCES}) +add_executable(runTests tests/ecc_tests.cpp ${SOURCES}) + # Link libraries target_link_libraries(runTests + ${GMP_LIBRARY} + ${GMPXX_LIBRARY} gtest gtest_main pthread ) -# Optional: Output directory for the executable -set_target_properties(runTests PROPERTIES - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} -) diff --git a/include/ecc.h b/include/ecc.h index 6aa91416..1fd53922 100644 --- a/include/ecc.h +++ b/include/ecc.h @@ -39,7 +39,42 @@ mpz_class mod(mpz_class x); bool isOnCurve(Point P); mpz_class inverse(mpz_class base); std::pair signMessageECC(const std::vector &message, const mpz_class &privateKey); -bool verifySignatureECC(const std::vector &message, const std::pair &signature, const Point& publicKey); bool modularSqrt(mpz_t result, const mpz_t a, const mpz_t p); +#else // ECC_NO_SYCL -#endif \ No newline at end of file +// Structure for representing a point +struct Point { + mpz_class x; + mpz_class y; + Point() : x(0), y(0) {} + Point(mpz_class x, mpz_class y) : x(x), y(y) {} +}; + +// Structure for representing an encrypted message +struct EncryptedMessage { + mpz_class c1X; + bool c1Y; + mpz_class c2X; + bool c2Y; + EncryptedMessage(mpz_class c1X, bool c1Y, mpz_class c2X, bool c2Y) + : c1X(c1X), c1Y(c1Y), c2X(c2X), c2Y(c2Y) {} +}; + +mpz_class generatePrivateKey(); +Point generatePublicKey(mpz_class key); +mpz_class calculateY(mpz_class x); +std::vector stringToUint8(const std::string& str); +std::string uint8ToString(const std::vector& uint8Vec); +Point convertMessageToPoint(const std::string& text); +std::string convertPointToMessage(const Point &point); +EncryptedMessage encryptECC(std::vector message, Point publicKey); +std::vector decryptECC(EncryptedMessage ciphertext, mpz_class privateKey); +mpz_class generateK(); +Point multiply(Point P, mpz_class times); +Point add(Point P, Point Q); +mpz_class mod(mpz_class x); +bool isOnCurve(Point P); +mpz_class inverse(mpz_class base); +std::pair signMessageECC(const std::vector &message, const mpz_class &privateKey); +bool modularSqrt(mpz_t result, const mpz_t a, const mpz_t p); +#endif // USE_SYCL diff --git a/src/ecc.cpp b/src/ecc.cpp index f2723d96..f2d7ab6d 100644 --- a/src/ecc.cpp +++ b/src/ecc.cpp @@ -7,6 +7,7 @@ #include + unsigned int added = 0; // Define static constants @@ -20,6 +21,95 @@ const Point basicPoint(mpz_class("550662630222773436695787188951685343262506034" mpz_class("326705100207588169780830851305070431844712733" "80659243275938904335757337482424")); +#ifdef USE_SYCL +#include +using namespace cl::sycl; +/** + * Converts a message string to a point on the elliptic curve using SYCL. + * @param text The message to convert. + * @return The point on the elliptic curve. + */ +Point convertMessageToPoint(const std::string &text) +{ + std::string binaryStr(text.size() * 8, '0'); + queue queue; + buffer textBuf(text.data(), range<1>(text.size())); + buffer binaryStrBuf(binaryStr.data(), + range<1>(binaryStr.size())); + + queue.submit([&](handler &handler) { + auto textAcc = textBuf.get_access(handler); + auto binaryStrAcc = + binaryStrBuf.get_access(handler); + + handler.parallel_for(range<1>(text.size()), [=](id<1> idx) { + for (int i = 7; i >= 0; --i) + binaryStrAcc[idx[0] * 8 + (7 - i)] = + ((textAcc[idx] >> i) & 1) ? '1' : '0'; + + }); + }).wait(); + + mpz_class x; + x.set_str(binaryStr, 2); + + for (;; added++) { + mpz_class xAdded = x + mpz_class(added); + mpz_class rhs = mod(xAdded * xAdded * xAdded + a * xAdded + b); + mpz_class yAdded; + + if (modularSqrt(yAdded.get_mpz_t(), rhs.get_mpz_t(), prime.get_mpz_t())) + return Point(xAdded, yAdded); + } + + throw std::runtime_error( + "Unable to convert message to a valid point on the curve."); +} + +/** + * Converts a point on the elliptic curve to a message string. + * @param point The point to convert. + * @return The message string. + */ +std::string convertPointToMessage(const Point &point) +{ + sycl::queue queue; + + mpz_class x = point.x - mpz_class(added); + std::string binaryStr = x.get_str(2); + + size_t paddingLength = 8 - (binaryStr.size() % 8); + if (paddingLength != 8) + binaryStr = std::string(paddingLength, '0') + binaryStr; + + size_t numBytes = binaryStr.size() / 8; + std::vector result(numBytes); + sycl::buffer binaryBuffer(binaryStr.data(), + sycl::range<1>(binaryStr.size())); + sycl::buffer resultBuffer(result.data(), + sycl::range<1>(result.size())); + + queue.submit([&](sycl::handler &handler) { + auto binaryAcc = + binaryBuffer.get_access(handler); + auto resultAcc = + resultBuffer.get_access(handler); + + handler.parallel_for( + sycl::range<1>(numBytes), [=](sycl::id<1> id) { + size_t idx = id[0] * 8; + std::bitset<8> byteStr; + for (size_t bit = 0; bit < 8; ++bit) + byteStr[7 - bit] = binaryAcc[idx + bit] == + '1'; + resultAcc[id] = static_cast(byteStr.to_ulong()); + }); + }).wait(); + std::string text(result.begin(), result.end()); + return text; +} + +#else /** * Converts a message string to a point on the elliptic curve. @@ -72,6 +162,8 @@ std::string convertPointToMessage(const Point &point) return text; } +#endif + /** * Computes the modular square root using the Tonelli-Shanks algorithm. * @param result The computed square root. @@ -336,64 +428,4 @@ std::vector decryptECC(EncryptedMessage ciphertext, mpz_class privateKe negTemp); std::string text=convertPointToMessage(decrypted); return stringToUint8(text); -} - -/** -* Function to sign a message using ECC -* @param message: The message to be signed, represented as a vector of uint8_t -* @param privateKey: The private key used for signing -* @param G: The base point for the elliptic curve -* @param n: The order of the elliptic curve -* @return: A pair containing the signature (r, s) -*/ -std::pair signMessageECC(const std::vector &message, const mpz_class &privateKey) - { - mpz_class r, s; - mpz_class k; - // Convert uint8_t message to mpz_class hash - mpz_class messageHash; - mpz_import(messageHash.get_mpz_t(), message.size(), 1, sizeof(uint8_t), 0, 0, message.data()); - do { - // Generate a random k - k = generateK(); - Point R = multiply(basicPoint, k); - r = mod(R.x); - mpz_class kInv; - // Compute the modular inverse of k - if (mpz_invert(kInv.get_mpz_t(), k.get_mpz_t(), prime.get_mpz_t()) == 0) - continue; // Retry if inversion fails - // Compute the signature s - s = mod((messageHash + r * privateKey) * kInv) ; - } while (s == 0); // Ensure s is not zero - return {r, s}; -} - -/** -* Function to verify a message signature using ECC -* @param message: The message whose signature is to be verified, represented as a vector of uint8_t -* @param signature: The signature (r, s) to be verified -* @param publicKey: The public key used for verification -* @param G: The base point for the elliptic curve -* @param n: The order of the elliptic curve -* @return: True if the signature is valid, false otherwise -*/ -bool verifySignatureECC(const std::vector &message, const std::pair &signature, const Point& publicKey) -{ - mpz_class r = signature.first; - mpz_class s = signature.second; - // Check if r and s are within valid range - if (r <= 0 || r >= prime || s <= 0 || s >= prime) - return false; // Invalid r or s - - // Convert uint8_t message to mpz_class hash - mpz_class messageHash; - mpz_import(messageHash.get_mpz_t(), message.size(), 1, sizeof(uint8_t), 0, 0, message.data()); - // Compute v1 and v2 for verification - mpz_class v1 = mod(r * r ); - mpz_class v2 = mod(s * s); - // Perform scalar multiplication - Point P = multiply(publicKey, v1); - Point Q = multiply(basicPoint, v2); - // Verify the equality (r, s) = (P + Q) - return true; // Update with actual verification logic } \ No newline at end of file diff --git a/tests/ecc_tests.cpp b/tests/ecc_tests.cpp index 306123ff..8a8f74d5 100644 --- a/tests/ecc_tests.cpp +++ b/tests/ecc_tests.cpp @@ -18,20 +18,6 @@ TEST(ECCTest, EncryptDecrypt) EXPECT_EQ(messageBytes, decryptedMessage); } -// Test for ECC signature and verification -TEST(ECCTest, SignVerify) -{ - mpz_class privateKey = generatePrivateKey(); - Point publicKey = generatePublicKey(privateKey); - // Sign the message - std::vector messageBytes = {0b01110100, 0b01100101, 0b01110011, 0b01110100, 0b00100000, 0b01101101, 0b01100101, 0b01110011, 0b01110011, 0b01100001, 0b01100111, 0b01100101}; - auto signature = signMessageECC(messageBytes, privateKey); - // Verify the signature - bool isValid = verifySignatureECC(messageBytes, signature, publicKey); - // Check if the signature is valid - EXPECT_TRUE(isValid); -} - // The main function for running all the tests int main(int argc, char **argv) { From e673048fa3b27d5bb4541e1ac6ae8b3b7312c7f3 Mon Sep 17 00:00:00 2001 From: Mali Bernstein Date: Sun, 11 Aug 2024 13:31:47 +0300 Subject: [PATCH 10/21] HSM: Implement and test SHA256 algorithm --- .gitignore | 1 - CMakeLists.txt | 2 +- include/sha256.h | 37 +++++++++++ src/sha256.cpp | 148 +++++++++++++++++++++++++++++++++++++++++ tests/sha256_tests.cpp | 63 ++++++++++++++++++ 5 files changed, 249 insertions(+), 2 deletions(-) create mode 100644 include/sha256.h create mode 100644 src/sha256.cpp create mode 100644 tests/sha256_tests.cpp diff --git a/.gitignore b/.gitignore index 8bbd9f46..81d156b9 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ #clangd .cache -.clang-format # VS Code files .vscode/ diff --git a/CMakeLists.txt b/CMakeLists.txt index d68c536c..677193c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ if(USE_SYCL) endif() # Add the executable for the tests -add_executable(runTests tests/ecc_tests.cpp ${SOURCES}) +add_executable(runTests tests/aes_tests.cpp tests/ecc_tests.cpp tests/sha256_tests.cpp ${SOURCES}) # Link libraries target_link_libraries(runTests diff --git a/include/sha256.h b/include/sha256.h new file mode 100644 index 00000000..71e77161 --- /dev/null +++ b/include/sha256.h @@ -0,0 +1,37 @@ +#ifndef SHA256_H +#define SHA256_H + +#include +#include +#include + +class Sha256 +{ +private: + uint32_t state[8]; // Internal state of the SHA-256 hash function + uint32_t result[8]; // Intermediate hash values + uint8_t message[64]; // Message block (64 bytes) + size_t messageSize; // Size of the current message block + size_t bitLength; // Total length of the input message in bits + + void padding(); // Applies padding to the message + void transform(); // Processes a message block to update hash values + +public: + // Constructor: Initializes the SHA-256 state and message block + Sha256(); + + // Updates the hash with additional data + void update(const std::vector& data); + + // Finalizes the hash computation and returns the hash value + std::vector finalize(); + + // Returns the current hash value + std::vector getHash(); + + // Computes the SHA-256 hash of the given input + std::vector computeSHA256(const std::vector& input); +}; + +#endif // SHA256_H \ No newline at end of file diff --git a/src/sha256.cpp b/src/sha256.cpp new file mode 100644 index 00000000..3c61d234 --- /dev/null +++ b/src/sha256.cpp @@ -0,0 +1,148 @@ +#include "../include/sha256.h" +#include +#include + +using namespace std; + +// Constants for SHA-256 +#define CHOOSE(x, y, z) (((x) & (y)) ^ (~(x) & (z))) +#define MAJORITY(x, y, z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) +#define ROTRIGHT(a, b) (((a) >> (b)) | ((a) << (32 - (b)))) +#define SIGMA0(x) (ROTRIGHT(x, 2) ^ ROTRIGHT(x, 13) ^ ROTRIGHT(x, 22)) +#define SIGMA1(x) (ROTRIGHT(x, 6) ^ ROTRIGHT(x, 11) ^ ROTRIGHT(x, 25)) +#define GAMMA0(x) (ROTRIGHT(x, 7) ^ ROTRIGHT(x, 18) ^ ((x) >> 3)) +#define GAMMA1(x) (ROTRIGHT(x, 17) ^ ROTRIGHT(x, 19) ^ ((x) >> 10)) + +const uint32_t bytes[64] = { + // SHA-256 constants + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +}; + +Sha256::Sha256() : messageSize(0), bitLength(0) +{ + // Initialize hash values + result[0] = 0x6a09e667; + result[1] = 0xbb67ae85; + result[2] = 0x3c6ef372; + result[3] = 0xa54ff53a; + result[4] = 0x510e527f; + result[5] = 0x9b05688c; + result[6] = 0x1f83d9ab; + result[7] = 0x5be0cd19; + + // Initialize message array to zero + memset(message, 0, sizeof(message)); +} + +void Sha256::update(const std::vector& data) +{ + size_t length = data.size(); + for (size_t i = 0; i < length; i++) { + message[messageSize++] = static_cast(data[i]); + if(messageSize == 64){ + transform(); + messageSize = 0; + bitLength += 512; + } + } +} + +void Sha256::padding() +{ + uint64_t currentLength = messageSize; + uint8_t paddingEnd = currentLength < 56 ? 56 : 64; + + // Append the 0x80 byte (0b10000000) + message[currentLength++] = 0x80; + + // Pad with 0x00 bytes until the length of the message is 56 bytes mod 64 + memset(message + currentLength, 0, paddingEnd - currentLength); + currentLength = paddingEnd; + + // If message length is >= 56, process the current block and reset for new padding + if (messageSize >= 56) { + transform(); + memset(message, 0, 56); + currentLength = 56; + } + + // Append the length of the original message in bits (64-bit big-endian) + bitLength += messageSize * 8; + for (int i = 0; i < 8; i++) { + message[63 - i] = bitLength >> (i * 8); + } + + transform(); +} + +void Sha256::transform() +{ + uint32_t temp[64]; + for (uint8_t i = 0, j = 0; i < 16; i++, j += 4) + temp[i] = (message[j] << 24) | (message[j + 1] << 16) | (message[j + 2] << 8) | (message[j + 3]); + + for (uint8_t k = 16; k < 64; k++) + temp[k] = GAMMA1(temp[k - 2]) + temp[k - 7] + GAMMA0(temp[k - 15]) + temp[k - 16]; + + // Save the current state + uint32_t state[8]; + for (uint8_t i = 0; i < 8; i++) + state[i] = result[i]; + + // Process the message in 64-byte chunks + for (size_t i = 0; i < 64; i++) { + uint32_t choose, sum, majority, newA, newE; + + choose = CHOOSE(state[4], state[5], state[6]); + majority = MAJORITY(state[0], state[1], state[2]); + sum = temp[i] + bytes[i] + state[7] + choose + SIGMA1(state[4]); + newA = SIGMA0(state[0]) + majority + sum; + newE = state[3] + sum; + + state[7] = state[6]; + state[6] = state[5]; + state[5] = state[4]; + state[4] = newE; + state[3] = state[2]; + state[2] = state[1]; + state[1] = state[0]; + state[0] = newA; + } + // Add the current chunk's hash to the result + for (uint8_t i = 0; i < 8; i++) { + result[i] += state[i]; + } +} + +vector Sha256::getHash() { + std::vector hash(32); // SHA-256 hash size is 32 bytes (256 bits) + for (int i = 0; i < 8; i++) { + hash[i * 4] = (result[i] >> 24) & 0xFF; + hash[i * 4 + 1] = (result[i] >> 16) & 0xFF; + hash[i * 4 + 2] = (result[i] >> 8) & 0xFF; + hash[i * 4 + 3] = result[i] & 0xFF; + } + return hash; +} + +vector Sha256::computeSHA256(const std::vector& input) { + Sha256 sha256; + sha256.update(input); + sha256.padding(); + return sha256.getHash(); +} \ No newline at end of file diff --git a/tests/sha256_tests.cpp b/tests/sha256_tests.cpp new file mode 100644 index 00000000..b380b90e --- /dev/null +++ b/tests/sha256_tests.cpp @@ -0,0 +1,63 @@ +#include +#include +#include "../include/sha256.h" + +std::string bytesToHexString(const std::vector& bytes) { + std::stringstream ss; + ss << std::hex << std::setfill('0'); + for (const auto& byte : bytes) { + ss << std::setw(2) << static_cast(byte); + } + return ss.str(); +} + +// Test for hash of an empty string +TEST(SHA256Test, EmptyStringHash) { + Sha256 sha256; + std::vector data = {}; + std::vector hash = sha256.computeSHA256(data); + + // Expected hash value for an empty string + std::string expectedHash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + ASSERT_EQ(bytesToHexString(hash), expectedHash); +} + +// Test for hash of the string "abc" +TEST(SHA256Test, ABCStringHash) { + Sha256 sha256; + std::vector data = {'a', 'b', 'c'}; + std::vector hash = sha256.computeSHA256(data); + + // Expected hash value for the string "abc" + std::string expectedHash = "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"; + ASSERT_EQ(bytesToHexString(hash), expectedHash); +} + +// Test for hash of a string longer than 64 bytes +TEST(SHA256Test, StringLongerThan64BytesHash) { + Sha256 sha256; + std::string longString = "The quick brown fox jumps over the lazy dog"; + std::vector data(longString.begin(), longString.end()); + std::vector hash = sha256.computeSHA256(data); + + // Expected hash value for the string "The quick brown fox jumps over the lazy dog" + std::string expectedHash = "d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592"; + ASSERT_EQ(bytesToHexString(hash), expectedHash); +} + +// Test for hash of a string containing special characters +TEST(SHA256Test, SpecialCharsHash) { + Sha256 sha256; + std::string specialString = "!@#$%^&*()"; + std::vector data(specialString.begin(), specialString.end()); + std::vector hash = sha256.computeSHA256(data); + + // Expected hash value for the string containing special characters + std::string expectedHash = "95ce789c5c9d18490972709838ca3a9719094bca3ac16332cfec0652b0236141"; + ASSERT_EQ(bytesToHexString(hash), expectedHash); +} + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file From 1563fe574f76cd1b29cb864c740364e5e027cdf7 Mon Sep 17 00:00:00 2001 From: Mali Bernstein Date: Sun, 11 Aug 2024 21:12:43 +0300 Subject: [PATCH 11/21] HSM: Replace class-based design with function declarations --- Dockerfile | 47 +++++++++++----------- include/sha256.h | 35 +++------------- src/sha256.cpp | 91 ++++++++++++++++++++++++++++-------------- tests/sha256_tests.cpp | 12 ++---- 4 files changed, 95 insertions(+), 90 deletions(-) diff --git a/Dockerfile b/Dockerfile index 92721481..49734c03 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,33 +1,32 @@ -# Use an official Ubuntu as a parent image +# Use the Ubuntu 20.04 image as the base FROM ubuntu:20.04 -# Set environment variables to avoid user input prompts during installation -ENV DEBIAN_FRONTEND=noninteractive +# Install CMake, Google Test dependencies, and g++ +RUN apt-get update && apt-get install -y \ + cmake \ + libgtest-dev \ + g++ \ + make -# Install dependencies -RUN apt-get update && \ - apt-get install -y cmake g++ git wget libgtest-dev +# Set the working directory inside the container +WORKDIR /app -# Install Google Test -RUN cd /usr/src/gtest && \ - cmake . && \ - make && \ - cp lib/*.a /usr/lib +# Copy the current directory contents into the container at /app +COPY . . -# Create and set the working directory -WORKDIR /usr/src/myapp +# Create a build directory +RUN mkdir build -# Copy the current directory contents into the container -COPY . . +# Change to the build directory +WORKDIR /app/build -# Ensure the build directory exists and clean any previous cache -RUN mkdir -p build && \ - rm -rf build/* +# Install Google Test +RUN cd /usr/src/gtest && cmake CMakeLists.txt && make && \ + find /usr/src/gtest -name "*.a" -exec cp {} /usr/lib \; -# Run CMake and build the project -RUN cd build && \ - cmake .. && \ - make +# Build the project using CMake and Make +RUN cmake .. -DUSE_SYCL=OFF +RUN make -# Run the tests -CMD ["./build/runTests"] +# Command to run tests (optional) +CMD ["./DPCPPExample"] diff --git a/include/sha256.h b/include/sha256.h index 71e77161..5b33325e 100644 --- a/include/sha256.h +++ b/include/sha256.h @@ -2,36 +2,13 @@ #define SHA256_H #include -#include #include +#include -class Sha256 -{ -private: - uint32_t state[8]; // Internal state of the SHA-256 hash function - uint32_t result[8]; // Intermediate hash values - uint8_t message[64]; // Message block (64 bytes) - size_t messageSize; // Size of the current message block - size_t bitLength; // Total length of the input message in bits - - void padding(); // Applies padding to the message - void transform(); // Processes a message block to update hash values - -public: - // Constructor: Initializes the SHA-256 state and message block - Sha256(); - - // Updates the hash with additional data - void update(const std::vector& data); - - // Finalizes the hash computation and returns the hash value - std::vector finalize(); - - // Returns the current hash value - std::vector getHash(); - - // Computes the SHA-256 hash of the given input - std::vector computeSHA256(const std::vector& input); -}; +// Function prototypes for SHA-256 hashing +void sha256_update(const std::vector& data); +std::vector sha256_finalize(); +std::vector sha256_compute(const std::vector& input); +void transform(); #endif // SHA256_H \ No newline at end of file diff --git a/src/sha256.cpp b/src/sha256.cpp index 3c61d234..6e172f82 100644 --- a/src/sha256.cpp +++ b/src/sha256.cpp @@ -1,10 +1,9 @@ #include "../include/sha256.h" #include -#include using namespace std; -// Constants for SHA-256 +// Constants used in SHA-256 processing #define CHOOSE(x, y, z) (((x) & (y)) ^ (~(x) & (z))) #define MAJORITY(x, y, z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) #define ROTRIGHT(a, b) (((a) >> (b)) | ((a) << (32 - (b)))) @@ -33,28 +32,25 @@ const uint32_t bytes[64] = { 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 }; -Sha256::Sha256() : messageSize(0), bitLength(0) -{ - // Initialize hash values - result[0] = 0x6a09e667; - result[1] = 0xbb67ae85; - result[2] = 0x3c6ef372; - result[3] = 0xa54ff53a; - result[4] = 0x510e527f; - result[5] = 0x9b05688c; - result[6] = 0x1f83d9ab; - result[7] = 0x5be0cd19; - - // Initialize message array to zero - memset(message, 0, sizeof(message)); -} - -void Sha256::update(const std::vector& data) +// Global variables used in SHA-256 computation +static uint32_t result[8]; +static uint8_t message[64]; +static size_t messageSize; +static size_t bitLength; + +/** + * Updates the SHA-256 hash with the provided data. + * Processes data in 64-byte chunks, calling `transform` for each chunk. + * + * @param data A vector of bytes to be added to the hash. + */ +void sha256_update(const std::vector& data) { size_t length = data.size(); for (size_t i = 0; i < length; i++) { message[messageSize++] = static_cast(data[i]); - if(messageSize == 64){ + if (messageSize == 64) { + // Transform function is called for each 64-byte chunk transform(); messageSize = 0; bitLength += 512; @@ -62,7 +58,11 @@ void Sha256::update(const std::vector& data) } } -void Sha256::padding() +/** + * Adds padding to the message and appends the length of the original message. + * The message is padded so its length is congruent to 56 modulo 64. + */ +void padding() { uint64_t currentLength = messageSize; uint8_t paddingEnd = currentLength < 56 ? 56 : 64; @@ -90,7 +90,11 @@ void Sha256::padding() transform(); } -void Sha256::transform() +/** + * Processes a 64-byte block of the message and updates the hash state. + * Applies the SHA-256 compression function to the current block. + */ +void transform() { uint32_t temp[64]; for (uint8_t i = 0, j = 0; i < 16; i++, j += 4) @@ -129,8 +133,17 @@ void Sha256::transform() } } -vector Sha256::getHash() { - std::vector hash(32); // SHA-256 hash size is 32 bytes (256 bits) +/** + * Finalizes the SHA-256 hash computation. + * Applies padding and appends the length of the original message. + * Returns the final hash as a vector of bytes. + * + * @return A vector containing the SHA-256 hash value. + */ +vector sha256_finalize() +{ + padding(); + vector hash(32); // SHA-256 hash size is 32 bytes (256 bits) for (int i = 0; i < 8; i++) { hash[i * 4] = (result[i] >> 24) & 0xFF; hash[i * 4 + 1] = (result[i] >> 16) & 0xFF; @@ -140,9 +153,29 @@ vector Sha256::getHash() { return hash; } -vector Sha256::computeSHA256(const std::vector& input) { - Sha256 sha256; - sha256.update(input); - sha256.padding(); - return sha256.getHash(); +/** + * Computes the SHA-256 hash for the given input. + * Resets the internal state, updates with the input data, and returns the final hash. + * + * @param input A vector of bytes to be hashed. + * @return A vector containing the SHA-256 hash value. + */ +vector sha256_compute(const std::vector& input) +{ + // Reset state + result[0] = 0x6a09e667; + result[1] = 0xbb67ae85; + result[2] = 0x3c6ef372; + result[3] = 0xa54ff53a; + result[4] = 0x510e527f; + result[5] = 0x9b05688c; + result[6] = 0x1f83d9ab; + result[7] = 0x5be0cd19; + + messageSize = 0; + bitLength = 0; + + // Update with input data and finalize + sha256_update(input); + return sha256_finalize(); } \ No newline at end of file diff --git a/tests/sha256_tests.cpp b/tests/sha256_tests.cpp index b380b90e..bceed66e 100644 --- a/tests/sha256_tests.cpp +++ b/tests/sha256_tests.cpp @@ -13,9 +13,8 @@ std::string bytesToHexString(const std::vector& bytes) { // Test for hash of an empty string TEST(SHA256Test, EmptyStringHash) { - Sha256 sha256; std::vector data = {}; - std::vector hash = sha256.computeSHA256(data); + std::vector hash = sha256_compute(data); // Expected hash value for an empty string std::string expectedHash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; @@ -24,9 +23,8 @@ TEST(SHA256Test, EmptyStringHash) { // Test for hash of the string "abc" TEST(SHA256Test, ABCStringHash) { - Sha256 sha256; std::vector data = {'a', 'b', 'c'}; - std::vector hash = sha256.computeSHA256(data); + std::vector hash = sha256_compute(data); // Expected hash value for the string "abc" std::string expectedHash = "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"; @@ -35,10 +33,9 @@ TEST(SHA256Test, ABCStringHash) { // Test for hash of a string longer than 64 bytes TEST(SHA256Test, StringLongerThan64BytesHash) { - Sha256 sha256; std::string longString = "The quick brown fox jumps over the lazy dog"; std::vector data(longString.begin(), longString.end()); - std::vector hash = sha256.computeSHA256(data); + std::vector hash = sha256_compute(data); // Expected hash value for the string "The quick brown fox jumps over the lazy dog" std::string expectedHash = "d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592"; @@ -47,10 +44,9 @@ TEST(SHA256Test, StringLongerThan64BytesHash) { // Test for hash of a string containing special characters TEST(SHA256Test, SpecialCharsHash) { - Sha256 sha256; std::string specialString = "!@#$%^&*()"; std::vector data(specialString.begin(), specialString.end()); - std::vector hash = sha256.computeSHA256(data); + std::vector hash = sha256_compute(data); // Expected hash value for the string containing special characters std::string expectedHash = "95ce789c5c9d18490972709838ca3a9719094bca3ac16332cfec0652b0236141"; From 8000ea091ca67d53fb47c9f981d9c7bdff9b461d Mon Sep 17 00:00:00 2001 From: Mali Bernstein Date: Thu, 5 Sep 2024 10:29:44 +0300 Subject: [PATCH 12/21] HSM: Add SYCL parallelization to SHA256 implementation --- CMakeLists.txt | 19 +++-- include/sha256.h | 15 +++- src/sha256.cpp | 195 +++++++++++++++++++++++++++++++++++------------ 3 files changed, 166 insertions(+), 63 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 677193c8..1e84b953 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(MyTest) - # Include directories include_directories(src) - # Find GMP library find_path(GMP_INCLUDE_DIR NAMES gmp.h) find_library(GMP_LIBRARY NAMES gmp) @@ -12,24 +10,20 @@ if(NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARY OR NOT GMPXX_LIBRARY) message(FATAL_ERROR "Could not find GMP or GMPXX libraries") endif() include_directories(${GMP_INCLUDE_DIR}) - # Find Google Test find_package(GTest REQUIRED) - # Add source files file(GLOB SOURCES "src/*.cpp") - # Check if SYCL is enabled option(USE_SYCL "Enable SYCL support" OFF) - +include_directories(src) +# Find Google Test if(USE_SYCL) # Set the icpx compiler with SYCL support set(CMAKE_CXX_COMPILER icpx) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl") - # Add oneAPI include directories include_directories(${CMAKE_SOURCE_DIR}/include /opt/intel/oneapi/compiler/latest/linux/include) - # Add oneAPI library directories link_directories(/opt/intel/oneapi/compiler/latest/linux/lib) message(STATUS "Compiling with SYCL support") @@ -38,13 +32,18 @@ if(USE_SYCL) message(STATUS "Compiling without SYCL support") remove_definitions(-DUSE_SYCL) endif() - # Add the executable for the tests add_executable(runTests tests/aes_tests.cpp tests/ecc_tests.cpp tests/sha256_tests.cpp ${SOURCES}) - # Link libraries target_link_libraries(runTests ${GMP_LIBRARY} ${GMPXX_LIBRARY} gtest gtest_main pthread ) +# Add debug flags +set(CMAKE_BUILD_TYPE Debug) +# Add the executable for the tests +# Optional: Output directory for the executable +set_target_properties(runTests PROPERTIES + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} +) diff --git a/include/sha256.h b/include/sha256.h index 5b33325e..079ec7d4 100644 --- a/include/sha256.h +++ b/include/sha256.h @@ -5,10 +5,19 @@ #include #include +//Structure to hold the state of the SHA-256 hash computation. +struct SHA256State{ + uint32_t result[8]; // Holds the current hash state + uint8_t message[64]; // Buffer to store the current message block + size_t messageSize = 0; // Size of the current message block + size_t bitLength = 0; // Total length of the message in bits +}; + // Function prototypes for SHA-256 hashing -void sha256_update(const std::vector& data); -std::vector sha256_finalize(); +void sha256_update(SHA256State& state, const std::vector& data); +void padding(SHA256State& state); +std::vector sha256_finalize(SHA256State& state); std::vector sha256_compute(const std::vector& input); -void transform(); +void transform(SHA256State& state); #endif // SHA256_H \ No newline at end of file diff --git a/src/sha256.cpp b/src/sha256.cpp index 6e172f82..d6ebb26a 100644 --- a/src/sha256.cpp +++ b/src/sha256.cpp @@ -1,5 +1,11 @@ #include "../include/sha256.h" +#include +#include #include +#ifdef USE_SYCL +#include +using namespace sycl; +#endif //USE_SYCL using namespace std; @@ -12,8 +18,8 @@ using namespace std; #define GAMMA0(x) (ROTRIGHT(x, 7) ^ ROTRIGHT(x, 18) ^ ((x) >> 3)) #define GAMMA1(x) (ROTRIGHT(x, 17) ^ ROTRIGHT(x, 19) ^ ((x) >> 10)) +// SHA-256 constants used in the compression function const uint32_t bytes[64] = { - // SHA-256 constants 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, @@ -32,28 +38,21 @@ const uint32_t bytes[64] = { 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 }; -// Global variables used in SHA-256 computation -static uint32_t result[8]; -static uint8_t message[64]; -static size_t messageSize; -static size_t bitLength; - /** * Updates the SHA-256 hash with the provided data. * Processes data in 64-byte chunks, calling `transform` for each chunk. * * @param data A vector of bytes to be added to the hash. */ -void sha256_update(const std::vector& data) +void sha256_update(SHA256State& state, const std::vector& data) { size_t length = data.size(); for (size_t i = 0; i < length; i++) { - message[messageSize++] = static_cast(data[i]); - if (messageSize == 64) { - // Transform function is called for each 64-byte chunk - transform(); - messageSize = 0; - bitLength += 512; + state.message[state.messageSize++] = static_cast(data[i]); + if (state.messageSize == 64) { + transform(state); // Process the current 64-byte block + state.messageSize = 0; + state.bitLength += 512; } } } @@ -62,43 +61,136 @@ void sha256_update(const std::vector& data) * Adds padding to the message and appends the length of the original message. * The message is padded so its length is congruent to 56 modulo 64. */ -void padding() +void padding(SHA256State& state) { - uint64_t currentLength = messageSize; + uint64_t currentLength = state.messageSize; uint8_t paddingEnd = currentLength < 56 ? 56 : 64; // Append the 0x80 byte (0b10000000) - message[currentLength++] = 0x80; + state.message[currentLength++] = 0x80; // Pad with 0x00 bytes until the length of the message is 56 bytes mod 64 - memset(message + currentLength, 0, paddingEnd - currentLength); + memset(state.message + currentLength, 0, paddingEnd - currentLength); currentLength = paddingEnd; // If message length is >= 56, process the current block and reset for new padding - if (messageSize >= 56) { - transform(); - memset(message, 0, 56); + if (state.messageSize >= 56) { + transform(state); // Process the current block + memset(state.message, 0, 56); currentLength = 56; } // Append the length of the original message in bits (64-bit big-endian) - bitLength += messageSize * 8; + state.bitLength += state.messageSize * 8; for (int i = 0; i < 8; i++) { - message[63 - i] = bitLength >> (i * 8); + state.message[63 - i] = state.bitLength >> (i * 8); + } + + transform(state); // Final block processing +} + +#ifdef USE_SYCL +/** + * Processes a 64-byte block of the message and updates the hash state. + * Applies the SHA-256 compression function to the current block. + */ +void transform(SHA256State& state) +{ + uint32_t temp[64]; + queue q; + + // Initialize the first 16 elements of temp with the message schedule + for (uint8_t i = 0, j = 0; i < 16; i++, j += 4) + temp[i] = (state.message[j] << 24) | (state.message[j + 1] << 16) | (state.message[j + 2] << 8) | (state.message[j + 3]); + + for (uint8_t k = 16; k < 64; k++) + temp[k] = GAMMA1(temp[k - 2]) + temp[k - 7] + GAMMA0(temp[k - 15]) + temp[k - 16]; + + // Save the current state + uint32_t s[8]; + for (uint8_t i = 0; i < 8; i++) + s[i] = state.result[i]; + + for (size_t i = 0; i < 64; i++) { + uint32_t choose, sum, majority, newA, newE; + + choose = CHOOSE(s[4], s[5], s[6]); + majority = MAJORITY(s[0], s[1], s[2]); + sum = temp[i] + bytes[i] + s[7] + choose + SIGMA1(s[4]); + newA = SIGMA0(s[0]) + majority + sum; + newE = s[3] + sum; + + s[7] = s[6]; + s[6] = s[5]; + s[5] = s[4]; + s[4] = newE; + s[3] = s[2]; + s[2] = s[1]; + s[1] = s[0]; + s[0] = newA; } - transform(); + // Process the message in 64-byte chunks, parallelizing where feasible + { + buffer state_buf(s, range<1>(8)); + buffer result_buf(state.result, range<1>(8)); + + // Update the result with the state + q.submit([&](handler &h) { + auto state_acc = state_buf.get_access(h); + auto result_acc = result_buf.get_access(h); + + h.parallel_for(range<1>(8), [=](id<1> idx) { + result_acc[idx] += state_acc[idx]; + }); + }).wait(); + } } +/** + * Finalizes the SHA-256 hash computation. + * Applies padding and appends the length of the original message. + * Returns the final hash as a vector of bytes. + * + * @param state The SHA256State object to finalize. + * @return A vector containing the SHA-256 hash value. + */ +vector sha256_finalize(SHA256State& state) +{ + padding(state); + vector hash(32); // SHA-256 hash size is 32 bytes (256 bits) + + // Define SYCL buffers + buffer result_buf(state.result, range<1>(8)); + buffer hash_buf(hash.data(), range<1>(32)); + + // Copy the result to the hash output + queue q; + q.submit([&](handler &h) { + auto result_acc = result_buf.get_access(h); + auto hash_acc = hash_buf.get_access(h); + + h.parallel_for(range<1>(8), [=](id<1> idx) { + size_t i = idx[0]; + hash_acc[i * 4 + 0] = (result_acc[i] >> 24) & 0xff; + hash_acc[i * 4 + 1] = (result_acc[i] >> 16) & 0xff; + hash_acc[i * 4 + 2] = (result_acc[i] >> 8) & 0xff; + hash_acc[i * 4 + 3] = (result_acc[i] >> 0) & 0xff; + }); + }).wait(); + + return hash; +} +#else /** * Processes a 64-byte block of the message and updates the hash state. * Applies the SHA-256 compression function to the current block. */ -void transform() +void transform(SHA256State& SHAState) { uint32_t temp[64]; for (uint8_t i = 0, j = 0; i < 16; i++, j += 4) - temp[i] = (message[j] << 24) | (message[j + 1] << 16) | (message[j + 2] << 8) | (message[j + 3]); + temp[i] = (SHAState.message[j] << 24) | (SHAState.message[j + 1] << 16) | (SHAState.message[j + 2] << 8) | (SHAState.message[j + 3]); for (uint8_t k = 16; k < 64; k++) temp[k] = GAMMA1(temp[k - 2]) + temp[k - 7] + GAMMA0(temp[k - 15]) + temp[k - 16]; @@ -106,7 +198,7 @@ void transform() // Save the current state uint32_t state[8]; for (uint8_t i = 0; i < 8; i++) - state[i] = result[i]; + state[i] = SHAState.result[i]; // Process the message in 64-byte chunks for (size_t i = 0; i < 64; i++) { @@ -129,7 +221,7 @@ void transform() } // Add the current chunk's hash to the result for (uint8_t i = 0; i < 8; i++) { - result[i] += state[i]; + SHAState.result[i] += state[i]; } } @@ -140,19 +232,22 @@ void transform() * * @return A vector containing the SHA-256 hash value. */ -vector sha256_finalize() +vector sha256_finalize(SHA256State& SHAState) { - padding(); + padding(SHAState); vector hash(32); // SHA-256 hash size is 32 bytes (256 bits) for (int i = 0; i < 8; i++) { - hash[i * 4] = (result[i] >> 24) & 0xFF; - hash[i * 4 + 1] = (result[i] >> 16) & 0xFF; - hash[i * 4 + 2] = (result[i] >> 8) & 0xFF; - hash[i * 4 + 3] = result[i] & 0xFF; + hash[i * 4] = (SHAState.result[i] >> 24) & 0xFF; + hash[i * 4 + 1] = (SHAState.result[i] >> 16) & 0xFF; + hash[i * 4 + 2] = (SHAState.result[i] >> 8) & 0xFF; + hash[i * 4 + 3] = SHAState.result[i] & 0xFF; } return hash; } +#endif //USE_SYCL + + /** * Computes the SHA-256 hash for the given input. * Resets the internal state, updates with the input data, and returns the final hash. @@ -162,20 +257,20 @@ vector sha256_finalize() */ vector sha256_compute(const std::vector& input) { - // Reset state - result[0] = 0x6a09e667; - result[1] = 0xbb67ae85; - result[2] = 0x3c6ef372; - result[3] = 0xa54ff53a; - result[4] = 0x510e527f; - result[5] = 0x9b05688c; - result[6] = 0x1f83d9ab; - result[7] = 0x5be0cd19; - - messageSize = 0; - bitLength = 0; - - // Update with input data and finalize - sha256_update(input); - return sha256_finalize(); + SHA256State state; + // Initialize state + state.result[0] = 0x6a09e667; + state.result[1] = 0xbb67ae85; + state.result[2] = 0x3c6ef372; + state.result[3] = 0xa54ff53a; + state.result[4] = 0x510e527f; + state.result[5] = 0x9b05688c; + state.result[6] = 0x1f83d9ab; + state.result[7] = 0x5be0cd19; + state.messageSize = 0; + state.bitLength = 0; + + // Process the input data + sha256_update(state, input); + return sha256_finalize(state); } \ No newline at end of file From 5e170e4522c30a28461481dd02a2e766dbd74a4b Mon Sep 17 00:00:00 2001 From: YochevedSalzer Date: Thu, 5 Sep 2024 10:06:06 +0300 Subject: [PATCH 13/21] HSM: Implement and test SHA3-512 algorithm --- include/SHA3-512.h | 31 +++ include/return_codes.h | 30 +++ src/SHA3-512.cpp | 420 +++++++++++++++++++++++++++++++++++++++ tests/SHA3-512_tests.cpp | 86 ++++++++ 4 files changed, 567 insertions(+) create mode 100644 include/SHA3-512.h create mode 100644 include/return_codes.h create mode 100644 src/SHA3-512.cpp create mode 100644 tests/SHA3-512_tests.cpp diff --git a/include/SHA3-512.h b/include/SHA3-512.h new file mode 100644 index 00000000..c7e4807b --- /dev/null +++ b/include/SHA3-512.h @@ -0,0 +1,31 @@ +#ifndef SHA3_512_H +#define SHA3_512_H + +#include +#include +#include // For fixed-width integer types +#include // For std::ostringstream +#include "return_codes.h" + +class SHA3_512 +{ +public: + SHA3_512(); // Constructor to initialize the state + CK_RV update(const uint8_t* input, std::size_t length); // Update the hash with more data + CK_RV finalize(std::string & output); // Finalize and get the hash value + CK_RV compute(const std::vector& input, std::string & output); // Single-step hashing + +private: + uint64_t S[5][5]; // State matrix + uint8_t buffer[576]; // Buffer to hold input data + std::size_t buffer_length; // Current length of data in the buffer + + void round(uint64_t A[5][5], uint64_t RC); + void f_function(uint64_t A[5][5]); + void padding(uint8_t input[], std::size_t &in_len, int &absorb_times) ; + void assign_S_xor_p(uint64_t S[5][5], uint64_t *p); + void endianSwap(uint64_t &x); + std::string hashPartToHexString(uint64_t S[5][5]); +}; + +#endif // SHA3_512_H diff --git a/include/return_codes.h b/include/return_codes.h new file mode 100644 index 00000000..3ddf1f29 --- /dev/null +++ b/include/return_codes.h @@ -0,0 +1,30 @@ +#ifndef __RETURN_CODES_H__ +#define __RETURN_CODES_H__ + +typedef unsigned long CK_RV; + +/* Successful operation */ +#define CKR_OK 0x00000000 + +/* General failure when a function could not complete its intended task */ +#define CKR_FUNCTION_FAILED 0x00000006 + +/* Invalid arguments provided to the function (e.g., null pointers or invalid values) */ +#define CKR_ARGUMENTS_BAD 0x00000007 + +/* Key size is out of the allowed range (e.g., key length is too short or too long) */ +#define CKR_KEY_SIZE_RANGE 0x00000162 + +/* Buffer provided by the user is too small to hold the required data (e.g., during encryption or decryption) */ +#define CKR_BUFFER_TOO_SMALL 0x00000150 + +/* The function attempted to generate a key, but key generation is not permitted or failed */ +#define CKR_KEY_FUNCTION_NOT_PERMITTED 0x00000068 + +/* Decryption was attempted, but the decrypted data is invalid (e.g., data was corrupted) */ +#define CKR_DECRYPTED_DATA_INVALID 0x00000064 + +/* Encrypted data has invalid padding (e.g., during decryption or when verifying padding) */ +#define CKR_ENCRYPTED_DATA_INVALID 0x00000063 + +#endif // __RETURN_CODES_H__ \ No newline at end of file diff --git a/src/SHA3-512.cpp b/src/SHA3-512.cpp new file mode 100644 index 00000000..76d33484 --- /dev/null +++ b/src/SHA3-512.cpp @@ -0,0 +1,420 @@ +#include "../include/SHA3-512.h" +#include "../logger/logger.h" +#include +#include + +#define BLOCK_SIZE 72 +// Macro for circular left shift (rotation) of x by y bits +#define ROT(x, y) (((x) << (y)) | ((x) >> ((64) - (y)))) + +// constants representing the rotation values for the Keccak-f permutation based on the (x, y) position +const uint64_t r[5][5]={{ 0, 36, 3, 41, 18}, + { 1, 44, 10, 45, 2}, + { 62, 6, 43, 15, 61}, + { 28, 55, 25, 21, 56}, + { 27, 20, 39, 8, 14}}; + +// Round constants used in the Keccak-f permutation +static const uint64_t RC[24] = {0x0000000000000001, 0x0000000000008082, + 0x800000000000808A, 0x8000000080008000, + 0x000000000000808B, 0x0000000080000001, + 0x8000000080008081, 0x8000000000008009, + 0x000000000000008A, 0x0000000000000088, + 0x0000000080008009, 0x000000008000000A, + 0x000000008000808B, 0x800000000000008B, + 0x8000000000008089, 0x8000000000008003, + 0x8000000000008002, 0x8000000000000080, + 0x000000000000800A, 0x800000008000000A, + 0x8000000080008081, 0x8000000000008080, + 0x0000000080000001, 0x8000000080008008}; + +/** + * @brief Constructor to initialize the SHA3_512 object. + * + * This constructor initializes the internal state and buffer of the SHA3-512 + * object to zero. It also logs the initialization process. + * + * @note The logger is initialized to log messages related to the SHA3-512 algorithm. + */ +SHA3_512::SHA3_512() { + logger sha3_512logger("HSM"); + sha3_512logger.logMessage(logger::LogLevel::INFO, "Initializing sha3-512"); + std::memset(S, 0, sizeof(S)); // Clear state + std::memset(buffer, 0, sizeof(buffer)); // Clear buffer + buffer_length = 0; // Reset buffer length +} + +/** + * @brief Perform one round of the Keccak-f permutation. + * + * This function executes a single round of the Keccak-f permutation, which + * includes the θ, ρ, π, χ, and ι steps. The state matrix is updated with + * new values based on these transformations, and the round constant is applied. + * + * @param A The state matrix to be updated. + * @param RC The round constant for the current round. + * + * @note This function logs the start and completion of the round operation. + */ +void SHA3_512::round(uint64_t A[5][5], uint64_t RC) +{ + logger sha3_512logger("HSM"); + sha3_512logger.logMessage(logger::LogLevel::INFO, "Starting round operation."); + // θ step: Calculate C and D values for the state matrix + uint64_t C[5]; + for (int x = 0; x < 5; x++) + C[x] = A[x][0] ^ A[x][1] ^ A[x][2] ^ A[x][3] ^ A[x][4]; + + uint64_t D[5]; + for (int x = 0; x < 5; x++) + D[x] = C[(x + 4) % 5] ^ ROT(C[(x + 1) % 5], 1); + + // Update state matrix A with D values + for (int x = 0; x < 5; x++) + for (int y = 0; y < 5; y++) + A[x][y] = A[x][y] ^ D[x]; + + // ρ & π steps: Perform rotation and permutation + uint64_t B[5][5]; + for (int x = 0; x < 5; x++) + for (int y = 0; y < 5; y++) + B[y][(2 * x + 3 * y) % 5] = ROT(A[x][y], r[x][y]); + + // χ step: Apply the χ transformation + for (int x = 0; x < 5; x++) + for (int y = 0; y < 5; y++) + A[x][y] = B[x][y] ^ ((~(B[(x + 1) % 5][y])) & B[(x + 2) % 5][y]); + + // ι step: Apply the round constant + A[0][0] = A[0][0] ^ RC; + + sha3_512logger.logMessage(logger::LogLevel::INFO, "Done round operation."); +} + +/** + * @brief Perform the Keccak-f permutation for 24 rounds. + * + * This function applies the Keccak-f permutation to the state matrix `A` for a total of + * 24 rounds. It iteratively calls the `round` function with the appropriate round constant + * from the `RC` array. + * + * @param A The state matrix to be permuted. This 5x5 matrix undergoes multiple transformations + * as defined by the Keccak-f permutation. + * + * @note This function logs the start and completion of the permutation process. + */ +void SHA3_512::f_function(uint64_t A[5][5]) +{ + logger sha3_512logger("HSM"); + sha3_512logger.logMessage(logger::LogLevel::INFO, "Starting f_function."); + + for (int i = 0; i < 24; i++) + round(A, RC[i]); + + sha3_512logger.logMessage(logger::LogLevel::INFO, "Done f_function."); +} + +/** + * @brief Apply padding to the input data for the SHA3-512 algorithm. + * + * This function pads the input data to ensure it aligns with the block size required by + * the SHA3-512 algorithm. Padding is done according to the SHA3-512 padding scheme, which + * involves appending specific bytes to the end of the data to make its length a multiple + * of the block size. + * + * @param input A pointer to the input data array that will be padded. + * @param in_len A reference to the size of the input data. This value will be updated to + * reflect the length of the padded data. + * @param absorb_times An integer reference that will be set to the number of full blocks + * (including the padded block) after padding is applied. + * + * @throws std::runtime_error If padding fails due to an unexpected error. + * + * @note If the input data length modulo the block size is 1, a special padding byte (0x86) + * is used. Otherwise, the general padding scheme is applied, which involves adding a + * 0x06 byte followed by zeroes, and ending with a 0x80 byte. The function logs various + * stages of padding and any errors encountered. + */ +void SHA3_512::padding(uint8_t input[], std::size_t &in_len, int &absorb_times) +{ + logger sha3_512logger("HSM"); + absorb_times = in_len / BLOCK_SIZE; // Number of full blocks + std::size_t add_last = in_len % BLOCK_SIZE; // Remaining bytes + sha3_512logger.logMessage(logger::LogLevel::INFO, "Remaining bytes: " + std::to_string(add_last)); + + if (BLOCK_SIZE - add_last == 1) { + sha3_512logger.logMessage(logger::LogLevel::INFO, "Padding byte for the case where only one byte is left"); + input[in_len] = 0x86; // Padding byte for the case where only one byte is left + } else if (BLOCK_SIZE - add_last > 1) { + sha3_512logger.logMessage(logger::LogLevel::INFO, "Applying general padding"); + input[in_len] = 0x06; // Padding byte for general case + for (int i = 1; i < (BLOCK_SIZE - 1 - add_last); i++) + input[in_len + i] = 0x00; // Fill with zeroes + input[in_len + (BLOCK_SIZE - 1 - add_last)] = 0x80; // Final padding byte + in_len += (BLOCK_SIZE - add_last); // Update length + } else { + sha3_512logger.logMessage(logger::LogLevel::ERROR, "Unexpected padding error"); + throw std::runtime_error("Padding failed due to unexpected error. Remaining bytes: " + std::to_string(add_last)); + } + + absorb_times += 1; // Include the final padding block +} + +/** + * @brief XOR the state matrix S with the block p. + * + * This function performs an XOR operation between the state matrix `S` and the given + * block `p`. It updates the state matrix in-place with the result of the XOR operation. + * Additionally, it logs the block data before and after the XOR operation for debugging purposes. + * + * @param S A 5x5 matrix of 64-bit integers representing the state matrix. This matrix + * will be updated with the XOR result. + * @param p A pointer to an array of 64-bit integers representing the block of data to + * XOR with the state matrix. The array is expected to have at least 25 elements. + * + * @note The function assumes that the size of the block `p` is 25 elements. It logs the + * block data and state matrix before and after the XOR operation. + */ +void SHA3_512::assign_S_xor_p(uint64_t S[5][5], uint64_t *p) +{ + logger sha3_512logger("HSM"); + + // Log the block of data before XOR operation + sha3_512logger.logMessage(logger::LogLevel::INFO, "Block data before XOR:"); + for (int i = 0; i < 24; ++i) { + sha3_512logger.logMessage(logger::LogLevel::INFO, "Block[" + std::to_string(i) + "] = " + std::to_string(p[i])); + } + + // Perform XOR of the block with the state matrix + for (int x = 0; x < 5; x++) { + for (int y = 0; y < 5; y++) { + int index = x + 5 * y; + if (index < 25) { + S[x][y] ^= p[index]; + } + } + } + + // Log the state matrix after XOR operation + sha3_512logger.logMessage(logger::LogLevel::INFO, "State matrix after XOR:"); + for (int x = 0; x < 5; x++) { + for (int y = 0; y < 5; y++) { + sha3_512logger.logMessage(logger::LogLevel::INFO, "S[" + std::to_string(x) + "][" + std::to_string(y) + "] = " + std::to_string(S[x][y])); + } + } +} + +/** + * @brief Swap byte order (endianess) for a 64-bit integer. + * + * This function swaps the byte order of a 64-bit integer from little-endian to big-endian + * or vice versa. It modifies the integer in place and logs its value before and after + * the swap operation. + * + * @param x A reference to a 64-bit integer whose byte order is to be swapped. The value + * will be updated to its byte-swapped equivalent. + * + * @note The function logs the value of `x` before and after performing the endian swap + * for debugging purposes. Ensure that the integer is appropriately sized (64-bit) + * for this operation. + */ +void SHA3_512::endianSwap(uint64_t &x) +{ + logger sha3_512logger("HSM"); + // Log the value before the swap + sha3_512logger.logMessage(logger::LogLevel::INFO, "Value before endian swap: " + std::to_string(x)); + + // Perform endian swap + x = (x >> 56) | + ((x << 40) & 0x00FF000000000000) | + ((x << 24) & 0x0000FF0000000000) | + ((x << 8) & 0x000000FF00000000) | + ((x >> 8) & 0x00000000FF000000) | + ((x >> 24) & 0x0000000000FF0000) | + ((x >> 40) & 0x000000000000FF00) | + (x << 56); + + // Log the value after the swap + sha3_512logger.logMessage(logger::LogLevel::INFO, "Value after endian swap: " + std::to_string(x)); +} + +/** + * @brief Convert the state matrix to a hexadecimal string. + * + * This function converts the state matrix `S` of the SHA3-512 algorithm into a + * hexadecimal string representation. It serializes the matrix values in a specific + * order, ensuring that each 64-bit integer is represented as a 16-digit hexadecimal + * number with leading zeros if necessary. + * + * @param S A 5x5 matrix of 64-bit integers representing the state of the SHA3-512 + * algorithm. + * + * @return A `std::string` containing the hexadecimal representation of the state + * matrix. The string concatenates the values in a specified order: the first + * column of each row, followed by the next rows. + * + * @note The function uses `std::ostringstream` to format the output and `std::setw` + * to ensure each 64-bit integer is represented as a 16-character wide hexadecimal + * string. + */ +std::string SHA3_512::hashPartToHexString(uint64_t S[5][5]) { + std::ostringstream oss; + oss << std::hex << std::setfill('0'); + // Append values in the specified order + oss << std::setw(16) << S[0][0] + << std::setw(16) << S[1][0] + << std::setw(16) << S[2][0] + << std::setw(16) << S[3][0] + << std::setw(16) << S[4][0] + << std::setw(16) << S[0][1] + << std::setw(16) << S[1][1] + << std::setw(16) << S[2][1]; + return oss.str(); +} + +/** + * @brief Update the hash with additional data. + * + * This function absorbs additional data into the SHA3-512 hash computation. It processes + * the input data in chunks and updates the internal state accordingly. The data is absorbed + * into a buffer and, once the buffer is full, the data is processed by XORing it with the + * current state and applying the Keccak-f permutation. + * + * @param input A pointer to the data to be absorbed into the hash. + * @param length The length of the data to be absorbed, in bytes. + * + * @return CK_RV Returns `CKR_OK` on success or `CKR_FUNCTION_FAILED` if an error occurs. + * + * @note The buffer size used for absorption is fixed at 72 bytes. If the buffer length + * exceeds its size, an error will be logged, and the function will return + * `CKR_FUNCTION_FAILED`. + */ +CK_RV SHA3_512::update(const uint8_t* input, std::size_t length) +{ + logger sha3_512logger("HSM"); + sha3_512logger.logMessage(logger::LogLevel::INFO, "Starting update with length: " + std::to_string(length)); + // Absorb input into the buffer and process in 72-byte chunks (576 bits) + while (length > 0) { + if(buffer_length > sizeof(buffer)){ + sha3_512logger.logMessage(logger::LogLevel::ERROR, "Buffer length is bigger then buffer size"); + return CKR_FUNCTION_FAILED; + } + // Calculate the number of bytes we can copy into the buffer + std::size_t to_copy = std::min(length, sizeof(buffer) - buffer_length); + + // Copy input data into the buffer + std::memcpy(buffer + buffer_length, input, to_copy); + + // Update buffer length and input pointers + buffer_length += to_copy; + input += to_copy; + length -= to_copy; + + sha3_512logger.logMessage(logger::LogLevel::INFO, "Copied " + std::to_string(to_copy) + + " bytes, remaining: " + std::to_string(length)); + + // If the buffer is full, process the absorbed data + if (buffer_length == sizeof(buffer)) { + // Convert the buffer into a block and XOR with state + uint64_t* block = reinterpret_cast(buffer); + assign_S_xor_p(S, block); + + // Apply the Keccak-f function to update the state + f_function(S); + + // Reset buffer length for the next block of data + buffer_length = 0; + sha3_512logger.logMessage(logger::LogLevel::INFO, "Processed a full block."); + } + } + + sha3_512logger.logMessage(logger::LogLevel::INFO, "Update complete."); + + return CKR_OK; +} + +/** + * @brief Finalize the hash computation and produce the final hash value. + * + * This function finalizes the SHA3-512 hashing process. It handles any remaining data in the + * buffer by applying padding, processes the data including the padding, and performs + * necessary transformations to produce the final hash value. The result is then converted + * to a hexadecimal string. + * + * @param[out] output A reference to a `std::string` that will be set to the resulting + * hexadecimal representation of the hash value. + * + * @return CK_RV Returns `CKR_OK` on success or `CKR_FUNCTION_FAILED` if an error occurs. + * + * @note The buffer is padded and processed as necessary to ensure that all input data + * is correctly absorbed and hashed. The function also performs an endian swap + * on the state matrix elements before converting the hash value to a hexadecimal + * string. + */ +CK_RV SHA3_512::finalize(std::string & output) +{ + logger sha3_512logger("HSM"); + sha3_512logger.logMessage(logger::LogLevel::INFO, "finalizing"); + + // Handle remaining data in the buffer with padding + std::size_t remaining_length = buffer_length; + sha3_512logger.logMessage(logger::LogLevel::INFO, " Length of remaining unprocessed data: " + std::to_string(remaining_length)); + + // Apply padding to the buffer + int absorb_times = 0; + + try { + padding(buffer, remaining_length, absorb_times); // Call padding in try block + sha3_512logger.logMessage(logger::LogLevel::INFO, "Number of blocks to be processed after padding: " + std::to_string(absorb_times)); + } + catch (const std::exception& e) { + // Log the exception error message + sha3_512logger.logMessage(logger::LogLevel::ERROR, "Padding error: " + std::string(e.what())); + return CKR_FUNCTION_FAILED; + } + + // Process any remaining data including padding + for (int i = 0; i < absorb_times; i++) { + // Convert the buffer into a block and XOR with state + uint64_t* block = reinterpret_cast(buffer + i * BLOCK_SIZE); + assign_S_xor_p(S, block); + + // Apply the Keccak-f function to update the state + f_function(S); + } + + // Perform endianess swap for each element of the state matrix + for (int i = 0; i < 5; i++) + for (int j = 0; j < 5; j++) + endianSwap(S[i][j]); + + // Convert the state to a hex string + output=hashPartToHexString(S); + sha3_512logger.logMessage(logger::LogLevel::INFO, "hashed data: " + output); + + return CKR_OK; +} + +/** + * @brief Compute the SHA3-512 hash of the input data in a single step. + * + * This function performs the entire SHA3-512 hashing process for the provided input data. + * It first updates the hash state with the input data and then finalizes the hash computation + * to produce the final hash value. + * + * @param[in] input A `std::vector` containing the input data to be hashed. + * @param[out] output A reference to a `std::string` that will be set to the resulting + * hexadecimal representation of the hash value. + * + * @return CK_RV Returns `CKR_OK` on success or `CKR_FUNCTION_FAILED` if an error occurs + * during the update or finalization process. + * + * @note This function is a convenient wrapper for `update` and `finalize`, combining them + * into a single operation. It assumes that the input data fits in memory and handles + * the entire data in one go. + */ +CK_RV SHA3_512::compute(const std::vector& input, std::string & output) +{ + update(input.data(), input.size()); + return finalize(output); +} \ No newline at end of file diff --git a/tests/SHA3-512_tests.cpp b/tests/SHA3-512_tests.cpp new file mode 100644 index 00000000..b592bbbd --- /dev/null +++ b/tests/SHA3-512_tests.cpp @@ -0,0 +1,86 @@ +#include "gtest/gtest.h" +#include +#include "../include/SHA3-512.h" +#include + +// General function to update and finalize the SHA-256 hash +void sha3_512_test(const std::vector>& chunks, const std::string& expectedHash) +{ + SHA3_512 state; + + // Loop to update the hash with chunks of data + for (const auto& chunk : chunks) + state.update(chunk.data(), chunk.size()); + + // Compute the final hash + std::string hash; + state.finalize(hash); + + // Compare the resulting hash with the expected hash + ASSERT_EQ(hash, expectedHash); +} + +// Test for hash of an empty string +TEST(SHA3_512Test, EmptyStringHash) +{ + std::vector> data = {{}}; + std::string expectedHash = "a69f73cca23a9ac5c8b567dc185a756e97c98216" + "4fe25859e0d1dcc1475c80a615b2123af1f5f94" + "c11e3e9402c3ac558f500199d95b6d3e3017585" + "86281dcd26"; + sha3_512_test(data, expectedHash); +} + +// Test for hash of the string "abc" +TEST(SHA3_512Test, ABCStringHash) +{ + std::vector> data = {{'a', 'b', 'c'}}; + std::string expectedHash = "b751850b1a57168a5693cd924b6b096e08f621827" + "444f70d884f5d0240d2712e10e116e9192af3c91" + "a7ec57647e3934057340b4cf408d5a56592f8274" + "eec53f0"; + sha3_512_test(data, expectedHash); +} + +// Test for hash of a string longer than 64 bytes +TEST(SHA3_512Test, StringLongerThan64BytesHash) +{ + std::string longString = "The quick brown fox jumps over the lazy dog"; + std::vector> data = {std::vector(longString.begin(), longString.end())}; + std::string expectedHash = "01dedd5de4ef14642445ba5f5b97c15e47b9ad931" + "326e4b0727cd94cefc44fff23f07bf543139939b" + "49128caf436dc1bdee54fcb24023a08d9403f9b4" + "bf0d450"; + sha3_512_test(data, expectedHash); +} + +// Test for hash of a string containing special characters +TEST(SHA3_512Test, SpecialCharsHash) +{ + std::string specialString = "!@#$%^&*()"; + std::vector> data = {std::vector(specialString.begin(), specialString.end())}; + std::string expectedHash = "fbbcb3e21184dd4061de0b85c4756f74e36a36112" + "5733e2c7470232fc66f71c902d1e6ff7eb60cfe6" + "b47e8b72e1429b4ff21de0fa150a2b3e8d8e29e2" + "64d56ab"; + sha3_512_test(data, expectedHash); +} + +// Test for multiple updates +TEST(SHA3_512Test, MultipleUpdatesHash) +{ + std::vector> data = { + {'a', 'b'}, // First update with two bytes + {'c', 'd'} // Second update with two more bytes + }; + std::string expectedHash = "6eb7b86765bf96a8467b72401231539cbb830f6c641" + "20954c4567272f613f1364d6a80084234fa3400d30" + "6b9f5e10c341bbdc5894d9b484a8c7deea9cbe4e265"; + sha3_512_test(data, expectedHash); +} + +int main(int argc, char **argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file From e5eff85c7a5842fba16c6ada36280f6453ea847d Mon Sep 17 00:00:00 2001 From: TehilaTheStudent Date: Mon, 16 Sep 2024 18:09:33 +0300 Subject: [PATCH 14/21] HSM: Implement and test RSA algorithm --- CMakeLists.txt | 45 +- Dockerfile | 2 +- include/big_int10.h | 81 +++ include/big_int_utils.h | 117 ++++ include/prime_tests.h | 22 + include/return_codes.h | 26 +- include/rsa.h | 20 + include/sycl-version/big_int64.h | 193 +++++++ include/threads-version/big_int64.h | 109 ++++ src/big_int10.cpp | 567 ++++++++++++++++++ src/prime_tests.cpp | 805 ++++++++++++++++++++++++++ src/rsa.cpp | 364 ++++++++++++ src/sycl-version/big_int64.cpp | 834 +++++++++++++++++++++++++++ src/threads-version/big_int64.cpp | 866 ++++++++++++++++++++++++++++ tests/ecc_tests.cpp | 7 - tests/rsa_tests.cpp | 125 ++++ tests/sha256_tests.cpp | 5 - 17 files changed, 4149 insertions(+), 39 deletions(-) create mode 100644 include/big_int10.h create mode 100644 include/big_int_utils.h create mode 100644 include/prime_tests.h create mode 100644 include/rsa.h create mode 100644 include/sycl-version/big_int64.h create mode 100644 include/threads-version/big_int64.h create mode 100644 src/big_int10.cpp create mode 100644 src/prime_tests.cpp create mode 100644 src/rsa.cpp create mode 100644 src/sycl-version/big_int64.cpp create mode 100644 src/threads-version/big_int64.cpp create mode 100644 tests/rsa_tests.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e84b953..dd23c187 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,23 +1,32 @@ cmake_minimum_required(VERSION 3.10) project(MyTest) + # Include directories -include_directories(src) +include_directories(include) +include_directories(logger) + + # Find GMP library find_path(GMP_INCLUDE_DIR NAMES gmp.h) find_library(GMP_LIBRARY NAMES gmp) find_library(GMPXX_LIBRARY NAMES gmpxx) if(NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARY OR NOT GMPXX_LIBRARY) - message(FATAL_ERROR "Could not find GMP or GMPXX libraries") + message(FATAL_ERROR "Could not find GMP or GMPXX libraries") endif() include_directories(${GMP_INCLUDE_DIR}) + # Find Google Test find_package(GTest REQUIRED) + # Add source files file(GLOB SOURCES "src/*.cpp") +list(APPEND SOURCES logger/logger.cpp) + + # Check if SYCL is enabled option(USE_SYCL "Enable SYCL support" OFF) include_directories(src) -# Find Google Test + if(USE_SYCL) # Set the icpx compiler with SYCL support set(CMAKE_CXX_COMPILER icpx) @@ -28,21 +37,37 @@ if(USE_SYCL) link_directories(/opt/intel/oneapi/compiler/latest/linux/lib) message(STATUS "Compiling with SYCL support") add_definitions(-DUSE_SYCL) - else() + list(APPEND SOURCES src/sycl-version/big_int64.cpp) + include_directories(${CMAKE_SOURCE_DIR}/include/sycl-version) +else() message(STATUS "Compiling without SYCL support") remove_definitions(-DUSE_SYCL) + list(APPEND SOURCES src/threads-version/big_int64.cpp) + include_directories(${CMAKE_SOURCE_DIR}/include/threads-version) endif() + +# Set build type and output message +if(USE_DEBUG) + set(CMAKE_BUILD_TYPE Debug) + add_definitions(-DDEBUG_MODE) + message(STATUS "Compiling with Debug build type") +else() + set(CMAKE_BUILD_TYPE Release) + remove_definitions(-DDEBUG_MODE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") + message(STATUS "Compiling with Release build type and optimization level -O3") +endif() + # Add the executable for the tests -add_executable(runTests tests/aes_tests.cpp tests/ecc_tests.cpp tests/sha256_tests.cpp ${SOURCES}) +add_executable(runTests tests/aes_tests.cpp tests/ecc_tests.cpp tests/sha256_tests.cpp tests/rsa_tests.cpp ${SOURCES}) + # Link libraries target_link_libraries(runTests - ${GMP_LIBRARY} - ${GMPXX_LIBRARY} + ${GMP_LIBRARY} + ${GMPXX_LIBRARY} gtest gtest_main pthread ) -# Add debug flags -set(CMAKE_BUILD_TYPE Debug) -# Add the executable for the tests + # Optional: Output directory for the executable set_target_properties(runTests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} diff --git a/Dockerfile b/Dockerfile index 49734c03..a2325f36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ RUN cd /usr/src/gtest && cmake CMakeLists.txt && make && \ find /usr/src/gtest -name "*.a" -exec cp {} /usr/lib \; # Build the project using CMake and Make -RUN cmake .. -DUSE_SYCL=OFF +RUN cmake .. -DUSE_SYCL=OFF -DUSE_DEBUG=OFF RUN make # Command to run tests (optional) diff --git a/include/big_int10.h b/include/big_int10.h new file mode 100644 index 00000000..edf75527 --- /dev/null +++ b/include/big_int10.h @@ -0,0 +1,81 @@ +#ifndef __BIG_INT_10__ +#define __BIG_INT_10__ +#include +#include +#include +#include +#include + +class BigInt10 { + friend std::ostream &operator<<(std::ostream &out, const BigInt10 &a); + friend BigInt10 modularExponentiation(BigInt10 base, BigInt10 exponent, + const BigInt10 &modulus); + friend BigInt10 gcd(BigInt10 a, BigInt10 b); + friend BigInt10 karatzubaMultiply(const BigInt10 &a, const BigInt10 &b); + friend BigInt10 longMultiplication(const BigInt10 &a, const BigInt10 &b); + friend BigInt10 longDivision(const BigInt10 &a, const BigInt10 &b, + BigInt10 &remainder); + friend BigInt10 power(BigInt10 base, BigInt10 exponent); + friend class BigInt64; + + public: + // ctors + BigInt10(const std::string &str); + BigInt10(const char *str); + BigInt10(long long val = 0); + BigInt10(uint64_t uval); + BigInt10(bool isNegative); + BigInt10(int val); + // operators + // comparison + bool operator==(const BigInt10 &b) const; + bool operator!=(const BigInt10 &b) const; + bool operator<(const BigInt10 &b) const; + bool operator>(const BigInt10 &b) const; + bool operator<=(const BigInt10 &b) const; + bool operator>=(const BigInt10 &b) const; + // arithematic operations + BigInt10 &operator++(); + BigInt10 operator++(int); + BigInt10 &operator--(); + BigInt10 operator--(int); + // addition + BigInt10 &operator+=(const BigInt10 &b); + BigInt10 operator+(const BigInt10 &b) const; + // subtruction + BigInt10 &operator-=(const BigInt10 &b); + BigInt10 operator-(const BigInt10 &b) const; + // multiplication + BigInt10 &operator*=(const BigInt10 &b); + BigInt10 operator*(const BigInt10 &b) const; + // division + BigInt10 &operator/=(const BigInt10 &b); + BigInt10 operator/(const BigInt10 &b) const; + // modulus + BigInt10 &operator%=(const BigInt10 &b); + BigInt10 operator%(const BigInt10 &b) const; + // power + BigInt10 &operator^=(const BigInt10 &b); + BigInt10 operator^(const BigInt10 &b) const; + std::string toString() const; + uint64_t toU64() const; + void removeLeadingZeros(); + bool isZero() const; + int limbsCount() const; + void insertZroes(int n); + + private: + // uint8_t is 1B, like unsigned char + std::vector limbs; + bool isNegative; + // logic + bool isSmallerThanUnsigned(const BigInt10 &b) const; + void prefixPlusPlusUnsigned(); + void prefixMinusMinusUnsigned(); + void addUnsigned(const BigInt10 &b); + void subtractUnsigned(const BigInt10 &b); + void initFromString(const char *str, int n); + void thisEqualsbBSubthis(const BigInt10 &b); +}; + +#endif // __BIG_INT_10__ \ No newline at end of file diff --git a/include/big_int_utils.h b/include/big_int_utils.h new file mode 100644 index 00000000..78eb3bd9 --- /dev/null +++ b/include/big_int_utils.h @@ -0,0 +1,117 @@ +#ifndef __BIG_INT_UTILS__ +#define __BIG_INT_UTILS__ +#include +constexpr uint64_t MAX_VAL_64 = UINT64_MAX; +constexpr int MAX_VAL_10 = 9; + +inline uint64_t toBase64(uint64_t val) +{ + return MAX_VAL_64 - val + 1; +} + +inline void adder3_64(const uint64_t &a, const uint64_t &b, + const uint64_t &carryIn, uint64_t &sum, + uint64_t &carryOut) +{ + uint64_t ab = a + b; + // if A+B coused overflow, the result will be smaller than both + uint64_t out = (ab < b) ? 1 : 0; + sum = ab + carryIn; + carryOut = out + ((sum < ab) ? 1 : 0); +} + +#if defined(__SYCL_DEVICE_ONLY__) // Check for Intel C++ Compiler +inline void mul2Limbs64(const uint64_t a, const uint64_t b, uint64_t &high, + uint64_t &low) +{ + uint64_t a_low = static_cast(a); + uint64_t a_high = a >> 32; + uint64_t b_low = static_cast(b); + uint64_t b_high = b >> 32; + uint64_t low_low = a_low * b_low; + uint64_t low_high = a_low * b_high; + uint64_t high_low = a_high * b_low; + uint64_t high_high = a_high * b_high; + + uint64_t mid1 = low_high + (low_low >> 32); + uint64_t mid2 = high_low + (mid1 & 0xFFFFFFFF); + high = high_high + (mid1 >> 32) + (mid2 >> 32); + low = (mid2 << 32) | (low_low & 0xFFFFFFFF); +} + +#elif defined(__GNUC__) && defined(__cplusplus) // Check for g++ +inline void mul2Limbs64(const uint64_t a, const uint64_t b, uint64_t &high, + uint64_t &low) +{ + __uint128_t result = static_cast<__uint128_t>(a) * b; + low = static_cast(result); + high = static_cast(result >> 64); +} + +#elif defined(_WIN32) || defined(_WIN64) // Check if running on Windows +#include +inline void mul2Limbs64(const uint64_t a, const uint64_t b, uint64_t &high, + uint64_t &low) +{ + low = _umul128(a, b, &high); +} + +#else +#error "Compiler/platform not supported for mul2Limbs64" +#endif +inline uint64_t toBase10(uint8_t val) +{ + // note that 0->0 + return (MAX_VAL_10 - val + 1) % 10; +} + +inline void adder3_10(const uint8_t &a, const uint8_t &b, + const uint8_t &carryIn, uint8_t &sum, uint8_t &carryOut) +{ + uint8_t abcarry = a + b + carryIn; + sum = abcarry % 10; + carryOut = abcarry / 10; +} + +inline void mul2Limbs10(const uint8_t a, const uint8_t b, uint8_t &high, + uint8_t &low) +{ + uint8_t mult = a * b; + low = mult % 10; + high = mult / 10; +} + +inline bool isDigit10(const uint8_t a) +{ + return a >= 0 && a <= 9; +} + +inline bool isCharDigit10(const uint64_t a) +{ + return a >= '0' && a <= '9'; +} + +inline int bitsCount(uint64_t a) +{ +#if defined(_MSC_VER) // Check if compiling with Visual Studio + int count = 0; + while (a > 0) { + a >>= 1; + count++; + } + + return count; +#else // Assume Linux or GCC/Clang + int count = 64 - __builtin_clzll(a); + return count; +#endif +} + +inline uint64_t floatsToUint64(double float1, double float2) +{ + uint32_t part1 = static_cast(float1 * (1ULL << 32)); + uint32_t part2 = static_cast(float2 * (1ULL << 32)); + return (static_cast(part1) << 32) | static_cast(part2); +} + +#endif // __BIG_INT_UTILS__ \ No newline at end of file diff --git a/include/prime_tests.h b/include/prime_tests.h new file mode 100644 index 00000000..2f9d2f63 --- /dev/null +++ b/include/prime_tests.h @@ -0,0 +1,22 @@ +#ifndef __PRIME_TESTS_H__ +#define __PRIME_TESTS_H__ +#include "big_int64.h" +#include "logger.h" + +bool millerRabinPrimalityTest(const BigInt64 &number, size_t k); +bool fermatPrimalityTest(const BigInt64 &number, size_t k); +bool isDivisibleBySmallPrimes(const BigInt64 &n); +BigInt64 nextPrimeSequential(const BigInt64 &number, size_t k); +BigInt64 nextPrimeDivideToChunks(const BigInt64 &number, size_t k); +#ifdef USE_SYCL +#include +bool isDivisibleBySmallPrimesUSM(sycl::queue &q, const BigInt64 &n); +bool isDivisibleBySmallPrimesBuffers(sycl::queue &q, const BigInt64 &n); +bool millerRabinPrimalityTestUSM(sycl::queue &q, const BigInt64 &number, + size_t k); +bool millerRabinPrimalityTestBuffers(sycl::queue &q, const BigInt64 &number, + size_t k); +#else +bool millerRabinPrimalityTestThreads(const BigInt64 &number, size_t k); +#endif +#endif // __PRIME_TESTS_H__ \ No newline at end of file diff --git a/include/return_codes.h b/include/return_codes.h index 3ddf1f29..ecc377b4 100644 --- a/include/return_codes.h +++ b/include/return_codes.h @@ -1,30 +1,24 @@ #ifndef __RETURN_CODES_H__ #define __RETURN_CODES_H__ - typedef unsigned long CK_RV; /* Successful operation */ -#define CKR_OK 0x00000000 - +constexpr CK_RV CKR_OK = 0x00000000; /* General failure when a function could not complete its intended task */ -#define CKR_FUNCTION_FAILED 0x00000006 - +constexpr CK_RV CKR_FUNCTION_FAILED = 0x00000006; /* Invalid arguments provided to the function (e.g., null pointers or invalid values) */ -#define CKR_ARGUMENTS_BAD 0x00000007 - +constexpr CK_RV CKR_ARGUMENTS_BAD = 0x00000007; /* Key size is out of the allowed range (e.g., key length is too short or too long) */ -#define CKR_KEY_SIZE_RANGE 0x00000162 - +constexpr CK_RV CKR_KEY_SIZE_RANGE = 0x00000162; /* Buffer provided by the user is too small to hold the required data (e.g., during encryption or decryption) */ -#define CKR_BUFFER_TOO_SMALL 0x00000150 - +constexpr CK_RV CKR_BUFFER_TOO_SMALL = 0x00000150; /* The function attempted to generate a key, but key generation is not permitted or failed */ -#define CKR_KEY_FUNCTION_NOT_PERMITTED 0x00000068 - +constexpr CK_RV CKR_KEY_FUNCTION_NOT_PERMITTED = 0x00000068; /* Decryption was attempted, but the decrypted data is invalid (e.g., data was corrupted) */ -#define CKR_DECRYPTED_DATA_INVALID 0x00000064 - +constexpr CK_RV CKR_DECRYPTED_DATA_INVALID = 0x00000064; /* Encrypted data has invalid padding (e.g., during decryption or when verifying padding) */ -#define CKR_ENCRYPTED_DATA_INVALID 0x00000063 +constexpr CK_RV CKR_ENCRYPTED_DATA_INVALID = 0x00000063; +/* Data provided for encryption is too large for the RSA key */ +constexpr CK_RV CKR_DATA_TOO_LARGE = 0x00000080; #endif // __RETURN_CODES_H__ \ No newline at end of file diff --git a/include/rsa.h b/include/rsa.h new file mode 100644 index 00000000..84e9a75e --- /dev/null +++ b/include/rsa.h @@ -0,0 +1,20 @@ +#ifndef __RSA_H__ +#define __RSA_H__ +#include "big_int64.h" +#include "return_codes.h" + +CK_RV rsaGenerateKeys(size_t keySize, uint8_t *pubKey, size_t pubLen, + uint8_t *privKey, size_t privLen); +CK_RV rsaEncrypt(const uint8_t *plaintext, size_t plaintextLen, + const uint8_t *key, size_t keyLen, uint8_t *ciphertext, + size_t ciphertextLen, size_t keySize); +CK_RV rsaDecrypt(const uint8_t *ciphertext, size_t ciphertextLen, + const uint8_t *key, size_t keyLen, uint8_t *plaintext, + size_t *plaintextLen, size_t keySize); +size_t rsaGetEncryptedLen(size_t keySize); +size_t rsaGetPlainMaxLen(size_t keySize); +size_t rsaGetDecryptedLen(size_t keySize); +size_t rsaGetPublicKeyLen(size_t keySize); +size_t rsaGetPrivateKeyLen(size_t keySize); + +#endif // __RSA_H__ \ No newline at end of file diff --git a/include/sycl-version/big_int64.h b/include/sycl-version/big_int64.h new file mode 100644 index 00000000..6a9ba367 --- /dev/null +++ b/include/sycl-version/big_int64.h @@ -0,0 +1,193 @@ +#ifndef __BIG_INT_64__ +#define __BIG_INT_64__ +#include +#include +#include +#include +#include +#include "big_int10.h" +#include "big_int_utils.h" +constexpr int BYTES_IN_LIMB = 8; +constexpr int BITS_IN_BYTE = 8; +constexpr int BITS_IN_LIMB = 64; + +class BigInt64 { + friend std::ostream &operator<<(std::ostream &out, const BigInt64 &a); + friend BigInt64 power(BigInt64 base, BigInt64 exponent); + friend BigInt64 modularExponentiation(BigInt64 base, BigInt64 exponent, + const BigInt64 &modulus) + { + BigInt64 res(1); + base %= modulus; + while (!exponent.isZero()) { + if (!exponent.isEven()) + res = (res * base) % modulus; + base = (base * base) % modulus; + exponent >>= 1; + } + + return res; + } + + SYCL_EXTERNAL friend BigInt64 gcd(BigInt64 a, BigInt64 b); + friend BigInt64 extendedGcd(BigInt64 a, BigInt64 b, BigInt64 &x, + BigInt64 &y); + friend BigInt64 modularInverse(BigInt64 a, BigInt64 b); + + public: + enum CreateModes { RANDOM, BIG_ENDIANESS, LITTLE_ENDIANESS }; + // ctors + BigInt64(const std::string &str); + SYCL_EXTERNAL BigInt64(uint64_t min, const BigInt64 &max, + oneapi::dpl::uniform_real_distribution &distr, + oneapi::dpl::minstd_rand &engine) + { + isNegative = false; + for (int i = 0; i < max.limbsCount(); i++) { + float r1 = distr(engine); + float r2 = distr(engine); + limbs[i] = floatsToUint64(r1, r2); + } + + std::uint64_t maxMsb = max.getMsb(); + if (maxMsb == 1) + size = max.limbsCount() - 1; + else { + std::uint64_t msbMask = (1ULL << (::bitsCount(maxMsb) - 1)) - 1; + limbs[max.limbsCount() - 1] &= msbMask; + size = max.limbsCount(); + } + + removeLeadingZeros(); + if (limbs[0] < min && size == 1) { + limbs[0] = min; + size = 1; + } + } + + SYCL_EXTERNAL BigInt64(long long val = 0) : size(0) + { + isNegative = false; + if (val == 0) { + limbs[size++] = 0; + return; + } + + if (val < 0) { + isNegative = true; + val *= -1; + } + + limbs[size++] = val; + } + + BigInt64(uint64_t uval); + SYCL_EXTERNAL BigInt64(int val) : BigInt64(static_cast(val)) {} + SYCL_EXTERNAL BigInt64(bool isNegative); + BigInt64(const char *str); + BigInt64(const uint8_t *str, size_t strLen, CreateModes mode); + BigInt64(CreateModes mode, int bits); + BigInt64(CreateModes mode, uint64_t min, const BigInt64 &max); + // copy ctor + SYCL_EXTERNAL BigInt64(const BigInt64 &other) + { + isNegative = other.isNegative; + size = other.size; + copyLimbsFrom(other.limbs, 0, size, 0, size); + } + + // assignment operator + SYCL_EXTERNAL BigInt64 &operator=(const BigInt64 &other) + { + if (this == &other) + return *this; + + isNegative = other.isNegative; + size = other.size; + copyLimbsFrom(other.limbs, 0, size, 0, size); + return *this; + } + + // operators + // comparison + SYCL_EXTERNAL bool operator==(const BigInt64 &b) const; + SYCL_EXTERNAL bool operator!=(const BigInt64 &b) const; + SYCL_EXTERNAL bool operator<(const BigInt64 &b) const; + SYCL_EXTERNAL bool operator>(const BigInt64 &b) const; + SYCL_EXTERNAL bool operator<=(const BigInt64 &b) const; + SYCL_EXTERNAL bool operator>=(const BigInt64 &b) const; + // arithematic operations + SYCL_EXTERNAL BigInt64 &operator++(); + SYCL_EXTERNAL BigInt64 operator++(int); + SYCL_EXTERNAL BigInt64 &operator--(); + SYCL_EXTERNAL BigInt64 operator--(int); + // addition + SYCL_EXTERNAL BigInt64 &operator+=(const BigInt64 &b); + SYCL_EXTERNAL BigInt64 operator+(const BigInt64 &b) const; + // subtruction + SYCL_EXTERNAL BigInt64 &operator-=(const BigInt64 &b); + SYCL_EXTERNAL BigInt64 operator-(const BigInt64 &b) const; + // multiplication + SYCL_EXTERNAL BigInt64 &operator*=(const BigInt64 &b); + SYCL_EXTERNAL BigInt64 operator*(const BigInt64 &b) const; + // division + SYCL_EXTERNAL BigInt64 &operator/=(const BigInt64 &b); + SYCL_EXTERNAL BigInt64 operator/(const BigInt64 &b) const; + // modulus + SYCL_EXTERNAL BigInt64 &operator%=(const BigInt64 &b); + SYCL_EXTERNAL BigInt64 operator%(const BigInt64 &b) const; + // power + BigInt64 &operator^=(const BigInt64 &b); + BigInt64 operator^(const BigInt64 &b) const; + // right shift - division + SYCL_EXTERNAL BigInt64 &operator>>=(uint64_t n); + SYCL_EXTERNAL BigInt64 operator>>(uint64_t n) const; + // left shift - multiplication + BigInt64 &operator<<=(uint64_t n); + BigInt64 operator<<(uint64_t n) const; + // basic utils + SYCL_EXTERNAL bool isZero() const; + SYCL_EXTERNAL int limbsCount() const; + SYCL_EXTERNAL std::uint64_t getMsb() const; + SYCL_EXTERNAL std::uint64_t getLsb() const; + int bitsCount() const; + SYCL_EXTERNAL bool isEven() const; + void exportTo(uint8_t *out, size_t outLen, CreateModes mode) const; + size_t bytesCount() const; + void longMultiplication(const BigInt64 &b); + std::string toString() const; + + private: + // uint64_t is 8B, like unsigned long long + uint64_t limbs[150]; + size_t size; + bool isNegative; + // logic + bool isSmallerThanUnsigned(const BigInt64 &b) const; + void prefixPlusPlusUnsigned(); + void prefixMinusMinusUnsigned(); + void addUnsigned(const BigInt64 &b); + void subtractUnsigned(const BigInt64 &b); + void longDivision(const BigInt64 &b, BigInt64 &remainder, + BigInt64 "ient) const; + BigInt10 toDecimal() const; + void initFromString(const char *str, int n); + void rightShift(uint64_t n); + void leftShift(uint64_t n); + // helpers + void thisEqualsbBSubthis(const BigInt64 &b); + SYCL_EXTERNAL void removeLeadingZeros(); + void insert(int n, uint64_t limb); + void erase(int n); + void generateNLimbsRandom(int limbsCnt); + uint64_t randomLimb(uint64_t min, uint64_t max); + void zero(); + bool hasLeadingZero(); + SYCL_EXTERNAL void copyLimbsFrom(const uint64_t *other, size_t otherStart, + size_t count, size_t meStart, + size_t newSize); + void setLimbs(uint64_t val, size_t count, size_t meStart, size_t newSize); + void reverse(); +}; + +#endif // __BIG_INT_64__ \ No newline at end of file diff --git a/include/threads-version/big_int64.h b/include/threads-version/big_int64.h new file mode 100644 index 00000000..a06a1190 --- /dev/null +++ b/include/threads-version/big_int64.h @@ -0,0 +1,109 @@ +#ifndef __BIG_INT_64__ +#define __BIG_INT_64__ +#include +#include +#include +#include +#include "big_int10.h" +constexpr int BYTES_IN_LIMB = 8; +constexpr int BITS_IN_BYTE = 8; +constexpr int BITS_IN_LIMB = 64; + +class BigInt64 { + friend std::ostream &operator<<(std::ostream &out, const BigInt64 &a); + friend BigInt64 modularExponentiation(BigInt64 base, BigInt64 exponent, + const BigInt64 &modulus); + friend BigInt64 gcd(BigInt64 a, BigInt64 b); + friend BigInt64 karatzubaMultiplication(const BigInt64 &a, + const BigInt64 &b); + friend BigInt64 extendedGcd(BigInt64 a, BigInt64 b, BigInt64 &x, + BigInt64 &y); + friend BigInt64 modularInverse(BigInt64 a, BigInt64 b); + friend BigInt64 longMultiplication(const BigInt64 &a, const BigInt64 &b); + friend BigInt64 longDivision(const BigInt64 &a, const BigInt64 &b, + BigInt64 &remainder); + friend BigInt64 power(BigInt64 base, BigInt64 exponent); + + public: + enum CreateModes { RANDOM, BIG_ENDIANESS, LITTLE_ENDIANESS }; + // ctors + BigInt64(const std::string &str); + BigInt64(long long val = 0); + BigInt64(uint64_t uval); + BigInt64(int val); + BigInt64(bool isNegative); + BigInt64(const char *str); + BigInt64(const uint8_t *str, size_t strLen, CreateModes mode); + BigInt64(std::vector v, bool isNegative); + BigInt64(CreateModes mode, int bits); + BigInt64(CreateModes mode, uint64_t min, const BigInt64 &max); + // operators + // comparison + bool operator==(const BigInt64 &b) const; + bool operator!=(const BigInt64 &b) const; + bool operator<(const BigInt64 &b) const; + bool operator>(const BigInt64 &b) const; + bool operator<=(const BigInt64 &b) const; + bool operator>=(const BigInt64 &b) const; + // arithematic operations + BigInt64 &operator++(); + BigInt64 operator++(int); + BigInt64 &operator--(); + BigInt64 operator--(int); + // addition + BigInt64 &operator+=(const BigInt64 &b); + BigInt64 operator+(const BigInt64 &b) const; + // subtruction + BigInt64 &operator-=(const BigInt64 &b); + BigInt64 operator-(const BigInt64 &b) const; + // multiplication + BigInt64 &operator*=(const BigInt64 &b); + BigInt64 operator*(const BigInt64 &b) const; + // division + BigInt64 &operator/=(const BigInt64 &b); + BigInt64 operator/(const BigInt64 &b) const; + // modulus + BigInt64 &operator%=(const BigInt64 &b); + BigInt64 operator%(const BigInt64 &b) const; + // power + BigInt64 &operator^=(const BigInt64 &b); + BigInt64 operator^(const BigInt64 &b) const; + // right shift - division + BigInt64 &operator>>=(uint64_t n); + BigInt64 operator>>(uint64_t n) const; + // left shift - multiplication + BigInt64 &operator<<=(uint64_t n); + BigInt64 operator<<(uint64_t n) const; + // basic utils + bool isZero() const; + int limbsCount() const; + int bitsCount() const; + bool isEven() const; + void exportTo(uint8_t *out, size_t outLen, CreateModes mode) const; + size_t bytesCount() const; + std::string toString() const; + + private: + // uint64_t is 8B, like unsigned long long + std::vector limbs; + bool isNegative; + // logic + bool isSmallerThanUnsigned(const BigInt64 &b) const; + void prefixPlusPlusUnsigned(); + void prefixMinusMinusUnsigned(); + void addUnsigned(const BigInt64 &b); + void subtractUnsigned(const BigInt64 &b); + BigInt10 toDecimal() const; + void initFromString(const char *str, int n); + void rightShift(uint64_t n); + void leftShift(uint64_t n); + // helpers + void thisEqualsbBSubthis(const BigInt64 &b); + void removeLeadingZeros(); + void insertZroes(int n); + void generateNLimbsRandom(int limbsCnt); + uint64_t randomLimb(uint64_t min, uint64_t max); + void zero(); +}; + +#endif // __BIG_INT_64__ \ No newline at end of file diff --git a/src/big_int10.cpp b/src/big_int10.cpp new file mode 100644 index 00000000..a1f353e0 --- /dev/null +++ b/src/big_int10.cpp @@ -0,0 +1,567 @@ +#include +#include +#include +#include "big_int10.h" +#include "big_int_utils.h" +using namespace std; + +BigInt10::BigInt10(const std::string &str) +{ + initFromString(str.c_str(), str.size()); +} + +BigInt10::BigInt10(const char *str) +{ + initFromString(str, std::strlen(str)); +} + +BigInt10::BigInt10(long long val) +{ + isNegative = val < 0; + do { + limbs.push_back(val % 10); + val /= 10; + } while (val != 0); +} + +BigInt10::BigInt10(uint64_t uval) +{ + isNegative = false; + do { + limbs.push_back(uval % 10); + uval /= 10; + } while (uval != 0); +} + +BigInt10::BigInt10(bool isNegative) : BigInt10(0) +{ + this->isNegative = isNegative; +} + +BigInt10::BigInt10(int val) : BigInt10(static_cast(val)) {} + +bool BigInt10::operator==(const BigInt10 &b) const +{ + return limbs == b.limbs && isNegative == b.isNegative; +} + +bool BigInt10::operator!=(const BigInt10 &b) const +{ + return !(*this == b); +} + +bool BigInt10::operator<(const BigInt10 &b) const +{ + if (isNegative && !b.isNegative) + return true; + + if (!isNegative && b.isNegative) + return false; + + // same sign + if (isNegative) + return b.isSmallerThanUnsigned(*this); + + else + return isSmallerThanUnsigned(b); +} + +bool BigInt10::operator>(const BigInt10 &b) const +{ + return b < *this; +} + +bool BigInt10::operator<=(const BigInt10 &b) const +{ + return !(b < *this); +} + +bool BigInt10::operator>=(const BigInt10 &b) const +{ + return !(*this < b); +} + +BigInt10 &BigInt10::operator++() +{ + if (!isNegative) + prefixPlusPlusUnsigned(); + else { + prefixMinusMinusUnsigned(); + if (isZero()) + //-1 -> 0 + isNegative = false; + } + + return *this; +} + +BigInt10 BigInt10::operator++(int) +{ + BigInt10 temp = *this; + ++*this; + return temp; +} + +BigInt10 &BigInt10::operator--() +{ + if (isNegative) + prefixPlusPlusUnsigned(); + else { + if (isZero()) { + // 0 -> -1 + limbs[0] = 1; + isNegative = true; + } + else + prefixMinusMinusUnsigned(); + } + + return *this; +} +BigInt10 BigInt10::operator--(int) +{ + BigInt10 temp = *this; + --*this; + return temp; +} + +void BigInt10::thisEqualsbBSubthis(const BigInt10 &b) +{ + BigInt10 copyB(b); + copyB.subtractUnsigned(*this); // copyB-=this + *this = std::move(copyB); +} + +BigInt10 &BigInt10::operator+=(const BigInt10 &b) +{ + if (isNegative == b.isNegative) // same sign + addUnsigned(b); + else if (isNegative && !b.isSmallerThanUnsigned(*this) || + !isNegative && isSmallerThanUnsigned(b)) { + // -3 + +4/-3 + +3 || +3 + -4 + thisEqualsbBSubthis(b); + isNegative = b.isNegative; + } + else // -4 + +3 || +3 + -3 / +4 + -3 + subtractUnsigned(b); // this-=b + return *this; +} + +BigInt10 BigInt10::operator+(const BigInt10 &b) const +{ + BigInt10 c(*this); + c += b; + return c; +} + +BigInt10 &BigInt10::operator-=(const BigInt10 &b) +{ + if (isNegative != b.isNegative) // -this - +b / +a - -b + addUnsigned(b); + else if (isNegative && !b.isSmallerThanUnsigned(*this) || + !isNegative && (isSmallerThanUnsigned(b))) { + // -3 - -4/ -4 - -4 || +3 - +7 + thisEqualsbBSubthis(b); + isNegative = !b.isNegative; + } + else // -4 - -3 ||+4 - +3/ +3 - +3 + subtractUnsigned(b); // this-=b + return *this; +} + +BigInt10 BigInt10::operator-(const BigInt10 &b) const +{ + BigInt10 c(*this); + c -= b; + return c; +} + +BigInt10 &BigInt10::operator*=(const BigInt10 &b) +{ + *this = karatzubaMultiply(*this, b); + return *this; +} + +BigInt10 BigInt10::operator*(const BigInt10 &b) const +{ + BigInt10 c(*this); + c *= b; + return c; +} + +BigInt10 &BigInt10::operator/=(const BigInt10 &b) +{ + BigInt10 remainder; + *this = longDivision(*this, b, remainder); + return *this; +} + +BigInt10 BigInt10::operator/(const BigInt10 &b) const +{ + BigInt10 c(*this); + c /= b; + return c; +} + +BigInt10 &BigInt10::operator%=(const BigInt10 &b) +{ + BigInt10 remainder; + longDivision(*this, b, remainder); + *this = remainder; + return *this; +} + +BigInt10 BigInt10::operator%(const BigInt10 &b) const +{ + BigInt10 c(*this); + c %= b; + return c; +} + +BigInt10 &BigInt10::operator^=(const BigInt10 &b) +{ + *this = power(*this, b); + return *this; +} + +BigInt10 BigInt10::operator^(const BigInt10 &b) const +{ + BigInt10 c(*this); + c ^= b; + return c; +} + +std::string BigInt10::toString() const +{ + std::ostringstream oss; + oss << *this; + return oss.str(); +} + +uint64_t BigInt10::toU64() const +{ + BigInt10 base = MAX_VAL_64; + if (base.isSmallerThanUnsigned(*this)) + throw std::invalid_argument("this bigger than uint64"); + + uint64_t result = 0; + for (int i = limbsCount() - 1; i >= 0; i--) { + result *= 10; + result += limbs[i]; + } + + return result; +} + +void BigInt10::removeLeadingZeros() +{ + while (limbs.size() > 1 && limbs.back() == 0) + limbs.pop_back(); +} + +bool BigInt10::isZero() const +{ + return limbsCount() == 1 && limbs[0] == 0; +} + +int BigInt10::limbsCount() const +{ + return limbs.size(); +} + +void BigInt10::insertZroes(int n) +{ + limbs.insert(limbs.begin(), n, 0); +} + +bool BigInt10::isSmallerThanUnsigned(const BigInt10 &b) const +{ + if (limbsCount() > b.limbsCount()) + // a is longer + return false; + + if (limbsCount() < b.limbsCount()) + // b is longer + return true; + + // same length + for (int i = limbsCount() - 1; i >= 0; i--) + if (limbs[i] != b.limbs[i]) + return limbs[i] < b.limbs[i]; + + // they are equal + return false; +} + +void BigInt10::prefixPlusPlusUnsigned() +{ + int i, n = limbsCount(); + // zero alll the MAX_VAL lsb's + for (i = 0; i < n && limbs[i] == MAX_VAL_10; i++) { + limbs[i] = 0; + } + + if (i == n) + // it was all MAX_VAL + limbs.push_back(1); + else + limbs[i]++; +} + +void BigInt10::prefixMinusMinusUnsigned() +{ + if (isZero()) + throw std::invalid_argument("cant --0"); + + int i = 0, n = limbsCount(); + // starting zeros case 0 0 0 X + while (i < n && limbs[i] == 0) { + limbs[i] = MAX_VAL_10; + i++; + } + + limbs[i]--; // subtruct the first valid limb + // remove leading zero if exists + if (limbs[i] == 0 && i != 0) + limbs.pop_back(); +} + +void BigInt10::addUnsigned(const BigInt10 &b) +{ + int n = limbsCount(), m = b.limbsCount(); + uint8_t carry = 0; //(1/0) + uint8_t bLimb; + if (n < m) { + limbs.resize(m); + n = m; + } + + for (int i = 0; i < n; i++) { + bLimb = i < m ? b.limbs[i] : 0; + adder3_10(limbs[i], bLimb, carry, limbs[i], carry); + } + + if (carry == 1) + limbs.push_back(carry); +} + +void BigInt10::subtractUnsigned(const BigInt10 &b) +{ + if (this->isSmallerThanUnsigned(b)) + // make sure this>=b; + throw std::invalid_argument("cant -: this < b"); + + int n = limbsCount(), m = b.limbsCount(); + int borrow = 0; //(1/0) + uint8_t bLimb; + + for (int i = 0; i < n; i++) { + bLimb = i < m ? b.limbs[i] : 0; + if ((borrow == 1 && limbs[i] == 0) || (limbs[i] - borrow < bLimb)) { + // need to borrow from next limb + limbs[i] = limbs[i] + (bLimb == 0 ? 10 : toBase10(bLimb)) - borrow; + borrow = 1; + } + else { + limbs[i] = limbs[i] - bLimb - borrow; + borrow = 0; + } + } + + removeLeadingZeros(); +} + +BigInt10 longMultiplication(const BigInt10 &a, const BigInt10 &b) +{ + if (a.isZero() || b.isZero()) + return BigInt10(); + + int n = a.limbsCount(), m = b.limbsCount(); + std::vector result(n + m, 0); + uint8_t high, low, carry; + + for (int i = 0; i < n; i++) { + carry = 0; + for (int j = 0; j < m; j++) { + mul2Limbs10(a.limbs[i], b.limbs[j], high, low); + adder3_10(low, result[i + j], carry, result[i + j], carry); + carry = high + carry; + } + + // Handle any remaining carry after the inner loop + result[i + m] = carry; + } + + BigInt10 res; + res.limbs = std::move(result); + res.removeLeadingZeros(); // Remove leading zeros + res.isNegative = a.isNegative != b.isNegative; + return res; +} + +BigInt10 longDivision(const BigInt10 &a, const BigInt10 &b, BigInt10 &remainder) +{ + if (b.isZero()) + throw std::invalid_argument("Invalid input: non-digit character"); + + remainder.isNegative = false; + if (a.isSmallerThanUnsigned(b)) { + remainder.limbs = a.limbs; + return BigInt10(); + } + + remainder.limbs.clear(); + std::vector quotient; + + for (int i = a.limbsCount() - 1; i >= 0; i--) { // msb-lsb + remainder.limbs.insert(remainder.limbs.begin(), + a.limbs[i]); // insert msb as lsb + if (remainder.limbsCount() > 1 && remainder.limbs.back() == 0) + remainder.limbs.pop_back(); // remove 1 leading zero + int times = 0; + if (!remainder.isSmallerThanUnsigned(b)) { + int left = 1, right = 9; + while (left <= right) { + int mid = left + (right - left) / 2; + if (!remainder.isSmallerThanUnsigned( + b * mid)) { // b*times<=remainder + times = mid; + if (left == right) + break; + left = mid + 1; + } + else + right = mid - 1; + } + + remainder.subtractUnsigned(b * times); + } + + if (quotient.size() > 0 || times > 0) + quotient.push_back(times); + } + + std::reverse(quotient.begin(), quotient.end()); + BigInt10 quoti(a.isNegative != b.isNegative); + quoti.limbs = std::move(quotient); + return quoti; +} + +BigInt10 power(BigInt10 base, BigInt10 exponent) +{ + if (exponent.isNegative) + throw std::invalid_argument("Invalid input: negative exponent"); + + BigInt10 result(1); + while (!exponent.isZero()) { + if (exponent.limbs[0] & 1) { + result *= base; + } + + base *= base; + exponent /= 2; + } + + return result; +} + +void BigInt10::initFromString(const char *str, int n) +{ + isNegative = str[0] == '-'; + limbs.reserve(n); + for (int i = n - 1; i >= isNegative; i--) { + uint8_t digit = str[i] - '0'; + if (!isDigit10(digit)) + throw std::invalid_argument("Invalid input: non-digit character"); + + limbs.push_back(digit); + } +} + +std::ostream &operator<<(std::ostream &out, const BigInt10 &a) +{ + if (a.isNegative) + out << '-'; + for (int i = a.limbsCount() - 1; i >= 0; i--) + out << static_cast(a.limbs[i]); + return out; +} + +BigInt10 modularExponentiation(BigInt10 base, BigInt10 exponent, + const BigInt10 &modulus) +{ + BigInt10 res(1); + base %= modulus; + while (!exponent.isZero()) { + if (exponent.limbs[0] & 1) + res = (res * base) % modulus; + res = (res * res) % modulus; + exponent /= 2; + } + + return res; +} + +BigInt10 gcd(BigInt10 a, BigInt10 b) +{ + while (!b.isZero()) { + BigInt10 copyB = b; + b = a % b; + a = copyB; + } + + return a; +} + +BigInt10 karatzubaMultiply(const BigInt10 &a, const BigInt10 &b) +{ + int n = a.limbsCount(), m = b.limbsCount(); + if (n == 1 || m == 1) + return longMultiplication(a, b); + + const BigInt10 *longerX, *shorterY; + int xLen, yLen; + if (n >= m) { + longerX = &a; + xLen = n; + shorterY = &b; + yLen = m; + } + else { + longerX = &b; + xLen = m; + shorterY = &a; + yLen = n; + } + + int xLsbHalf = xLen / 2; + int yLsbHalf = min(xLsbHalf, yLen); + BigInt10 xM, xL, yL, yM; + xM.limbs.reserve(xLen - xLsbHalf); + xL.limbs.reserve(xLsbHalf); + yM.limbs.reserve(yLen - yLsbHalf); + yL.limbs.reserve(yLsbHalf); + // M L + // xM aL =longer <-[L M], [xL ...... xM] + // yM bL =shorter<-[L M], [yL yM] + xL.limbs.assign(longerX->limbs.begin(), longerX->limbs.begin() + xLsbHalf); + xL.removeLeadingZeros(); + xM.limbs.assign(longerX->limbs.begin() + xLsbHalf, + longerX->limbs.begin() + xLen); + yL.limbs.assign(shorterY->limbs.begin(), + shorterY->limbs.begin() + yLsbHalf); + yL.removeLeadingZeros(); + if (yLen - yLsbHalf != 0) + yM.limbs.assign(shorterY->limbs.begin() + yLsbHalf, + shorterY->limbs.begin() + yLen); + + BigInt10 sum4Mult = karatzubaMultiply(xL + xM, yL + yM); + BigInt10 xyL = karatzubaMultiply(xL, yL); + BigInt10 xyM = karatzubaMultiply(xM, yM); + BigInt10 xLyM_xMyL = sum4Mult - xyL - xyM; + xyM.insertZroes(xLsbHalf * 2); + xLyM_xMyL.insertZroes(xLsbHalf); + BigInt10 res = xyM + xLyM_xMyL + xyL; + res.isNegative = a.isNegative != b.isNegative; + return res; +} \ No newline at end of file diff --git a/src/prime_tests.cpp b/src/prime_tests.cpp new file mode 100644 index 00000000..08df6267 --- /dev/null +++ b/src/prime_tests.cpp @@ -0,0 +1,805 @@ +#include +#include "big_int_utils.h" +#include "prime_tests.h" +#include "logger.h" +using namespace std; + +constexpr size_t smallPrimesSize = 2000; +constexpr int smallPrimes[2000] = { + 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, + 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, + 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, + 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, + 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, + 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, + 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, + 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, + 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, + 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, + 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, + 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, + 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, + 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, + 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, + 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, + 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, + 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, + 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, + 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, + 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, + 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, + 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, + 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, + 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, + 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, + 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, + 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, + 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, + 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, + 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, + 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, + 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, + 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, + 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, + 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, + 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, + 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, + 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, + 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, + 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, + 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, + 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, + 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, + 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, + 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, + 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, + 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, + 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, + 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, + 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, + 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, + 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, + 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, + 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, + 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, + 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, + 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, + 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, + 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, + 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, + 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, + 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, + 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, + 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, + 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, + 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, + 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, + 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, + 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, + 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, + 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, + 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, + 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, + 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, + 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, + 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, + 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, + 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, + 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, + 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, + 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, + 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, + 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, + 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, + 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, + 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, + 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, + 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, + 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, + 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, + 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, + 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, + 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, + 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, + 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, + 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, + 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, + 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, + 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, + 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, + 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, + 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, + 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, + 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, + 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, + 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, + 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, + 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, + 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, + 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, + 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, + 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, + 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, + 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, + 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, + 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, + 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, + 10651, 10657, 10663, 10667, 10687, 10691, 10709, 10711, 10723, 10729, 10733, + 10739, 10753, 10771, 10781, 10789, 10799, 10831, 10837, 10847, 10853, 10859, + 10861, 10867, 10883, 10889, 10891, 10903, 10909, 10937, 10939, 10949, 10957, + 10973, 10979, 10987, 10993, 11003, 11027, 11047, 11057, 11059, 11069, 11071, + 11083, 11087, 11093, 11113, 11117, 11119, 11131, 11149, 11159, 11161, 11171, + 11173, 11177, 11197, 11213, 11239, 11243, 11251, 11257, 11261, 11273, 11279, + 11287, 11299, 11311, 11317, 11321, 11329, 11351, 11353, 11369, 11383, 11393, + 11399, 11411, 11423, 11437, 11443, 11447, 11467, 11471, 11483, 11489, 11491, + 11497, 11503, 11519, 11527, 11549, 11551, 11579, 11587, 11593, 11597, 11617, + 11621, 11633, 11657, 11677, 11681, 11689, 11699, 11701, 11717, 11719, 11731, + 11743, 11777, 11779, 11783, 11789, 11801, 11807, 11813, 11821, 11827, 11831, + 11833, 11839, 11863, 11867, 11887, 11897, 11903, 11909, 11923, 11927, 11933, + 11939, 11941, 11953, 11959, 11969, 11971, 11981, 11987, 12007, 12011, 12037, + 12041, 12043, 12049, 12071, 12073, 12097, 12101, 12107, 12109, 12113, 12119, + 12143, 12149, 12157, 12161, 12163, 12197, 12203, 12211, 12227, 12239, 12241, + 12251, 12253, 12263, 12269, 12277, 12281, 12289, 12301, 12323, 12329, 12343, + 12347, 12373, 12377, 12379, 12391, 12401, 12409, 12413, 12421, 12433, 12437, + 12451, 12457, 12473, 12479, 12487, 12491, 12497, 12503, 12511, 12517, 12527, + 12539, 12541, 12547, 12553, 12569, 12577, 12583, 12589, 12601, 12611, 12613, + 12619, 12637, 12641, 12647, 12653, 12659, 12671, 12689, 12697, 12703, 12713, + 12721, 12739, 12743, 12757, 12763, 12781, 12791, 12799, 12809, 12821, 12823, + 12829, 12841, 12853, 12889, 12893, 12899, 12907, 12911, 12917, 12919, 12923, + 12941, 12953, 12959, 12967, 12973, 12979, 12983, 13001, 13003, 13007, 13009, + 13033, 13037, 13043, 13049, 13063, 13093, 13099, 13103, 13109, 13121, 13127, + 13147, 13151, 13159, 13163, 13171, 13177, 13183, 13187, 13217, 13219, 13229, + 13241, 13249, 13259, 13267, 13291, 13297, 13309, 13313, 13327, 13331, 13337, + 13339, 13367, 13381, 13397, 13399, 13411, 13417, 13421, 13441, 13451, 13457, + 13463, 13469, 13477, 13487, 13499, 13513, 13523, 13537, 13553, 13567, 13577, + 13591, 13597, 13613, 13619, 13627, 13633, 13649, 13669, 13679, 13681, 13687, + 13691, 13693, 13697, 13709, 13711, 13721, 13723, 13729, 13751, 13757, 13759, + 13763, 13781, 13789, 13799, 13807, 13829, 13831, 13841, 13859, 13873, 13877, + 13879, 13883, 13901, 13903, 13907, 13913, 13921, 13931, 13933, 13963, 13967, + 13997, 13999, 14009, 14011, 14029, 14033, 14051, 14057, 14071, 14081, 14083, + 14087, 14107, 14143, 14149, 14153, 14159, 14173, 14177, 14197, 14207, 14221, + 14243, 14249, 14251, 14281, 14293, 14303, 14321, 14323, 14327, 14341, 14347, + 14369, 14387, 14389, 14401, 14407, 14411, 14419, 14423, 14431, 14437, 14447, + 14449, 14461, 14479, 14489, 14503, 14519, 14533, 14537, 14543, 14549, 14551, + 14557, 14561, 14563, 14591, 14593, 14621, 14627, 14629, 14633, 14639, 14653, + 14657, 14669, 14683, 14699, 14713, 14717, 14723, 14731, 14737, 14741, 14747, + 14753, 14759, 14767, 14771, 14779, 14783, 14797, 14813, 14821, 14827, 14831, + 14843, 14851, 14867, 14869, 14879, 14887, 14891, 14897, 14923, 14929, 14939, + 14947, 14951, 14957, 14969, 14983, 15013, 15017, 15031, 15053, 15061, 15073, + 15077, 15083, 15091, 15101, 15107, 15121, 15131, 15137, 15139, 15149, 15161, + 15173, 15187, 15193, 15199, 15217, 15227, 15233, 15241, 15259, 15263, 15269, + 15271, 15277, 15287, 15289, 15299, 15307, 15313, 15319, 15329, 15331, 15349, + 15359, 15361, 15373, 15377, 15383, 15391, 15401, 15413, 15427, 15439, 15443, + 15451, 15461, 15467, 15473, 15493, 15497, 15511, 15527, 15541, 15551, 15559, + 15569, 15581, 15583, 15601, 15607, 15619, 15629, 15641, 15643, 15647, 15649, + 15661, 15667, 15671, 15679, 15683, 15727, 15731, 15733, 15737, 15739, 15749, + 15761, 15767, 15773, 15787, 15791, 15797, 15803, 15809, 15817, 15823, 15859, + 15877, 15881, 15887, 15889, 15901, 15907, 15913, 15919, 15923, 15937, 15959, + 15971, 15973, 15991, 16001, 16007, 16033, 16057, 16061, 16063, 16067, 16069, + 16073, 16087, 16091, 16097, 16103, 16111, 16127, 16139, 16141, 16183, 16187, + 16189, 16193, 16217, 16223, 16229, 16231, 16249, 16253, 16267, 16273, 16301, + 16319, 16333, 16339, 16349, 16361, 16363, 16369, 16381, 16411, 16417, 16421, + 16427, 16433, 16447, 16451, 16453, 16477, 16481, 16487, 16493, 16519, 16529, + 16547, 16553, 16561, 16567, 16573, 16603, 16607, 16619, 16631, 16633, 16649, + 16651, 16657, 16661, 16673, 16691, 16693, 16699, 16703, 16729, 16741, 16747, + 16759, 16763, 16787, 16811, 16823, 16829, 16831, 16843, 16871, 16879, 16883, + 16889, 16901, 16903, 16921, 16927, 16931, 16937, 16943, 16963, 16979, 16981, + 16987, 16993, 17011, 17021, 17027, 17029, 17033, 17041, 17047, 17053, 17077, + 17093, 17099, 17107, 17117, 17123, 17137, 17159, 17167, 17183, 17189, 17191, + 17203, 17207, 17209, 17231, 17239, 17257, 17291, 17293, 17299, 17317, 17321, + 17327, 17333, 17341, 17351, 17359, 17377, 17383, 17387, 17389}; + +bool isDivisibleBySmallPrimes(const BigInt64 &n) +{ + for (int i = 0; i < smallPrimesSize && n > smallPrimes[i]; i++) + if (n % smallPrimes[i] == 0) + return true; + + return false; +} + +bool fermatPrimalityTest(const BigInt64 &number, size_t k) +{ + if (number == 2 || number == 3) + return true; + + if (number <= 1 || number.isEven()) + return false; + + if (isDivisibleBySmallPrimes(number)) + return false; + + while (k-- > 0) { + // assume n is a prime number + // pick randon integer a, such that 1 its not prime + if (modExpo != 1) + return false; + } + + return true; +} + +bool millerRabinPrimalityTest(const BigInt64 &number, size_t k) +{ + if (number == 2 || number == 3) + return true; + + if (number <= 1 || number.isEven()) + return false; + + // Write n-1 as 2^s * d where d is odd + BigInt64 s = 0; + BigInt64 d = number - 1; + while (d.isEven()) { + d >>= 1; + s++; + } + while (k-- > 0) { + // pick randon integer a, such that 1 +bool isDivisibleBySmallPrimesBuffers(sycl::queue &q, const BigInt64 &n) +{ + const std::vector nVec(smallPrimesSize, n); + int sumResult = 0; + sycl::range<1> sizeRange{smallPrimesSize}; + sycl::buffer sumBuff{&sumResult, 1}; + sycl::buffer primesBuff{smallPrimes, sizeRange}; + sycl::buffer nBuff{nVec.data(), sizeRange}; + + q.submit([&](sycl::handler &h) { + auto sumResult = sycl::reduction(sumBuff, h, sycl::plus<>()); + sycl::accessor primesAcc(primesBuff, h, sycl::read_only); + sycl::accessor nAcc(nBuff, h, sycl::read_only); + + h.parallel_for(sizeRange, sumResult, [=](sycl::id<1> idx, auto &sum) { + if (nAcc[idx] % primesAcc[idx] == 0 && nAcc[idx] != primesAcc[idx]) + sum += true; + sum += false; + }); + }); + q.wait(); + return sumResult > 0; +} + +bool isDivisibleBySmallPrimesUSM(sycl::queue &q, const BigInt64 &n) +{ + const std::vector nVec(smallPrimesSize, n); + int sumResult = 0; + sycl::range<1> sizeRange{smallPrimesSize}; + sycl::buffer sumBuff{&sumResult, 1}; + + int *primesShared = sycl::malloc_shared(smallPrimesSize, q); + BigInt64 *nShared = sycl::malloc_shared(smallPrimesSize, q); + for (int i = 0; i < smallPrimesSize; i++) { + primesShared[i] = smallPrimes[i]; + nShared[i] = nVec[i]; + } + + q.submit([&](sycl::handler &h) { + auto sumResult = sycl::reduction(sumBuff, h, sycl::plus<>()); + + h.parallel_for(sizeRange, sumResult, [=](sycl::id<1> idx, auto &sum) { + if (nShared[idx] % primesShared[idx] == 0 && + nShared[idx] != primesShared[idx]) + sum += true; + sum += false; + }); + }); + q.wait(); + sycl::free(primesShared, q); + sycl::free(nShared, q); + return sumResult > 0; +} + +bool millerRabinPrimalityTestBuffers(sycl::queue &q, const BigInt64 &number, + size_t k) +{ + if (number == 2 || number == 3) + return true; + + if (number <= 1 || number.isEven()) + return false; + + // Write n-1 as 2^s * d where d is odd + BigInt64 s = 0; + BigInt64 d = number - 1; + while (d.isEven()) { + d >>= 1; + s++; + } + vector randoms(k, BigInt64(BigInt64::RANDOM, 2, number - 2)); + vector dVec(k, d); + vector numberVec(k, number); + vector sVec(k, s); + + sycl::range<1> kRange{k}; + int sumResult = 0; + sycl::buffer sumBuf{&sumResult, 1}; + sycl::buffer randomsBuff{randoms.data(), kRange}; + sycl::buffer dBuff{dVec.data(), kRange}; + sycl::buffer numberBuff{numberVec.data(), kRange}; + sycl::buffer sBuff{sVec.data(), kRange}; + + q.submit([&](sycl::handler &cgh) { + auto sumReduction = reduction(sumBuf, cgh, sycl::plus<>()); + sycl::accessor randomsAcc(randomsBuff, cgh, + sycl::read_write); + sycl::accessor dAcc(dBuff, cgh, sycl::read_write); + sycl::accessor numberAcc(numberBuff, cgh, + sycl::read_write); + sycl::accessor sAcc(sBuff, cgh, sycl::read_write); + + cgh.parallel_for(kRange, sumReduction, [=](sycl::id<1> idx, auto &sum) { + BigInt64 aIn = randomsAcc[idx]; + BigInt64 dIn = dAcc[idx]; + BigInt64 numberIn = numberAcc[idx]; + BigInt64 sIn = sAcc[idx]; + // pick randon integer a, such that 1>= 1; + s++; + } + + std::uint64_t offset = number.getLsb(); + oneapi::dpl::minstd_rand engine(seed, offset); + oneapi::dpl::uniform_real_distribution distr; + BigInt64 a(2, number - 2, distr, engine); + + BigInt64 x = modularExponentiation(a, d, number); + if (x == 1 || x == number - 1) + return true; + + for (BigInt64 i = 0; i < s - 1; i++) { + x = modularExponentiation(x, 2, number); + if (x == number - 1) // x^2 mod n=n-1 + return true; + } + + return false; +} + +bool millerRabinPrimalityTestUSM(sycl::queue &q, const BigInt64 &number, + size_t k) +{ + if (number == 2 || number == 3) + return true; + + if (number <= 1 || number.isEven()) + return false; + + // Write n-1 as 2^s * d where d is odd + BigInt64 s = 0; + BigInt64 d = number - 1; + while (d.isEven()) { + d >>= 1; + s++; + } + + sycl::range<1> kRange{k}; + int sumResult = 0; + sycl::buffer sumBuf{&sumResult, 1}; + + BigInt64 *randomsShared = sycl::malloc_shared(k, q); + BigInt64 *dShared = sycl::malloc_shared(k, q); + BigInt64 *numberShared = sycl::malloc_shared(k, q); + BigInt64 *sShared = sycl::malloc_shared(k, q); + + for (int i = 0; i < k; i++) { + randomsShared[i] = BigInt64(BigInt64::RANDOM, 2, number - 2); + dShared[i] = d; + numberShared[i] = number; + sShared[i] = s; + } + q.submit([&](sycl::handler &cgh) { + auto sumReduction = reduction(sumBuf, cgh, sycl::plus<>()); + + cgh.parallel_for(kRange, sumReduction, [=](sycl::id<1> idx, auto &sum) { + BigInt64 aIn = randomsShared[idx]; + BigInt64 dIn = dShared[idx]; + BigInt64 numberIn = numberShared[idx]; + BigInt64 sIn = sShared[idx]; + // pick randon integer a, such that 1 distr; + BigInt64 a(2, number - 2, distr, engine); + // check if n is divisible by a + if (gcd(number, a) != 1) + return false; + + BigInt64 modExpo = modularExponentiation(a, number - 1, number); + // Fermat's little theorem- a^(prime-1)%prime ==1, else-> its not prime + if (modExpo != 1) + return false; + + return true; +} + +bool fermatPrimalityTest(sycl::queue &q, const BigInt64 &number, size_t k) +{ + if (number == 2 || number == 3) + return true; + + if (number <= 1 || number.isEven()) + return false; + + if (isDivisibleBySmallPrimes(number)) + return false; + + while (k-- > 0) { + // assume n is a prime number + // pick randon integer a, such that 1 its not prime + if (modExpo != 1) + return false; + } + + return true; +} + +bool nextPrimeChunk(BigInt64 &number, const BigInt64 &max, std::uint32_t seed) +{ + if (number < 2) + return 2; + + if (number.isEven()) + number++; + + while (!fermatPrimalityTestInKernel(number, seed)) { + number += 2; + if (number > max) + return false; + } + // candidate passed fermats test + return true; +} + +BigInt64 nextPrimeSequential(const BigInt64 &number, size_t k) +{ + if (number < 2) + return 2; + + BigInt64 res = number; + if (res.isEven()) + res++; + sycl::queue q; + do { + while (!fermatPrimalityTest(q, res, 1)) { + res += 2; + } + // candidate passed fermats test + } while (!millerRabinPrimalityTestUSM(q, res, k)); + return res; +} + +BigInt64 nextPrimeDivideToChunks(const BigInt64 &number, size_t k) +{ + logger rsaLogger("RSA encryption"); + rsaLogger.logMessage( + logger::LogLevel::DEBUG, + "RSA next prime: finding next prime after random number " + + number.toString()); + size_t numChunks; + size_t chunkSize; + size_t bits = number.bitsCount(); + if (bits <= 513) { // 500 + numChunks = 10; + chunkSize = 50; + } + else { // 1000 + numChunks = 10; + chunkSize = 100; + } + sycl::queue q; + BigInt64 *numberShared = sycl::malloc_shared(numChunks, q); + BigInt64 *maxShared = sycl::malloc_shared(numChunks, q); + bool *resultsShared = sycl::malloc_shared(numChunks, q); + BigInt64 currentStart = number; + while (true) { + for (int i = 0; i < numChunks; i++) { + resultsShared[i] = false; + numberShared[i] = currentStart + i * chunkSize; + maxShared[i] = currentStart + (i + 1) * chunkSize - 1; + } + + currentStart += chunkSize * numChunks; + int sumResult = 0; + sycl::buffer sumBuff{&sumResult, 1}; + + q.submit([&](sycl::handler &cgh) { + auto sumReduction = reduction(sumBuff, cgh, sycl::plus<>()); + cgh.parallel_for(sycl::range<1>{numChunks}, sumReduction, + [=](sycl::id<1> idx, auto &sum) { + resultsShared[idx] = + nextPrimeChunk(numberShared[idx], + maxShared[idx], idx.get(0)); + sum += resultsShared[idx]; + }); + }); + q.wait(); + for (int i = 0; i < numChunks; i++) { + if (resultsShared[i] == true) { + BigInt64 candidate = numberShared[i]; + bool passed = millerRabinPrimalityTestUSM(q, candidate, k); + if (passed) { + sycl::free(numberShared, q); + sycl::free(maxShared, q); + sycl::free(resultsShared, q); + rsaLogger.logMessage(logger::LogLevel::DEBUG, + "RSA next prime: found prime number " + + candidate.toString() + "\nat gap " + + (candidate - number).toString()); + return candidate; + } + } + } + + rsaLogger.logMessage(logger::LogLevel::DEBUG, + "RSA next prime: didnt find primes in range of " + + (currentStart - number).toString() + + " numbers, continue searching..."); + } +} + +#else +#include +#include +#include + +bool millerRabinPrimalityTestRound(const BigInt64 &number, const BigInt64 &d, + const BigInt64 &s, std::atomic &passed) +{ + BigInt64 a(BigInt64::CreateModes::RANDOM, 2, number - 2); + BigInt64 x = modularExponentiation(a, d, number); + if (x == 1 || x == number - 1) + return true; + + for (BigInt64 i = 0; passed.load() == true && i < s - 1; i++) { + x = modularExponentiation(x, 2, number); + if (x == number - 1) // x^2 mod n=n-1 + return true; + } + + return false; +} + +void parallelRound(const BigInt64 &number, const BigInt64 &d, const BigInt64 &s, + std::atomic &passed) +{ + if (!passed.load()) + return; + + bool res = millerRabinPrimalityTestRound(number, d, s, passed); + if (!res && passed.exchange(false)) + return; +} + +bool millerRabinPrimalityTestThreads(const BigInt64 &number, size_t k) +{ + if (number == 2 || number == 3) + return true; + + if (number <= 1 || number.isEven()) + return false; + + // Write n-1 as 2^s * d where d is odd + BigInt64 s = 0; + BigInt64 d = number - 1; + while (d.isEven()) { + d >>= 1; + s++; + } + + std::atomic passed(true); + std::vector threads; + for (int i = 0; i < k; i++) { + threads.emplace_back(parallelRound, std::ref(number), std::ref(d), + std::ref(s), std::ref(passed)); + } + + for (auto &t : threads) + t.join(); + return passed.load(); +} + +bool nextPrimeChunk(BigInt64 &number, const BigInt64 &end, + std::atomic &found) +{ + if (found.load()) + return false; + + if (number < 2) + return 2; + + if (number.isEven()) + number++; + while (!fermatPrimalityTest(number, 1)) { + number += 2; + if (found.load() || number > end) + return false; + } + + if (!found.exchange(true)) + return true; + + return true; +} + +BigInt64 nextPrimeDivideToChunks(const BigInt64 &number, size_t k) +{ + logger rsaLogger("RSA encryption"); + rsaLogger.logMessage( + logger::LogLevel::DEBUG, + "RSA next prime: finding next prime after random number " + + number.toString()); + size_t numChunks; + size_t chunkSize; + size_t bits = number.bitsCount(); + if (bits <= 513) { // 500 + numChunks = 10; + chunkSize = 50; + } + else { // 1000 + numChunks = 10; + chunkSize = 100; + } + + std::vector numbers(numChunks); + std::vector ends(numChunks); + BigInt64 currentStart = number; + std::vector > futures; + std::atomic found(false); + while (true) { + for (int i = 0; i < numChunks; i++) { + numbers[i] = currentStart + i * chunkSize; + ends[i] = currentStart + (i + 1) * chunkSize - 1; + futures.push_back(std::async(std::launch::async, nextPrimeChunk, + std::ref(numbers[i]), + std::ref(ends[i]), std::ref(found))); + } + + currentStart += numChunks * chunkSize; + for (int i = 0; i < numChunks; i++) + if (futures[i].get() && + millerRabinPrimalityTestThreads(numbers[i], k)) { + rsaLogger.logMessage(logger::LogLevel::DEBUG, + "RSA next prime: found prime number " + + numbers[i].toString() + "\nat gap " + + (numbers[i] - number).toString()); + return numbers[i]; + } + + rsaLogger.logMessage(logger::LogLevel::DEBUG, + "RSA next prime: didnt find primes in range of " + + (currentStart - number).toString() + + " numbers, continue searching..."); + futures.clear(); + } +} + +BigInt64 nextPrimeSequential(const BigInt64 &number, size_t k) +{ + if (number < 2) + return 2; + + BigInt64 res = number; + if (res.isEven()) + res++; + do { + while (!fermatPrimalityTest(res, 1)) { + res += 2; + } + + // candidate passed fermats test + } while (!millerRabinPrimalityTestThreads(res, k)); + return res; +} + +#endif \ No newline at end of file diff --git a/src/rsa.cpp b/src/rsa.cpp new file mode 100644 index 00000000..a865ef70 --- /dev/null +++ b/src/rsa.cpp @@ -0,0 +1,364 @@ +#include +#include +#include +#include +#include "rsa.h" +#include "logger.h" +#include "prime_tests.h" +using namespace std; +constexpr int PADDING_MIN_LEN = 11; +constexpr int PRIME_TEST_ROUNDS = 40; +constexpr int DEFAULT_E = 65537; +constexpr int FALLBACK_E = 17; + +bool allowedKeySizes(size_t keySize) +{ + return keySize == 1024 || keySize == 2048 || keySize == 4096; +} + +void rsaGeneratePrime(size_t bits, BigInt64 &prime) +{ + BigInt64 random = BigInt64(BigInt64::CreateModes::RANDOM, bits); + prime = nextPrimeDivideToChunks(random, PRIME_TEST_ROUNDS); +} + +void rsaKeysGeneration(const BigInt64 &p, const BigInt64 &q, size_t keySize, + BigInt64 &e, BigInt64 &d) +{ + BigInt64 phi; + BigInt64 gcdVal; + // phi(n) = (p-1) * (q-1) + BigInt64 pMinus1 = p - 1; + BigInt64 qMinus1 = q - 1; + phi = pMinus1 * qMinus1; + // Choose e such that 1 < e < phi and gcd(e, phi) = 1 (coprime) + // A common choice for e is 65537 + e = DEFAULT_E; + gcdVal = gcd(e, phi); + while (gcdVal != 1) { + e += 2; + if (e > phi) + e = FALLBACK_E; + } + + // d is the modular inverse of e modulo ϕ(n) or e^-1 mod phi + // 0 dis(1, 255); + // Start with 0x00 0x02 + padded[0] = 0x00; + padded[1] = 0x02; + + // Add non-zero random padding + for (size_t i = 2; i < paddingLen + 2; i++) { + padded[i] = static_cast(dis(gen)); + } + + // Add 0x00 separator + padded[paddingLen + 2] = 0x00; + std::memcpy(padded + paddingLen + 3, plaintext, plaintextLen); +} + +void rsaPkcs1v15Unpad(const uint8_t *padded, size_t paddedLen, + uint8_t *plaintext, size_t *plaintextLen) +{ + if (paddedLen < PADDING_MIN_LEN || padded[0] != 0x00 || padded[1] != 0x02) + throw std::runtime_error("Invalid padding"); + + // Find 0x00 separator + size_t i = 2; + while (i < paddedLen && padded[i] != 0x00) + ++i; + if (i == paddedLen) + throw std::runtime_error("Invalid padding: No separator found"); + + *plaintextLen = paddedLen - i - 1; + std::memcpy(plaintext, padded + i + 1, *plaintextLen); +} + +/** + * @brief Encrypts data using RSA public or private key. + * @param plaintext Pointer to the plaintext data. + * @param plaintextLen The length of the plaintext in bytes. + * @param modulus Pointer to the modulus (n). + * @param modulusLen The length of the modulus in bytes. + * @param exponent Pointer to the exponent (either public or private). + * @param exponentLen The length of the exponent in bytes. + * @param ciphertext Pointer to the buffer where the encrypted data (ciphertext) will be stored. + * @param ciphertextLen The length of the ciphertext buffer. + * @param keySize The size of the RSA key in bits. + * @return CKR_OK on success, CKR_KEY_SIZE_RANGE if the key size is invalid, or CKR_BUFFER_TOO_SMALL if buffers are insufficient. + */ +CK_RV rsaEncrypt(const uint8_t *plaintext, size_t plaintextLen, + const uint8_t *key, size_t keyLen, uint8_t *ciphertext, + size_t ciphertextLen, size_t keySize) +{ + logger rsaLogger("RSA encryption"); + if (!allowedKeySizes(keySize)) { + rsaLogger.logMessage(logger::LogLevel::ERROR, + "RSA encryption: invalid key size"); + return CKR_KEY_SIZE_RANGE; + } + + if ((!(keyLen == rsaGetPublicKeyLen(keySize)) && + !(keyLen == rsaGetPrivateKeyLen(keySize)))) { + rsaLogger.logMessage(logger::LogLevel::ERROR, + "RSA encryption: buffer sizes are insufficient"); + return CKR_BUFFER_TOO_SMALL; + } + + size_t keySizeBytes = keySize / BITS_IN_BYTE; + if (plaintextLen > rsaGetPlainMaxLen(keySize)) { + rsaLogger.logMessage(logger::LogLevel::ERROR, + "RSA encryption: plaintext is too long"); + return CKR_DATA_TOO_LARGE; + } + + if (ciphertextLen != keySizeBytes) { + rsaLogger.logMessage(logger::LogLevel::ERROR, + "RSA encryption: ciphertext buffer is too small"); + return CKR_BUFFER_TOO_SMALL; + } + + rsaLogger.logMessage(logger::LogLevel::INFO, + "RSA encryption: executing..."); + size_t paddedLen = keySizeBytes; + // Padding plaintext to keySizeBytes + uint8_t *padded = new uint8_t[keySizeBytes]; + rsaPkcs1v15Pad(plaintext, plaintextLen, padded, keySizeBytes); + // Convert padded plaintext to BigInt64 + BigInt64 plainNumber(padded, paddedLen, + BigInt64::CreateModes::BIG_ENDIANESS); + BigInt64 modulus(key, rsaGetModulusLen(keySize), + BigInt64::CreateModes::BIG_ENDIANESS); + BigInt64 exponent(key + rsaGetModulusLen(keySize), + keyLen - rsaGetModulusLen(keySize), + BigInt64::CreateModes::BIG_ENDIANESS); + // Encrypt message: plain = plain^key % n + BigInt64 cipherNumber; + try { + cipherNumber = modularExponentiation(plainNumber, exponent, modulus); + } + catch (std::exception &e) { + rsaLogger.logMessage( + logger::LogLevel::ERROR, + "RSA encryption: error performing modular exponentiation " + + string(e.what())); + return CKR_DECRYPTED_DATA_INVALID; + } + + memset(ciphertext, 0, keySizeBytes); + cipherNumber.exportTo(ciphertext, ciphertextLen, + BigInt64::CreateModes::BIG_ENDIANESS); + delete[] padded; + return CKR_OK; +} + +/** + * @brief Decrypts data using RSA public or private key. + * @param ciphertext Pointer to the encrypted data (ciphertext). + * @param ciphertextLen The length of the ciphertext in bytes. + * @param modulus Pointer to the modulus (n). + * @param modulusLen The length of the modulus in bytes. + * @param exponent Pointer to the exponent (either public or private). + * @param exponentLen The length of the exponent in bytes. + * @param plaintext Pointer to the buffer where the decrypted data (plaintext) will be stored. + * @param plaintextLen Pointer to a variable that will store the length of the decrypted data. + * @param keySize The size of the RSA key in bits. + * @return CKR_OK on success, CKR_KEY_SIZE_RANGE if the key size is invalid, or CKR_BUFFER_TOO_SMALL if buffers are insufficient. + */ +CK_RV rsaDecrypt(const uint8_t *ciphertext, size_t ciphertextLen, + const uint8_t *key, size_t keyLen, uint8_t *plaintext, + size_t *plaintextLen, size_t keySize) +{ + logger rsaLogger("RSA encryption"); + if (!allowedKeySizes(keySize)) { + rsaLogger.logMessage(logger::LogLevel::ERROR, + "RSA decryption: invalid key size"); + return CKR_KEY_SIZE_RANGE; + } + + if ((!(keyLen == rsaGetPublicKeyLen(keySize)) && + !(keyLen == rsaGetPrivateKeyLen(keySize)))) { + rsaLogger.logMessage(logger::LogLevel::ERROR, + "RSA encryption: buffer sizes are insufficient"); + return CKR_BUFFER_TOO_SMALL; + } + + size_t keySizeBytes = keySize / BITS_IN_BYTE; + if (ciphertextLen != keySizeBytes) { + rsaLogger.logMessage(logger::LogLevel::ERROR, + "RSA decryption: ciphertext buffer is too small"); + return CKR_BUFFER_TOO_SMALL; + } + + rsaLogger.logMessage(logger::LogLevel::INFO, + "RSA decryption: executing..."); + // Convert ciphertext to BigInt64 + BigInt64 cipherNumber(ciphertext, ciphertextLen, + BigInt64::CreateModes::BIG_ENDIANESS); + BigInt64 modulus(key, rsaGetModulusLen(keySize), + BigInt64::CreateModes::BIG_ENDIANESS); + BigInt64 exponent(key + rsaGetModulusLen(keySize), + keyLen - rsaGetModulusLen(keySize), + BigInt64::CreateModes::BIG_ENDIANESS); + // Decrypt message: plain = cipher^key % n + BigInt64 plainNumber; + try { + plainNumber = modularExponentiation(cipherNumber, exponent, modulus); + } + catch (std::exception &e) { + rsaLogger.logMessage( + logger::LogLevel::ERROR, + "RSA decryption: error performing modular exponentiation " + + string(e.what())); + return CKR_ENCRYPTED_DATA_INVALID; + } + + uint8_t *padded = new uint8_t[keySizeBytes]; + size_t paddedLen = keySizeBytes; + plainNumber.exportTo(padded, paddedLen, + BigInt64::CreateModes::BIG_ENDIANESS); + // Remove padding + try { + rsaPkcs1v15Unpad(padded, paddedLen, plaintext, plaintextLen); + } + catch (std::exception &e) { + rsaLogger.logMessage( + logger::LogLevel::ERROR, + "RSA decryption: error unpadding plaintext " + string(e.what())); + delete[] padded; + return CKR_DECRYPTED_DATA_INVALID; + } + + delete[] padded; + return CKR_OK; +} + +size_t rsaGetEncryptedLen(size_t keySize) +{ + return keySize / BITS_IN_BYTE; +} + +/** + * @brief Gets the maximum length of plaintext that can be encrypted with a given RSA key size. + * @param keySize The size of the RSA key in bits. + * @return The maximum length of plaintext in bytes. + */ +size_t rsaGetPlainMaxLen(size_t keySize) +{ + return keySize / BITS_IN_BYTE - PADDING_MIN_LEN; +} + +/** + * @brief Gets the length of decrypted data for a given RSA key size. + * @param keySize The size of the RSA key in bits. + * @return The length of the decrypted data in bytes. + */ +size_t rsaGetDecryptedLen(size_t keySize) +{ + // Minimum padding length for PKCS#1 v1.5 is 11 bytes + // Remove the padding: The maximum length of the plaintext is keySize - + // minPaddingLength + return keySize / BITS_IN_BYTE - PADDING_MIN_LEN; +} + +/** + * @brief Gets the total length of the public key (including the modulus and public exponent) for RSA. + * @param keySize The size of the RSA key in bits. + * @return The length of the public key in bytes, which includes the modulus and the public exponent. + */ +size_t rsaGetPublicKeyLen(size_t keySize) +{ + return rsaGetModulusLen(keySize) + BYTES_IN_LIMB; +} + +/** + * @brief Gets the total length of the private key (including the modulus and private exponent) for RSA. + * @param keySize The size of the RSA key in bits. + * @return The length of the private key in bytes, which includes the modulus and the private exponent. + */ +size_t rsaGetPrivateKeyLen(size_t keySize) +{ + return rsaGetModulusLen(keySize) + keySize / BITS_IN_BYTE; +} \ No newline at end of file diff --git a/src/sycl-version/big_int64.cpp b/src/sycl-version/big_int64.cpp new file mode 100644 index 00000000..7e6a9128 --- /dev/null +++ b/src/sycl-version/big_int64.cpp @@ -0,0 +1,834 @@ +#include +#include +#include +#include +#include +#include "big_int64.h" +#include "big_int_utils.h" +using namespace std; + +BigInt64::BigInt64(const string &str) +{ + initFromString(str.c_str(), str.size()); +} + +BigInt64::BigInt64(const char *str) +{ + initFromString(str, std::strlen(str)); +} + +BigInt64::BigInt64(const uint8_t *str, size_t strLen, CreateModes mode) + : isNegative(false) +{ + if (strLen == 0) { + size = 1; + limbs[0] = 0; + return; + } + int fullLimbs = strLen / BYTES_IN_LIMB; + int msbParts = strLen % BYTES_IN_LIMB; + int limbsCnt = fullLimbs + (msbParts + BYTES_IN_LIMB - 1) / BYTES_IN_LIMB; + size = limbsCnt; + if (mode == CreateModes::LITTLE_ENDIANESS) { + for (int i = 0; i < fullLimbs; i++) { + int index = strLen - 1 - i * BYTES_IN_LIMB; + // little endian-> {0,1,2,3,4,5,6,7} becones 0x 07 06 05 04 03 02 01 00 + limbs[i] = ((static_cast(str[index]) << 56) | + (static_cast(str[index - 1]) << 48) | + (static_cast(str[index - 2]) << 40) | + (static_cast(str[index - 3]) << 32) | + (static_cast(str[index - 4]) << 24) | + (static_cast(str[index - 5]) << 16) | + (static_cast(str[index - 6]) << 8) | + static_cast(str[index - 7])); + } + if (msbParts != 0) { + uint64_t msb = 0; + for (int i = 0; i < msbParts; i++) { + msb |= static_cast(str[i]) << (i * BITS_IN_BYTE); + } + limbs[size++] = msb; + } + } + else { + // big endian-> {0,1,2,3,4,5,6,7} becones 0x 00 01 02 03 04 05 06 07 + for (int i = 0; i < fullLimbs; i++) { + int index = strLen - 1 - i * BYTES_IN_LIMB; + limbs[i] = (static_cast(str[index]) | + (static_cast(str[index - 1]) << 8) | + (static_cast(str[index - 2]) << 16) | + (static_cast(str[index - 3]) << 24) | + (static_cast(str[index - 4]) << 32) | + (static_cast(str[index - 5]) << 40) | + (static_cast(str[index - 6]) << 48) | + (static_cast(str[index - 7]) << 56)); + } + if (msbParts != 0) { + uint64_t msb = 0; + for (int i = 0; i < msbParts; i++) { + msb |= static_cast(str[msbParts - 1 - i]) + << (i * BITS_IN_BYTE); + } + limbs[size++] = msb; + } + } + removeLeadingZeros(); +} + +BigInt64::BigInt64(CreateModes mode, int bits) : isNegative(false) +{ + if (bits >= BITS_IN_LIMB) + generateNLimbsRandom(bits / BITS_IN_LIMB); + bits = bits % BITS_IN_LIMB; // 0-63 + if (bits != 0) { + uint64_t one = static_cast(1); + limbs[size++] = randomLimb(0, (one << bits) - 1) | (one << (bits - 1)); + } + else + limbs[size - 1] |= 0x8000000000000000ULL; +} + +BigInt64::BigInt64(CreateModes mode, uint64_t min, const BigInt64 &max) + : size(0), isNegative(false) +{ + if (max.isSmallerThanUnsigned(min)) + throw invalid_argument("min must be <= max"); + + if (max.limbsCount() == 1) { + uint64_t number = randomLimb(min, max.limbs[max.size - 1]); + limbs[size++] = number; + } + else { + generateNLimbsRandom(max.limbsCount() - 1); + uint64_t number = randomLimb(0, max.limbs[max.size - 1]); + limbs[size++] = number; + removeLeadingZeros(); + } +} + +BigInt64::BigInt64(bool isNegative) : BigInt64(0) +{ + this->isNegative = isNegative; +} + +BigInt64::BigInt64(uint64_t uval) : size(0) +{ + isNegative = false; + limbs[size++] = uval; +} + +bool BigInt64::operator==(const BigInt64 &b) const +{ + if (isNegative != b.isNegative || size != b.size) + return false; + + for (int i = 0; i < size; i++) + if (limbs[i] != b.limbs[i]) + return false; + + return true; +} + +bool BigInt64::operator!=(const BigInt64 &b) const +{ + return !(*this == b); +} + +bool BigInt64::operator<(const BigInt64 &b) const +{ + if (isNegative && !b.isNegative) + return true; + + if (!isNegative && b.isNegative) + return false; + + // same sign + if (isNegative) + return b.isSmallerThanUnsigned(*this); + + else + return isSmallerThanUnsigned(b); +} + +bool BigInt64::operator>(const BigInt64 &b) const +{ + return b < *this; +} + +bool BigInt64::operator<=(const BigInt64 &b) const +{ + return !(b < *this); +} + +bool BigInt64::operator>=(const BigInt64 &b) const +{ + return !(*this < b); +} + +BigInt64 &BigInt64::operator++() +{ + if (!isNegative) + prefixPlusPlusUnsigned(); + else { + prefixMinusMinusUnsigned(); + if (isZero()) + //-1 -> 0 + isNegative = false; + } + + return *this; +} + +BigInt64 BigInt64::operator++(int) +{ + BigInt64 temp = *this; + ++*this; + return temp; +} + +BigInt64 &BigInt64::operator--() +{ + if (isNegative) + prefixPlusPlusUnsigned(); + else { + if (isZero()) { + // 0 -> -1 + limbs[0] = 1; + isNegative = true; + } + else + prefixMinusMinusUnsigned(); + } + return *this; +} + +BigInt64 BigInt64::operator--(int) +{ + BigInt64 temp = *this; + --*this; + return temp; +} + +BigInt64 &BigInt64::operator+=(const BigInt64 &b) +{ + if (isNegative == b.isNegative) // same sign + addUnsigned(b); + else { + if ((isNegative && !b.isSmallerThanUnsigned(*this)) || + (!isNegative && isSmallerThanUnsigned(b))) { + // -3 + +4/-3 + +3 || +3 + -4 + thisEqualsbBSubthis(b); + isNegative = b.isNegative; + } + else // -4 + +3 || +3 + -3 / +4 + -3 + subtractUnsigned(b); // this-=b + } + return *this; +} + +BigInt64 BigInt64::operator+(const BigInt64 &b) const +{ + BigInt64 c(*this); + c += b; + return c; +} + +BigInt64 &BigInt64::operator-=(const BigInt64 &b) +{ + if (isNegative != b.isNegative) // -this - +b / +a - -b + addUnsigned(b); + else { + if ((isNegative && !b.isSmallerThanUnsigned(*this)) || + (!isNegative && (isSmallerThanUnsigned(b)))) { + // -3 - -4/ -4 - -4 || +3 - +7 + thisEqualsbBSubthis(b); + isNegative = !b.isNegative; + } + else // -4 - -3 ||+4 - +3/ +3 - +3 + subtractUnsigned(b); // this-=b + } + + return *this; +} + +BigInt64 BigInt64::operator-(const BigInt64 &b) const +{ + BigInt64 c(*this); + c -= b; + return c; +} + +BigInt64 &BigInt64::operator*=(const BigInt64 &b) +{ + longMultiplication(b); + return *this; +} + +BigInt64 BigInt64::operator*(const BigInt64 &b) const +{ + BigInt64 c(*this); + c *= b; + return c; +} + +BigInt64 &BigInt64::operator/=(const BigInt64 &b) +{ + BigInt64 remainder, quotient; + longDivision(b, remainder, quotient); + *this = quotient; + return *this; +} + +BigInt64 BigInt64::operator/(const BigInt64 &b) const +{ + BigInt64 c(*this); + c /= b; + return c; +} + +BigInt64 &BigInt64::operator%=(const BigInt64 &b) +{ + BigInt64 remainder, quotient; + longDivision(b, remainder, quotient); + if (isNegative != b.isNegative) + *this = b - remainder; + else + *this = remainder; + return *this; +} + +BigInt64 BigInt64::operator%(const BigInt64 &b) const +{ + BigInt64 c(*this); + c %= b; + return c; +} + +BigInt64 &BigInt64::operator^=(const BigInt64 &b) +{ + *this = power(*this, b); + return *this; +} + +BigInt64 BigInt64::operator^(const BigInt64 &b) const +{ + BigInt64 c(*this); + c ^= b; + return c; +} + +BigInt64 &BigInt64::operator>>=(uint64_t n) +{ + rightShift(n); + return *this; +} + +BigInt64 BigInt64::operator>>(uint64_t n) const +{ + BigInt64 c(*this); + c >>= n; + return c; +} + +BigInt64 &BigInt64::operator<<=(uint64_t n) +{ + leftShift(n); + return *this; +} + +BigInt64 BigInt64::operator<<(uint64_t n) const +{ + BigInt64 c(*this); + c <<= n; + return c; +} + +std::ostream &operator<<(std::ostream &out, const BigInt64 &a) +{ + if (a.limbsCount() == 1) { + if (a.isNegative) + out << "-"; + out << a.limbs[0]; + } + + else { + BigInt10 decimal = a.toDecimal(); + out << decimal; + } + + return out; +} + +bool BigInt64::isSmallerThanUnsigned(const BigInt64 &b) const +{ + if (limbsCount() > b.limbsCount()) + // a is longer + return false; + + if (limbsCount() < b.limbsCount()) + // b is longer + return true; + + // same length + for (int i = limbsCount() - 1; i >= 0; i--) + if (limbs[i] != b.limbs[i]) + return limbs[i] < b.limbs[i]; + + // they are equal + return false; +} + +void BigInt64::prefixPlusPlusUnsigned() +{ + int i, n = limbsCount(); + // zero alll the MAX_VAL_64 lsb's + for (i = 0; i < n && limbs[i] == MAX_VAL_64; i++) { + limbs[i] = 0; + } + if (i == n) + // it was all MAX_VAL_64 + limbs[size++] = 1; + else + limbs[i]++; +} + +void BigInt64::prefixMinusMinusUnsigned() +{ + if (isZero()) + return; + + int i = 0, n = limbsCount(); + // starting zeros case 0 0 0 X + while (i < n && limbs[i] == 0) { + limbs[i] = MAX_VAL_64; + i++; + } + limbs[i]--; // subtruct the first valid limb + // remove leading zero if exists + if (limbs[i] == 0 && i != 0) + size--; +} + +void BigInt64::addUnsigned(const BigInt64 &b) +{ + int n = limbsCount(), m = b.limbsCount(); + uint64_t carry = 0; //(1/0) + uint64_t bLimb; + if (n < m) { + setLimbs(0, m - n, 1, m); + n = m; + } + for (int i = 0; i < n; i++) { + bLimb = i < m ? b.limbs[i] : 0; + adder3_64(limbs[i], bLimb, carry, limbs[i], carry); + } + if (carry == 1) + limbs[size++] = carry; +} + +void BigInt64::subtractUnsigned(const BigInt64 &b) +{ + if (this->isSmallerThanUnsigned(b)) + // make sure this>=b; + return; + + int n = limbsCount(), m = b.limbsCount(); + int borrow = 0; //(1/0) + uint64_t bLimb; + + for (int i = 0; i < n; i++) { + bLimb = i < m ? b.limbs[i] : 0; + if ((borrow == 1 && limbs[i] == 0) || (limbs[i] - borrow < bLimb)) { + // need to borrow from next limb + limbs[i] = limbs[i] + toBase64(bLimb) - borrow; + borrow = 1; + } + else { + limbs[i] = limbs[i] - bLimb - borrow; + borrow = 0; + } + } + removeLeadingZeros(); +} + +void BigInt64::longMultiplication(const BigInt64 &b) +{ + if (isZero() || b.isZero()) { + zero(); + return; + } + int n = limbsCount(), m = b.limbsCount(); + uint64_t result[200] = {0}; + uint64_t high, low, carry; + + for (int i = 0; i < n; i++) { + carry = 0; + for (int j = 0; j < m; j++) { + mul2Limbs64(limbs[i], b.limbs[j], high, low); + adder3_64(low, result[i + j], carry, result[i + j], carry); + carry += high; + } + result[i + m] = carry; + } + size = m + n; + copyLimbsFrom(result, 0, size, 0, size); + removeLeadingZeros(); + isNegative = isNegative != b.isNegative; +} + +std::string BigInt64::toString() const +{ + std::ostringstream oss; + oss << *this; + return oss.str(); +} + +void BigInt64::exportTo(uint8_t *out, size_t outLen, CreateModes mode) const +{ + if (outLen < bytesCount()) + throw std::runtime_error("Not enough space in output buffer"); + + if (mode == CreateModes::LITTLE_ENDIANESS) + for (int i = 0; i < limbsCount(); i++) + for (int j = 0; j < BYTES_IN_LIMB; j++) + out[outLen - 1 - i * BYTES_IN_LIMB - (7 - j)] = + static_cast(limbs[i] >> (j * BITS_IN_BYTE)); + else + for (int i = 0; i < limbsCount(); i++) + for (int j = 0; j < BYTES_IN_LIMB; j++) + out[outLen - 1 - i * BYTES_IN_LIMB - j] = + static_cast(limbs[i] >> (j * BITS_IN_BYTE)); +} + +int BigInt64::bitsCount() const +{ + if (isZero()) + return 0; + + uint64_t mostSignificantLimb = limbs[size - 1]; + int inMsb = ::bitsCount(mostSignificantLimb); + return inMsb + (limbsCount() - 1) * BITS_IN_LIMB; +} + +void BigInt64::thisEqualsbBSubthis(const BigInt64 &b) +{ + BigInt64 copyB(b); + copyB.subtractUnsigned(*this); + *this = std::move(copyB); +} + +void BigInt64::removeLeadingZeros() +{ + while (size > 1 && limbs[size - 1] == 0) + size--; +} + +void BigInt64::insert(int n, uint64_t limb) +{ + for (int i = size - 1; i >= 0; i--) + limbs[i + n] = limbs[i]; + for (int i = 0; i < n; i++) + limbs[i] = limb; + size += n; +} + +void BigInt64::erase(int n) +{ + for (int i = 0; i < n; i++) + limbs[i] = limbs[i + n]; + size -= n; +} + +void BigInt64::generateNLimbsRandom(int limbsCnt) +{ + if (limbsCnt < 1) + throw std::invalid_argument("limbsCnt less than 1"); + + std::random_device rd; + std::mt19937_64 gen(rd()); + std::uniform_int_distribution distrib(0, UINT64_MAX); + size = limbsCnt; + + for (int i = 0; i < limbsCnt; i++) { + uint64_t number = distrib(gen); + limbs[i] = number; + } +} + +uint64_t BigInt64::randomLimb(uint64_t min, uint64_t max) +{ + if (min > max) + throw std::invalid_argument("cant random limb"); + + std::random_device rd; + std::mt19937_64 gen(rd()); + std::uniform_int_distribution distrib(min, max); + return distrib(gen); +} + +void BigInt64::zero() +{ + size = 1; + limbs[0] = 0; + isNegative = false; +} + +bool BigInt64::hasLeadingZero() +{ + return limbs[size - 1] == 0 && limbsCount() > 1; +} + +void BigInt64::copyLimbsFrom(const uint64_t *other, size_t otherStart, + size_t count, size_t meStart, size_t newSize) +{ + for (int i = 0; i < count; i++) + limbs[meStart + i] = other[otherStart + i]; + size = newSize; +} + +void BigInt64::reverse() +{ + int start = 0; + int end = size - 1; + + while (start < end) { + uint64_t temp = limbs[start]; + limbs[start] = limbs[end]; + limbs[end] = temp; + start++; + end--; + } +} + +void BigInt64::setLimbs(uint64_t val, size_t count, size_t meStart, + size_t newSize) +{ + for (int i = 0; i < count; i++) + limbs[meStart + i] = val; + size = newSize; +} + +void BigInt64::longDivision(const BigInt64 &b, BigInt64 &remainder, + BigInt64 "ient) const +{ + if (b.isZero()) + return; + + remainder.isNegative = b.isNegative; + if (isSmallerThanUnsigned(b)) { + remainder.copyLimbsFrom(limbs, 0, size, 0, size); + quotient.zero(); + return; + } + + remainder.size = 0; + quotient.size = 0; + + for (int i = limbsCount() - 1; i >= 0; i--) { // msb-lsb + remainder.insert(1, limbs[i]); // insert msb as lsb + if (remainder.hasLeadingZero()) + remainder.size--; // remove leading zero + uint64_t times = 0; + if (!remainder.isSmallerThanUnsigned(b)) { + uint64_t left = 1, right = MAX_VAL_64; + // after inserting next limb, most times t contains b is max value + // of singe limb, find in range of [0...max] + while (left <= right) { + uint64_t mid = left + (right - left) / 2; + if (!remainder.isSmallerThanUnsigned( + b * mid)) { // b*mid<=remainder + times = mid; + if (left == right) + break; + left = mid + 1; + } + else + right = mid - 1; + } + + remainder.subtractUnsigned(b * times); + } + + if (quotient.size > 0 || times > 0) + quotient.limbs[quotient.size++] = times; + } + + quotient.reverse(); + quotient.isNegative = isNegative != b.isNegative; +} +BigInt64 power(BigInt64 base, BigInt64 exponent) +{ + if (exponent.isNegative) + throw std::invalid_argument("Invalid input: negative exponent"); + + BigInt64 result(1); + + while (!exponent.isZero()) { + if (!exponent.isEven()) + result *= base; + base *= base; + exponent >>= 1; + } + + return result; +} + +BigInt10 BigInt64::toDecimal() const +{ + BigInt10 decimal; + BigInt10 base(MAX_VAL_64); + base++; + for (int i = limbsCount() - 1; i >= 0; i--) { + BigInt10 limb = limbs[i]; + decimal *= base; + decimal += limb; + } + + decimal.isNegative = isNegative; + return decimal; +} + +void BigInt64::initFromString(const char *str, int n) +{ + BigInt10 decimal = str; + size = 0; + isNegative = decimal.isNegative; + BigInt10 base = MAX_VAL_64; + base++; + if (decimal.isZero()) + limbs[size++] = 0; + else + while (!decimal.isZero()) { + limbs[size++] = (decimal % base).toU64(); + decimal /= base; + } +} + +BigInt64 gcd(BigInt64 a, BigInt64 b) +{ + a.isNegative = false; + b.isNegative = false; + while (!b.isZero()) { + BigInt64 copyB = b; + b = a % b; + a = copyB; + } + + return a; +} + +void BigInt64::rightShift(uint64_t n) +{ + if (n >= bitsCount()) { + zero(); + return; + } + uint64_t shiftEachLimb = n % BITS_IN_LIMB; + uint64_t dropLimbs = n / BITS_IN_LIMB; + if (shiftEachLimb != 0) { + for (int i = 0; i < limbsCount() - 1 - dropLimbs; i++) // lsb...msb + limbs[i] = limbs[i + dropLimbs] >> shiftEachLimb | + limbs[i + dropLimbs + 1] + << (BITS_IN_LIMB - shiftEachLimb); + limbs[limbsCount() - 1 - dropLimbs] >>= shiftEachLimb; + size -= dropLimbs; + if (hasLeadingZero() && !isZero()) + size--; + } + else + erase(dropLimbs); +} + +void BigInt64::leftShift(uint64_t n) +{ + if (n >= bitsCount()) { + zero(); + return; + } + + uint64_t shiftEachLimb = n % BITS_IN_LIMB; + uint64_t dropLimbs = n / BITS_IN_LIMB; + if (shiftEachLimb != 0) { + for (int i = limbsCount() - 1; i > dropLimbs; i--) { // msb-lst + limbs[i] = + limbs[i - dropLimbs] << shiftEachLimb | + limbs[i - dropLimbs - 1] >> (BITS_IN_LIMB - shiftEachLimb); + } + + limbs[0] <<= shiftEachLimb; + } + else { + for (int i = limbsCount() - 1; i >= dropLimbs; i--) + limbs[i] = limbs[i - dropLimbs]; + for (int i = dropLimbs - 1; i >= 0; i--) + limbs[i] = 0; + } + + removeLeadingZeros(); +} + +BigInt64 extendedGcd(BigInt64 a, BigInt64 b, BigInt64 &x, BigInt64 &y) +{ + x = 1; + y = 0; + BigInt64 x1 = 0, y1 = 1; + BigInt64 q, temp; + + while (b != 0) { + q = a / b; + temp = b; + b = a % b; + a = temp; + + temp = x1; + + x1 = x - q * x1; + x = temp; + + temp = y1; + y1 = y - q * y1; + y = temp; + } + + return a; +} + +BigInt64 modularInverse(BigInt64 a, BigInt64 b) +{ + BigInt64 x, y; + BigInt64 gcdResult = extendedGcd(a, b, x, y); + if (gcdResult != 1) + throw std::invalid_argument("Modular inverse does not exist."); + + return x % b; // Ensure result is positive +} + +size_t BigInt64::bytesCount() const +{ + return limbsCount() * BYTES_IN_LIMB; +} + +bool BigInt64::isZero() const +{ + return limbsCount() == 1 && limbs[0] == 0; +} + +int BigInt64::limbsCount() const +{ + return size; +} + +std::uint64_t BigInt64::getMsb() const +{ + return limbs[size - 1]; +} + +std::uint64_t BigInt64::getLsb() const +{ + return limbs[0]; +} + +bool BigInt64::isEven() const +{ + return (limbs[0] & 1) == 0; +} \ No newline at end of file diff --git a/src/threads-version/big_int64.cpp b/src/threads-version/big_int64.cpp new file mode 100644 index 00000000..3457c13b --- /dev/null +++ b/src/threads-version/big_int64.cpp @@ -0,0 +1,866 @@ +#include +#include +#include +#include +#include "big_int64.h" +#include "big_int_utils.h" +using namespace std; + +BigInt64::BigInt64(const string &str) +{ + initFromString(str.c_str(), str.size()); +} + +BigInt64::BigInt64(const char *str) +{ + initFromString(str, std::strlen(str)); +} + +BigInt64::BigInt64(const uint8_t *str, size_t strLen, CreateModes mode) + : isNegative(false) +{ + if (strLen == 0) { + limbs.push_back(0); + return; + } + + int fullLimbs = strLen / BYTES_IN_LIMB; + int msbParts = strLen % BYTES_IN_LIMB; + int limbsCnt = fullLimbs + (msbParts + BYTES_IN_LIMB - 1) / BYTES_IN_LIMB; + limbs.reserve(limbsCnt); + if (mode == CreateModes::LITTLE_ENDIANESS) { + for (int i = 0; i < fullLimbs; i++) { + int index = strLen - 1 - i * BYTES_IN_LIMB; + // little endian-> {0,1,2,3,4,5,6,7} becones 0x 07 06 05 04 03 02 01 00 + limbs.push_back((static_cast(str[index]) << 56) | + (static_cast(str[index - 1]) << 48) | + (static_cast(str[index - 2]) << 40) | + (static_cast(str[index - 3]) << 32) | + (static_cast(str[index - 4]) << 24) | + (static_cast(str[index - 5]) << 16) | + (static_cast(str[index - 6]) << 8) | + static_cast(str[index - 7])); + } + + if (msbParts != 0) { + uint64_t msb = 0; + for (int i = 0; i < msbParts; i++) + msb |= static_cast(str[i]) << (i * BITS_IN_BYTE); + limbs.push_back(msb); + } + } + else { + // big endian-> {0,1,2,3,4,5,6,7} becones 0x 00 01 02 03 04 05 06 07 + for (int i = 0; i < fullLimbs; i++) { + int index = strLen - 1 - i * BYTES_IN_LIMB; + limbs.push_back(static_cast(str[index]) | + (static_cast(str[index - 1]) << 8) | + (static_cast(str[index - 2]) << 16) | + (static_cast(str[index - 3]) << 24) | + (static_cast(str[index - 4]) << 32) | + (static_cast(str[index - 5]) << 40) | + (static_cast(str[index - 6]) << 48) | + (static_cast(str[index - 7]) << 56)); + } + + if (msbParts != 0) { + uint64_t msb = 0; + for (int i = 0; i < msbParts; i++) { + msb |= static_cast(str[msbParts - 1 - i]) + << (i * BITS_IN_BYTE); + } + + limbs.push_back(msb); + } + } + + removeLeadingZeros(); +} + +BigInt64::BigInt64(std::vector v, bool isNegative) + : limbs(v), isNegative(isNegative) +{ +} + +BigInt64::BigInt64(CreateModes mode, int bits) : isNegative(false) +{ + if (bits >= BITS_IN_LIMB) + generateNLimbsRandom(bits / BITS_IN_LIMB); + bits = bits % BITS_IN_LIMB; // 0-63 + if (bits != 0) { + uint64_t one = static_cast(1); + limbs.push_back(randomLimb(0, (one << bits) - 1) | (one << (bits - 1))); + } + else + limbs.back() |= 0x8000000000000000ULL; +} + +BigInt64::BigInt64(CreateModes mode, uint64_t min, const BigInt64 &max) + : isNegative(false) +{ + if (max.isSmallerThanUnsigned(min)) + throw invalid_argument("min must be <= max"); + + if (max.limbsCount() == 1) { + uint64_t number = randomLimb(min, max.limbs.back()); + limbs.push_back(number); + } + else { + generateNLimbsRandom(max.limbsCount() - 1); + uint64_t number = randomLimb(0, max.limbs.back()); + limbs.push_back(number); + removeLeadingZeros(); + } +} + +BigInt64::BigInt64(long long val) +{ + isNegative = false; + if (val == 0) { + limbs.push_back(0); + return; + } + + if (val < 0) { + isNegative = true; + val *= -1; + } + + limbs.push_back(val); +} + +BigInt64::BigInt64(bool isNegative) : BigInt64(0) +{ + this->isNegative = isNegative; +} + +BigInt64::BigInt64(uint64_t uval) +{ + isNegative = false; + limbs.push_back(uval); +} + +BigInt64::BigInt64(int val) : BigInt64(static_cast(val)) {} + +bool BigInt64::operator==(const BigInt64 &b) const +{ + return limbs == b.limbs && isNegative == b.isNegative; +} + +bool BigInt64::operator!=(const BigInt64 &b) const +{ + return !(*this == b); +} + +bool BigInt64::operator<(const BigInt64 &b) const +{ + if (isNegative && !b.isNegative) + return true; + + if (!isNegative && b.isNegative) + return false; + + // same sign + if (isNegative) + return b.isSmallerThanUnsigned(*this); + + else + return isSmallerThanUnsigned(b); +} + +bool BigInt64::operator>(const BigInt64 &b) const +{ + return b < *this; +} + +bool BigInt64::operator<=(const BigInt64 &b) const +{ + return !(b < *this); +} + +bool BigInt64::operator>=(const BigInt64 &b) const +{ + return !(*this < b); +} + +BigInt64 &BigInt64::operator++() +{ + if (!isNegative) + prefixPlusPlusUnsigned(); + else { + prefixMinusMinusUnsigned(); + if (isZero()) + //-1 -> 0 + isNegative = false; + } + + return *this; +} + +BigInt64 BigInt64::operator++(int) +{ + BigInt64 temp = *this; + ++*this; + return temp; +} + +BigInt64 &BigInt64::operator--() +{ + if (isNegative) + prefixPlusPlusUnsigned(); + else { + if (isZero()) { + // 0 -> -1 + limbs[0] = 1; + isNegative = true; + } + else + prefixMinusMinusUnsigned(); + } + + return *this; +} + +BigInt64 BigInt64::operator--(int) +{ + BigInt64 temp = *this; + --*this; + return temp; +} + +BigInt64 &BigInt64::operator+=(const BigInt64 &b) +{ + if (isNegative == b.isNegative) // same sign + addUnsigned(b); + else { + if (isNegative && !b.isSmallerThanUnsigned(*this) || + !isNegative && isSmallerThanUnsigned(b)) { + // -3 + +4/-3 + +3 || +3 + -4 + thisEqualsbBSubthis(b); + isNegative = b.isNegative; + } + else // -4 + +3 || +3 + -3 / +4 + -3 + subtractUnsigned(b); // this-=b + } + + return *this; +} + +BigInt64 BigInt64::operator+(const BigInt64 &b) const +{ + BigInt64 c(*this); + c += b; + return c; +} + +BigInt64 &BigInt64::operator-=(const BigInt64 &b) +{ + if (isNegative != b.isNegative) // -this - +b / +a - -b + addUnsigned(b); + else { + if (isNegative && !b.isSmallerThanUnsigned(*this) || + !isNegative && (isSmallerThanUnsigned(b))) { + // -3 - -4/ -4 - -4 || +3 - +7 + thisEqualsbBSubthis(b); + isNegative = !b.isNegative; + } + else // -4 - -3 ||+4 - +3/ +3 - +3 + subtractUnsigned(b); // this-=b + } + + return *this; +} + +BigInt64 BigInt64::operator-(const BigInt64 &b) const +{ + BigInt64 c(*this); + c -= b; + return c; +} + +BigInt64 &BigInt64::operator*=(const BigInt64 &b) +{ + *this = longMultiplication(*this, b); + return *this; +} + +BigInt64 BigInt64::operator*(const BigInt64 &b) const +{ + BigInt64 c(*this); + c *= b; + return c; +} +BigInt64 &BigInt64::operator/=(const BigInt64 &b) +{ + BigInt64 remainder; + *this = longDivision(*this, b, remainder); + return *this; +} + +BigInt64 BigInt64::operator/(const BigInt64 &b) const +{ + BigInt64 c(*this); + c /= b; + return c; +} + +BigInt64 &BigInt64::operator%=(const BigInt64 &b) +{ + BigInt64 remainder; + longDivision(*this, b, remainder); + if (isNegative != b.isNegative) + *this = b - remainder; + else + *this = remainder; + return *this; +} + +BigInt64 BigInt64::operator%(const BigInt64 &b) const +{ + BigInt64 c(*this); + c %= b; + return c; +} + +BigInt64 &BigInt64::operator^=(const BigInt64 &b) +{ + *this = power(*this, b); + return *this; +} + +BigInt64 BigInt64::operator^(const BigInt64 &b) const +{ + BigInt64 c(*this); + c ^= b; + return c; +} + +BigInt64 &BigInt64::operator>>=(uint64_t n) +{ + rightShift(n); + return *this; +} + +BigInt64 BigInt64::operator>>(uint64_t n) const +{ + BigInt64 c(*this); + c >>= n; + return c; +} + +BigInt64 &BigInt64::operator<<=(uint64_t n) +{ + leftShift(n); + return *this; +} + +BigInt64 BigInt64::operator<<(uint64_t n) const +{ + BigInt64 c(*this); + c <<= n; + return c; +} + +std::ostream &operator<<(std::ostream &out, const BigInt64 &a) +{ + if (a.limbsCount() == 1) { + if (a.isNegative) + out << "-"; + out << a.limbs[0]; + } + else { + BigInt10 decimal = a.toDecimal(); + out << decimal; + } + + return out; +} + +bool BigInt64::isSmallerThanUnsigned(const BigInt64 &b) const +{ + if (limbsCount() > b.limbsCount()) + // a is longer + return false; + + if (limbsCount() < b.limbsCount()) + // b is longer + return true; + + // same length + for (int i = limbsCount() - 1; i >= 0; i--) + if (limbs[i] != b.limbs[i]) + return limbs[i] < b.limbs[i]; + + // they are equal + return false; +} + +void BigInt64::prefixPlusPlusUnsigned() +{ + int i, n = limbsCount(); + // zero alll the MAX_VAL_64 lsb's + for (i = 0; i < n && limbs[i] == MAX_VAL_64; i++) + limbs[i] = 0; + if (i == n) + // it was all MAX_VAL_64 + limbs.push_back(1); + else + limbs[i]++; +} + +void BigInt64::prefixMinusMinusUnsigned() +{ + if (isZero()) + throw std::invalid_argument("cant --0"); + + int i = 0, n = limbsCount(); + // starting zeros case 0 0 0 X + while (i < n && limbs[i] == 0) { + limbs[i] = MAX_VAL_64; + i++; + } + + limbs[i]--; // subtruct the first valid limb + // remove leading zero if exists + if (limbs[i] == 0 && i != 0) + limbs.pop_back(); +} + +void BigInt64::addUnsigned(const BigInt64 &b) +{ + int n = limbsCount(), m = b.limbsCount(); + uint64_t carry = 0; //(1/0) + uint64_t bLimb; + if (n < m) { + limbs.resize(m); + n = m; + } + + for (int i = 0; i < n; i++) { + bLimb = i < m ? b.limbs[i] : 0; + adder3_64(limbs[i], bLimb, carry, limbs[i], carry); + } + + if (carry == 1) + limbs.push_back(carry); +} + +void BigInt64::subtractUnsigned(const BigInt64 &b) +{ + if (this->isSmallerThanUnsigned(b)) + // make sure this>=b; + throw std::invalid_argument("cant -: this < b"); + + int n = limbsCount(), m = b.limbsCount(); + int borrow = 0; //(1/0) + uint64_t bLimb; + + for (int i = 0; i < n; i++) { + bLimb = i < m ? b.limbs[i] : 0; + if ((borrow == 1 && limbs[i] == 0) || (limbs[i] - borrow < bLimb)) { + // need to borrow from next limb + limbs[i] = limbs[i] + toBase64(bLimb) - borrow; + borrow = 1; + } + else { + limbs[i] = limbs[i] - bLimb - borrow; + borrow = 0; + } + } + + removeLeadingZeros(); +} +BigInt64 longMultiplication(const BigInt64 &a, const BigInt64 &b) +{ + if (a.isZero() || b.isZero()) + return BigInt64(); + + int n = a.limbsCount(), m = b.limbsCount(); + std::vector result(n + m, 0); + uint64_t high, low, carry; + + for (int i = 0; i < n; i++) { + carry = 0; + for (int j = 0; j < m; j++) { + mul2Limbs64(a.limbs[i], b.limbs[j], high, low); + adder3_64(low, result[i + j], carry, result[i + j], carry); + carry += high; + } + // Handle any remaining carry after the inner loop + result[i + m] = carry; + } + + BigInt64 res; + res.limbs = std::move(result); + res.removeLeadingZeros(); + res.isNegative = a.isNegative != b.isNegative; + return res; +} + +void BigInt64::exportTo(uint8_t *out, size_t outLen, CreateModes mode) const +{ + if (outLen < bytesCount()) + throw std::runtime_error("Not enough space in output buffer"); + + if (mode == CreateModes::LITTLE_ENDIANESS) + for (int i = 0; i < limbsCount(); i++) + for (int j = 0; j < BYTES_IN_LIMB; j++) + out[outLen - 1 - i * BYTES_IN_LIMB - (7 - j)] = + static_cast(limbs[i] >> (j * BITS_IN_BYTE)); + else + for (int i = 0; i < limbsCount(); i++) + for (int j = 0; j < BYTES_IN_LIMB; j++) + out[outLen - 1 - i * BYTES_IN_LIMB - j] = + static_cast(limbs[i] >> (j * BITS_IN_BYTE)); +} + +int BigInt64::bitsCount() const +{ + if (isZero()) + return 0; + + // Count bits in the most significant limb manually + uint64_t mostSignificantLimb = limbs.back(); + int inMsb = ::bitsCount(mostSignificantLimb); + return inMsb + (limbsCount() - 1) * BITS_IN_LIMB; +} + +void BigInt64::thisEqualsbBSubthis(const BigInt64 &b) +{ + BigInt64 copyB(b); + copyB.subtractUnsigned(*this); + *this = std::move(copyB); +} + +void BigInt64::removeLeadingZeros() +{ + while (limbs.size() > 1 && limbs.back() == 0) + limbs.pop_back(); +} + +void BigInt64::insertZroes(int n) +{ + limbs.insert(limbs.begin(), n, 0); +} + +void BigInt64::generateNLimbsRandom(int limbsCnt) +{ + if (limbsCnt < 1) + throw std::invalid_argument("limbsCnt less than 1"); + + std::random_device rd; + std::mt19937_64 gen(rd()); + std::uniform_int_distribution distrib(0, UINT64_MAX); + + limbs.reserve(limbsCnt); + + for (int i = 0; i < limbsCnt; i++) { + uint64_t number = distrib(gen); + limbs.push_back(number); + } +} + +uint64_t BigInt64::randomLimb(uint64_t min, uint64_t max) +{ + if (min > max) + throw std::invalid_argument("cant random limb"); + + std::random_device rd; + std::mt19937_64 gen(rd()); + std::uniform_int_distribution distrib(min, max); + return distrib(gen); +} + +void BigInt64::zero() +{ + limbs.clear(); + limbs.push_back(0); + isNegative = false; +} + +BigInt64 longDivision(const BigInt64 &a, const BigInt64 &b, BigInt64 &remainder) +{ + if (b.isZero()) + throw std::invalid_argument("Invalid input: non-digit character"); + + remainder.isNegative = b.isNegative; + if (a.isSmallerThanUnsigned(b)) { + remainder.limbs = a.limbs; + return BigInt64(); + } + + remainder.limbs.clear(); + std::vector quotient; + + for (int i = a.limbsCount() - 1; i >= 0; i--) { // msb-lsb + remainder.limbs.insert(remainder.limbs.begin(), + a.limbs[i]); // insert msb as lsb + if (remainder.limbsCount() > 1 && remainder.limbs.back() == 0) + remainder.limbs.pop_back(); // remove leading zero + uint64_t times = 0; + if (!remainder.isSmallerThanUnsigned(b)) { + uint64_t left = 1, right = MAX_VAL_64; + // after inserting next limb, most times t contains b is max value + // of singe limb, find in range of [0...max] + while (left <= right) { + uint64_t mid = left + (right - left) / 2; + if (!remainder.isSmallerThanUnsigned( + b * mid)) { // b*mid<=remainder + times = mid; + if (left == right) + break; + left = mid + 1; + } + else + right = mid - 1; + } + + remainder.subtractUnsigned(b * times); + } + if (quotient.size() > 0 || times > 0) + quotient.push_back(times); + } + + std::reverse(quotient.begin(), quotient.end()); + BigInt64 quoti(a.isNegative != b.isNegative); + quoti.limbs = std::move(quotient); + return quoti; +} + +BigInt64 power(BigInt64 base, BigInt64 exponent) +{ + if (exponent.isNegative) + throw std::invalid_argument("Invalid input: negative exponent"); + + BigInt64 result(1); + while (!exponent.isZero()) { + if (!exponent.isEven()) { + result *= base; + } + base *= base; + exponent >>= 1; + } + + return result; +} + +BigInt10 BigInt64::toDecimal() const +{ + BigInt10 decimal; + BigInt10 base(MAX_VAL_64); + base++; + for (int i = limbsCount() - 1; i >= 0; i--) { + BigInt10 limb = limbs[i]; + decimal *= base; + decimal += limb; + } + + decimal.isNegative = isNegative; + return decimal; +} + +void BigInt64::initFromString(const char *str, int n) +{ + BigInt10 decimal = str; + isNegative = decimal.isNegative; + BigInt10 base = MAX_VAL_64; + base++; + if (decimal.isZero()) + limbs.push_back(0); + else + while (!decimal.isZero()) { + limbs.push_back((decimal % base).toU64()); + decimal /= base; + } +} + +BigInt64 modularExponentiation(BigInt64 base, BigInt64 exponent, + const BigInt64 &modulus) +{ + BigInt64 res(1); + base %= modulus; + while (!exponent.isZero()) { + if (!exponent.isEven()) + res = (res * base) % modulus; + base = (base * base) % modulus; + exponent >>= 1; + } + + return res; +} + +BigInt64 gcd(BigInt64 a, BigInt64 b) +{ + a.isNegative = false; + b.isNegative = false; + while (!b.isZero()) { + BigInt64 copyB = b; + b = a % b; + a = copyB; + } + + return a; +} + +BigInt64 karatzubaMultiplication(const BigInt64 &a, const BigInt64 &b) +{ + int n = a.limbsCount(), m = b.limbsCount(); + if (n == 1 || m == 1) + return longMultiplication(a, b); + + const BigInt64 *longerX, *shorterY; + int xLen, yLen; + if (n >= m) { + longerX = &a; + xLen = n; + shorterY = &b; + yLen = m; + } + else { + longerX = &b; + xLen = m; + shorterY = &a; + yLen = n; + } + + int xLsbHalf = xLen / 2; + int yLsbHalf = min(xLsbHalf, yLen); + BigInt64 xM, xL, yL, yM; + xM.limbs.reserve(xLen - xLsbHalf); + xL.limbs.reserve(xLsbHalf); + yM.limbs.reserve(yLen - yLsbHalf); + yL.limbs.reserve(yLsbHalf); + // Msb Lsb + // xM aL =longer <-[L M], [xL ...... xM] + // yM bL =shorter<-[L M], [yL yM] + xL.limbs.assign(longerX->limbs.begin(), longerX->limbs.begin() + xLsbHalf); + xL.removeLeadingZeros(); + xM.limbs.assign(longerX->limbs.begin() + xLsbHalf, + longerX->limbs.begin() + xLen); + yL.limbs.assign(shorterY->limbs.begin(), + shorterY->limbs.begin() + yLsbHalf); + yL.removeLeadingZeros(); + if (yLen - yLsbHalf != 0) + yM.limbs.assign(shorterY->limbs.begin() + yLsbHalf, + shorterY->limbs.begin() + yLen); + BigInt64 sum4Mult = karatzubaMultiplication(xL + xM, yL + yM); + BigInt64 xyL = karatzubaMultiplication(xL, yL); + BigInt64 xyM = karatzubaMultiplication(xM, yM); + BigInt64 xLyM_xMyL = sum4Mult - xyL - xyM; + xyM.insertZroes(xLsbHalf * 2); + xLyM_xMyL.insertZroes(xLsbHalf); + BigInt64 res = xyM + xLyM_xMyL + xyL; + res.isNegative = a.isNegative != b.isNegative; + return res; +} + +void BigInt64::rightShift(uint64_t n) +{ + if (n >= bitsCount()) { + zero(); + return; + } + uint64_t shiftEachLimb = n % BITS_IN_LIMB; + uint64_t dropLimbs = n / BITS_IN_LIMB; + if (shiftEachLimb != 0) { + for (int i = 0; i < limbsCount() - 1 - dropLimbs; i++) // lsb...msb + limbs[i] = limbs[i + dropLimbs] >> shiftEachLimb | + limbs[i + dropLimbs + 1] + << (BITS_IN_LIMB - shiftEachLimb); + limbs[limbsCount() - 1 - dropLimbs] >>= shiftEachLimb; + limbs.resize(limbsCount() - dropLimbs); + if (limbs.back() == 0 && !isZero()) + limbs.pop_back(); + } + else + limbs.erase(limbs.begin(), limbs.begin() + dropLimbs); +} + +void BigInt64::leftShift(uint64_t n) +{ + if (n >= bitsCount()) { + zero(); + return; + } + uint64_t shiftEachLimb = n % BITS_IN_LIMB; + uint64_t dropLimbs = n / BITS_IN_LIMB; + if (shiftEachLimb != 0) { + for (int i = limbsCount() - 1; i > dropLimbs; i--) { // msb-lst + limbs[i] = + limbs[i - dropLimbs] << shiftEachLimb | + limbs[i - dropLimbs - 1] >> (BITS_IN_LIMB - shiftEachLimb); + } + limbs[0] <<= shiftEachLimb; + } + else { + for (int i = limbsCount() - 1; i >= dropLimbs; i--) + limbs[i] = limbs[i - dropLimbs]; + for (int i = dropLimbs - 1; i >= 0; i--) + limbs[i] = 0; + } + + removeLeadingZeros(); +} + +BigInt64 extendedGcd(BigInt64 a, BigInt64 b, BigInt64 &x, BigInt64 &y) +{ + x = 1; + y = 0; + BigInt64 x1 = 0, y1 = 1; + BigInt64 q, temp; + + while (b != 0) { + q = a / b; + temp = b; + b = a % b; + a = temp; + + temp = x1; + + x1 = x - q * x1; + x = temp; + + temp = y1; + y1 = y - q * y1; + y = temp; + } + + return a; +} + +BigInt64 modularInverse(BigInt64 a, BigInt64 b) +{ + BigInt64 x, y; + BigInt64 gcdResult = extendedGcd(a, b, x, y); + if (gcdResult != 1) + throw std::invalid_argument("Modular inverse does not exist."); + + return x % b; // Ensure result is positive +} + +size_t BigInt64::bytesCount() const +{ + return limbsCount() * BYTES_IN_LIMB; +} + +std::string BigInt64::toString() const +{ + std::ostringstream oss; + oss << *this; + return oss.str(); +} + +bool BigInt64::isZero() const +{ + return limbsCount() == 1 && limbs[0] == 0; +} + +int BigInt64::limbsCount() const +{ + return limbs.size(); +} + +bool BigInt64::isEven() const +{ + return (limbs[0] & 1) == 0; +} \ No newline at end of file diff --git a/tests/ecc_tests.cpp b/tests/ecc_tests.cpp index 8a8f74d5..6a6b55ac 100644 --- a/tests/ecc_tests.cpp +++ b/tests/ecc_tests.cpp @@ -16,11 +16,4 @@ TEST(ECCTest, EncryptDecrypt) // Check if the decrypted message matches the original message EXPECT_EQ(messageBytes, decryptedMessage); -} - -// The main function for running all the tests -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); } \ No newline at end of file diff --git a/tests/rsa_tests.cpp b/tests/rsa_tests.cpp new file mode 100644 index 00000000..168e6514 --- /dev/null +++ b/tests/rsa_tests.cpp @@ -0,0 +1,125 @@ +#include +#include +#include "rsa.h" +using namespace std; + +TEST(RSATest, EncryptDecrypt_1024) +{ + const int KEY_SIZE = 1024; + + size_t pubLen = rsaGetPublicKeyLen(KEY_SIZE); + size_t priLen = rsaGetPrivateKeyLen(KEY_SIZE); + uint8_t *pubBuff = new uint8_t[pubLen]; + uint8_t *priBuff = new uint8_t[priLen]; + + CK_RV rv1 = rsaGenerateKeys(KEY_SIZE, pubBuff, pubLen, priBuff, priLen); + EXPECT_EQ(CKR_OK, rv1); + + const uint8_t plaintext[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + size_t plaintextLen = sizeof(plaintext); + + size_t ciphertextLen = rsaGetEncryptedLen(KEY_SIZE); + uint8_t *ciphertext = new uint8_t[ciphertextLen]; + CK_RV rv2 = rsaEncrypt(plaintext, plaintextLen, pubBuff, pubLen, ciphertext, + ciphertextLen, KEY_SIZE); + EXPECT_EQ(CKR_OK, rv2); + + size_t decryptedLen = rsaGetDecryptedLen(KEY_SIZE); + uint8_t *decrypted = new uint8_t[decryptedLen]; + CK_RV rv3 = rsaDecrypt(ciphertext, ciphertextLen, priBuff, priLen, + decrypted, &decryptedLen, KEY_SIZE); + EXPECT_EQ(CKR_OK, rv3); + EXPECT_EQ(plaintextLen, decryptedLen); + EXPECT_EQ(memcmp(plaintext, decrypted, plaintextLen), 0); + + delete[] pubBuff; + delete[] priBuff; + delete[] ciphertext; + delete[] decrypted; +} + +TEST(RSATest, EncryptDecrypt_2048) +{ + const int KEY_SIZE = 2048; + + size_t pubLen = rsaGetPublicKeyLen(KEY_SIZE); + size_t priLen = rsaGetPrivateKeyLen(KEY_SIZE); + uint8_t *pubBuff = new uint8_t[pubLen]; + uint8_t *priBuff = new uint8_t[priLen]; + + CK_RV rv1 = rsaGenerateKeys(KEY_SIZE, pubBuff, pubLen, priBuff, priLen); + EXPECT_EQ(CKR_OK, rv1); + + const uint8_t plaintext[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + size_t plaintextLen = sizeof(plaintext); + + size_t ciphertextLen = rsaGetEncryptedLen(KEY_SIZE); + uint8_t *ciphertext = new uint8_t[ciphertextLen]; + CK_RV rv2 = rsaEncrypt(plaintext, plaintextLen, pubBuff, pubLen, ciphertext, + ciphertextLen, KEY_SIZE); + EXPECT_EQ(CKR_OK, rv2); + + size_t decryptedLen = rsaGetDecryptedLen(KEY_SIZE); + uint8_t *decrypted = new uint8_t[decryptedLen]; + CK_RV rv3 = rsaDecrypt(ciphertext, ciphertextLen, priBuff, priLen, + decrypted, &decryptedLen, KEY_SIZE); + EXPECT_EQ(CKR_OK, rv3); + EXPECT_EQ(plaintextLen, decryptedLen); + EXPECT_EQ(memcmp(plaintext, decrypted, plaintextLen), 0); + + delete[] pubBuff; + delete[] priBuff; + delete[] ciphertext; + delete[] decrypted; +} + +TEST(RSATest, EncryptDecrypt_4096) +{ + const int KEY_SIZE = 4096; + + size_t pubLen = rsaGetPublicKeyLen(KEY_SIZE); + size_t priLen = rsaGetPrivateKeyLen(KEY_SIZE); + uint8_t *pubBuff = new uint8_t[pubLen]; + uint8_t *priBuff = new uint8_t[priLen]; + + CK_RV rv1 = rsaGenerateKeys(KEY_SIZE, pubBuff, pubLen, priBuff, priLen); + EXPECT_EQ(CKR_OK, rv1); + + const uint8_t plaintext[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + size_t plaintextLen = sizeof(plaintext); + + size_t ciphertextLen = rsaGetEncryptedLen(KEY_SIZE); + uint8_t *ciphertext = new uint8_t[ciphertextLen]; + CK_RV rv2 = rsaEncrypt(plaintext, plaintextLen, pubBuff, pubLen, ciphertext, + ciphertextLen, KEY_SIZE); + EXPECT_EQ(CKR_OK, rv2); + + size_t decryptedLen = rsaGetDecryptedLen(KEY_SIZE); + uint8_t *decrypted = new uint8_t[decryptedLen]; + CK_RV rv3 = rsaDecrypt(ciphertext, ciphertextLen, priBuff, priLen, + decrypted, &decryptedLen, KEY_SIZE); + EXPECT_EQ(CKR_OK, rv3); + + EXPECT_EQ(plaintextLen, decryptedLen); + EXPECT_EQ(memcmp(plaintext, decrypted, plaintextLen), 0); + + delete[] pubBuff; + delete[] priBuff; + delete[] ciphertext; + delete[] decrypted; +} \ No newline at end of file diff --git a/tests/sha256_tests.cpp b/tests/sha256_tests.cpp index bceed66e..bd38f031 100644 --- a/tests/sha256_tests.cpp +++ b/tests/sha256_tests.cpp @@ -51,9 +51,4 @@ TEST(SHA256Test, SpecialCharsHash) { // Expected hash value for the string containing special characters std::string expectedHash = "95ce789c5c9d18490972709838ca3a9719094bca3ac16332cfec0652b0236141"; ASSERT_EQ(bytesToHexString(hash), expectedHash); -} - -int main(int argc, char **argv) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); } \ No newline at end of file From c7a2d2650bd1ccf72df4c33e0a73cfc4f133cd39 Mon Sep 17 00:00:00 2001 From: Mali Bernstein Date: Thu, 5 Sep 2024 10:29:44 +0300 Subject: [PATCH 15/21] hsm: Add SYCL parallelization to SHA256 implementation --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dd23c187..b89d158d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10) -project(MyTest) +project(DPCPPExample) # Include directories include_directories(include) From 5ab3a0f0082ae5864aea8f0bed32702b9c5724b8 Mon Sep 17 00:00:00 2001 From: MiryamW Date: Wed, 18 Sep 2024 16:48:07 +0300 Subject: [PATCH 16/21] HSM: Correct AES Streaming Implementation --- CMakeLists.txt | 39 +- include/aes.h | 7 +- include/aes_stream.h | 26 +- include/aes_stream_factory.h | 128 +-- include/prime_tests.h | 2 +- src/aes.cpp | 52 +- src/aes_cbc.cpp | 15 +- src/aes_cfb.cpp | 15 +- src/aes_ctr.cpp | 31 +- src/aes_ecb.cpp | 9 +- src/aes_ofb.cpp | 35 +- src/aes_stream_factory.cpp | 16 + src/big_int10.cpp | 4 +- src/prime_tests.cpp | 1610 +++++++++++++++++----------------- src/rsa.cpp | 728 +++++++-------- tests/aes_tests.cpp | 64 +- 16 files changed, 1345 insertions(+), 1436 deletions(-) create mode 100644 src/aes_stream_factory.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index b89d158d..1bb0c6fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,17 +1,15 @@ cmake_minimum_required(VERSION 3.10) -project(DPCPPExample) +project(MyTest) # Include directories -include_directories(include) -include_directories(logger) - +include_directories(src) # Find GMP library find_path(GMP_INCLUDE_DIR NAMES gmp.h) find_library(GMP_LIBRARY NAMES gmp) find_library(GMPXX_LIBRARY NAMES gmpxx) if(NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARY OR NOT GMPXX_LIBRARY) - message(FATAL_ERROR "Could not find GMP or GMPXX libraries") + message(FATAL_ERROR "Could not find GMP or GMPXX libraries") endif() include_directories(${GMP_INCLUDE_DIR}) @@ -19,53 +17,40 @@ include_directories(${GMP_INCLUDE_DIR}) find_package(GTest REQUIRED) # Add source files -file(GLOB SOURCES "src/*.cpp") -list(APPEND SOURCES logger/logger.cpp) - +file(GLOB SOURCES "src/*.cpp" "logger/*.cpp") # Check if SYCL is enabled option(USE_SYCL "Enable SYCL support" OFF) -include_directories(src) if(USE_SYCL) # Set the icpx compiler with SYCL support set(CMAKE_CXX_COMPILER icpx) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl -g") # Add oneAPI include directories include_directories(${CMAKE_SOURCE_DIR}/include /opt/intel/oneapi/compiler/latest/linux/include) # Add oneAPI library directories link_directories(/opt/intel/oneapi/compiler/latest/linux/lib) message(STATUS "Compiling with SYCL support") add_definitions(-DUSE_SYCL) - list(APPEND SOURCES src/sycl-version/big_int64.cpp) - include_directories(${CMAKE_SOURCE_DIR}/include/sycl-version) else() message(STATUS "Compiling without SYCL support") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") remove_definitions(-DUSE_SYCL) - list(APPEND SOURCES src/threads-version/big_int64.cpp) - include_directories(${CMAKE_SOURCE_DIR}/include/threads-version) endif() -# Set build type and output message -if(USE_DEBUG) - set(CMAKE_BUILD_TYPE Debug) - add_definitions(-DDEBUG_MODE) - message(STATUS "Compiling with Debug build type") -else() - set(CMAKE_BUILD_TYPE Release) - remove_definitions(-DDEBUG_MODE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") - message(STATUS "Compiling with Release build type and optimization level -O3") -endif() +# Set build type to Debug +set(CMAKE_BUILD_TYPE Debug) # Add the executable for the tests -add_executable(runTests tests/aes_tests.cpp tests/ecc_tests.cpp tests/sha256_tests.cpp tests/rsa_tests.cpp ${SOURCES}) +add_executable(runTests tests/aes_tests.cpp ${SOURCES}) # Link libraries target_link_libraries(runTests ${GMP_LIBRARY} ${GMPXX_LIBRARY} - gtest gtest_main pthread + gtest + gtest_main + pthread ) # Optional: Output directory for the executable diff --git a/include/aes.h b/include/aes.h index 13ef6a91..3a53e38b 100644 --- a/include/aes.h +++ b/include/aes.h @@ -58,7 +58,10 @@ static std::map aesKeyLengthData = { unsigned char multiply(unsigned char x, unsigned char y); void xorBlocks(const unsigned char *a, const unsigned char *b, unsigned char *c, unsigned int len); - void generateRandomIV(unsigned char* iv); + void generateRandomIV(unsigned char* iv); + size_t calculatEncryptedLenAES(size_t inLen, bool isFirst); + size_t calculatDecryptedLenAES(size_t inLen, bool isFirst); + void generateKey(unsigned char*, AESKeyLength keyLength); /*Inverse S-Box*/ const unsigned char invSBox[16][16] = { @@ -130,6 +133,4 @@ const unsigned char sBox[16][16] = { {0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16}}; -unsigned char *generateKey(AESKeyLength keyLength); - #endif diff --git a/include/aes_stream.h b/include/aes_stream.h index e754fd27..99872349 100644 --- a/include/aes_stream.h +++ b/include/aes_stream.h @@ -1,4 +1,5 @@ #include "aes.h" +#include #include #include #include @@ -13,21 +14,22 @@ class StreamAES unsigned char* key; unsigned char* lastData; - StreamAES():iv(new unsigned char[16]){}; + StreamAES() : iv(new unsigned char[16]), lastBlock(new unsigned char[16]){}; + /** - @brief Encrypts the initial block of data using AES in CBC mode. + @brief Encrypts the initial block of data using AES in CBC mode. - This function generates a random initialization vector (IV) and then - encrypts the given block of data. The encrypted data and the IV are - concatenated and stored in the output buffer. + This function generates a random initialization vector (IV) and then + encrypts the given block of data. The encrypted data and the IV are + concatenated and stored in the output buffer. - @param block Input data block to encrypt. - @param inLen Length of the input data block. - @param[out] out Pointer to the output buffer where encrypted data will be stored. - @param[out] outLen Length of the encrypted output data. - @param key Encryption key. - @param keyLength Length of the AES key (128, 192, or 256 bits). -*/ + @param block Input data block to encrypt. + @param inLen Length of the input data block. + @param[out] out Pointer to the output buffer where encrypted data will be stored. + @param[out] outLen Length of the encrypted output data. + @param key Encryption key. + @param keyLength Length of the AES key (128, 192, or 256 bits). + */ virtual void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) = 0; /** diff --git a/include/aes_stream_factory.h b/include/aes_stream_factory.h index 104ec83a..cb6e8b84 100644 --- a/include/aes_stream_factory.h +++ b/include/aes_stream_factory.h @@ -3,105 +3,6 @@ #include #include -/** - * @brief Abstract factory class for creating StreamAES objects. - */ -class StreamAESFactory -{ - public: - /** - * @brief Creates a new StreamAES object. - * - * @return A pointer to the newly created StreamAES object. - */ - virtual StreamAES* create() const = 0; -}; - -/** - * @brief Factory class for creating AESEcb objects. - */ -class AESEcbFactory : public StreamAESFactory -{ - public: - /** - * @brief Creates a new AESEcb object. - * - * @return A pointer to the newly created AESEcb object. - */ - StreamAES* create() const override - { - return new AESEcb(); - } -}; - -/** - * @brief Factory class for creating AESCbc objects. - */ -class AESCbcFactory : public StreamAESFactory -{ - public: - /** - * @brief Creates a new AESCbc object. - * - * @return A pointer to the newly created AESCbc object. - */ - StreamAES* create() const override - { - return new AESCbc(); - } -}; - -/** - * @brief Factory class for creating AESCfb objects. - */ -class AESCfbFactory : public StreamAESFactory -{ - public: - /** - * @brief Creates a new AESCfb object. - * - * @return A pointer to the newly created AESCfb object. - */ - StreamAES* create() const override - { - return new AESCfb(); - } -}; - -/** - * @brief Factory class for creating AESOfb objects. - */ -class AESOfbFactory : public StreamAESFactory -{ - public: - /** - * @brief Creates a new AESOfb object. - * - * @return A pointer to the newly created AESOfb object. - */ - StreamAES* create() const override - { - return new AESOfb(); - } -}; - -/** - * @brief Factory class for creating AESCtr objects. - */ -class AESCtrFactory : public StreamAESFactory -{ - public: - /** - * @brief Creates a new AESCtr object. - * - * @return A pointer to the newly created AESCtr object. - */ - StreamAES* create() const override - { - return new AESCtr(); - } -}; - /** * @brief Singleton class for managing StreamAESFactory instances. */ @@ -113,11 +14,7 @@ class FactoryManager * * @return The singleton instance of FactoryManager. */ - static FactoryManager& getInstance() - { - static FactoryManager instance; - return instance; - } + static FactoryManager& getInstance() ; /** * @brief Creates a StreamAES object based on the specified AESChainingMode. @@ -125,23 +22,18 @@ class FactoryManager * @param type The AES chaining mode. * @return A pointer to the newly created StreamAES object. */ - StreamAES* create(const AESChainingMode& type) const - { - auto it = factories.find(type); - if (it != factories.end()) - return it->second->create(); - - return nullptr; - } + StreamAES* create(const AESChainingMode& type) const; + + static FactoryManager instance; private: - std::map factories = + std::map factories = { - {AESChainingMode::ECB, new AESEcbFactory()}, - {AESChainingMode::CBC, new AESCbcFactory()}, - {AESChainingMode::CFB, new AESCfbFactory()}, - {AESChainingMode::OFB, new AESOfbFactory()}, - {AESChainingMode::CTR, new AESCtrFactory()} + {AESChainingMode::ECB, new AESEcb()}, + {AESChainingMode::CBC, new AESCbc()}, + {AESChainingMode::CFB, new AESCfb()}, + {AESChainingMode::OFB, new AESOfb()}, + {AESChainingMode::CTR, new AESCtr()} }; /** diff --git a/include/prime_tests.h b/include/prime_tests.h index 2f9d2f63..2ddfea80 100644 --- a/include/prime_tests.h +++ b/include/prime_tests.h @@ -1,6 +1,6 @@ #ifndef __PRIME_TESTS_H__ #define __PRIME_TESTS_H__ -#include "big_int64.h" +#include "sycl-version/big_int64.h" #include "logger.h" bool millerRabinPrimalityTest(const BigInt64 &number, size_t k); diff --git a/src/aes.cpp b/src/aes.cpp index fd1f412b..cb7e5375 100644 --- a/src/aes.cpp +++ b/src/aes.cpp @@ -2,8 +2,6 @@ #include #include #include -#include - #ifdef USE_SYCL #include #include @@ -16,11 +14,11 @@ using namespace cl::sycl; /** @brief Generates a random Initialization Vector (IV) for cryptographic purposes. - This function generates a 16-byte random IV, which is commonly used in cryptographic algorithms + This function generates a BLOCK_BYTES_LEN-byte random IV, which is commonly used in cryptographic algorithms such as AES (Advanced Encryption Standard) in CBC (Cipher Block Chaining) mode. The IV ensures that the same plaintext block will result in a different ciphertext block when encrypted with the same key. - @param iv Pointer to an array of 16 unsigned char (bytes) where the generated IV will be stored. + @param iv Pointer to an array of BLOCK_BYTES_LEN unsigned char (bytes) where the generated IV will be stored. @note The function uses the C++ standard library's random number generator to produce a uniformly distributed sequence of bytes. */ @@ -29,7 +27,7 @@ void generateRandomIV(unsigned char* iv) std::random_device rd; std::mt19937 gen(rd()); std::uniform_int_distribution<> dis(0, 255); - for (unsigned int i = 0; i < 16; i++) + for (unsigned int i = 0; i < BLOCK_BYTES_LEN; i++) iv[i] = static_cast(dis(gen)); } @@ -78,10 +76,9 @@ void unpadMessage(unsigned char *message, unsigned int &length) @param keyLength The length of the key (128, 192, or 256 bits). @return A pointer to the generated key. */ -unsigned char *generateKey(AESKeyLength keyLength) +void generateKey(unsigned char* key, AESKeyLength keyLength) { // Allocate memory for the key - unsigned char *key = new unsigned char[aesKeyLengthData[keyLength].keySize]; // Initialize a random device and a random number generator std::random_device rd; @@ -91,8 +88,6 @@ unsigned char *generateKey(AESKeyLength keyLength) // Fill the key with random bytes for (int i = 0; i < aesKeyLengthData[keyLength].keySize; i++) key[i] = dis(gen); - - return key; } /** @@ -257,7 +252,7 @@ void subBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) queue queue; buffer stateBuffer(state[0], range<2>(AES_STATE_ROWS, NUM_BLOCKS)); - buffer sBoxBuffer(sBox[0], range<2>(16, 16)); + buffer sBoxBuffer(sBox[0], range<2>(BLOCK_BYTES_LEN, BLOCK_BYTES_LEN)); queue.submit([&](handler &handler) { auto stateAcc = stateBuffer.get_access(handler); @@ -266,7 +261,7 @@ void subBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) range<2>(AES_STATE_ROWS, NUM_BLOCKS), [=](id<2> id) { size_t i = id[0]; size_t j = id[1]; - stateAcc[i][j] = sBoxAcc[state[i][j] / 16][state[i][j] % 16]; + stateAcc[i][j] = sBoxAcc[state[i][j] / BLOCK_BYTES_LEN][state[i][j] % BLOCK_BYTES_LEN]; }); }).wait(); } @@ -354,7 +349,7 @@ void subWord(unsigned char a[AES_STATE_ROWS]) { queue queue; buffer aBuffer(a, range<1>(AES_STATE_ROWS)); - buffer sBoxBuffer(sBox[0], range<2>(16, 16)); + buffer sBoxBuffer(sBox[0], range<2>(BLOCK_BYTES_LEN, BLOCK_BYTES_LEN)); queue.submit([&](handler &handler) { auto aAcc = aBuffer.get_access(handler); @@ -363,7 +358,7 @@ void subWord(unsigned char a[AES_STATE_ROWS]) handler.parallel_for( range<1>(AES_STATE_ROWS), [=](id<1> id) { size_t i = id[0]; - aAcc[i] = sBoxAcc[aAcc[i] / 16][aAcc[i] % 16]; + aAcc[i] = sBoxAcc[aAcc[i] / BLOCK_BYTES_LEN][aAcc[i] % BLOCK_BYTES_LEN]; }); }).wait(); } @@ -486,7 +481,7 @@ void invSubBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) buffer stateBuffer(state[0], range<2>(AES_STATE_ROWS, NUM_BLOCKS)); buffer invSBoxBuffer(invSBox[0], - range<2>(16, 16)); + range<2>(BLOCK_BYTES_LEN, BLOCK_BYTES_LEN)); queue.submit([&](handler &handler) { auto stateAcc = @@ -499,7 +494,7 @@ void invSubBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) size_t i = id[0]; size_t j = id[1]; stateAcc[i][j] = - invSBoxAcc[state[i][j] / 16][state[i][j] % 16]; + invSBoxAcc[state[i][j] / BLOCK_BYTES_LEN][state[i][j] % BLOCK_BYTES_LEN]; }); }).wait(); } @@ -621,8 +616,7 @@ void decryptBlock(const unsigned char in[], unsigned char out[], { unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]; unsigned int i, j, round; - for(int i =0; i< 4 * NUM_BLOCKS; i++) - std::cout< void AESCbc::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) { generateRandomIV(iv); encrypt(block, inLen, key, out, outLen, iv,nullptr, keyLength); - unsigned char *newOut = new unsigned char[outLen + 16]; + unsigned char *newOut = new unsigned char[outLen + BLOCK_BYTES_LEN]; memcpy(newOut, out, outLen); - memcpy(newOut + outLen, iv, 16); + memcpy(newOut + outLen, iv, BLOCK_BYTES_LEN); + memcpy(lastBlock, out, outLen); out = newOut; - this -> lastBlock = out; this -> key = key; this -> keyLength = keyLength; - outLen += 16; + outLen += BLOCK_BYTES_LEN; } void AESCbc::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) @@ -22,9 +23,9 @@ void AESCbc::encryptContinue(unsigned char block[], unsigned int inLen, unsigned void AESCbc::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) { - this-> iv = block + inLen - 16; - decrypt(block, inLen - 16, key, out, outLen, block + inLen - 16, nullptr, keyLength); - this-> lastBlock = out; + this-> iv = block + inLen - BLOCK_BYTES_LEN; + decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, nullptr, keyLength); + memcpy(lastBlock, out, outLen - BLOCK_BYTES_LEN); } void AESCbc::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) diff --git a/src/aes_cfb.cpp b/src/aes_cfb.cpp index 6f1bb11f..6469ee4a 100644 --- a/src/aes_cfb.cpp +++ b/src/aes_cfb.cpp @@ -4,15 +4,16 @@ void AESCfb::encryptStart(unsigned char block[], unsigned int inLen, unsigned ch { generateRandomIV(iv); encrypt(block, inLen, key, out, outLen, iv,nullptr, keyLength); - unsigned char *newOut = new unsigned char[outLen + 16]; + unsigned char *newOut = new unsigned char[outLen + BLOCK_BYTES_LEN]; memcpy(newOut, out, outLen); - memcpy(newOut + outLen, iv, 16); + memcpy(newOut + outLen, iv, BLOCK_BYTES_LEN); + memcpy(lastBlock, out, outLen); out = newOut; this -> lastBlock = out; this -> key = key; this -> keyLength = keyLength; - outLen += 16; + outLen += BLOCK_BYTES_LEN; } void AESCfb::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) @@ -22,9 +23,9 @@ void AESCfb::encryptContinue(unsigned char block[], unsigned int inLen, unsigned void AESCfb::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) { - this-> iv = block + inLen - 16; - decrypt(block, inLen - 16, key, out, outLen, block + inLen - 16, nullptr, keyLength); - this-> lastBlock = out; + this-> iv = block + inLen - BLOCK_BYTES_LEN; + decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, nullptr, keyLength); + memcpy(lastBlock, out, outLen - BLOCK_BYTES_LEN); } void AESCfb::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) @@ -36,8 +37,8 @@ void AESCfb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) { padMessage(in, inLen, outLen); - unsigned char block[BLOCK_BYTES_LEN]; out = new unsigned char[outLen]; + unsigned char block[BLOCK_BYTES_LEN]; unsigned char feedback[BLOCK_BYTES_LEN]; unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); diff --git a/src/aes_ctr.cpp b/src/aes_ctr.cpp index 55d9303a..930bc75e 100644 --- a/src/aes_ctr.cpp +++ b/src/aes_ctr.cpp @@ -1,7 +1,6 @@ #include "../include/aes_stream.h" #include #include -#include #include /** @@ -116,14 +115,12 @@ void decryptCTRMultithreaded(const unsigned char* ciphertext, unsigned char* pla unsigned int numBlocks = length / BLOCK_BYTES_LEN; std::vector threads; - for (unsigned int i = 0; i < numBlocks; ++i) { + for (unsigned int i = 0; i < numBlocks; ++i) threads.push_back(std::thread(decryptBlockThreadedCTR, &ciphertext[i * BLOCK_BYTES_LEN], &plaintext[i * BLOCK_BYTES_LEN], roundKeys, keyLength, lastData, i)); - } - for (auto& th : threads) { + for (auto& th : threads) th.join(); - } } void AESCtr::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) @@ -132,35 +129,35 @@ void AESCtr::encryptStart(unsigned char block[], unsigned int inLen, unsigned ch generateRandomIV(iv); memcpy(lastData, iv, BLOCK_BYTES_LEN); encrypt(block, inLen, key, out, outLen, iv, lastData, keyLength); - unsigned char *newOut = new unsigned char[outLen + 16]; + unsigned char *newOut = new unsigned char[outLen + BLOCK_BYTES_LEN]; memcpy(newOut, out, outLen); - memcpy(newOut + outLen, iv, 16); + memcpy(newOut + outLen, iv, BLOCK_BYTES_LEN); out = newOut; this -> lastBlock = out; this -> key = key; this -> keyLength = keyLength; this-> lastData = lastData; - outLen += 16; + outLen += BLOCK_BYTES_LEN; } void AESCtr::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) { - encrypt(block, inLen, key,out, outLen, lastBlock, lastData, keyLength); + encrypt(block, inLen, key,out, outLen, lastData, lastData, keyLength); } void AESCtr::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) { - unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; - memcpy(lastData, iv, BLOCK_BYTES_LEN); - this-> iv = block + inLen - 16; - decrypt(block, inLen - 16, key, out, outLen, block + inLen - 16, lastData, keyLength); - this-> lastBlock = out; - this->lastData = lastData; + unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; + memcpy(lastData, iv, BLOCK_BYTES_LEN); + this-> iv = block + inLen - BLOCK_BYTES_LEN; + decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, lastData, keyLength); + this-> lastBlock = out; + this->lastData = lastData; } void AESCtr::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) { - decrypt(block, inLen , key, out, outLen, lastBlock, lastData, keyLength); + decrypt(block, inLen , key, out, outLen, lastData, lastData, keyLength); } void AESCtr::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, @@ -191,4 +188,4 @@ void AESCtr::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, decryptCTRMultithreaded(in, out, outLen, roundKeys, keyLength, iv); delete[] roundKeys; -} +} \ No newline at end of file diff --git a/src/aes_ecb.cpp b/src/aes_ecb.cpp index 2909e8e7..c0c9638e 100644 --- a/src/aes_ecb.cpp +++ b/src/aes_ecb.cpp @@ -1,7 +1,6 @@ #include "../include/aes_stream.h" #include #include -#include #include /** @@ -78,14 +77,12 @@ void decryptECBMultithreaded(const unsigned char* ciphertext, unsigned char* pla unsigned int numBlocks = length / BLOCK_BYTES_LEN; std::vector threads; - for (unsigned int i = 0; i < numBlocks; ++i) { + for (unsigned int i = 0; i < numBlocks; i++) threads.push_back(std::thread(decryptBlockThreadedECB, &ciphertext[i * BLOCK_BYTES_LEN], &plaintext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); - } - for (auto& th : threads) { + for (auto& th : threads) th.join(); - } } void AESEcb::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) @@ -135,6 +132,6 @@ void AESEcb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, keyExpansion(key, roundKeys, keyLength); for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) decryptECBMultithreaded(in, out, outLen, roundKeys, keyLength); - unpadMessage(out, outLen); + unpadMessage(out, outLen); delete[] roundKeys; } diff --git a/src/aes_ofb.cpp b/src/aes_ofb.cpp index 489eb5ae..13e027cb 100644 --- a/src/aes_ofb.cpp +++ b/src/aes_ofb.cpp @@ -6,15 +6,16 @@ void AESOfb::encryptStart(unsigned char block[], unsigned int inLen, unsigned ch generateRandomIV(iv); memcpy(lastData, iv, BLOCK_BYTES_LEN); encrypt(block, inLen, key, out, outLen, iv,lastData, keyLength); - unsigned char *newOut = new unsigned char[outLen + 16]; + unsigned char *newOut = new unsigned char[outLen + BLOCK_BYTES_LEN]; memcpy(newOut, out, outLen); - memcpy(newOut + outLen, iv, 16); + memcpy(newOut + outLen, iv, BLOCK_BYTES_LEN); + memcpy(lastBlock, out, outLen); out = newOut; this -> lastBlock = out; this -> key = key; this -> keyLength = keyLength; - this-> lastData = lastData; - outLen += 16; + this-> lastData = lastData; + outLen += BLOCK_BYTES_LEN; } void AESOfb::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) @@ -26,8 +27,8 @@ void AESOfb::decryptStart(unsigned char block[], unsigned int inLen, unsigned ch { unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; memcpy(lastData, iv, BLOCK_BYTES_LEN); - this-> iv = block + inLen - 16; - decrypt(block, inLen - 16, key, out, outLen, block + inLen - 16, lastData, keyLength); + this-> iv = block + inLen - BLOCK_BYTES_LEN; + decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, lastData, keyLength); this-> lastBlock = out; this->lastData = lastData; } @@ -41,17 +42,15 @@ void AESOfb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) { padMessage(in, inLen, outLen); - unsigned char block[BLOCK_BYTES_LEN]; out = new unsigned char[outLen]; + unsigned char block[BLOCK_BYTES_LEN]; unsigned char feedback[BLOCK_BYTES_LEN]; unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); - if(lastData) - memcpy(feedback, lastData, BLOCK_BYTES_LEN); - else - memcpy(feedback, iv, BLOCK_BYTES_LEN); + memcpy(feedback, lastData, BLOCK_BYTES_LEN); for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { encryptBlock(feedback, block, roundKeys, keyLength); + xorBlocks(in + i, block, out+ i,BLOCK_BYTES_LEN); for (unsigned int j = 0; j < BLOCK_BYTES_LEN; ++j) out[i + j] = in[i + j] ^ block[j]; memcpy(feedback, block, BLOCK_BYTES_LEN); @@ -70,20 +69,12 @@ void AESOfb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, unsigned char feedback[BLOCK_BYTES_LEN]; unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); - if(lastData) - memcpy(feedback, lastData, BLOCK_BYTES_LEN); - else - memcpy(feedback, iv, BLOCK_BYTES_LEN); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + memcpy(feedback, lastData, BLOCK_BYTES_LEN); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { encryptBlock(feedback, block, roundKeys, keyLength); - // Copy only the amount of data needed for the current block - unsigned int blockLen = (i + BLOCK_BYTES_LEN <= outLen) ? BLOCK_BYTES_LEN : (outLen - i); - for (unsigned int j = 0; j < blockLen; ++j) - out[i + j] = in[i + j] ^ block[j]; - // Update feedback to be used for the next block + xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); memcpy(feedback, block, BLOCK_BYTES_LEN); memcpy(lastData, feedback, BLOCK_BYTES_LEN); - } unpadMessage(out, outLen); delete[] roundKeys; diff --git a/src/aes_stream_factory.cpp b/src/aes_stream_factory.cpp new file mode 100644 index 00000000..ed1a3d67 --- /dev/null +++ b/src/aes_stream_factory.cpp @@ -0,0 +1,16 @@ + #include "../include/aes_stream_factory.h" + FactoryManager FactoryManager::instance; + + FactoryManager& FactoryManager::getInstance() + { + return instance; + } + + StreamAES* FactoryManager::create(const AESChainingMode& type) const + { + auto it = factories.find(type); + if (it != factories.end()) + return it->second; + + return nullptr; + } \ No newline at end of file diff --git a/src/big_int10.cpp b/src/big_int10.cpp index a1f353e0..12d16426 100644 --- a/src/big_int10.cpp +++ b/src/big_int10.cpp @@ -1,8 +1,8 @@ #include #include #include -#include "big_int10.h" -#include "big_int_utils.h" +#include "../include/big_int10.h" +#include "../include/big_int_utils.h" using namespace std; BigInt10::BigInt10(const std::string &str) diff --git a/src/prime_tests.cpp b/src/prime_tests.cpp index 08df6267..38df9461 100644 --- a/src/prime_tests.cpp +++ b/src/prime_tests.cpp @@ -1,805 +1,805 @@ -#include -#include "big_int_utils.h" -#include "prime_tests.h" -#include "logger.h" -using namespace std; - -constexpr size_t smallPrimesSize = 2000; -constexpr int smallPrimes[2000] = { - 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, - 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, - 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, - 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, - 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, - 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, - 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, - 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, - 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, - 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, - 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, - 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, - 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, - 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, - 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, - 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, - 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, - 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, - 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, - 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, - 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, - 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, - 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, - 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, - 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, - 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, - 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, - 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, - 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, - 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, - 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, - 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, - 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, - 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, - 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, - 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, - 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, - 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, - 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, - 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, - 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, - 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, - 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, - 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, - 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, - 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, - 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, - 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, - 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, - 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, - 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, - 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, - 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, - 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, - 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, - 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, - 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, - 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, - 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, - 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, - 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, - 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, - 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, - 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, - 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, - 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, - 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, - 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, - 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, - 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, - 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, - 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, - 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, - 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, - 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, - 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, - 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, - 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, - 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, - 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, - 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, - 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, - 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, - 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, - 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, - 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, - 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, - 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, - 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, - 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, - 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, - 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, - 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, - 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, - 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, - 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, - 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, - 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, - 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, - 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, - 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, - 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, - 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, - 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, - 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, - 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, - 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, - 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, - 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, - 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, - 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, - 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, - 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, - 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, - 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, - 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, - 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, - 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, - 10651, 10657, 10663, 10667, 10687, 10691, 10709, 10711, 10723, 10729, 10733, - 10739, 10753, 10771, 10781, 10789, 10799, 10831, 10837, 10847, 10853, 10859, - 10861, 10867, 10883, 10889, 10891, 10903, 10909, 10937, 10939, 10949, 10957, - 10973, 10979, 10987, 10993, 11003, 11027, 11047, 11057, 11059, 11069, 11071, - 11083, 11087, 11093, 11113, 11117, 11119, 11131, 11149, 11159, 11161, 11171, - 11173, 11177, 11197, 11213, 11239, 11243, 11251, 11257, 11261, 11273, 11279, - 11287, 11299, 11311, 11317, 11321, 11329, 11351, 11353, 11369, 11383, 11393, - 11399, 11411, 11423, 11437, 11443, 11447, 11467, 11471, 11483, 11489, 11491, - 11497, 11503, 11519, 11527, 11549, 11551, 11579, 11587, 11593, 11597, 11617, - 11621, 11633, 11657, 11677, 11681, 11689, 11699, 11701, 11717, 11719, 11731, - 11743, 11777, 11779, 11783, 11789, 11801, 11807, 11813, 11821, 11827, 11831, - 11833, 11839, 11863, 11867, 11887, 11897, 11903, 11909, 11923, 11927, 11933, - 11939, 11941, 11953, 11959, 11969, 11971, 11981, 11987, 12007, 12011, 12037, - 12041, 12043, 12049, 12071, 12073, 12097, 12101, 12107, 12109, 12113, 12119, - 12143, 12149, 12157, 12161, 12163, 12197, 12203, 12211, 12227, 12239, 12241, - 12251, 12253, 12263, 12269, 12277, 12281, 12289, 12301, 12323, 12329, 12343, - 12347, 12373, 12377, 12379, 12391, 12401, 12409, 12413, 12421, 12433, 12437, - 12451, 12457, 12473, 12479, 12487, 12491, 12497, 12503, 12511, 12517, 12527, - 12539, 12541, 12547, 12553, 12569, 12577, 12583, 12589, 12601, 12611, 12613, - 12619, 12637, 12641, 12647, 12653, 12659, 12671, 12689, 12697, 12703, 12713, - 12721, 12739, 12743, 12757, 12763, 12781, 12791, 12799, 12809, 12821, 12823, - 12829, 12841, 12853, 12889, 12893, 12899, 12907, 12911, 12917, 12919, 12923, - 12941, 12953, 12959, 12967, 12973, 12979, 12983, 13001, 13003, 13007, 13009, - 13033, 13037, 13043, 13049, 13063, 13093, 13099, 13103, 13109, 13121, 13127, - 13147, 13151, 13159, 13163, 13171, 13177, 13183, 13187, 13217, 13219, 13229, - 13241, 13249, 13259, 13267, 13291, 13297, 13309, 13313, 13327, 13331, 13337, - 13339, 13367, 13381, 13397, 13399, 13411, 13417, 13421, 13441, 13451, 13457, - 13463, 13469, 13477, 13487, 13499, 13513, 13523, 13537, 13553, 13567, 13577, - 13591, 13597, 13613, 13619, 13627, 13633, 13649, 13669, 13679, 13681, 13687, - 13691, 13693, 13697, 13709, 13711, 13721, 13723, 13729, 13751, 13757, 13759, - 13763, 13781, 13789, 13799, 13807, 13829, 13831, 13841, 13859, 13873, 13877, - 13879, 13883, 13901, 13903, 13907, 13913, 13921, 13931, 13933, 13963, 13967, - 13997, 13999, 14009, 14011, 14029, 14033, 14051, 14057, 14071, 14081, 14083, - 14087, 14107, 14143, 14149, 14153, 14159, 14173, 14177, 14197, 14207, 14221, - 14243, 14249, 14251, 14281, 14293, 14303, 14321, 14323, 14327, 14341, 14347, - 14369, 14387, 14389, 14401, 14407, 14411, 14419, 14423, 14431, 14437, 14447, - 14449, 14461, 14479, 14489, 14503, 14519, 14533, 14537, 14543, 14549, 14551, - 14557, 14561, 14563, 14591, 14593, 14621, 14627, 14629, 14633, 14639, 14653, - 14657, 14669, 14683, 14699, 14713, 14717, 14723, 14731, 14737, 14741, 14747, - 14753, 14759, 14767, 14771, 14779, 14783, 14797, 14813, 14821, 14827, 14831, - 14843, 14851, 14867, 14869, 14879, 14887, 14891, 14897, 14923, 14929, 14939, - 14947, 14951, 14957, 14969, 14983, 15013, 15017, 15031, 15053, 15061, 15073, - 15077, 15083, 15091, 15101, 15107, 15121, 15131, 15137, 15139, 15149, 15161, - 15173, 15187, 15193, 15199, 15217, 15227, 15233, 15241, 15259, 15263, 15269, - 15271, 15277, 15287, 15289, 15299, 15307, 15313, 15319, 15329, 15331, 15349, - 15359, 15361, 15373, 15377, 15383, 15391, 15401, 15413, 15427, 15439, 15443, - 15451, 15461, 15467, 15473, 15493, 15497, 15511, 15527, 15541, 15551, 15559, - 15569, 15581, 15583, 15601, 15607, 15619, 15629, 15641, 15643, 15647, 15649, - 15661, 15667, 15671, 15679, 15683, 15727, 15731, 15733, 15737, 15739, 15749, - 15761, 15767, 15773, 15787, 15791, 15797, 15803, 15809, 15817, 15823, 15859, - 15877, 15881, 15887, 15889, 15901, 15907, 15913, 15919, 15923, 15937, 15959, - 15971, 15973, 15991, 16001, 16007, 16033, 16057, 16061, 16063, 16067, 16069, - 16073, 16087, 16091, 16097, 16103, 16111, 16127, 16139, 16141, 16183, 16187, - 16189, 16193, 16217, 16223, 16229, 16231, 16249, 16253, 16267, 16273, 16301, - 16319, 16333, 16339, 16349, 16361, 16363, 16369, 16381, 16411, 16417, 16421, - 16427, 16433, 16447, 16451, 16453, 16477, 16481, 16487, 16493, 16519, 16529, - 16547, 16553, 16561, 16567, 16573, 16603, 16607, 16619, 16631, 16633, 16649, - 16651, 16657, 16661, 16673, 16691, 16693, 16699, 16703, 16729, 16741, 16747, - 16759, 16763, 16787, 16811, 16823, 16829, 16831, 16843, 16871, 16879, 16883, - 16889, 16901, 16903, 16921, 16927, 16931, 16937, 16943, 16963, 16979, 16981, - 16987, 16993, 17011, 17021, 17027, 17029, 17033, 17041, 17047, 17053, 17077, - 17093, 17099, 17107, 17117, 17123, 17137, 17159, 17167, 17183, 17189, 17191, - 17203, 17207, 17209, 17231, 17239, 17257, 17291, 17293, 17299, 17317, 17321, - 17327, 17333, 17341, 17351, 17359, 17377, 17383, 17387, 17389}; - -bool isDivisibleBySmallPrimes(const BigInt64 &n) -{ - for (int i = 0; i < smallPrimesSize && n > smallPrimes[i]; i++) - if (n % smallPrimes[i] == 0) - return true; - - return false; -} - -bool fermatPrimalityTest(const BigInt64 &number, size_t k) -{ - if (number == 2 || number == 3) - return true; - - if (number <= 1 || number.isEven()) - return false; - - if (isDivisibleBySmallPrimes(number)) - return false; - - while (k-- > 0) { - // assume n is a prime number - // pick randon integer a, such that 1 its not prime - if (modExpo != 1) - return false; - } - - return true; -} - -bool millerRabinPrimalityTest(const BigInt64 &number, size_t k) -{ - if (number == 2 || number == 3) - return true; - - if (number <= 1 || number.isEven()) - return false; - - // Write n-1 as 2^s * d where d is odd - BigInt64 s = 0; - BigInt64 d = number - 1; - while (d.isEven()) { - d >>= 1; - s++; - } - while (k-- > 0) { - // pick randon integer a, such that 1 -bool isDivisibleBySmallPrimesBuffers(sycl::queue &q, const BigInt64 &n) -{ - const std::vector nVec(smallPrimesSize, n); - int sumResult = 0; - sycl::range<1> sizeRange{smallPrimesSize}; - sycl::buffer sumBuff{&sumResult, 1}; - sycl::buffer primesBuff{smallPrimes, sizeRange}; - sycl::buffer nBuff{nVec.data(), sizeRange}; - - q.submit([&](sycl::handler &h) { - auto sumResult = sycl::reduction(sumBuff, h, sycl::plus<>()); - sycl::accessor primesAcc(primesBuff, h, sycl::read_only); - sycl::accessor nAcc(nBuff, h, sycl::read_only); - - h.parallel_for(sizeRange, sumResult, [=](sycl::id<1> idx, auto &sum) { - if (nAcc[idx] % primesAcc[idx] == 0 && nAcc[idx] != primesAcc[idx]) - sum += true; - sum += false; - }); - }); - q.wait(); - return sumResult > 0; -} - -bool isDivisibleBySmallPrimesUSM(sycl::queue &q, const BigInt64 &n) -{ - const std::vector nVec(smallPrimesSize, n); - int sumResult = 0; - sycl::range<1> sizeRange{smallPrimesSize}; - sycl::buffer sumBuff{&sumResult, 1}; - - int *primesShared = sycl::malloc_shared(smallPrimesSize, q); - BigInt64 *nShared = sycl::malloc_shared(smallPrimesSize, q); - for (int i = 0; i < smallPrimesSize; i++) { - primesShared[i] = smallPrimes[i]; - nShared[i] = nVec[i]; - } - - q.submit([&](sycl::handler &h) { - auto sumResult = sycl::reduction(sumBuff, h, sycl::plus<>()); - - h.parallel_for(sizeRange, sumResult, [=](sycl::id<1> idx, auto &sum) { - if (nShared[idx] % primesShared[idx] == 0 && - nShared[idx] != primesShared[idx]) - sum += true; - sum += false; - }); - }); - q.wait(); - sycl::free(primesShared, q); - sycl::free(nShared, q); - return sumResult > 0; -} - -bool millerRabinPrimalityTestBuffers(sycl::queue &q, const BigInt64 &number, - size_t k) -{ - if (number == 2 || number == 3) - return true; - - if (number <= 1 || number.isEven()) - return false; - - // Write n-1 as 2^s * d where d is odd - BigInt64 s = 0; - BigInt64 d = number - 1; - while (d.isEven()) { - d >>= 1; - s++; - } - vector randoms(k, BigInt64(BigInt64::RANDOM, 2, number - 2)); - vector dVec(k, d); - vector numberVec(k, number); - vector sVec(k, s); - - sycl::range<1> kRange{k}; - int sumResult = 0; - sycl::buffer sumBuf{&sumResult, 1}; - sycl::buffer randomsBuff{randoms.data(), kRange}; - sycl::buffer dBuff{dVec.data(), kRange}; - sycl::buffer numberBuff{numberVec.data(), kRange}; - sycl::buffer sBuff{sVec.data(), kRange}; - - q.submit([&](sycl::handler &cgh) { - auto sumReduction = reduction(sumBuf, cgh, sycl::plus<>()); - sycl::accessor randomsAcc(randomsBuff, cgh, - sycl::read_write); - sycl::accessor dAcc(dBuff, cgh, sycl::read_write); - sycl::accessor numberAcc(numberBuff, cgh, - sycl::read_write); - sycl::accessor sAcc(sBuff, cgh, sycl::read_write); - - cgh.parallel_for(kRange, sumReduction, [=](sycl::id<1> idx, auto &sum) { - BigInt64 aIn = randomsAcc[idx]; - BigInt64 dIn = dAcc[idx]; - BigInt64 numberIn = numberAcc[idx]; - BigInt64 sIn = sAcc[idx]; - // pick randon integer a, such that 1>= 1; - s++; - } - - std::uint64_t offset = number.getLsb(); - oneapi::dpl::minstd_rand engine(seed, offset); - oneapi::dpl::uniform_real_distribution distr; - BigInt64 a(2, number - 2, distr, engine); - - BigInt64 x = modularExponentiation(a, d, number); - if (x == 1 || x == number - 1) - return true; - - for (BigInt64 i = 0; i < s - 1; i++) { - x = modularExponentiation(x, 2, number); - if (x == number - 1) // x^2 mod n=n-1 - return true; - } - - return false; -} - -bool millerRabinPrimalityTestUSM(sycl::queue &q, const BigInt64 &number, - size_t k) -{ - if (number == 2 || number == 3) - return true; - - if (number <= 1 || number.isEven()) - return false; - - // Write n-1 as 2^s * d where d is odd - BigInt64 s = 0; - BigInt64 d = number - 1; - while (d.isEven()) { - d >>= 1; - s++; - } - - sycl::range<1> kRange{k}; - int sumResult = 0; - sycl::buffer sumBuf{&sumResult, 1}; - - BigInt64 *randomsShared = sycl::malloc_shared(k, q); - BigInt64 *dShared = sycl::malloc_shared(k, q); - BigInt64 *numberShared = sycl::malloc_shared(k, q); - BigInt64 *sShared = sycl::malloc_shared(k, q); - - for (int i = 0; i < k; i++) { - randomsShared[i] = BigInt64(BigInt64::RANDOM, 2, number - 2); - dShared[i] = d; - numberShared[i] = number; - sShared[i] = s; - } - q.submit([&](sycl::handler &cgh) { - auto sumReduction = reduction(sumBuf, cgh, sycl::plus<>()); - - cgh.parallel_for(kRange, sumReduction, [=](sycl::id<1> idx, auto &sum) { - BigInt64 aIn = randomsShared[idx]; - BigInt64 dIn = dShared[idx]; - BigInt64 numberIn = numberShared[idx]; - BigInt64 sIn = sShared[idx]; - // pick randon integer a, such that 1 distr; - BigInt64 a(2, number - 2, distr, engine); - // check if n is divisible by a - if (gcd(number, a) != 1) - return false; - - BigInt64 modExpo = modularExponentiation(a, number - 1, number); - // Fermat's little theorem- a^(prime-1)%prime ==1, else-> its not prime - if (modExpo != 1) - return false; - - return true; -} - -bool fermatPrimalityTest(sycl::queue &q, const BigInt64 &number, size_t k) -{ - if (number == 2 || number == 3) - return true; - - if (number <= 1 || number.isEven()) - return false; - - if (isDivisibleBySmallPrimes(number)) - return false; - - while (k-- > 0) { - // assume n is a prime number - // pick randon integer a, such that 1 its not prime - if (modExpo != 1) - return false; - } - - return true; -} - -bool nextPrimeChunk(BigInt64 &number, const BigInt64 &max, std::uint32_t seed) -{ - if (number < 2) - return 2; - - if (number.isEven()) - number++; - - while (!fermatPrimalityTestInKernel(number, seed)) { - number += 2; - if (number > max) - return false; - } - // candidate passed fermats test - return true; -} - -BigInt64 nextPrimeSequential(const BigInt64 &number, size_t k) -{ - if (number < 2) - return 2; - - BigInt64 res = number; - if (res.isEven()) - res++; - sycl::queue q; - do { - while (!fermatPrimalityTest(q, res, 1)) { - res += 2; - } - // candidate passed fermats test - } while (!millerRabinPrimalityTestUSM(q, res, k)); - return res; -} - -BigInt64 nextPrimeDivideToChunks(const BigInt64 &number, size_t k) -{ - logger rsaLogger("RSA encryption"); - rsaLogger.logMessage( - logger::LogLevel::DEBUG, - "RSA next prime: finding next prime after random number " + - number.toString()); - size_t numChunks; - size_t chunkSize; - size_t bits = number.bitsCount(); - if (bits <= 513) { // 500 - numChunks = 10; - chunkSize = 50; - } - else { // 1000 - numChunks = 10; - chunkSize = 100; - } - sycl::queue q; - BigInt64 *numberShared = sycl::malloc_shared(numChunks, q); - BigInt64 *maxShared = sycl::malloc_shared(numChunks, q); - bool *resultsShared = sycl::malloc_shared(numChunks, q); - BigInt64 currentStart = number; - while (true) { - for (int i = 0; i < numChunks; i++) { - resultsShared[i] = false; - numberShared[i] = currentStart + i * chunkSize; - maxShared[i] = currentStart + (i + 1) * chunkSize - 1; - } - - currentStart += chunkSize * numChunks; - int sumResult = 0; - sycl::buffer sumBuff{&sumResult, 1}; - - q.submit([&](sycl::handler &cgh) { - auto sumReduction = reduction(sumBuff, cgh, sycl::plus<>()); - cgh.parallel_for(sycl::range<1>{numChunks}, sumReduction, - [=](sycl::id<1> idx, auto &sum) { - resultsShared[idx] = - nextPrimeChunk(numberShared[idx], - maxShared[idx], idx.get(0)); - sum += resultsShared[idx]; - }); - }); - q.wait(); - for (int i = 0; i < numChunks; i++) { - if (resultsShared[i] == true) { - BigInt64 candidate = numberShared[i]; - bool passed = millerRabinPrimalityTestUSM(q, candidate, k); - if (passed) { - sycl::free(numberShared, q); - sycl::free(maxShared, q); - sycl::free(resultsShared, q); - rsaLogger.logMessage(logger::LogLevel::DEBUG, - "RSA next prime: found prime number " + - candidate.toString() + "\nat gap " + - (candidate - number).toString()); - return candidate; - } - } - } - - rsaLogger.logMessage(logger::LogLevel::DEBUG, - "RSA next prime: didnt find primes in range of " + - (currentStart - number).toString() + - " numbers, continue searching..."); - } -} - -#else -#include -#include -#include - -bool millerRabinPrimalityTestRound(const BigInt64 &number, const BigInt64 &d, - const BigInt64 &s, std::atomic &passed) -{ - BigInt64 a(BigInt64::CreateModes::RANDOM, 2, number - 2); - BigInt64 x = modularExponentiation(a, d, number); - if (x == 1 || x == number - 1) - return true; - - for (BigInt64 i = 0; passed.load() == true && i < s - 1; i++) { - x = modularExponentiation(x, 2, number); - if (x == number - 1) // x^2 mod n=n-1 - return true; - } - - return false; -} - -void parallelRound(const BigInt64 &number, const BigInt64 &d, const BigInt64 &s, - std::atomic &passed) -{ - if (!passed.load()) - return; - - bool res = millerRabinPrimalityTestRound(number, d, s, passed); - if (!res && passed.exchange(false)) - return; -} - -bool millerRabinPrimalityTestThreads(const BigInt64 &number, size_t k) -{ - if (number == 2 || number == 3) - return true; - - if (number <= 1 || number.isEven()) - return false; - - // Write n-1 as 2^s * d where d is odd - BigInt64 s = 0; - BigInt64 d = number - 1; - while (d.isEven()) { - d >>= 1; - s++; - } - - std::atomic passed(true); - std::vector threads; - for (int i = 0; i < k; i++) { - threads.emplace_back(parallelRound, std::ref(number), std::ref(d), - std::ref(s), std::ref(passed)); - } - - for (auto &t : threads) - t.join(); - return passed.load(); -} - -bool nextPrimeChunk(BigInt64 &number, const BigInt64 &end, - std::atomic &found) -{ - if (found.load()) - return false; - - if (number < 2) - return 2; - - if (number.isEven()) - number++; - while (!fermatPrimalityTest(number, 1)) { - number += 2; - if (found.load() || number > end) - return false; - } - - if (!found.exchange(true)) - return true; - - return true; -} - -BigInt64 nextPrimeDivideToChunks(const BigInt64 &number, size_t k) -{ - logger rsaLogger("RSA encryption"); - rsaLogger.logMessage( - logger::LogLevel::DEBUG, - "RSA next prime: finding next prime after random number " + - number.toString()); - size_t numChunks; - size_t chunkSize; - size_t bits = number.bitsCount(); - if (bits <= 513) { // 500 - numChunks = 10; - chunkSize = 50; - } - else { // 1000 - numChunks = 10; - chunkSize = 100; - } - - std::vector numbers(numChunks); - std::vector ends(numChunks); - BigInt64 currentStart = number; - std::vector > futures; - std::atomic found(false); - while (true) { - for (int i = 0; i < numChunks; i++) { - numbers[i] = currentStart + i * chunkSize; - ends[i] = currentStart + (i + 1) * chunkSize - 1; - futures.push_back(std::async(std::launch::async, nextPrimeChunk, - std::ref(numbers[i]), - std::ref(ends[i]), std::ref(found))); - } - - currentStart += numChunks * chunkSize; - for (int i = 0; i < numChunks; i++) - if (futures[i].get() && - millerRabinPrimalityTestThreads(numbers[i], k)) { - rsaLogger.logMessage(logger::LogLevel::DEBUG, - "RSA next prime: found prime number " + - numbers[i].toString() + "\nat gap " + - (numbers[i] - number).toString()); - return numbers[i]; - } - - rsaLogger.logMessage(logger::LogLevel::DEBUG, - "RSA next prime: didnt find primes in range of " + - (currentStart - number).toString() + - " numbers, continue searching..."); - futures.clear(); - } -} - -BigInt64 nextPrimeSequential(const BigInt64 &number, size_t k) -{ - if (number < 2) - return 2; - - BigInt64 res = number; - if (res.isEven()) - res++; - do { - while (!fermatPrimalityTest(res, 1)) { - res += 2; - } - - // candidate passed fermats test - } while (!millerRabinPrimalityTestThreads(res, k)); - return res; -} - -#endif \ No newline at end of file +// #include +// #include "../include/big_int_utils.h" +// #include "../include/prime_tests.h" +// #include "logger.h" +// using namespace std; + +// constexpr size_t smallPrimesSize = 2000; +// constexpr int smallPrimes[2000] = { +// 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, +// 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, +// 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, +// 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, +// 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, +// 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, +// 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, +// 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, +// 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, +// 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, +// 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, +// 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, +// 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, +// 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, +// 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, +// 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, +// 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, +// 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, +// 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, +// 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, +// 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, +// 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, +// 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, +// 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, +// 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, +// 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, +// 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, +// 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, +// 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, +// 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, +// 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, +// 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, +// 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, +// 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, +// 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, +// 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, +// 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, +// 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, +// 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, +// 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, +// 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, +// 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, +// 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, +// 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, +// 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, +// 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, +// 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, +// 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, +// 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, +// 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, +// 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, +// 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, +// 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, +// 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, +// 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, +// 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, +// 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, +// 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, +// 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, +// 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, +// 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, +// 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, +// 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, +// 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, +// 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, +// 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, +// 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, +// 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, +// 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, +// 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, +// 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, +// 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, +// 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, +// 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, +// 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, +// 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, +// 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, +// 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, +// 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, +// 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, +// 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, +// 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, +// 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, +// 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, +// 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, +// 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, +// 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, +// 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, +// 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, +// 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, +// 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, +// 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, +// 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, +// 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, +// 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, +// 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, +// 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, +// 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, +// 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, +// 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, +// 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, +// 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, +// 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, +// 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, +// 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, +// 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, +// 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, +// 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, +// 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, +// 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, +// 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, +// 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, +// 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, +// 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, +// 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, +// 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, +// 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, +// 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, +// 10651, 10657, 10663, 10667, 10687, 10691, 10709, 10711, 10723, 10729, 10733, +// 10739, 10753, 10771, 10781, 10789, 10799, 10831, 10837, 10847, 10853, 10859, +// 10861, 10867, 10883, 10889, 10891, 10903, 10909, 10937, 10939, 10949, 10957, +// 10973, 10979, 10987, 10993, 11003, 11027, 11047, 11057, 11059, 11069, 11071, +// 11083, 11087, 11093, 11113, 11117, 11119, 11131, 11149, 11159, 11161, 11171, +// 11173, 11177, 11197, 11213, 11239, 11243, 11251, 11257, 11261, 11273, 11279, +// 11287, 11299, 11311, 11317, 11321, 11329, 11351, 11353, 11369, 11383, 11393, +// 11399, 11411, 11423, 11437, 11443, 11447, 11467, 11471, 11483, 11489, 11491, +// 11497, 11503, 11519, 11527, 11549, 11551, 11579, 11587, 11593, 11597, 11617, +// 11621, 11633, 11657, 11677, 11681, 11689, 11699, 11701, 11717, 11719, 11731, +// 11743, 11777, 11779, 11783, 11789, 11801, 11807, 11813, 11821, 11827, 11831, +// 11833, 11839, 11863, 11867, 11887, 11897, 11903, 11909, 11923, 11927, 11933, +// 11939, 11941, 11953, 11959, 11969, 11971, 11981, 11987, 12007, 12011, 12037, +// 12041, 12043, 12049, 12071, 12073, 12097, 12101, 12107, 12109, 12113, 12119, +// 12143, 12149, 12157, 12161, 12163, 12197, 12203, 12211, 12227, 12239, 12241, +// 12251, 12253, 12263, 12269, 12277, 12281, 12289, 12301, 12323, 12329, 12343, +// 12347, 12373, 12377, 12379, 12391, 12401, 12409, 12413, 12421, 12433, 12437, +// 12451, 12457, 12473, 12479, 12487, 12491, 12497, 12503, 12511, 12517, 12527, +// 12539, 12541, 12547, 12553, 12569, 12577, 12583, 12589, 12601, 12611, 12613, +// 12619, 12637, 12641, 12647, 12653, 12659, 12671, 12689, 12697, 12703, 12713, +// 12721, 12739, 12743, 12757, 12763, 12781, 12791, 12799, 12809, 12821, 12823, +// 12829, 12841, 12853, 12889, 12893, 12899, 12907, 12911, 12917, 12919, 12923, +// 12941, 12953, 12959, 12967, 12973, 12979, 12983, 13001, 13003, 13007, 13009, +// 13033, 13037, 13043, 13049, 13063, 13093, 13099, 13103, 13109, 13121, 13127, +// 13147, 13151, 13159, 13163, 13171, 13177, 13183, 13187, 13217, 13219, 13229, +// 13241, 13249, 13259, 13267, 13291, 13297, 13309, 13313, 13327, 13331, 13337, +// 13339, 13367, 13381, 13397, 13399, 13411, 13417, 13421, 13441, 13451, 13457, +// 13463, 13469, 13477, 13487, 13499, 13513, 13523, 13537, 13553, 13567, 13577, +// 13591, 13597, 13613, 13619, 13627, 13633, 13649, 13669, 13679, 13681, 13687, +// 13691, 13693, 13697, 13709, 13711, 13721, 13723, 13729, 13751, 13757, 13759, +// 13763, 13781, 13789, 13799, 13807, 13829, 13831, 13841, 13859, 13873, 13877, +// 13879, 13883, 13901, 13903, 13907, 13913, 13921, 13931, 13933, 13963, 13967, +// 13997, 13999, 14009, 14011, 14029, 14033, 14051, 14057, 14071, 14081, 14083, +// 14087, 14107, 14143, 14149, 14153, 14159, 14173, 14177, 14197, 14207, 14221, +// 14243, 14249, 14251, 14281, 14293, 14303, 14321, 14323, 14327, 14341, 14347, +// 14369, 14387, 14389, 14401, 14407, 14411, 14419, 14423, 14431, 14437, 14447, +// 14449, 14461, 14479, 14489, 14503, 14519, 14533, 14537, 14543, 14549, 14551, +// 14557, 14561, 14563, 14591, 14593, 14621, 14627, 14629, 14633, 14639, 14653, +// 14657, 14669, 14683, 14699, 14713, 14717, 14723, 14731, 14737, 14741, 14747, +// 14753, 14759, 14767, 14771, 14779, 14783, 14797, 14813, 14821, 14827, 14831, +// 14843, 14851, 14867, 14869, 14879, 14887, 14891, 14897, 14923, 14929, 14939, +// 14947, 14951, 14957, 14969, 14983, 15013, 15017, 15031, 15053, 15061, 15073, +// 15077, 15083, 15091, 15101, 15107, 15121, 15131, 15137, 15139, 15149, 15161, +// 15173, 15187, 15193, 15199, 15217, 15227, 15233, 15241, 15259, 15263, 15269, +// 15271, 15277, 15287, 15289, 15299, 15307, 15313, 15319, 15329, 15331, 15349, +// 15359, 15361, 15373, 15377, 15383, 15391, 15401, 15413, 15427, 15439, 15443, +// 15451, 15461, 15467, 15473, 15493, 15497, 15511, 15527, 15541, 15551, 15559, +// 15569, 15581, 15583, 15601, 15607, 15619, 15629, 15641, 15643, 15647, 15649, +// 15661, 15667, 15671, 15679, 15683, 15727, 15731, 15733, 15737, 15739, 15749, +// 15761, 15767, 15773, 15787, 15791, 15797, 15803, 15809, 15817, 15823, 15859, +// 15877, 15881, 15887, 15889, 15901, 15907, 15913, 15919, 15923, 15937, 15959, +// 15971, 15973, 15991, 16001, 16007, 16033, 16057, 16061, 16063, 16067, 16069, +// 16073, 16087, 16091, 16097, 16103, 16111, 16127, 16139, 16141, 16183, 16187, +// 16189, 16193, 16217, 16223, 16229, 16231, 16249, 16253, 16267, 16273, 16301, +// 16319, 16333, 16339, 16349, 16361, 16363, 16369, 16381, 16411, 16417, 16421, +// 16427, 16433, 16447, 16451, 16453, 16477, 16481, 16487, 16493, 16519, 16529, +// 16547, 16553, 16561, 16567, 16573, 16603, 16607, 16619, 16631, 16633, 16649, +// 16651, 16657, 16661, 16673, 16691, 16693, 16699, 16703, 16729, 16741, 16747, +// 16759, 16763, 16787, 16811, 16823, 16829, 16831, 16843, 16871, 16879, 16883, +// 16889, 16901, 16903, 16921, 16927, 16931, 16937, 16943, 16963, 16979, 16981, +// 16987, 16993, 17011, 17021, 17027, 17029, 17033, 17041, 17047, 17053, 17077, +// 17093, 17099, 17107, 17117, 17123, 17137, 17159, 17167, 17183, 17189, 17191, +// 17203, 17207, 17209, 17231, 17239, 17257, 17291, 17293, 17299, 17317, 17321, +// 17327, 17333, 17341, 17351, 17359, 17377, 17383, 17387, 17389}; + +// bool isDivisibleBySmallPrimes(const BigInt64 &n) +// { +// for (int i = 0; i < smallPrimesSize && n > smallPrimes[i]; i++) +// if (n % smallPrimes[i] == 0) +// return true; + +// return false; +// } + +// bool fermatPrimalityTest(const BigInt64 &number, size_t k) +// { +// if (number == 2 || number == 3) +// return true; + +// if (number <= 1 || number.isEven()) +// return false; + +// if (isDivisibleBySmallPrimes(number)) +// return false; + +// while (k-- > 0) { +// // assume n is a prime number +// // pick randon integer a, such that 1 its not prime +// if (modExpo != 1) +// return false; +// } + +// return true; +// } + +// bool millerRabinPrimalityTest(const BigInt64 &number, size_t k) +// { +// if (number == 2 || number == 3) +// return true; + +// if (number <= 1 || number.isEven()) +// return false; + +// // Write n-1 as 2^s * d where d is odd +// BigInt64 s = 0; +// BigInt64 d = number - 1; +// while (d.isEven()) { +// d >>= 1; +// s++; +// } +// while (k-- > 0) { +// // pick randon integer a, such that 1 +// bool isDivisibleBySmallPrimesBuffers(sycl::queue &q, const BigInt64 &n) +// { +// const std::vector nVec(smallPrimesSize, n); +// int sumResult = 0; +// sycl::range<1> sizeRange{smallPrimesSize}; +// sycl::buffer sumBuff{&sumResult, 1}; +// sycl::buffer primesBuff{smallPrimes, sizeRange}; +// sycl::buffer nBuff{nVec.data(), sizeRange}; + +// q.submit([&](sycl::handler &h) { +// auto sumResult = sycl::reduction(sumBuff, h, sycl::plus<>()); +// sycl::accessor primesAcc(primesBuff, h, sycl::read_only); +// sycl::accessor nAcc(nBuff, h, sycl::read_only); + +// h.parallel_for(sizeRange, sumResult, [=](sycl::id<1> idx, auto &sum) { +// if (nAcc[idx] % primesAcc[idx] == 0 && nAcc[idx] != primesAcc[idx]) +// sum += true; +// sum += false; +// }); +// }); +// q.wait(); +// return sumResult > 0; +// } + +// bool isDivisibleBySmallPrimesUSM(sycl::queue &q, const BigInt64 &n) +// { +// const std::vector nVec(smallPrimesSize, n); +// int sumResult = 0; +// sycl::range<1> sizeRange{smallPrimesSize}; +// sycl::buffer sumBuff{&sumResult, 1}; + +// int *primesShared = sycl::malloc_shared(smallPrimesSize, q); +// BigInt64 *nShared = sycl::malloc_shared(smallPrimesSize, q); +// for (int i = 0; i < smallPrimesSize; i++) { +// primesShared[i] = smallPrimes[i]; +// nShared[i] = nVec[i]; +// } + +// q.submit([&](sycl::handler &h) { +// auto sumResult = sycl::reduction(sumBuff, h, sycl::plus<>()); + +// h.parallel_for(sizeRange, sumResult, [=](sycl::id<1> idx, auto &sum) { +// if (nShared[idx] % primesShared[idx] == 0 && +// nShared[idx] != primesShared[idx]) +// sum += true; +// sum += false; +// }); +// }); +// q.wait(); +// sycl::free(primesShared, q); +// sycl::free(nShared, q); +// return sumResult > 0; +// } + +// bool millerRabinPrimalityTestBuffers(sycl::queue &q, const BigInt64 &number, +// size_t k) +// { +// if (number == 2 || number == 3) +// return true; + +// if (number <= 1 || number.isEven()) +// return false; + +// // Write n-1 as 2^s * d where d is odd +// BigInt64 s = 0; +// BigInt64 d = number - 1; +// while (d.isEven()) { +// d >>= 1; +// s++; +// } +// vector randoms(k, BigInt64(BigInt64::RANDOM, 2, number - 2)); +// vector dVec(k, d); +// vector numberVec(k, number); +// vector sVec(k, s); + +// sycl::range<1> kRange{k}; +// int sumResult = 0; +// sycl::buffer sumBuf{&sumResult, 1}; +// sycl::buffer randomsBuff{randoms.data(), kRange}; +// sycl::buffer dBuff{dVec.data(), kRange}; +// sycl::buffer numberBuff{numberVec.data(), kRange}; +// sycl::buffer sBuff{sVec.data(), kRange}; + +// q.submit([&](sycl::handler &cgh) { +// auto sumReduction = reduction(sumBuf, cgh, sycl::plus<>()); +// sycl::accessor randomsAcc(randomsBuff, cgh, +// sycl::read_write); +// sycl::accessor dAcc(dBuff, cgh, sycl::read_write); +// sycl::accessor numberAcc(numberBuff, cgh, +// sycl::read_write); +// sycl::accessor sAcc(sBuff, cgh, sycl::read_write); + +// cgh.parallel_for(kRange, sumReduction, [=](sycl::id<1> idx, auto &sum) { +// BigInt64 aIn = randomsAcc[idx]; +// BigInt64 dIn = dAcc[idx]; +// BigInt64 numberIn = numberAcc[idx]; +// BigInt64 sIn = sAcc[idx]; +// // pick randon integer a, such that 1>= 1; +// s++; +// } + +// std::uint64_t offset = number.getLsb(); +// oneapi::dpl::minstd_rand engine(seed, offset); +// oneapi::dpl::uniform_real_distribution distr; +// BigInt64 a(2, number - 2, distr, engine); + +// BigInt64 x = modularExponentiation(a, d, number); +// if (x == 1 || x == number - 1) +// return true; + +// for (BigInt64 i = 0; i < s - 1; i++) { +// x = modularExponentiation(x, 2, number); +// if (x == number - 1) // x^2 mod n=n-1 +// return true; +// } + +// return false; +// } + +// bool millerRabinPrimalityTestUSM(sycl::queue &q, const BigInt64 &number, +// size_t k) +// { +// if (number == 2 || number == 3) +// return true; + +// if (number <= 1 || number.isEven()) +// return false; + +// // Write n-1 as 2^s * d where d is odd +// BigInt64 s = 0; +// BigInt64 d = number - 1; +// while (d.isEven()) { +// d >>= 1; +// s++; +// } + +// sycl::range<1> kRange{k}; +// int sumResult = 0; +// sycl::buffer sumBuf{&sumResult, 1}; + +// BigInt64 *randomsShared = sycl::malloc_shared(k, q); +// BigInt64 *dShared = sycl::malloc_shared(k, q); +// BigInt64 *numberShared = sycl::malloc_shared(k, q); +// BigInt64 *sShared = sycl::malloc_shared(k, q); + +// for (int i = 0; i < k; i++) { +// randomsShared[i] = BigInt64(BigInt64::RANDOM, 2, number - 2); +// dShared[i] = d; +// numberShared[i] = number; +// sShared[i] = s; +// } +// q.submit([&](sycl::handler &cgh) { +// auto sumReduction = reduction(sumBuf, cgh, sycl::plus<>()); + +// cgh.parallel_for(kRange, sumReduction, [=](sycl::id<1> idx, auto &sum) { +// BigInt64 aIn = randomsShared[idx]; +// BigInt64 dIn = dShared[idx]; +// BigInt64 numberIn = numberShared[idx]; +// BigInt64 sIn = sShared[idx]; +// // pick randon integer a, such that 1 distr; +// BigInt64 a(2, number - 2, distr, engine); +// // check if n is divisible by a +// if (gcd(number, a) != 1) +// return false; + +// BigInt64 modExpo = modularExponentiation(a, number - 1, number); +// // Fermat's little theorem- a^(prime-1)%prime ==1, else-> its not prime +// if (modExpo != 1) +// return false; + +// return true; +// } + +// bool fermatPrimalityTest(sycl::queue &q, const BigInt64 &number, size_t k) +// { +// if (number == 2 || number == 3) +// return true; + +// if (number <= 1 || number.isEven()) +// return false; + +// if (isDivisibleBySmallPrimes(number)) +// return false; + +// while (k-- > 0) { +// // assume n is a prime number +// // pick randon integer a, such that 1 its not prime +// if (modExpo != 1) +// return false; +// } + +// return true; +// } + +// bool nextPrimeChunk(BigInt64 &number, const BigInt64 &max, std::uint32_t seed) +// { +// if (number < 2) +// return 2; + +// if (number.isEven()) +// number++; + +// while (!fermatPrimalityTestInKernel(number, seed)) { +// number += 2; +// if (number > max) +// return false; +// } +// // candidate passed fermats test +// return true; +// } + +// BigInt64 nextPrimeSequential(const BigInt64 &number, size_t k) +// { +// if (number < 2) +// return 2; + +// BigInt64 res = number; +// if (res.isEven()) +// res++; +// sycl::queue q; +// do { +// while (!fermatPrimalityTest(q, res, 1)) { +// res += 2; +// } +// // candidate passed fermats test +// } while (!millerRabinPrimalityTestUSM(q, res, k)); +// return res; +// } + +// BigInt64 nextPrimeDivideToChunks(const BigInt64 &number, size_t k) +// { +// logger rsaLogger("RSA encryption"); +// rsaLogger.logMessage( +// logger::LogLevel::DEBUG, +// "RSA next prime: finding next prime after random number " + +// number.toString()); +// size_t numChunks; +// size_t chunkSize; +// size_t bits = number.bitsCount(); +// if (bits <= 513) { // 500 +// numChunks = 10; +// chunkSize = 50; +// } +// else { // 1000 +// numChunks = 10; +// chunkSize = 100; +// } +// sycl::queue q; +// BigInt64 *numberShared = sycl::malloc_shared(numChunks, q); +// BigInt64 *maxShared = sycl::malloc_shared(numChunks, q); +// bool *resultsShared = sycl::malloc_shared(numChunks, q); +// BigInt64 currentStart = number; +// while (true) { +// for (int i = 0; i < numChunks; i++) { +// resultsShared[i] = false; +// numberShared[i] = currentStart + i * chunkSize; +// maxShared[i] = currentStart + (i + 1) * chunkSize - 1; +// } + +// currentStart += chunkSize * numChunks; +// int sumResult = 0; +// sycl::buffer sumBuff{&sumResult, 1}; + +// q.submit([&](sycl::handler &cgh) { +// auto sumReduction = reduction(sumBuff, cgh, sycl::plus<>()); +// cgh.parallel_for(sycl::range<1>{numChunks}, sumReduction, +// [=](sycl::id<1> idx, auto &sum) { +// resultsShared[idx] = +// nextPrimeChunk(numberShared[idx], +// maxShared[idx], idx.get(0)); +// sum += resultsShared[idx]; +// }); +// }); +// q.wait(); +// for (int i = 0; i < numChunks; i++) { +// if (resultsShared[i] == true) { +// BigInt64 candidate = numberShared[i]; +// bool passed = millerRabinPrimalityTestUSM(q, candidate, k); +// if (passed) { +// sycl::free(numberShared, q); +// sycl::free(maxShared, q); +// sycl::free(resultsShared, q); +// rsaLogger.logMessage(logger::LogLevel::DEBUG, +// "RSA next prime: found prime number " + +// candidate.toString() + "\nat gap " + +// (candidate - number).toString()); +// return candidate; +// } +// } +// } + +// rsaLogger.logMessage(logger::LogLevel::DEBUG, +// "RSA next prime: didnt find primes in range of " + +// (currentStart - number).toString() + +// " numbers, continue searching..."); +// } +// } + +// #else +// #include +// #include +// #include + +// bool millerRabinPrimalityTestRound(const BigInt64 &number, const BigInt64 &d, +// const BigInt64 &s, std::atomic &passed) +// { +// BigInt64 a(BigInt64::CreateModes::RANDOM, 2, number - 2); +// BigInt64 x = modularExponentiation(a, d, number); +// if (x == 1 || x == number - 1) +// return true; + +// for (BigInt64 i = 0; passed.load() == true && i < s - 1; i++) { +// x = modularExponentiation(x, 2, number); +// if (x == number - 1) // x^2 mod n=n-1 +// return true; +// } + +// return false; +// } + +// void parallelRound(const BigInt64 &number, const BigInt64 &d, const BigInt64 &s, +// std::atomic &passed) +// { +// if (!passed.load()) +// return; + +// bool res = millerRabinPrimalityTestRound(number, d, s, passed); +// if (!res && passed.exchange(false)) +// return; +// } + +// bool millerRabinPrimalityTestThreads(const BigInt64 &number, size_t k) +// { +// if (number == 2 || number == 3) +// return true; + +// if (number <= 1 || number.isEven()) +// return false; + +// // Write n-1 as 2^s * d where d is odd +// BigInt64 s = 0; +// BigInt64 d = number - 1; +// while (d.isEven()) { +// d >>= 1; +// s++; +// } + +// std::atomic passed(true); +// std::vector threads; +// for (int i = 0; i < k; i++) { +// threads.emplace_back(parallelRound, std::ref(number), std::ref(d), +// std::ref(s), std::ref(passed)); +// } + +// for (auto &t : threads) +// t.join(); +// return passed.load(); +// } + +// bool nextPrimeChunk(BigInt64 &number, const BigInt64 &end, +// std::atomic &found) +// { +// if (found.load()) +// return false; + +// if (number < 2) +// return 2; + +// if (number.isEven()) +// number++; +// while (!fermatPrimalityTest(number, 1)) { +// number += 2; +// if (found.load() || number > end) +// return false; +// } + +// if (!found.exchange(true)) +// return true; + +// return true; +// } + +// BigInt64 nextPrimeDivideToChunks(const BigInt64 &number, size_t k) +// { +// logger rsaLogger("RSA encryption"); +// rsaLogger.logMessage( +// logger::LogLevel::DEBUG, +// "RSA next prime: finding next prime after random number " + +// number.toString()); +// size_t numChunks; +// size_t chunkSize; +// size_t bits = number.bitsCount(); +// if (bits <= 513) { // 500 +// numChunks = 10; +// chunkSize = 50; +// } +// else { // 1000 +// numChunks = 10; +// chunkSize = 100; +// } + +// std::vector numbers(numChunks); +// std::vector ends(numChunks); +// BigInt64 currentStart = number; +// std::vector > futures; +// std::atomic found(false); +// while (true) { +// for (int i = 0; i < numChunks; i++) { +// numbers[i] = currentStart + i * chunkSize; +// ends[i] = currentStart + (i + 1) * chunkSize - 1; +// futures.push_back(std::async(std::launch::async, nextPrimeChunk, +// std::ref(numbers[i]), +// std::ref(ends[i]), std::ref(found))); +// } + +// currentStart += numChunks * chunkSize; +// for (int i = 0; i < numChunks; i++) +// if (futures[i].get() && +// millerRabinPrimalityTestThreads(numbers[i], k)) { +// rsaLogger.logMessage(logger::LogLevel::DEBUG, +// "RSA next prime: found prime number " + +// numbers[i].toString() + "\nat gap " + +// (numbers[i] - number).toString()); +// return numbers[i]; +// } + +// rsaLogger.logMessage(logger::LogLevel::DEBUG, +// "RSA next prime: didnt find primes in range of " + +// (currentStart - number).toString() + +// " numbers, continue searching..."); +// futures.clear(); +// } +// } + +// BigInt64 nextPrimeSequential(const BigInt64 &number, size_t k) +// { +// if (number < 2) +// return 2; + +// BigInt64 res = number; +// if (res.isEven()) +// res++; +// do { +// while (!fermatPrimalityTest(res, 1)) { +// res += 2; +// } + +// // candidate passed fermats test +// } while (!millerRabinPrimalityTestThreads(res, k)); +// return res; +// } + +// #endif \ No newline at end of file diff --git a/src/rsa.cpp b/src/rsa.cpp index a865ef70..0244bc35 100644 --- a/src/rsa.cpp +++ b/src/rsa.cpp @@ -1,364 +1,364 @@ -#include -#include -#include -#include -#include "rsa.h" -#include "logger.h" -#include "prime_tests.h" -using namespace std; -constexpr int PADDING_MIN_LEN = 11; -constexpr int PRIME_TEST_ROUNDS = 40; -constexpr int DEFAULT_E = 65537; -constexpr int FALLBACK_E = 17; - -bool allowedKeySizes(size_t keySize) -{ - return keySize == 1024 || keySize == 2048 || keySize == 4096; -} - -void rsaGeneratePrime(size_t bits, BigInt64 &prime) -{ - BigInt64 random = BigInt64(BigInt64::CreateModes::RANDOM, bits); - prime = nextPrimeDivideToChunks(random, PRIME_TEST_ROUNDS); -} - -void rsaKeysGeneration(const BigInt64 &p, const BigInt64 &q, size_t keySize, - BigInt64 &e, BigInt64 &d) -{ - BigInt64 phi; - BigInt64 gcdVal; - // phi(n) = (p-1) * (q-1) - BigInt64 pMinus1 = p - 1; - BigInt64 qMinus1 = q - 1; - phi = pMinus1 * qMinus1; - // Choose e such that 1 < e < phi and gcd(e, phi) = 1 (coprime) - // A common choice for e is 65537 - e = DEFAULT_E; - gcdVal = gcd(e, phi); - while (gcdVal != 1) { - e += 2; - if (e > phi) - e = FALLBACK_E; - } - - // d is the modular inverse of e modulo ϕ(n) or e^-1 mod phi - // 0 dis(1, 255); - // Start with 0x00 0x02 - padded[0] = 0x00; - padded[1] = 0x02; - - // Add non-zero random padding - for (size_t i = 2; i < paddingLen + 2; i++) { - padded[i] = static_cast(dis(gen)); - } - - // Add 0x00 separator - padded[paddingLen + 2] = 0x00; - std::memcpy(padded + paddingLen + 3, plaintext, plaintextLen); -} - -void rsaPkcs1v15Unpad(const uint8_t *padded, size_t paddedLen, - uint8_t *plaintext, size_t *plaintextLen) -{ - if (paddedLen < PADDING_MIN_LEN || padded[0] != 0x00 || padded[1] != 0x02) - throw std::runtime_error("Invalid padding"); - - // Find 0x00 separator - size_t i = 2; - while (i < paddedLen && padded[i] != 0x00) - ++i; - if (i == paddedLen) - throw std::runtime_error("Invalid padding: No separator found"); - - *plaintextLen = paddedLen - i - 1; - std::memcpy(plaintext, padded + i + 1, *plaintextLen); -} - -/** - * @brief Encrypts data using RSA public or private key. - * @param plaintext Pointer to the plaintext data. - * @param plaintextLen The length of the plaintext in bytes. - * @param modulus Pointer to the modulus (n). - * @param modulusLen The length of the modulus in bytes. - * @param exponent Pointer to the exponent (either public or private). - * @param exponentLen The length of the exponent in bytes. - * @param ciphertext Pointer to the buffer where the encrypted data (ciphertext) will be stored. - * @param ciphertextLen The length of the ciphertext buffer. - * @param keySize The size of the RSA key in bits. - * @return CKR_OK on success, CKR_KEY_SIZE_RANGE if the key size is invalid, or CKR_BUFFER_TOO_SMALL if buffers are insufficient. - */ -CK_RV rsaEncrypt(const uint8_t *plaintext, size_t plaintextLen, - const uint8_t *key, size_t keyLen, uint8_t *ciphertext, - size_t ciphertextLen, size_t keySize) -{ - logger rsaLogger("RSA encryption"); - if (!allowedKeySizes(keySize)) { - rsaLogger.logMessage(logger::LogLevel::ERROR, - "RSA encryption: invalid key size"); - return CKR_KEY_SIZE_RANGE; - } - - if ((!(keyLen == rsaGetPublicKeyLen(keySize)) && - !(keyLen == rsaGetPrivateKeyLen(keySize)))) { - rsaLogger.logMessage(logger::LogLevel::ERROR, - "RSA encryption: buffer sizes are insufficient"); - return CKR_BUFFER_TOO_SMALL; - } - - size_t keySizeBytes = keySize / BITS_IN_BYTE; - if (plaintextLen > rsaGetPlainMaxLen(keySize)) { - rsaLogger.logMessage(logger::LogLevel::ERROR, - "RSA encryption: plaintext is too long"); - return CKR_DATA_TOO_LARGE; - } - - if (ciphertextLen != keySizeBytes) { - rsaLogger.logMessage(logger::LogLevel::ERROR, - "RSA encryption: ciphertext buffer is too small"); - return CKR_BUFFER_TOO_SMALL; - } - - rsaLogger.logMessage(logger::LogLevel::INFO, - "RSA encryption: executing..."); - size_t paddedLen = keySizeBytes; - // Padding plaintext to keySizeBytes - uint8_t *padded = new uint8_t[keySizeBytes]; - rsaPkcs1v15Pad(plaintext, plaintextLen, padded, keySizeBytes); - // Convert padded plaintext to BigInt64 - BigInt64 plainNumber(padded, paddedLen, - BigInt64::CreateModes::BIG_ENDIANESS); - BigInt64 modulus(key, rsaGetModulusLen(keySize), - BigInt64::CreateModes::BIG_ENDIANESS); - BigInt64 exponent(key + rsaGetModulusLen(keySize), - keyLen - rsaGetModulusLen(keySize), - BigInt64::CreateModes::BIG_ENDIANESS); - // Encrypt message: plain = plain^key % n - BigInt64 cipherNumber; - try { - cipherNumber = modularExponentiation(plainNumber, exponent, modulus); - } - catch (std::exception &e) { - rsaLogger.logMessage( - logger::LogLevel::ERROR, - "RSA encryption: error performing modular exponentiation " + - string(e.what())); - return CKR_DECRYPTED_DATA_INVALID; - } - - memset(ciphertext, 0, keySizeBytes); - cipherNumber.exportTo(ciphertext, ciphertextLen, - BigInt64::CreateModes::BIG_ENDIANESS); - delete[] padded; - return CKR_OK; -} - -/** - * @brief Decrypts data using RSA public or private key. - * @param ciphertext Pointer to the encrypted data (ciphertext). - * @param ciphertextLen The length of the ciphertext in bytes. - * @param modulus Pointer to the modulus (n). - * @param modulusLen The length of the modulus in bytes. - * @param exponent Pointer to the exponent (either public or private). - * @param exponentLen The length of the exponent in bytes. - * @param plaintext Pointer to the buffer where the decrypted data (plaintext) will be stored. - * @param plaintextLen Pointer to a variable that will store the length of the decrypted data. - * @param keySize The size of the RSA key in bits. - * @return CKR_OK on success, CKR_KEY_SIZE_RANGE if the key size is invalid, or CKR_BUFFER_TOO_SMALL if buffers are insufficient. - */ -CK_RV rsaDecrypt(const uint8_t *ciphertext, size_t ciphertextLen, - const uint8_t *key, size_t keyLen, uint8_t *plaintext, - size_t *plaintextLen, size_t keySize) -{ - logger rsaLogger("RSA encryption"); - if (!allowedKeySizes(keySize)) { - rsaLogger.logMessage(logger::LogLevel::ERROR, - "RSA decryption: invalid key size"); - return CKR_KEY_SIZE_RANGE; - } - - if ((!(keyLen == rsaGetPublicKeyLen(keySize)) && - !(keyLen == rsaGetPrivateKeyLen(keySize)))) { - rsaLogger.logMessage(logger::LogLevel::ERROR, - "RSA encryption: buffer sizes are insufficient"); - return CKR_BUFFER_TOO_SMALL; - } - - size_t keySizeBytes = keySize / BITS_IN_BYTE; - if (ciphertextLen != keySizeBytes) { - rsaLogger.logMessage(logger::LogLevel::ERROR, - "RSA decryption: ciphertext buffer is too small"); - return CKR_BUFFER_TOO_SMALL; - } - - rsaLogger.logMessage(logger::LogLevel::INFO, - "RSA decryption: executing..."); - // Convert ciphertext to BigInt64 - BigInt64 cipherNumber(ciphertext, ciphertextLen, - BigInt64::CreateModes::BIG_ENDIANESS); - BigInt64 modulus(key, rsaGetModulusLen(keySize), - BigInt64::CreateModes::BIG_ENDIANESS); - BigInt64 exponent(key + rsaGetModulusLen(keySize), - keyLen - rsaGetModulusLen(keySize), - BigInt64::CreateModes::BIG_ENDIANESS); - // Decrypt message: plain = cipher^key % n - BigInt64 plainNumber; - try { - plainNumber = modularExponentiation(cipherNumber, exponent, modulus); - } - catch (std::exception &e) { - rsaLogger.logMessage( - logger::LogLevel::ERROR, - "RSA decryption: error performing modular exponentiation " + - string(e.what())); - return CKR_ENCRYPTED_DATA_INVALID; - } - - uint8_t *padded = new uint8_t[keySizeBytes]; - size_t paddedLen = keySizeBytes; - plainNumber.exportTo(padded, paddedLen, - BigInt64::CreateModes::BIG_ENDIANESS); - // Remove padding - try { - rsaPkcs1v15Unpad(padded, paddedLen, plaintext, plaintextLen); - } - catch (std::exception &e) { - rsaLogger.logMessage( - logger::LogLevel::ERROR, - "RSA decryption: error unpadding plaintext " + string(e.what())); - delete[] padded; - return CKR_DECRYPTED_DATA_INVALID; - } - - delete[] padded; - return CKR_OK; -} - -size_t rsaGetEncryptedLen(size_t keySize) -{ - return keySize / BITS_IN_BYTE; -} - -/** - * @brief Gets the maximum length of plaintext that can be encrypted with a given RSA key size. - * @param keySize The size of the RSA key in bits. - * @return The maximum length of plaintext in bytes. - */ -size_t rsaGetPlainMaxLen(size_t keySize) -{ - return keySize / BITS_IN_BYTE - PADDING_MIN_LEN; -} - -/** - * @brief Gets the length of decrypted data for a given RSA key size. - * @param keySize The size of the RSA key in bits. - * @return The length of the decrypted data in bytes. - */ -size_t rsaGetDecryptedLen(size_t keySize) -{ - // Minimum padding length for PKCS#1 v1.5 is 11 bytes - // Remove the padding: The maximum length of the plaintext is keySize - - // minPaddingLength - return keySize / BITS_IN_BYTE - PADDING_MIN_LEN; -} - -/** - * @brief Gets the total length of the public key (including the modulus and public exponent) for RSA. - * @param keySize The size of the RSA key in bits. - * @return The length of the public key in bytes, which includes the modulus and the public exponent. - */ -size_t rsaGetPublicKeyLen(size_t keySize) -{ - return rsaGetModulusLen(keySize) + BYTES_IN_LIMB; -} - -/** - * @brief Gets the total length of the private key (including the modulus and private exponent) for RSA. - * @param keySize The size of the RSA key in bits. - * @return The length of the private key in bytes, which includes the modulus and the private exponent. - */ -size_t rsaGetPrivateKeyLen(size_t keySize) -{ - return rsaGetModulusLen(keySize) + keySize / BITS_IN_BYTE; -} \ No newline at end of file +// #include +// #include +// #include +// #include +// #include "rsa.h" +// #include "logger.h" +// #include "prime_tests.h" +// using namespace std; +// constexpr int PADDING_MIN_LEN = 11; +// constexpr int PRIME_TEST_ROUNDS = 40; +// constexpr int DEFAULT_E = 65537; +// constexpr int FALLBACK_E = 17; + +// bool allowedKeySizes(size_t keySize) +// { +// return keySize == 1024 || keySize == 2048 || keySize == 4096; +// } + +// void rsaGeneratePrime(size_t bits, BigInt64 &prime) +// { +// BigInt64 random = BigInt64(BigInt64::CreateModes::RANDOM, bits); +// prime = nextPrimeDivideToChunks(random, PRIME_TEST_ROUNDS); +// } + +// void rsaKeysGeneration(const BigInt64 &p, const BigInt64 &q, size_t keySize, +// BigInt64 &e, BigInt64 &d) +// { +// BigInt64 phi; +// BigInt64 gcdVal; +// // phi(n) = (p-1) * (q-1) +// BigInt64 pMinus1 = p - 1; +// BigInt64 qMinus1 = q - 1; +// phi = pMinus1 * qMinus1; +// // Choose e such that 1 < e < phi and gcd(e, phi) = 1 (coprime) +// // A common choice for e is 65537 +// e = DEFAULT_E; +// gcdVal = gcd(e, phi); +// while (gcdVal != 1) { +// e += 2; +// if (e > phi) +// e = FALLBACK_E; +// } + +// // d is the modular inverse of e modulo ϕ(n) or e^-1 mod phi +// // 0 dis(1, 255); +// // Start with 0x00 0x02 +// padded[0] = 0x00; +// padded[1] = 0x02; + +// // Add non-zero random padding +// for (size_t i = 2; i < paddingLen + 2; i++) { +// padded[i] = static_cast(dis(gen)); +// } + +// // Add 0x00 separator +// padded[paddingLen + 2] = 0x00; +// std::memcpy(padded + paddingLen + 3, plaintext, plaintextLen); +// } + +// void rsaPkcs1v15Unpad(const uint8_t *padded, size_t paddedLen, +// uint8_t *plaintext, size_t *plaintextLen) +// { +// if (paddedLen < PADDING_MIN_LEN || padded[0] != 0x00 || padded[1] != 0x02) +// throw std::runtime_error("Invalid padding"); + +// // Find 0x00 separator +// size_t i = 2; +// while (i < paddedLen && padded[i] != 0x00) +// ++i; +// if (i == paddedLen) +// throw std::runtime_error("Invalid padding: No separator found"); + +// *plaintextLen = paddedLen - i - 1; +// std::memcpy(plaintext, padded + i + 1, *plaintextLen); +// } + +// /** +// * @brief Encrypts data using RSA public or private key. +// * @param plaintext Pointer to the plaintext data. +// * @param plaintextLen The length of the plaintext in bytes. +// * @param modulus Pointer to the modulus (n). +// * @param modulusLen The length of the modulus in bytes. +// * @param exponent Pointer to the exponent (either public or private). +// * @param exponentLen The length of the exponent in bytes. +// * @param ciphertext Pointer to the buffer where the encrypted data (ciphertext) will be stored. +// * @param ciphertextLen The length of the ciphertext buffer. +// * @param keySize The size of the RSA key in bits. +// * @return CKR_OK on success, CKR_KEY_SIZE_RANGE if the key size is invalid, or CKR_BUFFER_TOO_SMALL if buffers are insufficient. +// */ +// CK_RV rsaEncrypt(const uint8_t *plaintext, size_t plaintextLen, +// const uint8_t *key, size_t keyLen, uint8_t *ciphertext, +// size_t ciphertextLen, size_t keySize) +// { +// logger rsaLogger("RSA encryption"); +// if (!allowedKeySizes(keySize)) { +// rsaLogger.logMessage(logger::LogLevel::ERROR, +// "RSA encryption: invalid key size"); +// return CKR_KEY_SIZE_RANGE; +// } + +// if ((!(keyLen == rsaGetPublicKeyLen(keySize)) && +// !(keyLen == rsaGetPrivateKeyLen(keySize)))) { +// rsaLogger.logMessage(logger::LogLevel::ERROR, +// "RSA encryption: buffer sizes are insufficient"); +// return CKR_BUFFER_TOO_SMALL; +// } + +// size_t keySizeBytes = keySize / BITS_IN_BYTE; +// if (plaintextLen > rsaGetPlainMaxLen(keySize)) { +// rsaLogger.logMessage(logger::LogLevel::ERROR, +// "RSA encryption: plaintext is too long"); +// return CKR_DATA_TOO_LARGE; +// } + +// if (ciphertextLen != keySizeBytes) { +// rsaLogger.logMessage(logger::LogLevel::ERROR, +// "RSA encryption: ciphertext buffer is too small"); +// return CKR_BUFFER_TOO_SMALL; +// } + +// rsaLogger.logMessage(logger::LogLevel::INFO, +// "RSA encryption: executing..."); +// size_t paddedLen = keySizeBytes; +// // Padding plaintext to keySizeBytes +// uint8_t *padded = new uint8_t[keySizeBytes]; +// rsaPkcs1v15Pad(plaintext, plaintextLen, padded, keySizeBytes); +// // Convert padded plaintext to BigInt64 +// BigInt64 plainNumber(padded, paddedLen, +// BigInt64::CreateModes::BIG_ENDIANESS); +// BigInt64 modulus(key, rsaGetModulusLen(keySize), +// BigInt64::CreateModes::BIG_ENDIANESS); +// BigInt64 exponent(key + rsaGetModulusLen(keySize), +// keyLen - rsaGetModulusLen(keySize), +// BigInt64::CreateModes::BIG_ENDIANESS); +// // Encrypt message: plain = plain^key % n +// BigInt64 cipherNumber; +// try { +// cipherNumber = modularExponentiation(plainNumber, exponent, modulus); +// } +// catch (std::exception &e) { +// rsaLogger.logMessage( +// logger::LogLevel::ERROR, +// "RSA encryption: error performing modular exponentiation " + +// string(e.what())); +// return CKR_DECRYPTED_DATA_INVALID; +// } + +// memset(ciphertext, 0, keySizeBytes); +// cipherNumber.exportTo(ciphertext, ciphertextLen, +// BigInt64::CreateModes::BIG_ENDIANESS); +// delete[] padded; +// return CKR_OK; +// } + +// /** +// * @brief Decrypts data using RSA public or private key. +// * @param ciphertext Pointer to the encrypted data (ciphertext). +// * @param ciphertextLen The length of the ciphertext in bytes. +// * @param modulus Pointer to the modulus (n). +// * @param modulusLen The length of the modulus in bytes. +// * @param exponent Pointer to the exponent (either public or private). +// * @param exponentLen The length of the exponent in bytes. +// * @param plaintext Pointer to the buffer where the decrypted data (plaintext) will be stored. +// * @param plaintextLen Pointer to a variable that will store the length of the decrypted data. +// * @param keySize The size of the RSA key in bits. +// * @return CKR_OK on success, CKR_KEY_SIZE_RANGE if the key size is invalid, or CKR_BUFFER_TOO_SMALL if buffers are insufficient. +// */ +// CK_RV rsaDecrypt(const uint8_t *ciphertext, size_t ciphertextLen, +// const uint8_t *key, size_t keyLen, uint8_t *plaintext, +// size_t *plaintextLen, size_t keySize) +// { +// logger rsaLogger("RSA encryption"); +// if (!allowedKeySizes(keySize)) { +// rsaLogger.logMessage(logger::LogLevel::ERROR, +// "RSA decryption: invalid key size"); +// return CKR_KEY_SIZE_RANGE; +// } + +// if ((!(keyLen == rsaGetPublicKeyLen(keySize)) && +// !(keyLen == rsaGetPrivateKeyLen(keySize)))) { +// rsaLogger.logMessage(logger::LogLevel::ERROR, +// "RSA encryption: buffer sizes are insufficient"); +// return CKR_BUFFER_TOO_SMALL; +// } + +// size_t keySizeBytes = keySize / BITS_IN_BYTE; +// if (ciphertextLen != keySizeBytes) { +// rsaLogger.logMessage(logger::LogLevel::ERROR, +// "RSA decryption: ciphertext buffer is too small"); +// return CKR_BUFFER_TOO_SMALL; +// } + +// rsaLogger.logMessage(logger::LogLevel::INFO, +// "RSA decryption: executing..."); +// // Convert ciphertext to BigInt64 +// BigInt64 cipherNumber(ciphertext, ciphertextLen, +// BigInt64::CreateModes::BIG_ENDIANESS); +// BigInt64 modulus(key, rsaGetModulusLen(keySize), +// BigInt64::CreateModes::BIG_ENDIANESS); +// BigInt64 exponent(key + rsaGetModulusLen(keySize), +// keyLen - rsaGetModulusLen(keySize), +// BigInt64::CreateModes::BIG_ENDIANESS); +// // Decrypt message: plain = cipher^key % n +// BigInt64 plainNumber; +// try { +// plainNumber = modularExponentiation(cipherNumber, exponent, modulus); +// } +// catch (std::exception &e) { +// rsaLogger.logMessage( +// logger::LogLevel::ERROR, +// "RSA decryption: error performing modular exponentiation " + +// string(e.what())); +// return CKR_ENCRYPTED_DATA_INVALID; +// } + +// uint8_t *padded = new uint8_t[keySizeBytes]; +// size_t paddedLen = keySizeBytes; +// plainNumber.exportTo(padded, paddedLen, +// BigInt64::CreateModes::BIG_ENDIANESS); +// // Remove padding +// try { +// rsaPkcs1v15Unpad(padded, paddedLen, plaintext, plaintextLen); +// } +// catch (std::exception &e) { +// rsaLogger.logMessage( +// logger::LogLevel::ERROR, +// "RSA decryption: error unpadding plaintext " + string(e.what())); +// delete[] padded; +// return CKR_DECRYPTED_DATA_INVALID; +// } + +// delete[] padded; +// return CKR_OK; +// } + +// size_t rsaGetEncryptedLen(size_t keySize) +// { +// return keySize / BITS_IN_BYTE; +// } + +// /** +// * @brief Gets the maximum length of plaintext that can be encrypted with a given RSA key size. +// * @param keySize The size of the RSA key in bits. +// * @return The maximum length of plaintext in bytes. +// */ +// size_t rsaGetPlainMaxLen(size_t keySize) +// { +// return keySize / BITS_IN_BYTE - PADDING_MIN_LEN; +// } + +// /** +// * @brief Gets the length of decrypted data for a given RSA key size. +// * @param keySize The size of the RSA key in bits. +// * @return The length of the decrypted data in bytes. +// */ +// size_t rsaGetDecryptedLen(size_t keySize) +// { +// // Minimum padding length for PKCS#1 v1.5 is 11 bytes +// // Remove the padding: The maximum length of the plaintext is keySize - +// // minPaddingLength +// return keySize / BITS_IN_BYTE - PADDING_MIN_LEN; +// } + +// /** +// * @brief Gets the total length of the public key (including the modulus and public exponent) for RSA. +// * @param keySize The size of the RSA key in bits. +// * @return The length of the public key in bytes, which includes the modulus and the public exponent. +// */ +// size_t rsaGetPublicKeyLen(size_t keySize) +// { +// return rsaGetModulusLen(keySize) + BYTES_IN_LIMB; +// } + +// /** +// * @brief Gets the total length of the private key (including the modulus and private exponent) for RSA. +// * @param keySize The size of the RSA key in bits. +// * @return The length of the private key in bytes, which includes the modulus and the private exponent. +// */ +// size_t rsaGetPrivateKeyLen(size_t keySize) +// { +// return rsaGetModulusLen(keySize) + keySize / BITS_IN_BYTE; +// } \ No newline at end of file diff --git a/tests/aes_tests.cpp b/tests/aes_tests.cpp index 7fdfdacb..f0a07960 100644 --- a/tests/aes_tests.cpp +++ b/tests/aes_tests.cpp @@ -3,47 +3,67 @@ #include "../include/aes.h" #include "../include/aes_stream_factory.h" // Assuming this is where your FactoryManager is defined -const unsigned int BLOCK_BYTES_LENGTH = 16 * sizeof(unsigned char); - /* Helper function to setup encryption and decryption */ void testEncryptionDecryption(AESChainingMode mode, AESKeyLength keyLength) { - unsigned char plain[BLOCK_BYTES_LENGTH] = { + unsigned char plain[BLOCK_BYTES_LEN] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; - unsigned char plain2[BLOCK_BYTES_LENGTH] = { + unsigned char plain2[BLOCK_BYTES_LEN] = { 0x00, 0x10, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x78, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; + unsigned char plain3[BLOCK_BYTES_LEN] = { + 0x00, 0x10, 0x21, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x78, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff + }; // Create a factory instance StreamAES* streamAES = FactoryManager::getInstance().create(mode); ASSERT_NE(streamAES, nullptr); - unsigned char* key = generateKey(keyLength); - unsigned char* encrypted = nullptr; - unsigned char* encrypted2 = nullptr; + unsigned char *key = new unsigned char[aesKeyLengthData[keyLength].keySize]; + generateKey(key, keyLength); + unsigned char* encrypted = new unsigned char[calculatEncryptedLenAES(BLOCK_BYTES_LEN, true)]; + unsigned char* encrypted2 = new unsigned char[calculatEncryptedLenAES(BLOCK_BYTES_LEN, false)]; + unsigned char* encrypted3 = new unsigned char[calculatEncryptedLenAES(BLOCK_BYTES_LEN, false)]; + unsigned int outLenEncrypted = 0; unsigned int outLenEncrypted2 = 0; - - streamAES->encryptStart(plain, BLOCK_BYTES_LENGTH, encrypted, outLenEncrypted, key, keyLength); - streamAES->encryptContinue(plain2, BLOCK_BYTES_LENGTH, encrypted2, outLenEncrypted2); - - unsigned char* decrypted = nullptr; - unsigned char* decrypted2 = nullptr; + unsigned int outLenEncrypted3 = 0; + + streamAES->encryptStart(plain, BLOCK_BYTES_LEN, encrypted, outLenEncrypted, key, keyLength); + streamAES->encryptContinue(plain2, BLOCK_BYTES_LEN, encrypted2, outLenEncrypted2); + streamAES->encryptContinue(plain3, BLOCK_BYTES_LEN, encrypted3, outLenEncrypted3); + + unsigned char* decrypted; + // new unsigned char[calculatDecryptedLenAES(BLOCK_BYTES_LEN, true)]; + unsigned char* decrypted2; + // new unsigned char[calculatDecryptedLenAES(BLOCK_BYTES_LEN, false)]; + unsigned char* decrypted3; + // new unsigned char[calculatDecryptedLenAES(BLOCK_BYTES_LEN, false)]; unsigned int outLenDecrypted = 0; unsigned int outLenDecrypted2 = 0; + unsigned int outLenDecrypted3 = 0; streamAES->decryptStart(encrypted, outLenEncrypted, decrypted, outLenDecrypted, key, keyLength); streamAES->decryptContinue(encrypted2, outLenEncrypted2, decrypted2, outLenDecrypted2); + streamAES->decryptContinue(encrypted3, outLenEncrypted3, decrypted3, outLenDecrypted3); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LENGTH)); - delete[] encrypted; - delete[] encrypted2; - delete[] decrypted; - delete[] decrypted2; - // delete streamAES; + + ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LEN)); + ASSERT_FALSE(memcmp(plain2, decrypted2, BLOCK_BYTES_LEN)); + ASSERT_FALSE(memcmp(plain3, decrypted3, BLOCK_BYTES_LEN)); + + delete [] encrypted; + delete [] encrypted2; + delete [] encrypted3; + delete [] decrypted; + delete [] decrypted2; + delete [] decrypted3; + delete [] key; } + TEST(KeyLengths, KeyLength128_ECB) { testEncryptionDecryption(AESChainingMode::ECB, AESKeyLength::AES_128); @@ -120,10 +140,6 @@ TEST(KeyLengths, KeyLength256_CTR) } int main() { - // Register factories - FactoryManager& manager = FactoryManager::getInstance(); - - // Now run your tests ::testing::InitGoogleTest(); return RUN_ALL_TESTS(); -} +} \ No newline at end of file From 5dcb7661bf413a1e01acdc02fec32ed1203982c7 Mon Sep 17 00:00:00 2001 From: Mali Bernstein Date: Wed, 18 Sep 2024 10:12:25 +0300 Subject: [PATCH 17/21] HSM: add shared interface and factory pattern for SHA algorithms --- CMakeLists.txt | 17 +- include/IHash.h | 17 ++ include/SHA3-512.h | 10 +- include/aes_stream.h | 368 ++++++++++++++++++++++++++++++++------- include/ecc.h | 1 + include/hash_factory.h | 22 +++ include/sha256.h | 52 ++++-- src/SHA3-512.cpp | 55 +++--- src/aes.cpp | 2 +- src/aes_cbc.cpp | 55 ++++-- src/aes_cfb.cpp | 62 ++++--- src/aes_ctr.cpp | 200 ++++++++++++++++++++- src/aes_ecb.cpp | 226 ++++++++++++++++++++---- src/aes_ofb.cpp | 75 +++++--- src/hash_factory.cpp | 64 +++++++ src/sha256.cpp | 323 +++++++++++++++++++--------------- tests/SHA3-512_tests.cpp | 86 --------- tests/aes_tests.cpp | 63 +++++-- tests/hash_tests.cpp | 144 +++++++++++++++ 19 files changed, 1371 insertions(+), 471 deletions(-) create mode 100644 include/IHash.h create mode 100644 include/hash_factory.h create mode 100644 src/hash_factory.cpp delete mode 100644 tests/SHA3-512_tests.cpp create mode 100644 tests/hash_tests.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bb0c6fe..4eeaab16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,15 +1,17 @@ cmake_minimum_required(VERSION 3.10) -project(MyTest) +project(VehicleComputingSimulator) # Include directories include_directories(src) +include_directories(${CMAKE_SOURCE_DIR}/include) +include_directories(${CMAKE_SOURCE_DIR}/logger) # Find GMP library find_path(GMP_INCLUDE_DIR NAMES gmp.h) find_library(GMP_LIBRARY NAMES gmp) find_library(GMPXX_LIBRARY NAMES gmpxx) if(NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARY OR NOT GMPXX_LIBRARY) - message(FATAL_ERROR "Could not find GMP or GMPXX libraries") + message(FATAL_ERROR "Could not find GMP or GMPXX libraries") endif() include_directories(${GMP_INCLUDE_DIR}) @@ -41,8 +43,13 @@ endif() # Set build type to Debug set(CMAKE_BUILD_TYPE Debug) -# Add the executable for the tests -add_executable(runTests tests/aes_tests.cpp ${SOURCES}) +# Add the executable for the tests, using the test source files +add_executable(runTests + tests/aes_tests.cpp + tests/ecc_tests.cpp + tests/hash_tests.cpp + ${SOURCES} +) # Link libraries target_link_libraries(runTests @@ -53,7 +60,7 @@ target_link_libraries(runTests pthread ) -# Optional: Output directory for the executable +# Optional: Set the output directory for the executable set_target_properties(runTests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} ) diff --git a/include/IHash.h b/include/IHash.h new file mode 100644 index 00000000..44e506bb --- /dev/null +++ b/include/IHash.h @@ -0,0 +1,17 @@ +#ifndef IHASH_H +#define IHASH_H +#include "return_codes.h" +#include +#include + +class IHash { +public: + enum SHAAlgorithm{ + SHA256, + SHA3_512 + }; + virtual CK_RV update(const std::vector& data) = 0; + virtual CK_RV finalize(std::vector& output) = 0; + virtual ~IHash() = default; +}; +#endif // IHASH_H \ No newline at end of file diff --git a/include/SHA3-512.h b/include/SHA3-512.h index c7e4807b..8ed5849b 100644 --- a/include/SHA3-512.h +++ b/include/SHA3-512.h @@ -5,15 +5,15 @@ #include #include // For fixed-width integer types #include // For std::ostringstream +#include "IHash.h" #include "return_codes.h" -class SHA3_512 +class SHA3_512: public IHash { public: SHA3_512(); // Constructor to initialize the state - CK_RV update(const uint8_t* input, std::size_t length); // Update the hash with more data - CK_RV finalize(std::string & output); // Finalize and get the hash value - CK_RV compute(const std::vector& input, std::string & output); // Single-step hashing + CK_RV update(const std::vector& data) override; // Update the hash with more data + CK_RV finalize(std::vector& output) override; // Finalize and get the hash value private: uint64_t S[5][5]; // State matrix @@ -25,7 +25,7 @@ class SHA3_512 void padding(uint8_t input[], std::size_t &in_len, int &absorb_times) ; void assign_S_xor_p(uint64_t S[5][5], uint64_t *p); void endianSwap(uint64_t &x); - std::string hashPartToHexString(uint64_t S[5][5]); + std::vector hashPartToHexVector(uint64_t S[5][5]); }; #endif // SHA3_512_H diff --git a/include/aes_stream.h b/include/aes_stream.h index 99872349..a764ce44 100644 --- a/include/aes_stream.h +++ b/include/aes_stream.h @@ -1,21 +1,203 @@ +// #include "aes.h" +// #include +// #include +// #include +// #include + +// class StreamAES +// { +// public: + +// unsigned char* iv; +// unsigned char* lastBlock; +// AESKeyLength keyLength; +// unsigned char* key; +// unsigned char* lastData; + +// StreamAES() : iv(new unsigned char[16]), lastBlock(new unsigned char[16]){}; + +// /** +// @brief Encrypts the initial block of data using AES in CBC mode. + +// This function generates a random initialization vector (IV) and then +// encrypts the given block of data. The encrypted data and the IV are +// concatenated and stored in the output buffer. + +// @param block Input data block to encrypt. +// @param inLen Length of the input data block. +// @param[out] out Pointer to the output buffer where encrypted data will be stored. +// @param[out] outLen Length of the encrypted output data. +// @param key Encryption key. +// @param keyLength Length of the AES key (128, 192, or 256 bits). +// */ +// virtual void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) = 0; + +// /** +// @brief Continues encryption of data using AES in CBC mode. + +// This function continues the encryption process for the given block of data +// using the last encrypted block as the IV. + +// @param block Input data block to encrypt. +// @param inLen Length of the input data block. +// @param[out] out Pointer to the output buffer where encrypted data will be stored. +// @param[out] outLen Length of the encrypted output data. +// */ +// virtual void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen) = 0; + +// /** +// @brief Decrypts the initial block of data using AES in CBC mode. + +// This function extracts the initialization vector (IV) from the end of the +// input data block and then decrypts the given block of data. The decrypted +// data is stored in the output buffer. + +// @param block Encrypted input data block to decrypt. +// @param inLen Length of the encrypted input data block. +// @param[out] out Pointer to the output buffer where decrypted data will be stored. +// @param[out] outLen Length of the decrypted output data. +// @param key Decryption key. +// @param keyLength Length of the AES key (128, 192, or 256 bits). +// */ +// virtual void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength) = 0; + +// /** +// @brief Continues decryption of data using AES in CBC mode. + +// This function continues the decryption process for the given block of data +// using the last decrypted block as the IV. + +// @param block Encrypted input data block to decrypt. +// @param inLen Length of the encrypted input data block. +// @param[out] out Pointer to the output buffer where decrypted data will be stored. +// @param[out] outLen Length of the decrypted output data. +// */ +// virtual void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen) = 0; + +// /** +// Decrypts data using AES in CBC mode. +// @param in Encrypted input data. +// @param inLen Length of input data. +// @param key Decryption key. +// @param[out] out Decrypted output data. +// @param[out] outLen Length of decrypted data. +// @param iv Initialization vector. +// @param keyLength AES key length (128, 192, 256 bits). +// */ +// virtual void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) = 0; +// /** +// Encrypts data using AES. +// @param in Input data. +// @param inLen Length of input data. +// @param key Encryption key. +// @param[out] out Encrypted output data. +// @param[out] outLen Length of encrypted data. +// @param iv Initialization vector. +// @param keyLength AES key length (128, 192, 256 bits). +// */ +// virtual void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) = 0; + +// }; + +// class AESEcb:public StreamAES +// { +// void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); +// void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +// void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); +// void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +// void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +// void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +// }; + +// class AESCbc:public StreamAES +// { +// void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); +// void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +// void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); +// void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +// void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +// void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +// }; + +// class AESCfb:public StreamAES +// { +// void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); +// void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +// void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); +// void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +// void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +// void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +// }; + +// class AESOfb:public StreamAES +// { +// void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); +// void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +// void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); +// void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +// void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +// void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +// }; + +// class AESCtr:public StreamAES +// { +// void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); +// void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +// void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); +// void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +// void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +// void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); +// }; + + +#ifndef __AES_STREAM__ +#define __AES_STREAM__ #include "aes.h" #include #include #include #include -class StreamAES -{ - public: - - unsigned char* iv; - unsigned char* lastBlock; +class StreamAES { + public: + unsigned char *iv = nullptr; + unsigned char *lastBlock = nullptr; AESKeyLength keyLength; - unsigned char* key; - unsigned char* lastData; - - StreamAES() : iv(new unsigned char[16]), lastBlock(new unsigned char[16]){}; - + unsigned char *key = nullptr; + unsigned char *lastData = nullptr; + + StreamAES() : iv(new unsigned char[16]), lastBlock(new unsigned char[16]), lastData(new unsigned char[16]){}; + virtual ~StreamAES() + { + if (iv) { + delete[] iv; // Free the memory allocated for iv + iv = nullptr; // Avoid dangling pointer + } + if (lastBlock) { + delete[] lastBlock; // Free the memory allocated for lastBlock + lastBlock = nullptr; // Avoid dangling pointer + } + if (key) { + delete[] key; // Free the memory allocated for key + key = nullptr; // Avoid dangling pointer + } + if (lastData) { + delete[] lastData; // Free the memory allocated for lastData + lastData = nullptr; // Avoid dangling pointer + } + } /** @brief Encrypts the initial block of data using AES in CBC mode. @@ -30,9 +212,11 @@ class StreamAES @param key Encryption key. @param keyLength Length of the AES key (128, 192, or 256 bits). */ -virtual void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) = 0; + virtual void encryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength) = 0; -/** + /** @brief Continues encryption of data using AES in CBC mode. This function continues the encryption process for the given block of data @@ -43,9 +227,10 @@ virtual void encryptStart(unsigned char block[], unsigned int inLen, unsigned ch @param[out] out Pointer to the output buffer where encrypted data will be stored. @param[out] outLen Length of the encrypted output data. */ -virtual void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen) = 0; + virtual void encryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen) = 0; -/** + /** @brief Decrypts the initial block of data using AES in CBC mode. This function extracts the initialization vector (IV) from the end of the @@ -59,9 +244,11 @@ virtual void encryptContinue(unsigned char block[], unsigned int inLen, unsigned @param key Decryption key. @param keyLength Length of the AES key (128, 192, or 256 bits). */ -virtual void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength) = 0; + virtual void decryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen, + unsigned char *key, AESKeyLength keyLength) = 0; -/** + /** @brief Continues decryption of data using AES in CBC mode. This function continues the decryption process for the given block of data @@ -72,9 +259,10 @@ virtual void decryptStart(unsigned char block[], unsigned int inLen, unsigned ch @param[out] out Pointer to the output buffer where decrypted data will be stored. @param[out] outLen Length of the decrypted output data. */ -virtual void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen) = 0; + virtual void decryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen) = 0; -/** + /** Decrypts data using AES in CBC mode. @param in Encrypted input data. @param inLen Length of input data. @@ -84,9 +272,11 @@ virtual void decryptContinue(unsigned char block[], unsigned int inLen, unsigned @param iv Initialization vector. @param keyLength AES key length (128, 192, 256 bits). */ -virtual void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) = 0; -/** + virtual void decrypt(unsigned char in[], unsigned int inLen, + unsigned char *key, unsigned char *&out, + unsigned int &outLen, const unsigned char *iv, + unsigned char *lastData, AESKeyLength keyLength) = 0; + /** Encrypts data using AES. @param in Input data. @param inLen Length of input data. @@ -96,69 +286,115 @@ virtual void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, @param iv Initialization vector. @param keyLength AES key length (128, 192, 256 bits). */ -virtual void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) = 0; - + virtual void encrypt(unsigned char in[], unsigned int inLen, + unsigned char *key, unsigned char *&out, + unsigned int &outLen, const unsigned char *iv, + unsigned char *lastData, AESKeyLength keyLength) = 0; }; -class AESEcb:public StreamAES -{ - void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); - void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); - void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); - void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +class AESEcb : public StreamAES { + void encryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength); + void encryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen); + void decryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen, + unsigned char *key, AESKeyLength keyLength); + void decryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen); void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength); void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength); }; -class AESCbc:public StreamAES -{ - void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); - void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); - void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); - void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +class AESCbc : public StreamAES { + void encryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength); + void encryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen); + void decryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen, + unsigned char *key, AESKeyLength keyLength); + void decryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen); void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength); void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength); }; -class AESCfb:public StreamAES -{ - void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); - void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); - void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); - void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +class AESCfb : public StreamAES { + void encryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength); + void encryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen); + void decryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen, + unsigned char *key, AESKeyLength keyLength); + void decryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen); void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength); void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength); }; -class AESOfb:public StreamAES -{ - void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); - void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); - void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); - void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +class AESOfb : public StreamAES { + void encryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength); + void encryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen); + void decryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen, + unsigned char *key, AESKeyLength keyLength); + void decryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen); void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength); void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength); }; -class AESCtr:public StreamAES -{ - void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); - void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); - void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); - void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); +class AESCtr : public StreamAES { + void encryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength); + void encryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen); + void decryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen, + unsigned char *key, AESKeyLength keyLength); + void decryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outlen); void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength); void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength); }; - +#endif // __AES_STREAM__ \ No newline at end of file diff --git a/include/ecc.h b/include/ecc.h index 1fd53922..89d2a75b 100644 --- a/include/ecc.h +++ b/include/ecc.h @@ -4,6 +4,7 @@ #include #include +#include // Structure for representing a point struct Point { diff --git a/include/hash_factory.h b/include/hash_factory.h new file mode 100644 index 00000000..4e47a6cd --- /dev/null +++ b/include/hash_factory.h @@ -0,0 +1,22 @@ +#ifndef FACTORY_MANAGER_H +#define FACTORY_MANAGER_H +#include "sha256.h" +#include "SHA3-512.h" +#include "IHash.h" +#include "return_codes.h" +#include +#include +#include + +class HashFactory +{ +public: + static HashFactory& getInstance(); + CK_RV create(const IHash::SHAAlgorithm& type, std::unique_ptr& hashPtr) const; + +private: + std::map()>> factories; + HashFactory(); //Private constructor for singleton pattern. +}; + +#endif // FACTORY_MANAGER_H \ No newline at end of file diff --git a/include/sha256.h b/include/sha256.h index 079ec7d4..7584e2cd 100644 --- a/include/sha256.h +++ b/include/sha256.h @@ -1,23 +1,43 @@ #ifndef SHA256_H #define SHA256_H - #include #include #include +#include "IHash.h" +#include "../logger/logger.h" +#include "return_codes.h" -//Structure to hold the state of the SHA-256 hash computation. -struct SHA256State{ - uint32_t result[8]; // Holds the current hash state - uint8_t message[64]; // Buffer to store the current message block - size_t messageSize = 0; // Size of the current message block - size_t bitLength = 0; // Total length of the message in bits -}; - -// Function prototypes for SHA-256 hashing -void sha256_update(SHA256State& state, const std::vector& data); -void padding(SHA256State& state); -std::vector sha256_finalize(SHA256State& state); -std::vector sha256_compute(const std::vector& input); -void transform(SHA256State& state); +class SHA256: public IHash { +private: + uint32_t result[8]; + uint8_t message[64]; + size_t messageSize; + size_t bitLength; + const uint32_t bytes[64] = { + // SHA-256 constants + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 + }; + CK_RV transform(); + void padding(); -#endif // SHA256_H \ No newline at end of file +public: + SHA256(); + CK_RV update(const std::vector& data) override; + CK_RV finalize(std::vector& output) override; +}; +#endif //SHA256_H \ No newline at end of file diff --git a/src/SHA3-512.cpp b/src/SHA3-512.cpp index 76d33484..db791523 100644 --- a/src/SHA3-512.cpp +++ b/src/SHA3-512.cpp @@ -1,7 +1,9 @@ #include "../include/SHA3-512.h" #include "../logger/logger.h" +#include #include #include +#include #define BLOCK_SIZE 72 // Macro for circular left shift (rotation) of x by y bits @@ -257,7 +259,7 @@ void SHA3_512::endianSwap(uint64_t &x) * to ensure each 64-bit integer is represented as a 16-character wide hexadecimal * string. */ -std::string SHA3_512::hashPartToHexString(uint64_t S[5][5]) { +std::vector SHA3_512::hashPartToHexVector(uint64_t S[5][5]) { std::ostringstream oss; oss << std::hex << std::setfill('0'); // Append values in the specified order @@ -269,7 +271,12 @@ std::string SHA3_512::hashPartToHexString(uint64_t S[5][5]) { << std::setw(16) << S[0][1] << std::setw(16) << S[1][1] << std::setw(16) << S[2][1]; - return oss.str(); + std::string res = oss.str(); + std::vector vec; + vec.reserve(res.size()); // Optional: reserve space for performance + for (char c : res) + vec.push_back(static_cast(c)); + return vec; } /** @@ -289,10 +296,15 @@ std::string SHA3_512::hashPartToHexString(uint64_t S[5][5]) { * exceeds its size, an error will be logged, and the function will return * `CKR_FUNCTION_FAILED`. */ -CK_RV SHA3_512::update(const uint8_t* input, std::size_t length) +CK_RV SHA3_512::update(const std::vector& data) { logger sha3_512logger("HSM"); - sha3_512logger.logMessage(logger::LogLevel::INFO, "Starting update with length: " + std::to_string(length)); + sha3_512logger.logMessage(logger::LogLevel::INFO, "Starting update with length: " + std::to_string(data.size())); + + // Define the input size and starting pointer + std::size_t length = data.size(); + std::size_t data_index = 0; + // Absorb input into the buffer and process in 72-byte chunks (576 bits) while (length > 0) { if(buffer_length > sizeof(buffer)){ @@ -303,11 +315,11 @@ CK_RV SHA3_512::update(const uint8_t* input, std::size_t length) std::size_t to_copy = std::min(length, sizeof(buffer) - buffer_length); // Copy input data into the buffer - std::memcpy(buffer + buffer_length, input, to_copy); + std::memcpy(buffer + buffer_length, data.data(), to_copy); // Update buffer length and input pointers buffer_length += to_copy; - input += to_copy; + data_index += to_copy; length -= to_copy; sha3_512logger.logMessage(logger::LogLevel::INFO, "Copied " + std::to_string(to_copy) @@ -351,7 +363,8 @@ CK_RV SHA3_512::update(const uint8_t* input, std::size_t length) * on the state matrix elements before converting the hash value to a hexadecimal * string. */ -CK_RV SHA3_512::finalize(std::string & output) + +CK_RV SHA3_512::finalize(std::vector& output) { logger sha3_512logger("HSM"); sha3_512logger.logMessage(logger::LogLevel::INFO, "finalizing"); @@ -389,32 +402,8 @@ CK_RV SHA3_512::finalize(std::string & output) endianSwap(S[i][j]); // Convert the state to a hex string - output=hashPartToHexString(S); - sha3_512logger.logMessage(logger::LogLevel::INFO, "hashed data: " + output); + output = hashPartToHexVector(S); + // sha3_512logger.logMessage(logger::LogLevel::INFO, "hashed data: " + output); return CKR_OK; -} - -/** - * @brief Compute the SHA3-512 hash of the input data in a single step. - * - * This function performs the entire SHA3-512 hashing process for the provided input data. - * It first updates the hash state with the input data and then finalizes the hash computation - * to produce the final hash value. - * - * @param[in] input A `std::vector` containing the input data to be hashed. - * @param[out] output A reference to a `std::string` that will be set to the resulting - * hexadecimal representation of the hash value. - * - * @return CK_RV Returns `CKR_OK` on success or `CKR_FUNCTION_FAILED` if an error occurs - * during the update or finalization process. - * - * @note This function is a convenient wrapper for `update` and `finalize`, combining them - * into a single operation. It assumes that the input data fits in memory and handles - * the entire data in one go. - */ -CK_RV SHA3_512::compute(const std::vector& input, std::string & output) -{ - update(input.data(), input.size()); - return finalize(output); } \ No newline at end of file diff --git a/src/aes.cpp b/src/aes.cpp index cb7e5375..a20e3866 100644 --- a/src/aes.cpp +++ b/src/aes.cpp @@ -845,4 +845,4 @@ size_t calculatDecryptedLenAES(size_t inLen, bool isFirst) return (inLen + 15) & ~15; } -#endif \ No newline at end of file +#endif diff --git a/src/aes_cbc.cpp b/src/aes_cbc.cpp index 5fea5cc4..b8f0e020 100644 --- a/src/aes_cbc.cpp +++ b/src/aes_cbc.cpp @@ -1,46 +1,62 @@ #include "../include/aes_stream.h" #include - -void AESCbc::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) +void AESCbc::encryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength) { generateRandomIV(iv); - encrypt(block, inLen, key, out, outLen, iv,nullptr, keyLength); + encrypt(block, inLen, key, out, outLen, iv, nullptr, keyLength); unsigned char *newOut = new unsigned char[outLen + BLOCK_BYTES_LEN]; memcpy(newOut, out, outLen); memcpy(newOut + outLen, iv, BLOCK_BYTES_LEN); - memcpy(lastBlock, out, outLen); + memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); out = newOut; - this -> key = key; - this -> keyLength = keyLength; + this->key = new unsigned char[aesKeyLengthData[keyLength].keySize]; + // Copy the data from the provided key + memcpy(this->key, key, aesKeyLengthData[keyLength].keySize); + + // Set the key length + this->keyLength = keyLength; outLen += BLOCK_BYTES_LEN; } -void AESCbc::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) +void AESCbc::encryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen) { - encrypt(block, inLen, key,out, outLen, lastBlock, nullptr, keyLength); + encrypt(block, inLen, key, out, outLen, lastBlock, nullptr, keyLength); + memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } -void AESCbc::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) +void AESCbc::decryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength) { - this-> iv = block + inLen - BLOCK_BYTES_LEN; - decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, nullptr, keyLength); - memcpy(lastBlock, out, outLen - BLOCK_BYTES_LEN); + this->iv = block + inLen - BLOCK_BYTES_LEN; + decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, + block + inLen - BLOCK_BYTES_LEN, nullptr, keyLength); + memcpy(lastBlock, block + inLen - 2*BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } -void AESCbc::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) +void AESCbc::decryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen) { - decrypt(block, inLen , key, out, outLen, lastBlock,nullptr, keyLength); + decrypt(block, inLen, key, out, outLen, lastBlock, nullptr, keyLength); + memcpy(lastBlock, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); + } void AESCbc::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength) { padMessage(in, inLen, outLen); unsigned char block[BLOCK_BYTES_LEN]; out = new unsigned char[outLen]; unsigned char *roundKeys = - new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * + NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); memcpy(block, iv, BLOCK_BYTES_LEN); for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { @@ -52,14 +68,17 @@ void AESCbc::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, } void AESCbc::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength) { checkLength(inLen); unsigned char block[BLOCK_BYTES_LEN]; outLen = inLen; out = new unsigned char[outLen]; unsigned char *roundKeys = - new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * + NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); memcpy(block, iv, BLOCK_BYTES_LEN); for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { diff --git a/src/aes_cfb.cpp b/src/aes_cfb.cpp index 6469ee4a..c8516a3b 100644 --- a/src/aes_cfb.cpp +++ b/src/aes_cfb.cpp @@ -1,46 +1,62 @@ #include "../include/aes_stream.h" - -void AESCfb::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) +#include +void AESCfb::encryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength) { generateRandomIV(iv); - encrypt(block, inLen, key, out, outLen, iv,nullptr, keyLength); - unsigned char *newOut = new unsigned char[outLen + BLOCK_BYTES_LEN]; + encrypt(block, inLen, key, out, outLen, iv, nullptr, keyLength); + unsigned char *newOut = new unsigned char[outLen + BLOCK_BYTES_LEN]; memcpy(newOut, out, outLen); memcpy(newOut + outLen, iv, BLOCK_BYTES_LEN); - memcpy(lastBlock, out, outLen); + memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); out = newOut; - this -> lastBlock = out; - this -> key = key; - this -> keyLength = keyLength; + this->key = new unsigned char[aesKeyLengthData[keyLength].keySize]; + // Copy the data from the provided key + memcpy(this->key, key, aesKeyLengthData[keyLength].keySize); + + // Set the key length + this->keyLength = keyLength; outLen += BLOCK_BYTES_LEN; } -void AESCfb::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) +void AESCfb::encryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen) { - encrypt(block, inLen, key,out, outLen, lastBlock, nullptr, keyLength); + encrypt(block, inLen, key, out, outLen, lastBlock, nullptr, keyLength); + memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } -void AESCfb::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) +void AESCfb::decryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength) { - this-> iv = block + inLen - BLOCK_BYTES_LEN; - decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, nullptr, keyLength); - memcpy(lastBlock, out, outLen - BLOCK_BYTES_LEN); + this->iv = block + inLen - BLOCK_BYTES_LEN; + decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, + block + inLen - BLOCK_BYTES_LEN, nullptr, keyLength); + memcpy(lastBlock, block + inLen - 2*BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } -void AESCfb::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) +void AESCfb::decryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen) { - decrypt(block, inLen , key, out, outLen, lastBlock,nullptr, keyLength); -} + decrypt(block, inLen, key, out, outLen, lastBlock, nullptr, keyLength); + memcpy(lastBlock, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); +} void AESCfb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength) { padMessage(in, inLen, outLen); out = new unsigned char[outLen]; unsigned char block[BLOCK_BYTES_LEN]; unsigned char feedback[BLOCK_BYTES_LEN]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * + NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); memcpy(feedback, iv, BLOCK_BYTES_LEN); for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { @@ -62,14 +78,18 @@ void AESCfb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, @param keyLength AES key length (128, 192, 256 bits). */ void AESCfb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength) { checkLength(inLen); unsigned char block[BLOCK_BYTES_LEN]; outLen = inLen; out = new unsigned char[outLen]; unsigned char feedback[BLOCK_BYTES_LEN]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * + NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); memcpy(feedback, iv, BLOCK_BYTES_LEN); for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { diff --git a/src/aes_ctr.cpp b/src/aes_ctr.cpp index 930bc75e..14708f41 100644 --- a/src/aes_ctr.cpp +++ b/src/aes_ctr.cpp @@ -1,3 +1,194 @@ +// #include "../include/aes_stream.h" +// #include +// #include +// #include + +// /** +// Encrypts a single block of data using AES in CTR mode. +// This function handles the encryption of a single block in CTR (Counter) mode. +// It computes the counter value based on the given initialization vector (IV) and +// block index, encrypts the counter, and then XORs the encrypted counter with the +// input block to produce the output block. +// @param input Pointer to the input block of plaintext data (BLOCK_BYTES_LEN bytes). +// @param output Pointer to the output block where the encrypted ciphertext will be stored (BLOCK_BYTES_LEN bytes). +// @param roundKeys Pointer to the array of round keys used for AES encryption. +// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). +// @param iv Pointer to the initialization vector (IV) used for the counter. +// @param blockIndex The index of the current block to be encrypted, used to compute the counter value. +// */ +// void encryptBlockThreadedCTR(const unsigned char* input, unsigned char* output, unsigned char* roundKeys, +// AESKeyLength keyLength, const unsigned char* lastData, unsigned int blockIndex) +// { +// unsigned char block[BLOCK_BYTES_LEN]; +// unsigned char counter[BLOCK_BYTES_LEN]; + +// memcpy(counter, lastData, BLOCK_BYTES_LEN); + +// for (int j = BLOCK_BYTES_LEN - 1, k = blockIndex; j >= 0; --j) { +// counter[j] += (k % 256); +// if (counter[j] != 0) break; +// k /= 256; +// } + +// encryptBlock(counter, block, roundKeys, keyLength); + +// xorBlocks(block, input, output, BLOCK_BYTES_LEN); +// } + +// /** +// Encrypts multiple blocks of data using AES in CTR mode with multithreading. +// This function divides the input plaintext into blocks and encrypts each block +// in parallel using multiple threads in CTR (Counter) mode. The function ensures +// that each block is encrypted using AES with a counter value derived from the +// initialization vector (IV) and block index, and all threads are joined before completing. +// @param plaintext Pointer to the input plaintext data to be encrypted. +// @param ciphertext Pointer to the buffer where the encrypted ciphertext will be stored. +// @param length The total length of the plaintext data (must be a multiple of BLOCK_BYTES_LEN). +// @param roundKeys Pointer to the array of round keys used for AES encryption. +// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). +// @param iv Pointer to the initialization vector (IV) used for the counter. +// */ +// void encryptCTRMultithreaded(const unsigned char* plaintext, unsigned char* ciphertext, unsigned int length, +// unsigned char* roundKeys, AESKeyLength keyLength, const unsigned char* lastData) +// { +// unsigned int numBlocks = length / BLOCK_BYTES_LEN; +// std::vector threads; + +// for (unsigned int i = 0; i < numBlocks; ++i) { +// threads.push_back(std::thread(encryptBlockThreadedCTR, &plaintext[i * BLOCK_BYTES_LEN], +// &ciphertext[i * BLOCK_BYTES_LEN], roundKeys, keyLength, lastData, i)); +// } + +// for (auto& th : threads) { +// th.join(); +// } +// } + +// /** +// Decrypts a single block of data using AES in CTR mode. +// This function handles the decryption of a single block in CTR (Counter) mode. +// It computes the counter value based on the given initialization vector (IV) and +// block index, encrypts the counter, and then XORs the encrypted counter with the +// input block to produce the output block. +// @param input Pointer to the input block of ciphertext data (BLOCK_BYTES_LEN bytes). +// @param output Pointer to the output block where the decrypted plaintext will be stored (BLOCK_BYTES_LEN bytes). +// @param roundKeys Pointer to the array of round keys used for AES encryption. +// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). +// @param iv Pointer to the initialization vector (IV) used for the counter. +// @param blockIndex The index of the current block to be decrypted, used to compute the counter value. +// */ +// void decryptBlockThreadedCTR(const unsigned char* input, unsigned char* output, unsigned char* roundKeys, +// AESKeyLength keyLength, const unsigned char* lastData, unsigned int blockIndex) +// { +// unsigned char block[BLOCK_BYTES_LEN]; +// unsigned char counter[BLOCK_BYTES_LEN]; + +// memcpy(counter, lastData, BLOCK_BYTES_LEN); + +// for (int j = BLOCK_BYTES_LEN - 1, k = blockIndex; j >= 0; --j) { +// counter[j] += (k % 256); +// if (counter[j] != 0) break; +// k /= 256; +// } + +// encryptBlock(counter, block, roundKeys, keyLength); + +// xorBlocks(block, input, output, BLOCK_BYTES_LEN); +// } + +// /** +// Decrypts multiple blocks of data using AES in CTR mode with multithreading. +// This function divides the input ciphertext into blocks and decrypts each block +// in parallel using multiple threads in CTR (Counter) mode. The function ensures +// that each block is decrypted using AES with a counter value derived from the +// initialization vector (IV) and block index, and all threads are joined before completing. +// @param ciphertext Pointer to the input ciphertext data to be decrypted. +// @param plaintext Pointer to the buffer where the decrypted plaintext will be stored. +// @param length The total length of the ciphertext data (must be a multiple of BLOCK_BYTES_LEN). +// @param roundKeys Pointer to the array of round keys used for AES encryption. +// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). +// @param iv Pointer to the initialization vector (IV) used for the counter. +// */ +// void decryptCTRMultithreaded(const unsigned char* ciphertext, unsigned char* plaintext, unsigned int length, +// unsigned char* roundKeys, AESKeyLength keyLength, const unsigned char* lastData) +// { +// unsigned int numBlocks = length / BLOCK_BYTES_LEN; +// std::vector threads; + +// for (unsigned int i = 0; i < numBlocks; ++i) +// threads.push_back(std::thread(decryptBlockThreadedCTR, &ciphertext[i * BLOCK_BYTES_LEN], +// &plaintext[i * BLOCK_BYTES_LEN], roundKeys, keyLength, lastData, i)); + +// for (auto& th : threads) +// th.join(); +// } + +// void AESCtr::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) +// { +// unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; +// generateRandomIV(iv); +// memcpy(lastData, iv, BLOCK_BYTES_LEN); +// encrypt(block, inLen, key, out, outLen, iv, lastData, keyLength); +// unsigned char *newOut = new unsigned char[outLen + BLOCK_BYTES_LEN]; +// memcpy(newOut, out, outLen); +// memcpy(newOut + outLen, iv, BLOCK_BYTES_LEN); +// out = newOut; +// this -> lastBlock = out; +// this -> key = key; +// this -> keyLength = keyLength; +// this-> lastData = lastData; +// outLen += BLOCK_BYTES_LEN; +// } + +// void AESCtr::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) +// { +// encrypt(block, inLen, key,out, outLen, lastData, lastData, keyLength); +// } + +// void AESCtr::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) +// { +// unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; +// memcpy(lastData, iv, BLOCK_BYTES_LEN); +// this-> iv = block + inLen - BLOCK_BYTES_LEN; +// decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, lastData, keyLength); +// this-> lastBlock = out; +// this->lastData = lastData; +// } + +// void AESCtr::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) +// { +// decrypt(block, inLen , key, out, outLen, lastData, lastData, keyLength); +// } + +// void AESCtr::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) +// { + +// padMessage(in, inLen, outLen); +// out = new unsigned char[outLen]; + +// unsigned char* roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; +// keyExpansion(key, roundKeys, keyLength); + +// encryptCTRMultithreaded(in, out, outLen, roundKeys, keyLength, iv); + +// delete[] roundKeys; +// } + +// void AESCtr::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) +// { +// checkLength(inLen); +// outLen = inLen; +// out = new unsigned char[outLen]; + +// unsigned char* roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; +// keyExpansion(key, roundKeys, keyLength); + +// decryptCTRMultithreaded(in, out, outLen, roundKeys, keyLength, iv); + +// delete[] roundKeys; +// } #include "../include/aes_stream.h" #include #include @@ -133,7 +324,7 @@ void AESCtr::encryptStart(unsigned char block[], unsigned int inLen, unsigned ch memcpy(newOut, out, outLen); memcpy(newOut + outLen, iv, BLOCK_BYTES_LEN); out = newOut; - this -> lastBlock = out; + memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); this -> key = key; this -> keyLength = keyLength; this-> lastData = lastData; @@ -143,21 +334,24 @@ void AESCtr::encryptStart(unsigned char block[], unsigned int inLen, unsigned ch void AESCtr::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) { encrypt(block, inLen, key,out, outLen, lastData, lastData, keyLength); + memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } void AESCtr::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) { unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; memcpy(lastData, iv, BLOCK_BYTES_LEN); - this-> iv = block + inLen - BLOCK_BYTES_LEN; + this-> iv = block + inLen - BLOCK_BYTES_LEN; decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, lastData, keyLength); - this-> lastBlock = out; +memcpy(lastBlock, block + inLen - 2*BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); this->lastData = lastData; } void AESCtr::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) { decrypt(block, inLen , key, out, outLen, lastData, lastData, keyLength); + memcpy(lastBlock, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); + } void AESCtr::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, diff --git a/src/aes_ecb.cpp b/src/aes_ecb.cpp index c0c9638e..49118238 100644 --- a/src/aes_ecb.cpp +++ b/src/aes_ecb.cpp @@ -1,8 +1,144 @@ +// #include "../include/aes_stream.h" +// #include +// #include +// #include + +// /** +// Encrypts a single block of data using AES in ECB mode. +// This function wraps the `encryptBlock` function to allow it to be used +// in a threaded context. It performs AES encryption on a single block of +// plaintext using the provided round keys and key length. +// @param in Pointer to the input block of plaintext data (BLOCK_BYTES_LEN bytes). +// @param out Pointer to the output block where the encrypted ciphertext will be stored (BLOCK_BYTES_LEN bytes). +// @param roundKeys Pointer to the array of round keys used for AES encryption. +// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). +// */ +// void encryptBlockThreadedECB(const unsigned char in[], unsigned char out[], unsigned char* roundKeys, AESKeyLength keyLength) +// { +// encryptBlock(in, out, roundKeys, keyLength); +// } + +// /** +// Encrypts multiple blocks of data using AES in ECB mode with multithreading. +// This function divides the input plaintext into blocks and encrypts each block +// in parallel using multiple threads. The function ensures that each block is +// encrypted using AES in ECB mode, and all threads are joined before completing. +// @param plaintext Pointer to the input plaintext data to be encrypted. +// @param ciphertext Pointer to the buffer where the encrypted ciphertext will be stored. +// @param length The total length of the plaintext data (must be a multiple of BLOCK_BYTES_LEN). +// @param roundKeys Pointer to the array of round keys used for AES encryption. +// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). +// */ +// void encryptECBMultithreaded(const unsigned char* plaintext, unsigned char* ciphertext, unsigned int length, unsigned char* roundKeys, AESKeyLength keyLength) +// { +// unsigned int numBlocks = length / BLOCK_BYTES_LEN; +// std::vector threads; + +// for (unsigned int i = 0; i < numBlocks; ++i) { +// threads.push_back(std::thread(encryptBlockThreadedECB, &plaintext[i * BLOCK_BYTES_LEN], &ciphertext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); +// } + +// for (auto& th : threads) { +// th.join(); +// } +// } + +// /** +// Decrypts a single block of data using AES in ECB mode. +// This function wraps the `decryptBlock` function to allow it to be used +// in a threaded context. It performs AES decryption on a single block of +// ciphertext using the provided round keys and key length. +// @param input Pointer to the input block of ciphertext data (BLOCK_BYTES_LEN bytes). +// @param output Pointer to the output block where the decrypted plaintext will be stored (BLOCK_BYTES_LEN bytes). +// @param roundKeys Pointer to the array of round keys used for AES decryption. +// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). +// */ +// void decryptBlockThreadedECB(const unsigned char* input, unsigned char* output, unsigned char* roundKeys, +// AESKeyLength keyLength) +// { +// decryptBlock(input, output, roundKeys, keyLength); +// } + +// /** +// Decrypts multiple blocks of data using AES in ECB mode with multithreading. +// This function divides the input ciphertext into blocks and decrypts each block +// in parallel using multiple threads in ECB (Electronic Codebook) mode. The function +// ensures that each block is decrypted using AES with the provided round keys, and +// all threads are joined before completing. +// @param ciphertext Pointer to the input ciphertext data to be decrypted. +// @param plaintext Pointer to the buffer where the decrypted plaintext will be stored. +// @param length The total length of the ciphertext data (must be a multiple of BLOCK_BYTES_LEN). +// @param roundKeys Pointer to the array of round keys used for AES decryption. +// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). +// */ +// void decryptECBMultithreaded(const unsigned char* ciphertext, unsigned char* plaintext, unsigned int length, +// unsigned char* roundKeys, AESKeyLength keyLength) +// { +// unsigned int numBlocks = length / BLOCK_BYTES_LEN; +// std::vector threads; + +// for (unsigned int i = 0; i < numBlocks; i++) +// threads.push_back(std::thread(decryptBlockThreadedECB, &ciphertext[i * BLOCK_BYTES_LEN], +// &plaintext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); + +// for (auto& th : threads) +// th.join(); +// } + +// void AESEcb::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) +// { +// encrypt(block, inLen, key, out, outLen, nullptr,nullptr, keyLength); +// this -> key = key; +// this -> keyLength = keyLength; +// } + +// void AESEcb::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) +// { +// encrypt(block, inLen, key,out, outLen, nullptr, nullptr, keyLength); +// } + +// void AESEcb::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) +// { +// decrypt(block, inLen , key, out, outLen, nullptr, nullptr, keyLength); +// } + +// void AESEcb::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) +// { +// decrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); +// } + +// void AESEcb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen,const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) +// { +// padMessage(in, inLen, outLen); +// unsigned char block[BLOCK_BYTES_LEN]; +// out = new unsigned char[outLen]; +// unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; +// keyExpansion(key, roundKeys, keyLength); +// for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { +// memcpy(block, in + i, BLOCK_BYTES_LEN); +// encryptECBMultithreaded(block, out + i, BLOCK_BYTES_LEN, roundKeys, keyLength); +// } +// delete[] roundKeys; +// } + +// void AESEcb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, +// unsigned char *&out, unsigned int &outLen,const unsigned char *iv, unsigned char *lastData,AESKeyLength keyLength) +// { +// checkLength(inLen); +// outLen = inLen; +// out = new unsigned char[outLen]; +// unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; +// keyExpansion(key, roundKeys, keyLength); +// for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) +// decryptECBMultithreaded(in, out, outLen, roundKeys, keyLength); +// unpadMessage(out, outLen); +// delete[] roundKeys; +// } #include "../include/aes_stream.h" #include #include #include - /** Encrypts a single block of data using AES in ECB mode. This function wraps the `encryptBlock` function to allow it to be used @@ -13,7 +149,8 @@ @param roundKeys Pointer to the array of round keys used for AES encryption. @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). */ -void encryptBlockThreadedECB(const unsigned char in[], unsigned char out[], unsigned char* roundKeys, AESKeyLength keyLength) +void encryptBlockThreadedECB(const unsigned char in[], unsigned char out[], + unsigned char *roundKeys, AESKeyLength keyLength) { encryptBlock(in, out, roundKeys, keyLength); } @@ -29,16 +166,20 @@ void encryptBlockThreadedECB(const unsigned char in[], unsigned char out[], unsi @param roundKeys Pointer to the array of round keys used for AES encryption. @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). */ -void encryptECBMultithreaded(const unsigned char* plaintext, unsigned char* ciphertext, unsigned int length, unsigned char* roundKeys, AESKeyLength keyLength) +void encryptECBMultithreaded(const unsigned char *plaintext, + unsigned char *ciphertext, unsigned int length, + unsigned char *roundKeys, AESKeyLength keyLength) { unsigned int numBlocks = length / BLOCK_BYTES_LEN; std::vector threads; for (unsigned int i = 0; i < numBlocks; ++i) { - threads.push_back(std::thread(encryptBlockThreadedECB, &plaintext[i * BLOCK_BYTES_LEN], &ciphertext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); + threads.push_back(std::thread( + encryptBlockThreadedECB, &plaintext[i * BLOCK_BYTES_LEN], + &ciphertext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); } - for (auto& th : threads) { + for (auto &th : threads) { th.join(); } } @@ -53,8 +194,8 @@ void encryptECBMultithreaded(const unsigned char* plaintext, unsigned char* ciph @param roundKeys Pointer to the array of round keys used for AES decryption. @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). */ -void decryptBlockThreadedECB(const unsigned char* input, unsigned char* output, unsigned char* roundKeys, - AESKeyLength keyLength) +void decryptBlockThreadedECB(const unsigned char *input, unsigned char *output, + unsigned char *roundKeys, AESKeyLength keyLength) { decryptBlock(input, output, roundKeys, keyLength); } @@ -71,67 +212,88 @@ void decryptBlockThreadedECB(const unsigned char* input, unsigned char* output, @param roundKeys Pointer to the array of round keys used for AES decryption. @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). */ -void decryptECBMultithreaded(const unsigned char* ciphertext, unsigned char* plaintext, unsigned int length, - unsigned char* roundKeys, AESKeyLength keyLength) +void decryptECBMultithreaded(const unsigned char *ciphertext, + unsigned char *plaintext, unsigned int length, + unsigned char *roundKeys, AESKeyLength keyLength) { unsigned int numBlocks = length / BLOCK_BYTES_LEN; - std::vector threads; + std::vector threads; - for (unsigned int i = 0; i < numBlocks; i++) - threads.push_back(std::thread(decryptBlockThreadedECB, &ciphertext[i * BLOCK_BYTES_LEN], - &plaintext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); + for (unsigned int i = 0; i < numBlocks; i++) + threads.push_back(std::thread( + decryptBlockThreadedECB, &ciphertext[i * BLOCK_BYTES_LEN], + &plaintext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); - for (auto& th : threads) + for (auto &th : threads) th.join(); } -void AESEcb::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) +void AESEcb::encryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength) { - encrypt(block, inLen, key, out, outLen, nullptr,nullptr, keyLength); - this -> key = key; - this -> keyLength = keyLength; + encrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); + this->key = new unsigned char[aesKeyLengthData[keyLength].keySize]; + + // Copy the data from the provided key + memcpy(this->key, key, aesKeyLengthData[keyLength].keySize); + + // Set the key length + this->keyLength = keyLength; } -void AESEcb::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) +void AESEcb::encryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen) { - encrypt(block, inLen, key,out, outLen, nullptr, nullptr, keyLength); + encrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); } -void AESEcb::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) +void AESEcb::decryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength) { - decrypt(block, inLen , key, out, outLen, nullptr, nullptr, keyLength); + decrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); } -void AESEcb::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) +void AESEcb::decryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen) { - decrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); + decrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); } void AESEcb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen,const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength) { padMessage(in, inLen, outLen); unsigned char block[BLOCK_BYTES_LEN]; - out = new unsigned char[outLen]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * + NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { memcpy(block, in + i, BLOCK_BYTES_LEN); - encryptECBMultithreaded(block, out + i, BLOCK_BYTES_LEN, roundKeys, keyLength); + encryptECBMultithreaded(block, out + i, BLOCK_BYTES_LEN, roundKeys, + keyLength); } delete[] roundKeys; } void AESEcb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen,const unsigned char *iv, unsigned char *lastData,AESKeyLength keyLength) + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength) { checkLength(inLen); outLen = inLen; out = new unsigned char[outLen]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * + NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) decryptECBMultithreaded(in, out, outLen, roundKeys, keyLength); unpadMessage(out, outLen); delete[] roundKeys; -} +} \ No newline at end of file diff --git a/src/aes_ofb.cpp b/src/aes_ofb.cpp index 13e027cb..2949df95 100644 --- a/src/aes_ofb.cpp +++ b/src/aes_ofb.cpp @@ -1,57 +1,76 @@ + #include "../include/aes_stream.h" -void AESOfb::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) +void AESOfb::encryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength) { - unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; + unsigned char *lastData = new unsigned char[BLOCK_BYTES_LEN]; generateRandomIV(iv); memcpy(lastData, iv, BLOCK_BYTES_LEN); - encrypt(block, inLen, key, out, outLen, iv,lastData, keyLength); + encrypt(block, inLen, key, out, outLen, iv, lastData, keyLength); unsigned char *newOut = new unsigned char[outLen + BLOCK_BYTES_LEN]; memcpy(newOut, out, outLen); memcpy(newOut + outLen, iv, BLOCK_BYTES_LEN); - memcpy(lastBlock, out, outLen); + memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); out = newOut; - this -> lastBlock = out; - this -> key = key; - this -> keyLength = keyLength; - this-> lastData = lastData; + this->key = new unsigned char[aesKeyLengthData[keyLength].keySize]; + + // Copy the data from the provided key + memcpy(this->key, key, aesKeyLengthData[keyLength].keySize); + + // Set the key length + this->keyLength = keyLength; + this->lastData = lastData; outLen += BLOCK_BYTES_LEN; } -void AESOfb::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) +void AESOfb::encryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen) { - encrypt(block, inLen, key,out, outLen, lastBlock, lastData, keyLength); + encrypt(block, inLen, key, out, outLen, lastBlock, lastData, keyLength); + memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } -void AESOfb::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) +void AESOfb::decryptStart(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength) { - unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; - memcpy(lastData, iv, BLOCK_BYTES_LEN); - this-> iv = block + inLen - BLOCK_BYTES_LEN; - decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, lastData, keyLength); - this-> lastBlock = out; - this->lastData = lastData; + unsigned char *lastData = new unsigned char[BLOCK_BYTES_LEN]; + memcpy(lastData, iv, BLOCK_BYTES_LEN); + this->iv = block + inLen - BLOCK_BYTES_LEN; + decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, + block + inLen - BLOCK_BYTES_LEN, lastData, keyLength); + memcpy(lastBlock, block + inLen - 2*BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); + this->lastData = lastData; } -void AESOfb::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) +void AESOfb::decryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen) { - decrypt(block, inLen , key, out, outLen, lastBlock, lastData, keyLength); + decrypt(block, inLen, key, out, outLen, lastBlock, lastData, keyLength); + memcpy(lastBlock, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); + } void AESOfb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength) { padMessage(in, inLen, outLen); out = new unsigned char[outLen]; unsigned char block[BLOCK_BYTES_LEN]; unsigned char feedback[BLOCK_BYTES_LEN]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * + NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); memcpy(feedback, lastData, BLOCK_BYTES_LEN); for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { encryptBlock(feedback, block, roundKeys, keyLength); - xorBlocks(in + i, block, out+ i,BLOCK_BYTES_LEN); - for (unsigned int j = 0; j < BLOCK_BYTES_LEN; ++j) + xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); + for (unsigned int j = 0; j < BLOCK_BYTES_LEN; ++j) out[i + j] = in[i + j] ^ block[j]; memcpy(feedback, block, BLOCK_BYTES_LEN); memcpy(lastData, feedback, BLOCK_BYTES_LEN); @@ -60,17 +79,21 @@ void AESOfb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, } void AESOfb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) + unsigned char *&out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength) { checkLength(inLen); unsigned char block[BLOCK_BYTES_LEN]; outLen = inLen; out = new unsigned char[outLen]; unsigned char feedback[BLOCK_BYTES_LEN]; - unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * + NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); memcpy(feedback, lastData, BLOCK_BYTES_LEN); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { encryptBlock(feedback, block, roundKeys, keyLength); xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); memcpy(feedback, block, BLOCK_BYTES_LEN); diff --git a/src/hash_factory.cpp b/src/hash_factory.cpp new file mode 100644 index 00000000..f44e9a8c --- /dev/null +++ b/src/hash_factory.cpp @@ -0,0 +1,64 @@ +#include "../include/hash_factory.h" +#include + +logger factory_logger("hsm"); + +/** + * @brief Gets the singleton instance of HashFactory. + * + * This method ensures that only one instance of HashFactory exists during + * the program's lifetime (Singleton Pattern). + * + * @return The singleton instance of HashFactory. + */ +HashFactory& HashFactory::getInstance() +{ + factory_logger.logMessage(logger::LogLevel::INFO, "HashFactory::getInstance() called"); + static HashFactory instance; + return instance; +} + +/** + * @brief Creates an IHash object based on the specified SHAAlgorithm. + * + * This method creates a hash algorithm object depending on the specified + * type (e.g., SHA256, SHA3-512). + * + * @param type The SHA algorithm type to create. + * @param hashPtr A reference to a unique_ptr where the newly created IHash object will be stored. + * @return CK_RV The return code indicating success or failure. + */ +CK_RV HashFactory::create(const IHash::SHAAlgorithm& type, std::unique_ptr& hashPtr) const +{ + factory_logger.logMessage(logger::LogLevel::INFO, "HashFactory::create() called with SHAAlgorithm: " + std::to_string(static_cast(type))); + + try { + const auto it = factories.find(type); + if (it != factories.end()) { + hashPtr = it->second(); + return CKR_OK; // Success + } else { + factory_logger.logMessage(logger::LogLevel::ERROR, "Error: Algorithm type not found in HashFactory."); + return CKR_FUNCTION_FAILED; // Error: Algorithm type not found + } + } + catch (const std::exception& e) { + factory_logger.logMessage(logger::LogLevel::ERROR, std::string("Exception caught in HashFactory::create: ") + e.what()); + return CKR_FUNCTION_FAILED; // Error: Exception occurred + } +} + +/** + * @brief Private constructor that initializes the hash algorithm factories. + * + * This constructor registers hash algorithms to the factory map. It is private + * to ensure that only one instance of HashFactory can exist (Singleton Pattern). + */ +HashFactory::HashFactory() + : factories({ + {IHash::SHAAlgorithm::SHA256, []() -> std::unique_ptr { return std::make_unique(); }}, + {IHash::SHAAlgorithm::SHA3_512, []() -> std::unique_ptr { return std::make_unique(); }} + }) +{ + factory_logger.logMessage(logger::LogLevel::INFO, "HashFactory constructor called, initializing hash algorithm factories."); +} \ No newline at end of file diff --git a/src/sha256.cpp b/src/sha256.cpp index d6ebb26a..5a472d25 100644 --- a/src/sha256.cpp +++ b/src/sha256.cpp @@ -1,13 +1,12 @@ #include "../include/sha256.h" -#include -#include #include + #ifdef USE_SYCL #include using namespace sycl; #endif //USE_SYCL - using namespace std; +logger logger("hsm"); // Constants used in SHA-256 processing #define CHOOSE(x, y, z) (((x) & (y)) ^ (~(x) & (z))) @@ -17,91 +16,110 @@ using namespace std; #define SIGMA1(x) (ROTRIGHT(x, 6) ^ ROTRIGHT(x, 11) ^ ROTRIGHT(x, 25)) #define GAMMA0(x) (ROTRIGHT(x, 7) ^ ROTRIGHT(x, 18) ^ ((x) >> 3)) #define GAMMA1(x) (ROTRIGHT(x, 17) ^ ROTRIGHT(x, 19) ^ ((x) >> 10)) - -// SHA-256 constants used in the compression function -const uint32_t bytes[64] = { - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, - 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, - 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, - 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, - 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, - 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, - 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, - 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, - 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 -}; - +/** + * SHA256 constructor initializes the hash values with SHA-256 specific constants. + * Sets the initial message size and bit length to 0. + */ +SHA256::SHA256(){ + result[0] = 0x6a09e667; + result[1] = 0xbb67ae85; + result[2] = 0x3c6ef372; + result[3] = 0xa54ff53a; + result[4] = 0x510e527f; + result[5] = 0x9b05688c; + result[6] = 0x1f83d9ab; + result[7] = 0x5be0cd19; + messageSize = 0; + bitLength = 0; +} /** * Updates the SHA-256 hash with the provided data. * Processes data in 64-byte chunks, calling `transform` for each chunk. - * + * * @param data A vector of bytes to be added to the hash. */ -void sha256_update(SHA256State& state, const std::vector& data) +CK_RV SHA256::update(const std::vector& data) { + logger.logMessage(logger::LogLevel::DEBUG, "Updating SHA-256 with data."); + + // Get the size of the input data size_t length = data.size(); + + // Process the input data byte by byte for (size_t i = 0; i < length; i++) { - state.message[state.messageSize++] = static_cast(data[i]); - if (state.messageSize == 64) { - transform(state); // Process the current 64-byte block - state.messageSize = 0; - state.bitLength += 512; + message[messageSize++] = static_cast(data[i]); + + // If the message buffer is full (64 bytes), apply the SHA-256 transform + if (messageSize == 64) { + CK_RV transform_status = transform(); + if (transform_status != CKR_OK) { + logger.logMessage(logger::LogLevel::ERROR, "Transform failed during SHA-256 update."); + return transform_status; // Return the error code from the transform function + } + + // Reset the message size and increment the bit length + messageSize = 0; + bitLength += 512; } } + return CKR_OK; // Return success if everything goes well } /** * Adds padding to the message and appends the length of the original message. * The message is padded so its length is congruent to 56 modulo 64. */ -void padding(SHA256State& state) +void SHA256::padding() { - uint64_t currentLength = state.messageSize; + logger.logMessage(logger::LogLevel::DEBUG, "Padding the message and appending its length to make it congruent to 56 mod 64."); + + uint64_t currentLength = messageSize; uint8_t paddingEnd = currentLength < 56 ? 56 : 64; // Append the 0x80 byte (0b10000000) - state.message[currentLength++] = 0x80; + message[currentLength++] = 0x80; // Pad with 0x00 bytes until the length of the message is 56 bytes mod 64 - memset(state.message + currentLength, 0, paddingEnd - currentLength); + memset(message + currentLength, 0, paddingEnd - currentLength); currentLength = paddingEnd; // If message length is >= 56, process the current block and reset for new padding - if (state.messageSize >= 56) { - transform(state); // Process the current block - memset(state.message, 0, 56); + if (messageSize >= 56) { + transform(); + memset(message, 0, 56); currentLength = 56; } // Append the length of the original message in bits (64-bit big-endian) - state.bitLength += state.messageSize * 8; + bitLength += messageSize * 8; for (int i = 0; i < 8; i++) { - state.message[63 - i] = state.bitLength >> (i * 8); + message[63 - i] = bitLength >> (i * 8); } - - transform(state); // Final block processing + transform(); } - #ifdef USE_SYCL /** - * Processes a 64-byte block of the message and updates the hash state. - * Applies the SHA-256 compression function to the current block. + * Transforms the message block by applying SHA-256 compression. + * This function runs in parallel using SYCL if the USE_SYCL flag is enabled. + * + * The function computes the message schedule array (`temp`) and then + * updates the hash state by processing the message in 64 rounds. */ -void transform(SHA256State& state) +CK_RV SHA256::transform() { + logger.logMessage(logger::LogLevel::DEBUG, "Transforming message block and updating hash state using 64 rounds of SHA-256 compression."); uint32_t temp[64]; queue q; + // Check if message size is correct + if (messageSize != 64) { + logger.logMessage(logger::LogLevel::ERROR, "Message size is not 64 bytes."); + return CKR_FUNCTION_FAILED; // Return an error code if the message size is incorrect + } + // Initialize the first 16 elements of temp with the message schedule for (uint8_t i = 0, j = 0; i < 16; i++, j += 4) - temp[i] = (state.message[j] << 24) | (state.message[j + 1] << 16) | (state.message[j + 2] << 8) | (state.message[j + 3]); + temp[i] = (message[j] << 24) | (message[j + 1] << 16) | (message[j + 2] << 8) | (message[j + 3]); for (uint8_t k = 16; k < 64; k++) temp[k] = GAMMA1(temp[k - 2]) + temp[k - 7] + GAMMA0(temp[k - 15]) + temp[k - 16]; @@ -109,7 +127,7 @@ void transform(SHA256State& state) // Save the current state uint32_t s[8]; for (uint8_t i = 0; i < 8; i++) - s[i] = state.result[i]; + s[i] = result[i]; for (size_t i = 0; i < 64; i++) { uint32_t choose, sum, majority, newA, newE; @@ -129,11 +147,10 @@ void transform(SHA256State& state) s[1] = s[0]; s[0] = newA; } - // Process the message in 64-byte chunks, parallelizing where feasible { buffer state_buf(s, range<1>(8)); - buffer result_buf(state.result, range<1>(8)); + buffer result_buf(result, range<1>(8)); // Update the result with the state q.submit([&](handler &h) { @@ -145,132 +162,158 @@ void transform(SHA256State& state) }); }).wait(); } + return CKR_OK; } /** * Finalizes the SHA-256 hash computation. * Applies padding and appends the length of the original message. * Returns the final hash as a vector of bytes. - * + * * @param state The SHA256State object to finalize. * @return A vector containing the SHA-256 hash value. */ -vector sha256_finalize(SHA256State& state) +CK_RV SHA256::finalize(std::vector& output) { - padding(state); - vector hash(32); // SHA-256 hash size is 32 bytes (256 bits) - - // Define SYCL buffers - buffer result_buf(state.result, range<1>(8)); - buffer hash_buf(hash.data(), range<1>(32)); + logger.logMessage(logger::LogLevel::DEBUG, "Finalizing SHA-256 hash computation and returning the hash value."); + + try { + // Perform padding + padding(); + + // SHA-256 hash size is 32 bytes (256 bits) + std::vector hash(32); + + // Define SYCL buffers + sycl::buffer result_buf(result, sycl::range<1>(8)); + sycl::buffer hash_buf(hash.data(), sycl::range<1>(32)); + + // Submit SYCL command group + sycl::queue q; + q.submit([&](sycl::handler& h) { + auto result_acc = result_buf.get_access(h); + auto hash_acc = hash_buf.get_access(h); + h.parallel_for(sycl::range<1>(8), [=](sycl::id<1> idx) { + size_t i = idx[0]; + hash_acc[i * 4 + 0] = (result_acc[i] >> 24) & 0xff; + hash_acc[i * 4 + 1] = (result_acc[i] >> 16) & 0xff; + hash_acc[i * 4 + 2] = (result_acc[i] >> 8) & 0xff; + hash_acc[i * 4 + 3] = (result_acc[i] >> 0) & 0xff; + }); + }).wait(); - // Copy the result to the hash output - queue q; - q.submit([&](handler &h) { - auto result_acc = result_buf.get_access(h); - auto hash_acc = hash_buf.get_access(h); - - h.parallel_for(range<1>(8), [=](id<1> idx) { - size_t i = idx[0]; - hash_acc[i * 4 + 0] = (result_acc[i] >> 24) & 0xff; - hash_acc[i * 4 + 1] = (result_acc[i] >> 16) & 0xff; - hash_acc[i * 4 + 2] = (result_acc[i] >> 8) & 0xff; - hash_acc[i * 4 + 3] = (result_acc[i] >> 0) & 0xff; - }); - }).wait(); - - return hash; + // Copy the hash to the output vector + output = hash; + + return CKR_OK; // Return success + } + catch (const sycl::exception& e) { + // Handle SYCL exceptions + logger.logMessage(logger::LogLevel::ERROR, "SYCL error: " + std::string(e.what())); + return CKR_FUNCTION_FAILED; + } + catch (const std::exception& e) { + // Handle other exceptions + logger.logMessage(logger::LogLevel::ERROR, "Standard error: " + std::string(e.what())); + return CKR_FUNCTION_FAILED; + } } + #else /** * Processes a 64-byte block of the message and updates the hash state. * Applies the SHA-256 compression function to the current block. */ -void transform(SHA256State& SHAState) +CK_RV SHA256::transform() { + logger.logMessage(logger::LogLevel::DEBUG, "Transforming message block and updating hash state using 64 rounds of SHA-256 compression."); + uint32_t temp[64]; + + // Initialize temp array with message data for (uint8_t i = 0, j = 0; i < 16; i++, j += 4) - temp[i] = (SHAState.message[j] << 24) | (SHAState.message[j + 1] << 16) | (SHAState.message[j + 2] << 8) | (SHAState.message[j + 3]); + temp[i] = (message[j] << 24) | (message[j + 1] << 16) | (message[j + 2] << 8) | (message[j + 3]); + // Compute remaining values for temp array for (uint8_t k = 16; k < 64; k++) temp[k] = GAMMA1(temp[k - 2]) + temp[k - 7] + GAMMA0(temp[k - 15]) + temp[k - 16]; - // Save the current state - uint32_t state[8]; - for (uint8_t i = 0; i < 8; i++) - state[i] = SHAState.result[i]; - - // Process the message in 64-byte chunks + // Initialize working variables + uint32_t a, b, c, d, e, f, g, h; + a = result[0]; + b = result[1]; + c = result[2]; + d = result[3]; + e = result[4]; + f = result[5]; + g = result[6]; + h = result[7]; + + // Perform the 64 rounds of SHA-256 compression for (size_t i = 0; i < 64; i++) { - uint32_t choose, sum, majority, newA, newE; - - choose = CHOOSE(state[4], state[5], state[6]); - majority = MAJORITY(state[0], state[1], state[2]); - sum = temp[i] + bytes[i] + state[7] + choose + SIGMA1(state[4]); - newA = SIGMA0(state[0]) + majority + sum; - newE = state[3] + sum; - - state[7] = state[6]; - state[6] = state[5]; - state[5] = state[4]; - state[4] = newE; - state[3] = state[2]; - state[2] = state[1]; - state[1] = state[0]; - state[0] = newA; - } - // Add the current chunk's hash to the result - for (uint8_t i = 0; i < 8; i++) { - SHAState.result[i] += state[i]; + uint32_t temp1 = h + SIGMA1(e) + CHOOSE(e, f, g) + bytes[i] + temp[i]; + uint32_t temp2 = SIGMA0(a) + MAJORITY(a, b, c); + h = g; + g = f; + f = e; + e = d + temp1; + d = c; + c = b; + b = a; + a = temp1 + temp2; } + + // Update result with compressed values + result[0] += a; + result[1] += b; + result[2] += c; + result[3] += d; + result[4] += e; + result[5] += f; + result[6] += g; + result[7] += h; + + return CKR_OK; // Return success if no errors occurred } /** * Finalizes the SHA-256 hash computation. * Applies padding and appends the length of the original message. * Returns the final hash as a vector of bytes. - * + * * @return A vector containing the SHA-256 hash value. */ -vector sha256_finalize(SHA256State& SHAState) +CK_RV SHA256::finalize(std::vector& output) { - padding(SHAState); - vector hash(32); // SHA-256 hash size is 32 bytes (256 bits) - for (int i = 0; i < 8; i++) { - hash[i * 4] = (SHAState.result[i] >> 24) & 0xFF; - hash[i * 4 + 1] = (SHAState.result[i] >> 16) & 0xFF; - hash[i * 4 + 2] = (SHAState.result[i] >> 8) & 0xFF; - hash[i * 4 + 3] = SHAState.result[i] & 0xFF; + logger.logMessage(logger::LogLevel::DEBUG, "Finalizing SHA-256 hash computation."); + + // Check if the internal state is valid + if (result == nullptr) { + logger.logMessage(logger::LogLevel::ERROR, "SHA-256 computation has not been initialized or has failed."); + return CKR_FUNCTION_FAILED; } - return hash; -} -#endif //USE_SYCL + try { + // Apply padding to the data + padding(); + } catch (const std::exception& e) { + logger.logMessage(logger::LogLevel::ERROR, std::string("Padding failed: ") + e.what()); + return CKR_FUNCTION_FAILED; + } + // Ensure the output vector has the correct size + if (output.size() != 32) { + output.resize(32); + } -/** - * Computes the SHA-256 hash for the given input. - * Resets the internal state, updates with the input data, and returns the final hash. - * - * @param input A vector of bytes to be hashed. - * @return A vector containing the SHA-256 hash value. - */ -vector sha256_compute(const std::vector& input) -{ - SHA256State state; - // Initialize state - state.result[0] = 0x6a09e667; - state.result[1] = 0xbb67ae85; - state.result[2] = 0x3c6ef372; - state.result[3] = 0xa54ff53a; - state.result[4] = 0x510e527f; - state.result[5] = 0x9b05688c; - state.result[6] = 0x1f83d9ab; - state.result[7] = 0x5be0cd19; - state.messageSize = 0; - state.bitLength = 0; - - // Process the input data - sha256_update(state, input); - return sha256_finalize(state); -} \ No newline at end of file + for (size_t i = 0; i < 8; i++) { + output[i * 4 + 0] = (result[i] >> 24) & 0xFF; + output[i * 4 + 1] = (result[i] >> 16) & 0xFF; + output[i * 4 + 2] = (result[i] >> 8) & 0xFF; + output[i * 4 + 3] = (result[i]) & 0xFF; + } + + return CKR_OK; +} + +#endif //USE_SYCL \ No newline at end of file diff --git a/tests/SHA3-512_tests.cpp b/tests/SHA3-512_tests.cpp deleted file mode 100644 index b592bbbd..00000000 --- a/tests/SHA3-512_tests.cpp +++ /dev/null @@ -1,86 +0,0 @@ -#include "gtest/gtest.h" -#include -#include "../include/SHA3-512.h" -#include - -// General function to update and finalize the SHA-256 hash -void sha3_512_test(const std::vector>& chunks, const std::string& expectedHash) -{ - SHA3_512 state; - - // Loop to update the hash with chunks of data - for (const auto& chunk : chunks) - state.update(chunk.data(), chunk.size()); - - // Compute the final hash - std::string hash; - state.finalize(hash); - - // Compare the resulting hash with the expected hash - ASSERT_EQ(hash, expectedHash); -} - -// Test for hash of an empty string -TEST(SHA3_512Test, EmptyStringHash) -{ - std::vector> data = {{}}; - std::string expectedHash = "a69f73cca23a9ac5c8b567dc185a756e97c98216" - "4fe25859e0d1dcc1475c80a615b2123af1f5f94" - "c11e3e9402c3ac558f500199d95b6d3e3017585" - "86281dcd26"; - sha3_512_test(data, expectedHash); -} - -// Test for hash of the string "abc" -TEST(SHA3_512Test, ABCStringHash) -{ - std::vector> data = {{'a', 'b', 'c'}}; - std::string expectedHash = "b751850b1a57168a5693cd924b6b096e08f621827" - "444f70d884f5d0240d2712e10e116e9192af3c91" - "a7ec57647e3934057340b4cf408d5a56592f8274" - "eec53f0"; - sha3_512_test(data, expectedHash); -} - -// Test for hash of a string longer than 64 bytes -TEST(SHA3_512Test, StringLongerThan64BytesHash) -{ - std::string longString = "The quick brown fox jumps over the lazy dog"; - std::vector> data = {std::vector(longString.begin(), longString.end())}; - std::string expectedHash = "01dedd5de4ef14642445ba5f5b97c15e47b9ad931" - "326e4b0727cd94cefc44fff23f07bf543139939b" - "49128caf436dc1bdee54fcb24023a08d9403f9b4" - "bf0d450"; - sha3_512_test(data, expectedHash); -} - -// Test for hash of a string containing special characters -TEST(SHA3_512Test, SpecialCharsHash) -{ - std::string specialString = "!@#$%^&*()"; - std::vector> data = {std::vector(specialString.begin(), specialString.end())}; - std::string expectedHash = "fbbcb3e21184dd4061de0b85c4756f74e36a36112" - "5733e2c7470232fc66f71c902d1e6ff7eb60cfe6" - "b47e8b72e1429b4ff21de0fa150a2b3e8d8e29e2" - "64d56ab"; - sha3_512_test(data, expectedHash); -} - -// Test for multiple updates -TEST(SHA3_512Test, MultipleUpdatesHash) -{ - std::vector> data = { - {'a', 'b'}, // First update with two bytes - {'c', 'd'} // Second update with two more bytes - }; - std::string expectedHash = "6eb7b86765bf96a8467b72401231539cbb830f6c641" - "20954c4567272f613f1364d6a80084234fa3400d30" - "6b9f5e10c341bbdc5894d9b484a8c7deea9cbe4e265"; - sha3_512_test(data, expectedHash); -} - -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} \ No newline at end of file diff --git a/tests/aes_tests.cpp b/tests/aes_tests.cpp index f0a07960..6932fe18 100644 --- a/tests/aes_tests.cpp +++ b/tests/aes_tests.cpp @@ -2,21 +2,45 @@ #include "gtest/gtest.h" #include "../include/aes.h" #include "../include/aes_stream_factory.h" // Assuming this is where your FactoryManager is defined - +void printBufferHexa(const uint8_t *buffer, size_t len, std::string message) +{ + std::cout << message << std::endl; + for (size_t i = 0; i < len; ++i) + { + std::cout << std::hex << std::setw(2) << std::setfill('0') + << static_cast(buffer[i]) << " "; + // Print a new line every 16 bytes for better readability + if ((i + 1) % 16 == 0) + std::cout << std::endl; + } + std::cout << std::endl; + // Reset the stream format back to decimal + std::cout << std::dec; +} /* Helper function to setup encryption and decryption */ void testEncryptionDecryption(AESChainingMode mode, AESKeyLength keyLength) { - unsigned char plain[BLOCK_BYTES_LEN] = { + unsigned char plain[64] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, + 0x00, 0x10, 0x21, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x78, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, + 0x00, 0x10, 0x21, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x78, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, }; - unsigned char plain2[BLOCK_BYTES_LEN] = { + + unsigned char plain2[32] = { 0x00, 0x10, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x78, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, + 0x00, 0x10, 0x21, 0x33, 0x44, 0x55, 0x66, 0x77, 0x78, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; - unsigned char plain3[BLOCK_BYTES_LEN] = { - 0x00, 0x10, 0x21, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x78, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff + + unsigned char plain3[13] = { + 0x48, 0x65, 0x6c ,0x6c ,0x6f ,0x2c ,0x20 ,0x57 ,0x6f ,0x72 ,0x6c ,0x64 ,0x21 }; + // Create a factory instance StreamAES* streamAES = FactoryManager::getInstance().create(mode); @@ -24,17 +48,17 @@ void testEncryptionDecryption(AESChainingMode mode, AESKeyLength keyLength) { unsigned char *key = new unsigned char[aesKeyLengthData[keyLength].keySize]; generateKey(key, keyLength); - unsigned char* encrypted = new unsigned char[calculatEncryptedLenAES(BLOCK_BYTES_LEN, true)]; - unsigned char* encrypted2 = new unsigned char[calculatEncryptedLenAES(BLOCK_BYTES_LEN, false)]; - unsigned char* encrypted3 = new unsigned char[calculatEncryptedLenAES(BLOCK_BYTES_LEN, false)]; - + unsigned char* encrypted = new unsigned char[calculatEncryptedLenAES(64, true)]; + unsigned char* encrypted2 = new unsigned char[calculatEncryptedLenAES(32, false)]; + unsigned char* encrypted3 = new unsigned char[calculatEncryptedLenAES(32, false)]; + printBufferHexa(encrypted3, 13, "OFB hello world"); unsigned int outLenEncrypted = 0; unsigned int outLenEncrypted2 = 0; unsigned int outLenEncrypted3 = 0; - streamAES->encryptStart(plain, BLOCK_BYTES_LEN, encrypted, outLenEncrypted, key, keyLength); - streamAES->encryptContinue(plain2, BLOCK_BYTES_LEN, encrypted2, outLenEncrypted2); - streamAES->encryptContinue(plain3, BLOCK_BYTES_LEN, encrypted3, outLenEncrypted3); + streamAES->encryptStart(plain, 64, encrypted, outLenEncrypted, key, keyLength); + streamAES->encryptContinue(plain2, 32, encrypted2, outLenEncrypted2); + streamAES->encryptContinue(plain3, 32, encrypted3, outLenEncrypted3); unsigned char* decrypted; // new unsigned char[calculatDecryptedLenAES(BLOCK_BYTES_LEN, true)]; @@ -51,9 +75,9 @@ void testEncryptionDecryption(AESChainingMode mode, AESKeyLength keyLength) { streamAES->decryptContinue(encrypted3, outLenEncrypted3, decrypted3, outLenDecrypted3); - ASSERT_FALSE(memcmp(plain, decrypted, BLOCK_BYTES_LEN)); - ASSERT_FALSE(memcmp(plain2, decrypted2, BLOCK_BYTES_LEN)); - ASSERT_FALSE(memcmp(plain3, decrypted3, BLOCK_BYTES_LEN)); + ASSERT_FALSE(memcmp(plain, decrypted, 64)); + ASSERT_FALSE(memcmp(plain2, decrypted2, 32)); + ASSERT_FALSE(memcmp(plain3, decrypted3, 32)); delete [] encrypted; delete [] encrypted2; @@ -139,7 +163,8 @@ TEST(KeyLengths, KeyLength256_CTR) testEncryptionDecryption(AESChainingMode::CTR, AESKeyLength::AES_256); } -int main() { +int main() +{ ::testing::InitGoogleTest(); return RUN_ALL_TESTS(); -} \ No newline at end of file +} diff --git a/tests/hash_tests.cpp b/tests/hash_tests.cpp new file mode 100644 index 00000000..ddaca874 --- /dev/null +++ b/tests/hash_tests.cpp @@ -0,0 +1,144 @@ +#include +#include +#include +#include "../include/IHash.h" +#include "../include/hash_factory.h" + +// Helper function to convert vector to a hex string for comparison +std::string to_hex_string(const std::vector& data) { + std::ostringstream oss; + for (auto byte : data) { + oss << std::hex << std::setw(2) << std::setfill('0') << static_cast(byte); + } + return oss.str(); +} + +// Test fixture class for SHA256 +class HashTest : public ::testing::Test { +protected: + void SetUp() override { + // Get the FactoryManager instance + factoryManager = &HashFactory::getInstance(); + CK_RV result; + // Create SHA256 object using FactoryManager + result = factoryManager->create(IHash::SHA256, sha256); + if (!sha256 || result != CKR_OK) { + FAIL() << "Failed to create SHA256 instance"; + } + + result = factoryManager->create(IHash::SHA3_512, sha512); + if(!sha512 || result != CKR_OK){ + FAIL() << "Failed to create SHA512 instance"; + } + } + // Utility to hash a string and return the hex string of the result + std::string hashStringSHA256(const std::string& input) { + std::vector output; + std::vector data(input.begin(), input.end()); + sha256->update(data); + sha256->finalize(output); + return to_hex_string(output); + } + + void hashStringSHA512(const std::vector>& chunks, const std::string& expectedHash) { + std::vector output; + for (const auto& chunk : chunks) { + sha512->update(chunk); + } + sha512->finalize(output); + std::string res = std::string(output.begin(), output.end()); + + ASSERT_EQ(res, expectedHash); + } + HashFactory* factoryManager; + std::unique_ptr sha256; + std::unique_ptr sha512; +}; + +// Test hashing an empty string +TEST_F(HashTest, HashEmptyString) { + std::string expectedHash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + std::string hash = hashStringSHA256(""); + EXPECT_EQ(hash, expectedHash); +} + +// Test hashing "abc" +TEST_F(HashTest, HashABC) { + std::string expectedHash = "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"; + std::string hash = hashStringSHA256("abc"); + EXPECT_EQ(hash, expectedHash); +} + +// Test hashing "hello world" +TEST_F(HashTest, HashHelloWorld) { + std::string expectedHash = "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"; + std::string hash = hashStringSHA256("hello world"); + EXPECT_EQ(hash, expectedHash); +} + +// Test hashing a string with special characters +TEST_F(HashTest, HashSpecialCharacters) { + std::string specialChars = "!@#$%^&*()_+-={}[]|:;<>,.?/~`"; + std::string expectedHash = "64192e06fd03a054a8f7a478adfed5b15effe6f3ecc24df06df143cc1d45b7ab"; // Replace with the actual expected hash value + std::string hash = hashStringSHA256(specialChars); + EXPECT_EQ(hash, expectedHash); +} + +// Test for hash of an empty string +TEST_F(HashTest, EmptyStringHash) +{ + std::vector> data = {{}}; + std::string expectedHash = "a69f73cca23a9ac5c8b567dc185a756e97c98216" + "4fe25859e0d1dcc1475c80a615b2123af1f5f94" + "c11e3e9402c3ac558f500199d95b6d3e3017585" + "86281dcd26"; + hashStringSHA512(data, expectedHash); +} + +// Test for hash of the string "abc" +TEST_F(HashTest, ABCStringHash) +{ + std::vector> data = {{'a', 'b', 'c'}}; + std::string expectedHash = "b751850b1a57168a5693cd924b6b096e08f621827" + "444f70d884f5d0240d2712e10e116e9192af3c91" + "a7ec57647e3934057340b4cf408d5a56592f8274" + "eec53f0"; + hashStringSHA512(data, expectedHash); +} + +// Test for hash of a string longer than 64 bytes +TEST_F(HashTest, StringLongerThan64BytesHash) +{ + std::string longString = "The quick brown fox jumps over the lazy dog"; + std::vector> data = {std::vector(longString.begin(), longString.end())}; + std::string expectedHash = "01dedd5de4ef14642445ba5f5b97c15e47b9ad931" + "326e4b0727cd94cefc44fff23f07bf543139939b" + "49128caf436dc1bdee54fcb24023a08d9403f9b4" + "bf0d450"; + hashStringSHA512(data, expectedHash); +} + +// Test for hash of a string containing special characters +TEST_F(HashTest, SpecialCharsHash) +{ + std::string specialString = "!@#$%^&*()"; + std::vector> data = {std::vector(specialString.begin(), specialString.end())}; + std::string expectedHash = "fbbcb3e21184dd4061de0b85c4756f74e36a36112" + "5733e2c7470232fc66f71c902d1e6ff7eb60cfe6" + "b47e8b72e1429b4ff21de0fa150a2b3e8d8e29e2" + "64d56ab"; + hashStringSHA512(data, expectedHash); +} + +// Test for multiple updates +TEST_F(HashTest, MultipleUpdatesHash) +{ + std::vector> data = { + {'a', 'b'}, // First update with two bytes + {'c', 'd'} // Second update with two more bytes + }; + std::string expectedHash = "6eb7b86765bf96a8467b72401231539cbb830f6c641" + "20954c4567272f613f1364d6a80084234fa3400d30" + "6b9f5e10c341bbdc5894d9b484a8c7deea9cbe4e265"; + hashStringSHA512(data, expectedHash); +} \ No newline at end of file From c40080df3676579ebc53dd12a7c6d2221d96ad3d Mon Sep 17 00:00:00 2001 From: rut-git Date: Mon, 30 Sep 2024 22:23:11 +0300 Subject: [PATCH 18/21] Implement HSM functionality with gRPC communication --- CMakeLists.txt | 121 +- include/IHash.h | 16 +- include/SHA3-512.h | 41 +- include/aes.h | 85 +- include/aes_stream.h | 366 +- include/aes_stream_factory.h | 19 +- include/{sycl-version => }/big_int64.h | 107 +- include/big_int_utils.h | 1 + include/crypto_api.h | 97 + include/crypto_service.h | 42 + include/debug_utils.h | 26 + include/ecc.h | 4 +- include/general.h | 59 + include/hash_factory.h | 20 +- include/prime_tests.h | 7 +- include/return_codes.h | 24 - include/rsa.h | 4 +- include/sha256.h | 64 +- include/temp_hsm.h | 223 + include/threads-version/big_int64.h | 109 - logger/logger.cpp | 1 + proto/encryption.grpc.pb.cc | 1346 ++++ proto/encryption.grpc.pb.h | 4950 +++++++++++++ proto/encryption.pb.cc | 8982 +++++++++++++++++++++++ proto/encryption.pb.h | 8805 ++++++++++++++++++++++ proto/encryption.proto | 216 + shared_log_file_name.txt | 1 + src/SHA3-512.cpp | 588 +- src/aes.cpp | 573 +- src/aes_cbc.cpp | 128 +- src/aes_cfb.cpp | 133 +- src/aes_ctr.cpp | 456 +- src/aes_ecb.cpp | 321 +- src/aes_ofb.cpp | 53 +- src/aes_stream_factory.cpp | 16 - src/{threads-version => }/big_int64.cpp | 839 ++- src/crypto_api.cpp | 1272 ++++ src/crypto_service.cpp | 431 ++ src/debug_utils.cpp | 51 + src/ecc.cpp | 3 - src/general.cpp | 6 + src/hash_factory.cpp | 18 +- src/prime_tests.cpp | 1603 ++-- src/rsa.cpp | 732 +- src/sha256.cpp | 28 +- src/shared_log_file_name.txt | 1 + src/sycl-version/big_int64.cpp | 834 --- tests/aes_tests.cpp | 201 +- tests/crypto_api_tests.cpp | 1032 +++ tests/ecc_tests.cpp | 3 +- tests/hash_tests.cpp | 4 +- tests/keys_tests.cpp | 107 + tests/sha256_tests.cpp | 117 +- 53 files changed, 31364 insertions(+), 3922 deletions(-) rename include/{sycl-version => }/big_int64.h (63%) create mode 100644 include/crypto_api.h create mode 100644 include/crypto_service.h create mode 100644 include/debug_utils.h create mode 100644 include/general.h delete mode 100644 include/return_codes.h create mode 100644 include/temp_hsm.h delete mode 100644 include/threads-version/big_int64.h create mode 100644 proto/encryption.grpc.pb.cc create mode 100644 proto/encryption.grpc.pb.h create mode 100644 proto/encryption.pb.cc create mode 100644 proto/encryption.pb.h create mode 100644 proto/encryption.proto create mode 100644 shared_log_file_name.txt delete mode 100644 src/aes_stream_factory.cpp rename src/{threads-version => }/big_int64.cpp (51%) create mode 100644 src/crypto_api.cpp create mode 100644 src/crypto_service.cpp create mode 100644 src/debug_utils.cpp create mode 100644 src/general.cpp create mode 100644 src/shared_log_file_name.txt delete mode 100644 src/sycl-version/big_int64.cpp create mode 100644 tests/crypto_api_tests.cpp create mode 100644 tests/keys_tests.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 4eeaab16..c967bd5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,66 +1,75 @@ cmake_minimum_required(VERSION 3.10) -project(VehicleComputingSimulator) - -# Include directories -include_directories(src) -include_directories(${CMAKE_SOURCE_DIR}/include) -include_directories(${CMAKE_SOURCE_DIR}/logger) - +# Set the project name +project(grpc_server) # Find GMP library find_path(GMP_INCLUDE_DIR NAMES gmp.h) find_library(GMP_LIBRARY NAMES gmp) find_library(GMPXX_LIBRARY NAMES gmpxx) if(NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARY OR NOT GMPXX_LIBRARY) - message(FATAL_ERROR "Could not find GMP or GMPXX libraries") + message(FATAL_ERROR "Could not find GMP or GMPXX libraries") endif() include_directories(${GMP_INCLUDE_DIR}) - -# Find Google Test -find_package(GTest REQUIRED) - -# Add source files -file(GLOB SOURCES "src/*.cpp" "logger/*.cpp") - -# Check if SYCL is enabled -option(USE_SYCL "Enable SYCL support" OFF) - -if(USE_SYCL) - # Set the icpx compiler with SYCL support - set(CMAKE_CXX_COMPILER icpx) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl -g") - # Add oneAPI include directories - include_directories(${CMAKE_SOURCE_DIR}/include /opt/intel/oneapi/compiler/latest/linux/include) - # Add oneAPI library directories - link_directories(/opt/intel/oneapi/compiler/latest/linux/lib) - message(STATUS "Compiling with SYCL support") - add_definitions(-DUSE_SYCL) -else() - message(STATUS "Compiling without SYCL support") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") - remove_definitions(-DUSE_SYCL) -endif() - -# Set build type to Debug -set(CMAKE_BUILD_TYPE Debug) - -# Add the executable for the tests, using the test source files -add_executable(runTests - tests/aes_tests.cpp - tests/ecc_tests.cpp - tests/hash_tests.cpp - ${SOURCES} +# Specify C++ standard +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +# Find Protobuf and gRPC packages +find_package(Protobuf REQUIRED) +find_package(gRPC REQUIRED) +# Gather all source files in src directory +file(GLOB SOURCES "src/*.cpp" ) +# Specify the path to the proto files +set(PROTO_FILES + ${CMAKE_SOURCE_DIR}/proto/encryption.proto ) - -# Link libraries -target_link_libraries(runTests - ${GMP_LIBRARY} - ${GMPXX_LIBRARY} - gtest - gtest_main - pthread -) - -# Optional: Set the output directory for the executable -set_target_properties(runTests PROPERTIES - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} +# Paths to the protoc and grpc_cpp_plugin binaries +set(PROTOC_PATH "/usr/local/bin/protoc") +set(GRPC_CPP_PLUGIN_PATH "/usr/local/bin/grpc_cpp_plugin") +# Specify output directory for generated files +set(PROTO_GEN_DIR "${CMAKE_BINARY_DIR}/generated") +file(MAKE_DIRECTORY ${PROTO_GEN_DIR}) +# Generate C++ source files from proto files +foreach(proto_file ${PROTO_FILES}) + get_filename_component(proto_name ${proto_file} NAME_WE) + + # Protobuf C++ source files + add_custom_command( + OUTPUT ${PROTO_GEN_DIR}/${proto_name}.pb.cc ${PROTO_GEN_DIR}/${proto_name}.pb.h + COMMAND ${PROTOC_PATH} --cpp_out=${PROTO_GEN_DIR} --proto_path=${CMAKE_SOURCE_DIR}/proto ${proto_file} + DEPENDS ${proto_file} + COMMENT "Generating protobuf code for ${proto_file}" + ) + + # gRPC C++ source files + add_custom_command( + OUTPUT ${PROTO_GEN_DIR}/${proto_name}.grpc.pb.cc ${PROTO_GEN_DIR}/${proto_name}.grpc.pb.h + COMMAND ${PROTOC_PATH} --grpc_out=${PROTO_GEN_DIR} --plugin=protoc-gen-grpc=${GRPC_CPP_PLUGIN_PATH} --proto_path=${CMAKE_SOURCE_DIR}/proto ${proto_file} + DEPENDS ${proto_file} + COMMENT "Generating gRPC code for ${proto_file}" + ) + + list(APPEND PROTO_SRCS ${PROTO_GEN_DIR}/${proto_name}.pb.cc ${PROTO_GEN_DIR}/${proto_name}.grpc.pb.cc) + list(APPEND PROTO_HDRS ${PROTO_GEN_DIR}/${proto_name}.pb.h ${PROTO_GEN_DIR}/${proto_name}.grpc.pb.h) +endforeach() +# Include the generated files directory +include_directories(${PROTO_GEN_DIR}) +# Include directories for protobuf and gRPC +include_directories(${Protobuf_INCLUDE_DIRS} ${GRPC_INCLUDE_DIRS}) +# Add the logger library +file(GLOB LOGGER_SOURCES "logger/*.cpp") +add_library(logger STATIC ${LOGGER_SOURCES}) +# Add the executable +add_executable(grpc_server ${SOURCES} ${PROTO_SRCS}) +# Link against protobuf, gRPC, GMP, and logger libraries +target_link_libraries(grpc_server ${Protobuf_LIBRARIES} ${GMP_LIBRARY} ${GMPXX_LIBRARY} gRPC::grpc++ logger) +# Ensure that protobuf and gRPC code generation is properly configured +add_custom_target(proto_gen ALL + DEPENDS ${PROTO_SRCS} ${PROTO_HDRS} + COMMENT "Generating protobuf and gRPC code" ) +# Add dependencies to ensure proper build order +add_dependencies(grpc_server proto_gen) +# Set build type to Debug +set(CMAKE_BUILD_TYPE Debug) +# Add debug flags +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") \ No newline at end of file diff --git a/include/IHash.h b/include/IHash.h index 44e506bb..011509c2 100644 --- a/include/IHash.h +++ b/include/IHash.h @@ -1,17 +1,15 @@ #ifndef IHASH_H #define IHASH_H -#include "return_codes.h" -#include +#include "general.h" #include +#include class IHash { public: - enum SHAAlgorithm{ - SHA256, - SHA3_512 - }; - virtual CK_RV update(const std::vector& data) = 0; - virtual CK_RV finalize(std::vector& output) = 0; - virtual ~IHash() = default; + enum SHAAlgorithm { SHA256, SHA3_512 }; + virtual CK_RV update(const std::vector &data) = 0; + virtual CK_RV finalize(std::vector &output) = 0; + virtual ~IHash() = default; }; + #endif // IHASH_H \ No newline at end of file diff --git a/include/SHA3-512.h b/include/SHA3-512.h index 8ed5849b..cc1a951c 100644 --- a/include/SHA3-512.h +++ b/include/SHA3-512.h @@ -1,31 +1,32 @@ #ifndef SHA3_512_H #define SHA3_512_H -#include -#include -#include // For fixed-width integer types -#include // For std::ostringstream #include "IHash.h" -#include "return_codes.h" +#include "general.h" +#include // For fixed-width integer types +#include // For std::ostringstream +#include +#include -class SHA3_512: public IHash -{ +class SHA3_512 : public IHash { public: - SHA3_512(); // Constructor to initialize the state - CK_RV update(const std::vector& data) override; // Update the hash with more data - CK_RV finalize(std::vector& output) override; // Finalize and get the hash value + SHA3_512(); // Constructor to initialize the state + CK_RV update(const std::vector &data) + override; // Update the hash with more data + CK_RV finalize( + std::vector &output) override; // Finalize and get the hash value private: - uint64_t S[5][5]; // State matrix - uint8_t buffer[576]; // Buffer to hold input data - std::size_t buffer_length; // Current length of data in the buffer + uint64_t S[5][5]; // State matrix + uint8_t buffer[576]; // Buffer to hold input data + std::size_t buffer_length; // Current length of data in the buffer - void round(uint64_t A[5][5], uint64_t RC); - void f_function(uint64_t A[5][5]); - void padding(uint8_t input[], std::size_t &in_len, int &absorb_times) ; - void assign_S_xor_p(uint64_t S[5][5], uint64_t *p); - void endianSwap(uint64_t &x); - std::vector hashPartToHexVector(uint64_t S[5][5]); + void round(uint64_t A[5][5], uint64_t RC); + void f_function(uint64_t A[5][5]); + void padding(uint8_t input[], std::size_t &in_len, int &absorb_times); + void assign_S_xor_p(uint64_t S[5][5], uint64_t *p); + void endianSwap(uint64_t &x); + std::vector hashPartToHexVector(uint64_t S[5][5]); }; -#endif // SHA3_512_H +#endif // SHA3_512_H \ No newline at end of file diff --git a/include/aes.h b/include/aes.h index 3a53e38b..e84be936 100644 --- a/include/aes.h +++ b/include/aes.h @@ -1,6 +1,7 @@ #ifndef _AES_H_ #define _AES_H_ #include +#include "general.h" #include #include #include @@ -9,59 +10,49 @@ #define NUM_BLOCKS 4 #define BLOCK_BYTES_LEN (AES_STATE_ROWS * (NUM_BLOCKS) * sizeof(unsigned char)) -enum AESChainingMode { - ECB, /*Electronic Codebook*/ - CBC, /*Cipher Block Chaining*/ - CFB, /*Cipher Feedback*/ - OFB, /*Output Feedback*/ - CTR /*Counter*/ -}; - -enum class AESKeyLength -{ - AES_128, - AES_192, - AES_256 -}; -struct AESData -{ +struct AESData { unsigned int numWord; unsigned int numRound; unsigned int keySize; }; -typedef std::function EncryptDecryptFunc; -static std::map aesKeyLengthData = { - { AESKeyLength::AES_128, {4, 10, 128} }, - { AESKeyLength::AES_192, {6, 12, 192} }, - { AESKeyLength::AES_256, {8, 14, 256} } -}; - void padMessage(unsigned char* &message, unsigned int& length, unsigned int& paddedLength); - void unpadMessage(unsigned char* message, unsigned int& length); - void addRoundKey(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS], unsigned char* roundKey); - void checkLength(unsigned int length); - void encryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys, AESKeyLength keyLength); - void decryptBlock(const unsigned char in[], unsigned char out[], unsigned char* roundKeys, AESKeyLength keyLength); - void subBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); - void invSubBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); - void invShiftRows(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); - void invMixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); - void mixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); - void shiftRows(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); - void keyExpansion(const unsigned char* key, unsigned char roundKeys[], AESKeyLength keyLength); - unsigned char xtime(unsigned char x); - void rotWord(unsigned char word[AES_STATE_ROWS]); - void subWord(unsigned char word[AES_STATE_ROWS]); - void rconWord(unsigned char rcon[AES_STATE_ROWS], unsigned int n); - unsigned char multiply(unsigned char x, unsigned char y); - void xorBlocks(const unsigned char *a, const unsigned char *b, - unsigned char *c, unsigned int len); - void generateRandomIV(unsigned char* iv); - size_t calculatEncryptedLenAES(size_t inLen, bool isFirst); - size_t calculatDecryptedLenAES(size_t inLen, bool isFirst); - void generateKey(unsigned char*, AESKeyLength keyLength); +static std::map aesKeyLengthData = { + {AESKeyLength::AES_128, {4, 10, 16}}, + {AESKeyLength::AES_192, {6, 12, 24}}, + {AESKeyLength::AES_256, {8, 14, 32}}}; + +unsigned int getPaddedLength(unsigned int originalLength); +void padMessage(unsigned char *originalMessage, unsigned int originalLength,unsigned char * paddedMessage); +unsigned int getUnpadMessageLength(unsigned char *message,unsigned int paddedLength); +void addRoundKey(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS], + unsigned char *roundKey); +void checkLength(unsigned int length); +void encryptBlock(const unsigned char in[], unsigned char out[], + unsigned char *roundKeys, AESKeyLength keyLength); +void decryptBlock(const unsigned char in[], unsigned char out[], + unsigned char *roundKeys, AESKeyLength keyLength); +void subBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); +void invSubBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); +void invShiftRows(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); +void invMixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); +void mixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); +void shiftRows(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]); +void keyExpansion(const unsigned char *key, unsigned char roundKeys[], + AESKeyLength keyLength); +unsigned char xtime(unsigned char x); +void rotWord(unsigned char word[AES_STATE_ROWS]); +void subWord(unsigned char word[AES_STATE_ROWS]); +void rconWord(unsigned char rcon[AES_STATE_ROWS], unsigned int n); +unsigned char multiply(unsigned char x, unsigned char y); +void xorBlocks(const unsigned char *a, const unsigned char *b, unsigned char *c, + unsigned int len); +void generateRandomIV(unsigned char *iv); +size_t calculatEncryptedLenAES(size_t inLen, bool isFirst, + AESChainingMode chainingMode); +size_t calculatDecryptedLenAES(size_t inLen, bool isFirst,AESChainingMode chainingMode); +void generateKey(unsigned char *, AESKeyLength keyLength); /*Inverse S-Box*/ const unsigned char invSBox[16][16] = { @@ -133,4 +124,4 @@ const unsigned char sBox[16][16] = { {0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16}}; -#endif +#endif \ No newline at end of file diff --git a/include/aes_stream.h b/include/aes_stream.h index a764ce44..61492139 100644 --- a/include/aes_stream.h +++ b/include/aes_stream.h @@ -1,174 +1,7 @@ -// #include "aes.h" -// #include -// #include -// #include -// #include - -// class StreamAES -// { -// public: - -// unsigned char* iv; -// unsigned char* lastBlock; -// AESKeyLength keyLength; -// unsigned char* key; -// unsigned char* lastData; - -// StreamAES() : iv(new unsigned char[16]), lastBlock(new unsigned char[16]){}; - -// /** -// @brief Encrypts the initial block of data using AES in CBC mode. - -// This function generates a random initialization vector (IV) and then -// encrypts the given block of data. The encrypted data and the IV are -// concatenated and stored in the output buffer. - -// @param block Input data block to encrypt. -// @param inLen Length of the input data block. -// @param[out] out Pointer to the output buffer where encrypted data will be stored. -// @param[out] outLen Length of the encrypted output data. -// @param key Encryption key. -// @param keyLength Length of the AES key (128, 192, or 256 bits). -// */ -// virtual void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) = 0; - -// /** -// @brief Continues encryption of data using AES in CBC mode. - -// This function continues the encryption process for the given block of data -// using the last encrypted block as the IV. - -// @param block Input data block to encrypt. -// @param inLen Length of the input data block. -// @param[out] out Pointer to the output buffer where encrypted data will be stored. -// @param[out] outLen Length of the encrypted output data. -// */ -// virtual void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen) = 0; - -// /** -// @brief Decrypts the initial block of data using AES in CBC mode. - -// This function extracts the initialization vector (IV) from the end of the -// input data block and then decrypts the given block of data. The decrypted -// data is stored in the output buffer. - -// @param block Encrypted input data block to decrypt. -// @param inLen Length of the encrypted input data block. -// @param[out] out Pointer to the output buffer where decrypted data will be stored. -// @param[out] outLen Length of the decrypted output data. -// @param key Decryption key. -// @param keyLength Length of the AES key (128, 192, or 256 bits). -// */ -// virtual void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength) = 0; - -// /** -// @brief Continues decryption of data using AES in CBC mode. - -// This function continues the decryption process for the given block of data -// using the last decrypted block as the IV. - -// @param block Encrypted input data block to decrypt. -// @param inLen Length of the encrypted input data block. -// @param[out] out Pointer to the output buffer where decrypted data will be stored. -// @param[out] outLen Length of the decrypted output data. -// */ -// virtual void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen) = 0; - -// /** -// Decrypts data using AES in CBC mode. -// @param in Encrypted input data. -// @param inLen Length of input data. -// @param key Decryption key. -// @param[out] out Decrypted output data. -// @param[out] outLen Length of decrypted data. -// @param iv Initialization vector. -// @param keyLength AES key length (128, 192, 256 bits). -// */ -// virtual void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) = 0; -// /** -// Encrypts data using AES. -// @param in Input data. -// @param inLen Length of input data. -// @param key Encryption key. -// @param[out] out Encrypted output data. -// @param[out] outLen Length of encrypted data. -// @param iv Initialization vector. -// @param keyLength AES key length (128, 192, 256 bits). -// */ -// virtual void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) = 0; - -// }; - -// class AESEcb:public StreamAES -// { -// void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); -// void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); -// void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); -// void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); -// void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); -// void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); -// }; - -// class AESCbc:public StreamAES -// { -// void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); -// void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); -// void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); -// void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); -// void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); -// void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); -// }; - -// class AESCfb:public StreamAES -// { -// void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); -// void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); -// void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); -// void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); -// void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); -// void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); -// }; - -// class AESOfb:public StreamAES -// { -// void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); -// void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); -// void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); -// void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); -// void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); -// void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); -// }; - -// class AESCtr:public StreamAES -// { -// void encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength); -// void encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); -// void decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen,unsigned char* key, AESKeyLength keyLength); -// void decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outlen); -// void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); -// void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); -// }; - - #ifndef __AES_STREAM__ #define __AES_STREAM__ #include "aes.h" #include -#include -#include -#include class StreamAES { public: @@ -181,30 +14,29 @@ class StreamAES { StreamAES() : iv(new unsigned char[16]), lastBlock(new unsigned char[16]), lastData(new unsigned char[16]){}; virtual ~StreamAES() { - if (iv) { - delete[] iv; // Free the memory allocated for iv - iv = nullptr; // Avoid dangling pointer + if (iv != nullptr) { + delete[] iv; + iv = nullptr; } - if (lastBlock) { - delete[] lastBlock; // Free the memory allocated for lastBlock - lastBlock = nullptr; // Avoid dangling pointer + if (lastBlock != nullptr) { + delete[] lastBlock; + lastBlock = nullptr; } - if (key) { - delete[] key; // Free the memory allocated for key - key = nullptr; // Avoid dangling pointer + if (key != nullptr) { + delete[] key; + key = nullptr; } - if (lastData) { - delete[] lastData; // Free the memory allocated for lastData - lastData = nullptr; // Avoid dangling pointer + if (lastData != nullptr) { + delete[] lastData; + lastData = nullptr; } } + /** @brief Encrypts the initial block of data using AES in CBC mode. - This function generates a random initialization vector (IV) and then encrypts the given block of data. The encrypted data and the IV are concatenated and stored in the output buffer. - @param block Input data block to encrypt. @param inLen Length of the input data block. @param[out] out Pointer to the output buffer where encrypted data will be stored. @@ -213,186 +45,180 @@ class StreamAES { @param keyLength Length of the AES key (128, 192, or 256 bits). */ virtual void encryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, unsigned char *key, AESKeyLength keyLength) = 0; /** - @brief Continues encryption of data using AES in CBC mode. - - This function continues the encryption process for the given block of data - using the last encrypted block as the IV. - - @param block Input data block to encrypt. - @param inLen Length of the input data block. - @param[out] out Pointer to the output buffer where encrypted data will be stored. - @param[out] outLen Length of the encrypted output data. - */ + @brief Continues encryption of data using AES in CBC mode. + This function continues the encryption process for the given block of data + using the last encrypted block as the IV. + @param block Input data block to encrypt. + @param inLen Length of the input data block. + @param[out] out Pointer to the output buffer where encrypted data will be stored. + @param[out] outLen Length of the encrypted output data. + */ virtual void encryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen) = 0; + unsigned char *out, unsigned int outlen) = 0; /** - @brief Decrypts the initial block of data using AES in CBC mode. - - This function extracts the initialization vector (IV) from the end of the - input data block and then decrypts the given block of data. The decrypted - data is stored in the output buffer. - - @param block Encrypted input data block to decrypt. - @param inLen Length of the encrypted input data block. - @param[out] out Pointer to the output buffer where decrypted data will be stored. - @param[out] outLen Length of the decrypted output data. - @param key Decryption key. - @param keyLength Length of the AES key (128, 192, or 256 bits). - */ + @brief Decrypts the initial block of data using AES in CBC mode. + This function extracts the initialization vector (IV) from the end of the + input data block and then decrypts the given block of data. The decrypted + data is stored in the output buffer. + @param block Encrypted input data block to decrypt. + @param inLen Length of the encrypted input data block. + @param[out] out Pointer to the output buffer where decrypted data will be stored. + @param outLen Length of the decrypted output data. + @param key Decryption key. + @param keyLength Length of the AES key (128, 192, or 256 bits). + */ virtual void decryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen, + unsigned char *out, unsigned int &outLen, unsigned char *key, AESKeyLength keyLength) = 0; /** - @brief Continues decryption of data using AES in CBC mode. - - This function continues the decryption process for the given block of data - using the last decrypted block as the IV. - - @param block Encrypted input data block to decrypt. - @param inLen Length of the encrypted input data block. - @param[out] out Pointer to the output buffer where decrypted data will be stored. - @param[out] outLen Length of the decrypted output data. - */ + @brief Continues decryption of data using AES in CBC mode. + This function continues the decryption process for the given block of data + using the last decrypted block as the IV. + @param block Encrypted input data block to decrypt. + @param inLen Length of the encrypted input data block. + @param[out] out Pointer to the output buffer where decrypted data will be stored. + @param outLen Length of the decrypted output data. + */ virtual void decryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen) = 0; + unsigned char *out, unsigned int &outLen) = 0; /** - Decrypts data using AES in CBC mode. - @param in Encrypted input data. - @param inLen Length of input data. - @param key Decryption key. - @param[out] out Decrypted output data. - @param[out] outLen Length of decrypted data. - @param iv Initialization vector. - @param keyLength AES key length (128, 192, 256 bits). - */ + Decrypts data using AES in CBC mode. + @param in Encrypted input data. + @param inLen Length of input data. + @param key Decryption key. + @param[out] out Decrypted output data. + @param[out] outLen Length of decrypted data. + @param iv Initialization vector. + @param keyLength AES key length (128, 192, 256 bits). + */ virtual void decrypt(unsigned char in[], unsigned int inLen, - unsigned char *key, unsigned char *&out, + unsigned char *key, unsigned char *out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) = 0; + /** - Encrypts data using AES. - @param in Input data. - @param inLen Length of input data. - @param key Encryption key. - @param[out] out Encrypted output data. - @param[out] outLen Length of encrypted data. - @param iv Initialization vector. - @param keyLength AES key length (128, 192, 256 bits). - */ + Encrypts data using AES. + @param in Input data. + @param inLen Length of input data. + @param key Encryption key. + @param[out] out Encrypted output data. + @param[out] outLen Length of encrypted data. + @param iv Initialization vector. + @param keyLength AES key length (128, 192, 256 bits). + */ virtual void encrypt(unsigned char in[], unsigned int inLen, - unsigned char *key, unsigned char *&out, - unsigned int &outLen, const unsigned char *iv, + unsigned char *key, unsigned char *out, + unsigned int outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) = 0; }; class AESEcb : public StreamAES { void encryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, unsigned char *key, AESKeyLength keyLength); void encryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen); + unsigned char *out, unsigned int outlen); void decryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen, + unsigned char *out, unsigned int &outLen, unsigned char *key, AESKeyLength keyLength); void decryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen); + unsigned char *out, unsigned int &outlen); void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); }; class AESCbc : public StreamAES { void encryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, unsigned char *key, AESKeyLength keyLength); void encryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen); + unsigned char *out, unsigned int outlen); void decryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen, + unsigned char *out, unsigned int &outLen, unsigned char *key, AESKeyLength keyLength); void decryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen); + unsigned char *out, unsigned int &outLen); void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); }; class AESCfb : public StreamAES { void encryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, unsigned char *key, AESKeyLength keyLength); void encryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen); + unsigned char *out, unsigned int outlen); void decryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen, + unsigned char *out, unsigned int &outLen, unsigned char *key, AESKeyLength keyLength); void decryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen); + unsigned char *out, unsigned int &outlen); void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); }; class AESOfb : public StreamAES { void encryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, unsigned char *key, AESKeyLength keyLength); void encryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen); + unsigned char *out, unsigned int outlen); void decryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen, + unsigned char *out, unsigned int &outLen, unsigned char *key, AESKeyLength keyLength); void decryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen); + unsigned char *out, unsigned int &outlen); void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); }; - class AESCtr : public StreamAES { void encryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, unsigned char *key, AESKeyLength keyLength); void encryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen); + unsigned char *out, unsigned int outlen); void decryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen, + unsigned char *out, unsigned int &outlen, unsigned char *key, AESKeyLength keyLength); void decryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outlen); + unsigned char *out, unsigned int &outlen); void decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); void encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength); }; diff --git a/include/aes_stream_factory.h b/include/aes_stream_factory.h index cb6e8b84..1366b09e 100644 --- a/include/aes_stream_factory.h +++ b/include/aes_stream_factory.h @@ -14,7 +14,11 @@ class FactoryManager * * @return The singleton instance of FactoryManager. */ - static FactoryManager& getInstance() ; + static FactoryManager& getInstance() + { + static FactoryManager instance; + return instance; + } /** * @brief Creates a StreamAES object based on the specified AESChainingMode. @@ -22,9 +26,14 @@ class FactoryManager * @param type The AES chaining mode. * @return A pointer to the newly created StreamAES object. */ - StreamAES* create(const AESChainingMode& type) const; - - static FactoryManager instance; + StreamAES* create(const AESChainingMode& type) const + { + auto it = factories.find(type); + if (it != factories.end()) + return it->second; + + return nullptr; + } private: std::map factories = @@ -40,4 +49,4 @@ class FactoryManager * @brief Private constructor for singleton pattern. */ FactoryManager() {} -}; +}; \ No newline at end of file diff --git a/include/sycl-version/big_int64.h b/include/big_int64.h similarity index 63% rename from include/sycl-version/big_int64.h rename to include/big_int64.h index 6a9ba367..65747d90 100644 --- a/include/sycl-version/big_int64.h +++ b/include/big_int64.h @@ -3,14 +3,17 @@ #include #include #include -#include -#include #include "big_int10.h" #include "big_int_utils.h" + constexpr int BYTES_IN_LIMB = 8; constexpr int BITS_IN_BYTE = 8; constexpr int BITS_IN_LIMB = 64; +#ifdef USE_SYCL +#include +#include + class BigInt64 { friend std::ostream &operator<<(std::ostream &out, const BigInt64 &a); friend BigInt64 power(BigInt64 base, BigInt64 exponent); @@ -189,5 +192,105 @@ class BigInt64 { void setLimbs(uint64_t val, size_t count, size_t meStart, size_t newSize); void reverse(); }; +#else +#include + +class BigInt64 { + friend std::ostream &operator<<(std::ostream &out, const BigInt64 &a); + friend BigInt64 modularExponentiation(BigInt64 base, BigInt64 exponent, + const BigInt64 &modulus); + friend BigInt64 gcd(BigInt64 a, BigInt64 b); + friend BigInt64 karatzubaMultiplication(const BigInt64 &a, + const BigInt64 &b); + friend BigInt64 extendedGcd(BigInt64 a, BigInt64 b, BigInt64 &x, + BigInt64 &y); + friend BigInt64 modularInverse(BigInt64 a, BigInt64 b); + friend BigInt64 longMultiplication(const BigInt64 &a, const BigInt64 &b); + friend BigInt64 longDivision(const BigInt64 &a, const BigInt64 &b, + BigInt64 &remainder); + friend BigInt64 power(BigInt64 base, BigInt64 exponent); + + public: + enum CreateModes { RANDOM, BIG_ENDIANESS, LITTLE_ENDIANESS }; + // ctors + BigInt64(const std::string &str); + BigInt64(long long val = 0); + BigInt64(uint64_t uval); + BigInt64(int val); + BigInt64(bool isNegative); + BigInt64(const char *str); + BigInt64(const uint8_t *str, size_t strLen, CreateModes mode); + BigInt64(std::vector v, bool isNegative); + BigInt64(CreateModes mode, int bits); + BigInt64(CreateModes mode, uint64_t min, const BigInt64 &max); + // operators + // comparison + bool operator==(const BigInt64 &b) const; + bool operator!=(const BigInt64 &b) const; + bool operator<(const BigInt64 &b) const; + bool operator>(const BigInt64 &b) const; + bool operator<=(const BigInt64 &b) const; + bool operator>=(const BigInt64 &b) const; + // arithematic operations + BigInt64 &operator++(); + BigInt64 operator++(int); + BigInt64 &operator--(); + BigInt64 operator--(int); + // addition + BigInt64 &operator+=(const BigInt64 &b); + BigInt64 operator+(const BigInt64 &b) const; + // subtruction + BigInt64 &operator-=(const BigInt64 &b); + BigInt64 operator-(const BigInt64 &b) const; + // multiplication + BigInt64 &operator*=(const BigInt64 &b); + BigInt64 operator*(const BigInt64 &b) const; + // division + BigInt64 &operator/=(const BigInt64 &b); + BigInt64 operator/(const BigInt64 &b) const; + // modulus + BigInt64 &operator%=(const BigInt64 &b); + BigInt64 operator%(const BigInt64 &b) const; + // power + BigInt64 &operator^=(const BigInt64 &b); + BigInt64 operator^(const BigInt64 &b) const; + // right shift - division + BigInt64 &operator>>=(uint64_t n); + BigInt64 operator>>(uint64_t n) const; + // left shift - multiplication + BigInt64 &operator<<=(uint64_t n); + BigInt64 operator<<(uint64_t n) const; + // basic utils + bool isZero() const; + int limbsCount() const; + int bitsCount() const; + bool isEven() const; + void exportTo(uint8_t *out, size_t outLen, CreateModes mode) const; + size_t bytesCount() const; + std::string toString() const; + + private: + // uint64_t is 8B, like unsigned long long + std::vector limbs; + bool isNegative; + // logic + bool isSmallerThanUnsigned(const BigInt64 &b) const; + void prefixPlusPlusUnsigned(); + void prefixMinusMinusUnsigned(); + void addUnsigned(const BigInt64 &b); + void subtractUnsigned(const BigInt64 &b); + BigInt10 toDecimal() const; + void initFromString(const char *str, int n); + void rightShift(uint64_t n); + void leftShift(uint64_t n); + // helpers + void thisEqualsbBSubthis(const BigInt64 &b); + void removeLeadingZeros(); + void insertZroes(int n); + void generateNLimbsRandom(int limbsCnt); + uint64_t randomLimb(uint64_t min, uint64_t max); + void zero(); +}; +#endif #endif // __BIG_INT_64__ \ No newline at end of file diff --git a/include/big_int_utils.h b/include/big_int_utils.h index 78eb3bd9..f438726e 100644 --- a/include/big_int_utils.h +++ b/include/big_int_utils.h @@ -1,6 +1,7 @@ #ifndef __BIG_INT_UTILS__ #define __BIG_INT_UTILS__ #include + constexpr uint64_t MAX_VAL_64 = UINT64_MAX; constexpr int MAX_VAL_10 = 9; diff --git a/include/crypto_api.h b/include/crypto_api.h new file mode 100644 index 00000000..ad39c680 --- /dev/null +++ b/include/crypto_api.h @@ -0,0 +1,97 @@ +#ifndef __CRYPTO_API_H__ +#define __CRYPTO_API_H__ + +#include +#include +#include +#include +#include + +#include "aes_stream_factory.h" +#include "ecc.h" +#include "general.h" +#include "sha256.h" + +CK_RV configure(int userId, CryptoConfig config); +CK_RV bootSystem( + const std::map> &usersIdspermissions); +// geneate key pair to each coponnet cinfigure the +//encrypt and decrypt behaviour for later + +// keys generation: +std::string generateAESKey(int userId, AESKeyLength aesKeyLength, + std::vector permissions, + int destUserId); + +std::pair generateRSAKeyPair( + int userId, std::vector permissions); + +std::pair generateECCKeyPair( + int userId, std::vector permissions); + +// sign-verify + +size_t getSignatureLength(); + +CK_RV signUpdate(int senderId, void *data, size_t dataLen, + SHAAlgorithm hashfunc, int counter); +CK_RV signFinalize(int senderId, void *signature, size_t signatureLen, + SHAAlgorithm hashfunc, std::string keyId); + +CK_RV verifyUpdate(int recieverId, void *in, size_t inLen, + SHAAlgorithm hashFunc, size_t counter); +CK_RV verifyFinalize(int recieverId, void *signature, size_t signatureLen, + SHAAlgorithm hashFunc, std::string keyId); + +// get public key id's +std::string getPublicECCKeyByUserId(int userId); + +std::string getPublicRSAKeyByUserId(int userId); + +// ecc +size_t getECCencryptedLength(); + +size_t getECCdecryptedLength(); + +CK_RV ECCencrypt(int senderId, std::string keyId, void *in, size_t inLen, + void *out, size_t &outLen); + +CK_RV ECCdecrypt(int receiverId, std::string keyId, void *in, size_t inLen, + void *out, size_t &outLen); +// rsa +size_t getRSAencryptedLength(); + +size_t getRSAdecryptedLength(); + +CK_RV RSAencrypt(int userId, std::string keyId, void *in, size_t inLen, + void *out, size_t outLen); + +CK_RV RSAdecrypt(int userId, std::string keyId, void *in, size_t inLen, + void *out, size_t *outLen); +// aes +size_t getAESencryptedLength(size_t dataLen, bool isFirst, + AESChainingMode chainingMode); + +size_t getAESdecryptedLength(size_t dataLen, bool isFirst,AESChainingMode chainingMode); + +CK_RV AESencrypt(int senderId, int receiverId, void *in, size_t inLen, + void *out, size_t outLen, AESKeyLength keyLength, + AESChainingMode chainingMode, size_t counter, + std::string keyId); + +CK_RV +AESdecrypt(int senderId, int receiverId, void *in, size_t inLen, void *out, + size_t &outLen, AESKeyLength keyLength, AESChainingMode chainingMode, + size_t counter, std::string keyId); +// encrypt-decrypt +size_t getEncryptedLen(int senderId, size_t inLen, bool isFirst); + +size_t getDecryptedLen(int senderId, size_t inLen, bool isFirst); + +CK_RV encrypt(int senderId, int receiverId, void *in, size_t inLen, void *out, + size_t outLen,void * signature,size_t signatureLen, size_t counter); + +CK_RV decrypt(int senderId, int receiverId, void *in, size_t inLen,void * signature,size_t signatureLen, void *out, + size_t &outLen, size_t counter); + +#endif // __CRYPTO_API_H__ \ No newline at end of file diff --git a/include/crypto_service.h b/include/crypto_service.h new file mode 100644 index 00000000..3cd69383 --- /dev/null +++ b/include/crypto_service.h @@ -0,0 +1,42 @@ +#include +#include +#include +#include "../proto/encryption.pb.h" +#include "../proto/encryption.grpc.pb.h" +#include "general.h" + +class CryptoServiceServer final : public crypto::CryptoService::Service { +public: + grpc::Status encrypt(grpc::ServerContext* context, const crypto::EncryptRequest* request, crypto::EncryptResponse* response) override; + grpc::Status decrypt(grpc::ServerContext* context, const crypto::DecryptRequest* request, crypto::DecryptResponse* response) override; + grpc::Status generateAESKey(grpc::ServerContext* context, const crypto::GenerateAESKeyRequest* request, crypto::GenerateAESKeyResponse* response) override; + grpc::Status generateRSAKeyPair(grpc::ServerContext* context, const crypto::GenerateKeyPairRequest* request, crypto::GenerateKeyPairResponse* response) override; + grpc::Status generateECCKeyPair(grpc::ServerContext* context, const crypto::GenerateKeyPairRequest* request, crypto::GenerateKeyPairResponse* response) override; +// sign-verify + grpc::Status getSignedDataLength(grpc::ServerContext* context, const crypto::GetHashLengthRequest* request, crypto::GetLengthResponse* response) override; + + grpc::Status getPublicECCKeyByUserId(grpc::ServerContext* context, const crypto::KeyRequest* request, crypto::KeyResponse* response) override; + grpc::Status getPublicRSAKeyByUserId(grpc::ServerContext* context, const crypto::KeyRequest* request, crypto::KeyResponse* response) override; +// ecc + grpc::Status getECCencryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) override; + grpc::Status getECCDecryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) override; + grpc::Status ECCencrypt(grpc::ServerContext* context, const crypto::AsymetricEncryptRequest* request, crypto::AsymetricEncryptResponse* response) override; + grpc::Status ECCdecrypt(grpc::ServerContext* context, const crypto::AsymetricDecryptRequest* request, crypto::AsymetricDecryptResponse* response) override; +// rsa + grpc::Status getRSAencryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) override; + grpc::Status getRSAdecryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) override; + grpc::Status RSAencrypt(grpc::ServerContext* context, const crypto::AsymetricEncryptRequest* request, crypto::AsymetricEncryptResponse* response) override; + grpc::Status RSAdecrypt(grpc::ServerContext* context, const crypto::AsymetricDecryptRequest* request, crypto::AsymetricDecryptResponse* response) override; +// aes + grpc::Status getAESencryptedLength(grpc::ServerContext* context, const crypto::GetAESLengthRequest* request, crypto::GetLengthResponse* response) override; + grpc::Status getAESdecryptedLength(grpc::ServerContext* context, const crypto::GetAESLengthRequest* request, crypto::GetLengthResponse* response) override; + grpc::Status AESencrypt(grpc::ServerContext* context, const crypto::AESEncryptRequest* request, crypto::AESEncryptResponse* response) override; + grpc::Status AESdecrypt(grpc::ServerContext* context, const crypto::AESDecryptRequest* request, crypto::AESDecryptResponse* response) override; +// + grpc::Status getEncryptedLen(grpc::ServerContext* context, const crypto::GetWholeLength* request, crypto::GetLengthResponse* response) override; + grpc::Status getDecryptedLen(grpc::ServerContext* context, const crypto::GetWholeLength* request, crypto::GetLengthResponse* response) override; + grpc::Status signUpdate(grpc::ServerContext* context, const crypto::SignRequest* request, crypto::SignResponse* response) override; + grpc::Status signFinalize(grpc::ServerContext* context, const crypto::SignRequest* request, crypto::SignResponse* response) override; + grpc::Status verifyUpdate(grpc::ServerContext* context, const crypto::VerifyRequest* request, crypto::VerifyResponse* response) override; + grpc::Status verifyFinalize(grpc::ServerContext* context, const crypto::VerifyRequest* request, crypto::VerifyResponse* response) override; +}; \ No newline at end of file diff --git a/include/debug_utils.h b/include/debug_utils.h new file mode 100644 index 00000000..6c6ef075 --- /dev/null +++ b/include/debug_utils.h @@ -0,0 +1,26 @@ +#ifndef __DEBUG_UTILS_H__ +#define __DEBUG_UTILS_H__ + +#include +#include +#include +#include "general.h" +#include "aes_stream.h" +#include "ecc.h" + +#define START_TIMER \ + auto start_timer = std::chrono::high_resolution_clock::now(); + +#define END_TIMER(message) \ + auto end_timer = std::chrono::high_resolution_clock::now(); \ + std::chrono::duration elapsed = end_timer - start_timer; \ + std::cout << message << " took " << elapsed.count() << " seconds\n"; + +void printBufferHexa(const uint8_t *buffer, size_t len, std::string message); + +void encryptStartPrintParams(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen, unsigned char* key, AESKeyLength keyLength); +void encryptContinuePrintParams(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen); +void printStreamAES(const StreamAES& obj, size_t blockSize, std::string message); +void printEncryptedMessage(const EncryptedMessage& message) ; + +#endif // __DEBUG_UTILS_H__ diff --git a/include/ecc.h b/include/ecc.h index 89d2a75b..cb47e8cf 100644 --- a/include/ecc.h +++ b/include/ecc.h @@ -5,6 +5,7 @@ #include #include #include +#include // Structure for representing a point struct Point { @@ -78,4 +79,5 @@ bool isOnCurve(Point P); mpz_class inverse(mpz_class base); std::pair signMessageECC(const std::vector &message, const mpz_class &privateKey); bool modularSqrt(mpz_t result, const mpz_t a, const mpz_t p); -#endif // USE_SYCL + +#endif // USE_SYCL \ No newline at end of file diff --git a/include/general.h b/include/general.h new file mode 100644 index 00000000..105da335 --- /dev/null +++ b/include/general.h @@ -0,0 +1,59 @@ +#ifndef __GENERAL_H__ +#define __GENERAL_H__ + +#include "../logger/logger.h" + +typedef unsigned long CK_RV; + +/* Successful operation */ +constexpr CK_RV CKR_OK = 0x00000000; // 0 +/* General failure when a function could not complete its intended task */ +constexpr CK_RV CKR_FUNCTION_FAILED = 0x00000006; // 6 +/* Invalid arguments provided to the function (e.g., null pointers or invalid values) */ +constexpr CK_RV CKR_ARGUMENTS_BAD = 0x00000007; // 7 +/* Key size is out of the allowed range (e.g., key length is too short or too long) */ +constexpr CK_RV CKR_KEY_SIZE_RANGE = 0x00000162; // 354 +/* Buffer provided by the user is too small to hold the required data (e.g., during encryption or decryption) */ +constexpr CK_RV CKR_BUFFER_TOO_SMALL = 0x00000150; // 336 +/* The function attempted to generate a key, but key generation is not permitted or failed */ +constexpr CK_RV CKR_KEY_FUNCTION_NOT_PERMITTED = 0x00000068; // 104 +/* Decryption was attempted, but the decrypted data is invalid (e.g., data was corrupted) */ +constexpr CK_RV CKR_DECRYPTED_DATA_INVALID = 0x00000064; // 100 +/* Encrypted data has invalid padding (e.g., during decryption or when verifying padding) */ +constexpr CK_RV CKR_ENCRYPTED_DATA_INVALID = 0x00000063; // 99 +/* Data provided for encryption is too large for the RSA key */ +constexpr CK_RV CKR_DATA_TOO_LARGE = 0x00000080; // 128 +/* User is not authorized to access or use the requested key */ +constexpr CK_RV CKR_USER_NOT_AUTHORIZED = 0x00000100; // 256 +/* Signature or hash did not match */ +constexpr CK_RV CKR_SIGNATURE_INVALID = 0x000000C0; // 192 + +enum KeyPermission { VERIFY, SIGN, ENCRYPT, DECRYPT, EXPORTABLE }; +enum AsymmetricFunction { RSA, ECC }; +enum SHAAlgorithm { SHA_256, SHA_3_512 }; +enum AESChainingMode { + ECB, /*Electronic Codebook*/ + CBC, /*Cipher Block Chaining*/ + CFB, /*Cipher Feedback*/ + OFB, /*Output Feedback*/ + CTR /*Counter*/ +}; + +enum AESKeyLength { AES_128 = 16, AES_192 = 24, AES_256 = 32 }; + +struct CryptoConfig { + SHAAlgorithm hashFunction; // Hash function algorithm + AESKeyLength aesKeyLength; // AES key length + AESChainingMode aesChainingMode; // AES chaining mode + AsymmetricFunction asymmetricFunction; // Asymmetric encryption function + + CryptoConfig(SHAAlgorithm hashFunc, AESKeyLength aesLen, + AESChainingMode aesMode, AsymmetricFunction asymFunc) + : hashFunction(hashFunc), aesKeyLength(aesLen), aesChainingMode(aesMode), + asymmetricFunction(asymFunc) {} + CryptoConfig() {} +}; + +void log(logger::LogLevel level, const std::string &message); + +#endif // __GENERAL_H__ diff --git a/include/hash_factory.h b/include/hash_factory.h index 4e47a6cd..6d08106d 100644 --- a/include/hash_factory.h +++ b/include/hash_factory.h @@ -1,22 +1,24 @@ #ifndef FACTORY_MANAGER_H #define FACTORY_MANAGER_H -#include "sha256.h" -#include "SHA3-512.h" + #include "IHash.h" -#include "return_codes.h" +#include "SHA3-512.h" +#include "general.h" +#include "sha256.h" #include #include #include -class HashFactory -{ +class HashFactory { public: - static HashFactory& getInstance(); - CK_RV create(const IHash::SHAAlgorithm& type, std::unique_ptr& hashPtr) const; + static HashFactory &getInstance(); + CK_RV create(const SHAAlgorithm &type, + std::unique_ptr &hashPtr) const; private: - std::map()>> factories; - HashFactory(); //Private constructor for singleton pattern. + std::map()>> + factories; + HashFactory(); // Private constructor for singleton pattern. }; #endif // FACTORY_MANAGER_H \ No newline at end of file diff --git a/include/prime_tests.h b/include/prime_tests.h index 2ddfea80..871a29f5 100644 --- a/include/prime_tests.h +++ b/include/prime_tests.h @@ -1,13 +1,14 @@ #ifndef __PRIME_TESTS_H__ #define __PRIME_TESTS_H__ -#include "sycl-version/big_int64.h" -#include "logger.h" +#include "big_int64.h" +#include "../logger/logger.h" bool millerRabinPrimalityTest(const BigInt64 &number, size_t k); bool fermatPrimalityTest(const BigInt64 &number, size_t k); bool isDivisibleBySmallPrimes(const BigInt64 &n); BigInt64 nextPrimeSequential(const BigInt64 &number, size_t k); BigInt64 nextPrimeDivideToChunks(const BigInt64 &number, size_t k); + #ifdef USE_SYCL #include bool isDivisibleBySmallPrimesUSM(sycl::queue &q, const BigInt64 &n); @@ -17,6 +18,8 @@ bool millerRabinPrimalityTestUSM(sycl::queue &q, const BigInt64 &number, bool millerRabinPrimalityTestBuffers(sycl::queue &q, const BigInt64 &number, size_t k); #else + bool millerRabinPrimalityTestThreads(const BigInt64 &number, size_t k); + #endif #endif // __PRIME_TESTS_H__ \ No newline at end of file diff --git a/include/return_codes.h b/include/return_codes.h deleted file mode 100644 index ecc377b4..00000000 --- a/include/return_codes.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __RETURN_CODES_H__ -#define __RETURN_CODES_H__ -typedef unsigned long CK_RV; - -/* Successful operation */ -constexpr CK_RV CKR_OK = 0x00000000; -/* General failure when a function could not complete its intended task */ -constexpr CK_RV CKR_FUNCTION_FAILED = 0x00000006; -/* Invalid arguments provided to the function (e.g., null pointers or invalid values) */ -constexpr CK_RV CKR_ARGUMENTS_BAD = 0x00000007; -/* Key size is out of the allowed range (e.g., key length is too short or too long) */ -constexpr CK_RV CKR_KEY_SIZE_RANGE = 0x00000162; -/* Buffer provided by the user is too small to hold the required data (e.g., during encryption or decryption) */ -constexpr CK_RV CKR_BUFFER_TOO_SMALL = 0x00000150; -/* The function attempted to generate a key, but key generation is not permitted or failed */ -constexpr CK_RV CKR_KEY_FUNCTION_NOT_PERMITTED = 0x00000068; -/* Decryption was attempted, but the decrypted data is invalid (e.g., data was corrupted) */ -constexpr CK_RV CKR_DECRYPTED_DATA_INVALID = 0x00000064; -/* Encrypted data has invalid padding (e.g., during decryption or when verifying padding) */ -constexpr CK_RV CKR_ENCRYPTED_DATA_INVALID = 0x00000063; -/* Data provided for encryption is too large for the RSA key */ -constexpr CK_RV CKR_DATA_TOO_LARGE = 0x00000080; - -#endif // __RETURN_CODES_H__ \ No newline at end of file diff --git a/include/rsa.h b/include/rsa.h index 84e9a75e..9867b318 100644 --- a/include/rsa.h +++ b/include/rsa.h @@ -1,7 +1,7 @@ #ifndef __RSA_H__ #define __RSA_H__ -#include "big_int64.h" -#include "return_codes.h" + +#include "general.h" CK_RV rsaGenerateKeys(size_t keySize, uint8_t *pubKey, size_t pubLen, uint8_t *privKey, size_t privLen); diff --git a/include/sha256.h b/include/sha256.h index 7584e2cd..e2edbe06 100644 --- a/include/sha256.h +++ b/include/sha256.h @@ -1,43 +1,39 @@ #ifndef SHA256_H #define SHA256_H + +#include "../logger/logger.h" +#include "IHash.h" +#include "general.h" #include -#include #include -#include "IHash.h" -#include "../logger/logger.h" -#include "return_codes.h" +#include -class SHA256: public IHash { +class SHA256 : public IHash { private: - uint32_t result[8]; - uint8_t message[64]; - size_t messageSize; - size_t bitLength; - const uint32_t bytes[64] = { - // SHA-256 constants - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, - 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, - 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, - 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, - 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, - 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, - 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, - 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, - 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 - }; - CK_RV transform(); - void padding(); + uint32_t result[8]; + uint8_t message[64]; + size_t messageSize; + size_t bitLength; + const uint32_t bytes[64] = { + // SHA-256 constants + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, + 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, + 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, + 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, + 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, + 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2}; + CK_RV transform(); + void padding(); public: - SHA256(); - CK_RV update(const std::vector& data) override; - CK_RV finalize(std::vector& output) override; + SHA256(); + CK_RV update(const std::vector &data) override; + CK_RV finalize(std::vector &output) override; }; -#endif //SHA256_H \ No newline at end of file + +#endif // SHA256_H \ No newline at end of file diff --git a/include/temp_hsm.h b/include/temp_hsm.h new file mode 100644 index 00000000..17940e20 --- /dev/null +++ b/include/temp_hsm.h @@ -0,0 +1,223 @@ +#ifndef __TEMP_HSM_H__ +#define __TEMP_HSM_H__ + +#include "aes.h" +#include "ecc.h" +#include "general.h" +#include "rsa.h" +#include +#include +#include +#include +#include + +constexpr size_t RSA_KEY_SIZE = 1024; + +const std::string AES_KEY_ID = "AESKey"; +const std::string RSA_PUB_KEY_ID = "RSAPubKey"; +const std::string RSA_PRIV_KEY_ID = "RSAPrivKey"; +const std::string ECC_PUB_KEY_ID = "ECCPubKey"; +const std::string ECC_PRIV_KEY_ID = "ECCPrivKey"; + +class TempHsm { + public: + // Deleted to avoid copying and assignment + TempHsm(const TempHsm &) = delete; + TempHsm &operator=(const TempHsm &) = delete; + + // Access the singleton instance + static TempHsm &getInstance() + { + static TempHsm instance; + return instance; + } + // configure a user + void configure(int userId, CryptoConfig config) + { + usersConfig[userId] = CryptoConfig(config); + } + // AES key generation for a specific user + std::string generateAESKey(int ownerId, AESKeyLength aesKeyLength, + const std::vector &permissions, + int destUserId) + { + std::string keyId = AES_KEY_ID + std::to_string(ownerId); + keyIdUsersPermissions[keyId] = {{ownerId, permissions}, + {destUserId, {KeyPermission::DECRYPT}}}; + int keySize = aesKeyLengthData[aesKeyLength].keySize; + std::shared_ptr key = + std::shared_ptr(new unsigned char[keySize]); + generateKey(key.get(), aesKeyLength); + + aesKeys[keyId].first = key; + aesKeys[keyId].second = keySize; + + return keyId; + } + + // RSA key pair generation for a specific user + std::pair generateRSAKeyPair( + int userId, const std::vector &permissions) + { + std::string pubKeyId = RSA_PUB_KEY_ID + std::to_string(userId); + std::string privKeyId = RSA_PRIV_KEY_ID + std::to_string(userId); + // ASK:: does he give other premossions? and premissions to private and + // public? + // Store key pair with permissions + keyIdUsersPermissions[pubKeyId] = { + {userId, permissions}, + {-1, {KeyPermission::DECRYPT, KeyPermission::ENCRYPT}}}; + keyIdUsersPermissions[privKeyId] = {{userId, permissions}}; + size_t pubLen = rsaGetPublicKeyLen(RSA_KEY_SIZE); + size_t priLen = rsaGetPrivateKeyLen(RSA_KEY_SIZE); + uint8_t *pubBuff = new uint8_t[pubLen]; + uint8_t *priBuff = new uint8_t[priLen]; + + CK_RV rv1 = + rsaGenerateKeys(RSA_KEY_SIZE, pubBuff, pubLen, priBuff, priLen); + + // Assuming keys is a map + rsaKeys[pubKeyId].first = pubBuff; + rsaKeys[pubKeyId].second = pubLen; + rsaKeys[privKeyId].first = priBuff; + rsaKeys[privKeyId].second = priLen; + + return {pubKeyId, privKeyId}; + } + + // ECC key pair generation for a specific user + std::pair generateECCKeyPair( + int userId, const std::vector &permissions) + { + std::string pubKeyId = ECC_PUB_KEY_ID + std::to_string(userId); + std::string privKeyId = ECC_PRIV_KEY_ID + std::to_string(userId); + + // Store key pair with permissions + keyIdUsersPermissions[pubKeyId] = { + {userId, permissions}, + {-1, {KeyPermission::DECRYPT, KeyPermission::ENCRYPT}}}; + keyIdUsersPermissions[privKeyId] = {{userId, permissions}}; + mpz_class privateKey = generatePrivateKey(); + Point publicKey = generatePublicKey(privateKey); + + // Assuming keys is a map + eccPublicKeys[pubKeyId] = publicKey; + eccPrivateKeys[privKeyId] = privateKey; + + return {pubKeyId, privKeyId}; + } + + // Retrieve public key ID for a user + std::string getPublicKeyIdByUserId(int userId, AsymmetricFunction function) + { + std::string publicKeyId; + if (function == ECC) + publicKeyId = ECC_PUB_KEY_ID + std::to_string(userId); + else + publicKeyId = RSA_PUB_KEY_ID + std::to_string(userId); + return publicKeyId; + } + + // Get private key ID for a user + std::string getPrivateKeyIdByUserId(int userId, AsymmetricFunction function) + { + std::string privateKeyId; + if (function == ECC) + privateKeyId = ECC_PRIV_KEY_ID + std::to_string(userId); + else + privateKeyId = RSA_PRIV_KEY_ID + std::to_string(userId); + return privateKeyId; + } + + std::pair, int> getAESKey( + int userId, const std::string &keyId, KeyPermission usage) + { + checkPermission(keyId, userId, usage); + // If the usage is DECRYPT, delete it after returning a deep copy + if (usage == KeyPermission::DECRYPT) { + // Get the original key and its length + std::shared_ptr originalKey(aesKeys[keyId].first); + int keyLength = aesKeys[keyId].second; + + // Deep copy the key before deleting it + aesKeys.erase(keyId); // Remove the key entry from the map + + // Remove permissions associated with the key + keyIdUsersPermissions[keyId].clear(); + + // Return the copied key and its length as a pair + return {originalKey, keyLength}; + } + return aesKeys[keyId]; + } + + std::pair getRSAKey(int userId, const std::string &keyId, + KeyPermission usage) + { + checkPermission(keyId, userId, usage); + return rsaKeys[keyId]; + } + + mpz_class getECCPrivateKey(int userId, const std::string &keyId, + KeyPermission usage) + { + checkPermission(keyId, userId, usage); + return eccPrivateKeys[keyId]; + } + + Point getECCPublicKey(int userId, const std::string &keyId, + KeyPermission usage) + { + checkPermission(keyId, userId, usage); + return eccPublicKeys[keyId]; + } + CryptoConfig getUserConfig(int userId) + { + return usersConfig[userId]; + } + AsymmetricFunction getAssymetricFunctionByUserId(int userId) + { + return usersConfig[userId].asymmetricFunction; + } + + // Function to check permissions and throw a basic error if denied + void checkPermission(const std::string &keyId, int userId, + KeyPermission usage) + { + // First, check if the permission is for all users (-1) + if (keyIdUsersPermissions[keyId].count(-1) > 0) { + const std::vector &globalPermissions = + keyIdUsersPermissions[keyId][-1]; + if (std::find(globalPermissions.begin(), globalPermissions.end(), + usage) != globalPermissions.end()) { + // Permission granted for all users + return; + } + } + + // If not granted for all users, check specific user permissions + const std::vector &permissions = + keyIdUsersPermissions[keyId][userId]; + if (std::find(permissions.begin(), permissions.end(), usage) == + permissions.end()) { + throw std::runtime_error("Permission denied for keyId: " + keyId + + " and userId: " + std::to_string(userId)); + } + } + + private: + TempHsm() {} + + // For each user, store configurations, keys, and permissions + std::unordered_map usersConfig; + std::unordered_map>> + keyIdUsersPermissions; + std::unordered_map, int>> + aesKeys; + std::unordered_map> rsaKeys; + std::unordered_map eccPublicKeys; + std::unordered_map eccPrivateKeys; +}; + +#endif // __TEMP_HSM_H__ \ No newline at end of file diff --git a/include/threads-version/big_int64.h b/include/threads-version/big_int64.h deleted file mode 100644 index a06a1190..00000000 --- a/include/threads-version/big_int64.h +++ /dev/null @@ -1,109 +0,0 @@ -#ifndef __BIG_INT_64__ -#define __BIG_INT_64__ -#include -#include -#include -#include -#include "big_int10.h" -constexpr int BYTES_IN_LIMB = 8; -constexpr int BITS_IN_BYTE = 8; -constexpr int BITS_IN_LIMB = 64; - -class BigInt64 { - friend std::ostream &operator<<(std::ostream &out, const BigInt64 &a); - friend BigInt64 modularExponentiation(BigInt64 base, BigInt64 exponent, - const BigInt64 &modulus); - friend BigInt64 gcd(BigInt64 a, BigInt64 b); - friend BigInt64 karatzubaMultiplication(const BigInt64 &a, - const BigInt64 &b); - friend BigInt64 extendedGcd(BigInt64 a, BigInt64 b, BigInt64 &x, - BigInt64 &y); - friend BigInt64 modularInverse(BigInt64 a, BigInt64 b); - friend BigInt64 longMultiplication(const BigInt64 &a, const BigInt64 &b); - friend BigInt64 longDivision(const BigInt64 &a, const BigInt64 &b, - BigInt64 &remainder); - friend BigInt64 power(BigInt64 base, BigInt64 exponent); - - public: - enum CreateModes { RANDOM, BIG_ENDIANESS, LITTLE_ENDIANESS }; - // ctors - BigInt64(const std::string &str); - BigInt64(long long val = 0); - BigInt64(uint64_t uval); - BigInt64(int val); - BigInt64(bool isNegative); - BigInt64(const char *str); - BigInt64(const uint8_t *str, size_t strLen, CreateModes mode); - BigInt64(std::vector v, bool isNegative); - BigInt64(CreateModes mode, int bits); - BigInt64(CreateModes mode, uint64_t min, const BigInt64 &max); - // operators - // comparison - bool operator==(const BigInt64 &b) const; - bool operator!=(const BigInt64 &b) const; - bool operator<(const BigInt64 &b) const; - bool operator>(const BigInt64 &b) const; - bool operator<=(const BigInt64 &b) const; - bool operator>=(const BigInt64 &b) const; - // arithematic operations - BigInt64 &operator++(); - BigInt64 operator++(int); - BigInt64 &operator--(); - BigInt64 operator--(int); - // addition - BigInt64 &operator+=(const BigInt64 &b); - BigInt64 operator+(const BigInt64 &b) const; - // subtruction - BigInt64 &operator-=(const BigInt64 &b); - BigInt64 operator-(const BigInt64 &b) const; - // multiplication - BigInt64 &operator*=(const BigInt64 &b); - BigInt64 operator*(const BigInt64 &b) const; - // division - BigInt64 &operator/=(const BigInt64 &b); - BigInt64 operator/(const BigInt64 &b) const; - // modulus - BigInt64 &operator%=(const BigInt64 &b); - BigInt64 operator%(const BigInt64 &b) const; - // power - BigInt64 &operator^=(const BigInt64 &b); - BigInt64 operator^(const BigInt64 &b) const; - // right shift - division - BigInt64 &operator>>=(uint64_t n); - BigInt64 operator>>(uint64_t n) const; - // left shift - multiplication - BigInt64 &operator<<=(uint64_t n); - BigInt64 operator<<(uint64_t n) const; - // basic utils - bool isZero() const; - int limbsCount() const; - int bitsCount() const; - bool isEven() const; - void exportTo(uint8_t *out, size_t outLen, CreateModes mode) const; - size_t bytesCount() const; - std::string toString() const; - - private: - // uint64_t is 8B, like unsigned long long - std::vector limbs; - bool isNegative; - // logic - bool isSmallerThanUnsigned(const BigInt64 &b) const; - void prefixPlusPlusUnsigned(); - void prefixMinusMinusUnsigned(); - void addUnsigned(const BigInt64 &b); - void subtractUnsigned(const BigInt64 &b); - BigInt10 toDecimal() const; - void initFromString(const char *str, int n); - void rightShift(uint64_t n); - void leftShift(uint64_t n); - // helpers - void thisEqualsbBSubthis(const BigInt64 &b); - void removeLeadingZeros(); - void insertZroes(int n); - void generateNLimbsRandom(int limbsCnt); - uint64_t randomLimb(uint64_t min, uint64_t max); - void zero(); -}; - -#endif // __BIG_INT_64__ \ No newline at end of file diff --git a/logger/logger.cpp b/logger/logger.cpp index 4d6665e0..a31e5614 100644 --- a/logger/logger.cpp +++ b/logger/logger.cpp @@ -9,6 +9,7 @@ logger::logger(std::string componentName) { logger::componentName=componentName; } + void logger::initializeLogFile() { if (isInitialized) return; diff --git a/proto/encryption.grpc.pb.cc b/proto/encryption.grpc.pb.cc new file mode 100644 index 00000000..552b5e59 --- /dev/null +++ b/proto/encryption.grpc.pb.cc @@ -0,0 +1,1346 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: proto/encryption.proto + +#include "encryption.pb.h" +#include "encryption.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace crypto { + +static const char* CryptoService_method_names[] = { + "/crypto.CryptoService/bootSystem", + "/crypto.CryptoService/addProccess", + "/crypto.CryptoService/configure", + "/crypto.CryptoService/generateAESKey", + "/crypto.CryptoService/generateRSAKeyPair", + "/crypto.CryptoService/generateECCKeyPair", + "/crypto.CryptoService/getSignedDataLength", + "/crypto.CryptoService/getECCencryptedLength", + "/crypto.CryptoService/getECCDecryptedLength", + "/crypto.CryptoService/getRSAencryptedLength", + "/crypto.CryptoService/getRSAdecryptedLength", + "/crypto.CryptoService/getAESencryptedLength", + "/crypto.CryptoService/getAESdecryptedLength", + "/crypto.CryptoService/getEncryptedLen", + "/crypto.CryptoService/getDecryptedLen", + "/crypto.CryptoService/sign", + "/crypto.CryptoService/verify", + "/crypto.CryptoService/getPublicECCKeyByUserId", + "/crypto.CryptoService/getPublicRSAKeyByUserId", + "/crypto.CryptoService/ECCencrypt", + "/crypto.CryptoService/ECCdecrypt", + "/crypto.CryptoService/RSAencrypt", + "/crypto.CryptoService/RSAdecrypt", + "/crypto.CryptoService/AESencrypt", + "/crypto.CryptoService/AESdecrypt", + "/crypto.CryptoService/encrypt", + "/crypto.CryptoService/decrypt", + "/crypto.CryptoService/signUpdate", + "/crypto.CryptoService/signFinalize", + "/crypto.CryptoService/verifyUpdate", + "/crypto.CryptoService/verifyFinalize", +}; + +std::unique_ptr< CryptoService::Stub> CryptoService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< CryptoService::Stub> stub(new CryptoService::Stub(channel, options)); + return stub; +} + +CryptoService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_bootSystem_(CryptoService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_addProccess_(CryptoService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_configure_(CryptoService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_generateAESKey_(CryptoService_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_generateRSAKeyPair_(CryptoService_method_names[4], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_generateECCKeyPair_(CryptoService_method_names[5], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_getSignedDataLength_(CryptoService_method_names[6], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_getECCencryptedLength_(CryptoService_method_names[7], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_getECCDecryptedLength_(CryptoService_method_names[8], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_getRSAencryptedLength_(CryptoService_method_names[9], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_getRSAdecryptedLength_(CryptoService_method_names[10], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_getAESencryptedLength_(CryptoService_method_names[11], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_getAESdecryptedLength_(CryptoService_method_names[12], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_getEncryptedLen_(CryptoService_method_names[13], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_getDecryptedLen_(CryptoService_method_names[14], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_sign_(CryptoService_method_names[15], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_verify_(CryptoService_method_names[16], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_getPublicECCKeyByUserId_(CryptoService_method_names[17], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_getPublicRSAKeyByUserId_(CryptoService_method_names[18], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_ECCencrypt_(CryptoService_method_names[19], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_ECCdecrypt_(CryptoService_method_names[20], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_RSAencrypt_(CryptoService_method_names[21], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_RSAdecrypt_(CryptoService_method_names[22], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_AESencrypt_(CryptoService_method_names[23], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_AESdecrypt_(CryptoService_method_names[24], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_encrypt_(CryptoService_method_names[25], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_decrypt_(CryptoService_method_names[26], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_signUpdate_(CryptoService_method_names[27], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_signFinalize_(CryptoService_method_names[28], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_verifyUpdate_(CryptoService_method_names[29], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_verifyFinalize_(CryptoService_method_names[30], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status CryptoService::Stub::bootSystem(::grpc::ClientContext* context, const ::crypto::BootSystemRequest& request, ::crypto::Empty* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::BootSystemRequest, ::crypto::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_bootSystem_, context, request, response); +} + +void CryptoService::Stub::async::bootSystem(::grpc::ClientContext* context, const ::crypto::BootSystemRequest* request, ::crypto::Empty* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::BootSystemRequest, ::crypto::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_bootSystem_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::bootSystem(::grpc::ClientContext* context, const ::crypto::BootSystemRequest* request, ::crypto::Empty* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_bootSystem_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::Empty>* CryptoService::Stub::PrepareAsyncbootSystemRaw(::grpc::ClientContext* context, const ::crypto::BootSystemRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::Empty, ::crypto::BootSystemRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_bootSystem_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::Empty>* CryptoService::Stub::AsyncbootSystemRaw(::grpc::ClientContext* context, const ::crypto::BootSystemRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncbootSystemRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::addProccess(::grpc::ClientContext* context, const ::crypto::AddProcessRequest& request, ::crypto::Empty* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::AddProcessRequest, ::crypto::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_addProccess_, context, request, response); +} + +void CryptoService::Stub::async::addProccess(::grpc::ClientContext* context, const ::crypto::AddProcessRequest* request, ::crypto::Empty* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::AddProcessRequest, ::crypto::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_addProccess_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::addProccess(::grpc::ClientContext* context, const ::crypto::AddProcessRequest* request, ::crypto::Empty* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_addProccess_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::Empty>* CryptoService::Stub::PrepareAsyncaddProccessRaw(::grpc::ClientContext* context, const ::crypto::AddProcessRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::Empty, ::crypto::AddProcessRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_addProccess_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::Empty>* CryptoService::Stub::AsyncaddProccessRaw(::grpc::ClientContext* context, const ::crypto::AddProcessRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncaddProccessRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::configure(::grpc::ClientContext* context, const ::crypto::ConfigureRequest& request, ::crypto::Empty* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::ConfigureRequest, ::crypto::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_configure_, context, request, response); +} + +void CryptoService::Stub::async::configure(::grpc::ClientContext* context, const ::crypto::ConfigureRequest* request, ::crypto::Empty* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::ConfigureRequest, ::crypto::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_configure_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::configure(::grpc::ClientContext* context, const ::crypto::ConfigureRequest* request, ::crypto::Empty* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_configure_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::Empty>* CryptoService::Stub::PrepareAsyncconfigureRaw(::grpc::ClientContext* context, const ::crypto::ConfigureRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::Empty, ::crypto::ConfigureRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_configure_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::Empty>* CryptoService::Stub::AsyncconfigureRaw(::grpc::ClientContext* context, const ::crypto::ConfigureRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncconfigureRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::generateAESKey(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest& request, ::crypto::GenerateAESKeyResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::GenerateAESKeyRequest, ::crypto::GenerateAESKeyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_generateAESKey_, context, request, response); +} + +void CryptoService::Stub::async::generateAESKey(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest* request, ::crypto::GenerateAESKeyResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::GenerateAESKeyRequest, ::crypto::GenerateAESKeyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_generateAESKey_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::generateAESKey(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest* request, ::crypto::GenerateAESKeyResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_generateAESKey_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GenerateAESKeyResponse>* CryptoService::Stub::PrepareAsyncgenerateAESKeyRaw(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::GenerateAESKeyResponse, ::crypto::GenerateAESKeyRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_generateAESKey_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GenerateAESKeyResponse>* CryptoService::Stub::AsyncgenerateAESKeyRaw(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncgenerateAESKeyRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::generateRSAKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::crypto::GenerateKeyPairResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_generateRSAKeyPair_, context, request, response); +} + +void CryptoService::Stub::async::generateRSAKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_generateRSAKeyPair_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::generateRSAKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_generateRSAKeyPair_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>* CryptoService::Stub::PrepareAsyncgenerateRSAKeyPairRaw(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::GenerateKeyPairResponse, ::crypto::GenerateKeyPairRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_generateRSAKeyPair_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>* CryptoService::Stub::AsyncgenerateRSAKeyPairRaw(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncgenerateRSAKeyPairRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::generateECCKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::crypto::GenerateKeyPairResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_generateECCKeyPair_, context, request, response); +} + +void CryptoService::Stub::async::generateECCKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_generateECCKeyPair_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::generateECCKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_generateECCKeyPair_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>* CryptoService::Stub::PrepareAsyncgenerateECCKeyPairRaw(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::GenerateKeyPairResponse, ::crypto::GenerateKeyPairRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_generateECCKeyPair_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>* CryptoService::Stub::AsyncgenerateECCKeyPairRaw(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncgenerateECCKeyPairRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::getSignedDataLength(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest& request, ::crypto::GetLengthResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::GetHashLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_getSignedDataLength_, context, request, response); +} + +void CryptoService::Stub::async::getSignedDataLength(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest* request, ::crypto::GetLengthResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::GetHashLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getSignedDataLength_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::getSignedDataLength(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getSignedDataLength_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::PrepareAsyncgetSignedDataLengthRaw(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::GetLengthResponse, ::crypto::GetHashLengthRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_getSignedDataLength_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::AsyncgetSignedDataLengthRaw(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncgetSignedDataLengthRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::getECCencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::crypto::GetLengthResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_getECCencryptedLength_, context, request, response); +} + +void CryptoService::Stub::async::getECCencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getECCencryptedLength_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::getECCencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getECCencryptedLength_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::PrepareAsyncgetECCencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::GetLengthResponse, ::crypto::GetLengthRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_getECCencryptedLength_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::AsyncgetECCencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncgetECCencryptedLengthRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::getECCDecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::crypto::GetLengthResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_getECCDecryptedLength_, context, request, response); +} + +void CryptoService::Stub::async::getECCDecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getECCDecryptedLength_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::getECCDecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getECCDecryptedLength_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::PrepareAsyncgetECCDecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::GetLengthResponse, ::crypto::GetLengthRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_getECCDecryptedLength_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::AsyncgetECCDecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncgetECCDecryptedLengthRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::getRSAencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::crypto::GetLengthResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_getRSAencryptedLength_, context, request, response); +} + +void CryptoService::Stub::async::getRSAencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getRSAencryptedLength_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::getRSAencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getRSAencryptedLength_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::PrepareAsyncgetRSAencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::GetLengthResponse, ::crypto::GetLengthRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_getRSAencryptedLength_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::AsyncgetRSAencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncgetRSAencryptedLengthRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::getRSAdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::crypto::GetLengthResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_getRSAdecryptedLength_, context, request, response); +} + +void CryptoService::Stub::async::getRSAdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getRSAdecryptedLength_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::getRSAdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getRSAdecryptedLength_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::PrepareAsyncgetRSAdecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::GetLengthResponse, ::crypto::GetLengthRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_getRSAdecryptedLength_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::AsyncgetRSAdecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncgetRSAdecryptedLengthRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::getAESencryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::crypto::GetLengthResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_getAESencryptedLength_, context, request, response); +} + +void CryptoService::Stub::async::getAESencryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getAESencryptedLength_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::getAESencryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getAESencryptedLength_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::PrepareAsyncgetAESencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::GetLengthResponse, ::crypto::GetAESLengthRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_getAESencryptedLength_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::AsyncgetAESencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncgetAESencryptedLengthRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::getAESdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::crypto::GetLengthResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_getAESdecryptedLength_, context, request, response); +} + +void CryptoService::Stub::async::getAESdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getAESdecryptedLength_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::getAESdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getAESdecryptedLength_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::PrepareAsyncgetAESdecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::GetLengthResponse, ::crypto::GetAESLengthRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_getAESdecryptedLength_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::AsyncgetAESdecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncgetAESdecryptedLengthRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::getEncryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::crypto::GetLengthResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::GetWholeLength, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_getEncryptedLen_, context, request, response); +} + +void CryptoService::Stub::async::getEncryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::GetWholeLength, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getEncryptedLen_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::getEncryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getEncryptedLen_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::PrepareAsyncgetEncryptedLenRaw(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::GetLengthResponse, ::crypto::GetWholeLength, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_getEncryptedLen_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::AsyncgetEncryptedLenRaw(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncgetEncryptedLenRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::getDecryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::crypto::GetLengthResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::GetWholeLength, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_getDecryptedLen_, context, request, response); +} + +void CryptoService::Stub::async::getDecryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::GetWholeLength, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getDecryptedLen_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::getDecryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getDecryptedLen_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::PrepareAsyncgetDecryptedLenRaw(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::GetLengthResponse, ::crypto::GetWholeLength, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_getDecryptedLen_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* CryptoService::Stub::AsyncgetDecryptedLenRaw(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncgetDecryptedLenRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::sign(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::crypto::SignResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::SignRequest, ::crypto::SignResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_sign_, context, request, response); +} + +void CryptoService::Stub::async::sign(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::SignRequest, ::crypto::SignResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_sign_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::sign(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_sign_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>* CryptoService::Stub::PrepareAsyncsignRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::SignResponse, ::crypto::SignRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_sign_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>* CryptoService::Stub::AsyncsignRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncsignRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::verify(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::crypto::VerifyResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::VerifyRequest, ::crypto::VerifyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_verify_, context, request, response); +} + +void CryptoService::Stub::async::verify(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::VerifyRequest, ::crypto::VerifyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_verify_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::verify(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_verify_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>* CryptoService::Stub::PrepareAsyncverifyRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::VerifyResponse, ::crypto::VerifyRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_verify_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>* CryptoService::Stub::AsyncverifyRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncverifyRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::getPublicECCKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::crypto::KeyResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::KeyRequest, ::crypto::KeyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_getPublicECCKeyByUserId_, context, request, response); +} + +void CryptoService::Stub::async::getPublicECCKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::KeyRequest, ::crypto::KeyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getPublicECCKeyByUserId_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::getPublicECCKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getPublicECCKeyByUserId_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>* CryptoService::Stub::PrepareAsyncgetPublicECCKeyByUserIdRaw(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::KeyResponse, ::crypto::KeyRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_getPublicECCKeyByUserId_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>* CryptoService::Stub::AsyncgetPublicECCKeyByUserIdRaw(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncgetPublicECCKeyByUserIdRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::getPublicRSAKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::crypto::KeyResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::KeyRequest, ::crypto::KeyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_getPublicRSAKeyByUserId_, context, request, response); +} + +void CryptoService::Stub::async::getPublicRSAKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::KeyRequest, ::crypto::KeyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getPublicRSAKeyByUserId_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::getPublicRSAKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_getPublicRSAKeyByUserId_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>* CryptoService::Stub::PrepareAsyncgetPublicRSAKeyByUserIdRaw(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::KeyResponse, ::crypto::KeyRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_getPublicRSAKeyByUserId_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>* CryptoService::Stub::AsyncgetPublicRSAKeyByUserIdRaw(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncgetPublicRSAKeyByUserIdRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::ECCencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::crypto::AsymetricEncryptResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ECCencrypt_, context, request, response); +} + +void CryptoService::Stub::async::ECCencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ECCencrypt_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::ECCencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ECCencrypt_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>* CryptoService::Stub::PrepareAsyncECCencryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::AsymetricEncryptResponse, ::crypto::AsymetricEncryptRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ECCencrypt_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>* CryptoService::Stub::AsyncECCencryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncECCencryptRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::ECCdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::crypto::AsymetricDecryptResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ECCdecrypt_, context, request, response); +} + +void CryptoService::Stub::async::ECCdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ECCdecrypt_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::ECCdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ECCdecrypt_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>* CryptoService::Stub::PrepareAsyncECCdecryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::AsymetricDecryptResponse, ::crypto::AsymetricDecryptRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ECCdecrypt_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>* CryptoService::Stub::AsyncECCdecryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncECCdecryptRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::RSAencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::crypto::AsymetricEncryptResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_RSAencrypt_, context, request, response); +} + +void CryptoService::Stub::async::RSAencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RSAencrypt_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::RSAencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RSAencrypt_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>* CryptoService::Stub::PrepareAsyncRSAencryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::AsymetricEncryptResponse, ::crypto::AsymetricEncryptRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_RSAencrypt_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>* CryptoService::Stub::AsyncRSAencryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncRSAencryptRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::RSAdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::crypto::AsymetricDecryptResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_RSAdecrypt_, context, request, response); +} + +void CryptoService::Stub::async::RSAdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RSAdecrypt_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::RSAdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RSAdecrypt_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>* CryptoService::Stub::PrepareAsyncRSAdecryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::AsymetricDecryptResponse, ::crypto::AsymetricDecryptRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_RSAdecrypt_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>* CryptoService::Stub::AsyncRSAdecryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncRSAdecryptRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::AESencrypt(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest& request, ::crypto::AESEncryptResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::AESEncryptRequest, ::crypto::AESEncryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_AESencrypt_, context, request, response); +} + +void CryptoService::Stub::async::AESencrypt(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest* request, ::crypto::AESEncryptResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::AESEncryptRequest, ::crypto::AESEncryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_AESencrypt_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::AESencrypt(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest* request, ::crypto::AESEncryptResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_AESencrypt_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::AESEncryptResponse>* CryptoService::Stub::PrepareAsyncAESencryptRaw(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::AESEncryptResponse, ::crypto::AESEncryptRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_AESencrypt_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::AESEncryptResponse>* CryptoService::Stub::AsyncAESencryptRaw(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncAESencryptRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::AESdecrypt(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest& request, ::crypto::AESDecryptResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::AESDecryptRequest, ::crypto::AESDecryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_AESdecrypt_, context, request, response); +} + +void CryptoService::Stub::async::AESdecrypt(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest* request, ::crypto::AESDecryptResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::AESDecryptRequest, ::crypto::AESDecryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_AESdecrypt_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::AESdecrypt(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest* request, ::crypto::AESDecryptResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_AESdecrypt_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::AESDecryptResponse>* CryptoService::Stub::PrepareAsyncAESdecryptRaw(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::AESDecryptResponse, ::crypto::AESDecryptRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_AESdecrypt_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::AESDecryptResponse>* CryptoService::Stub::AsyncAESdecryptRaw(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncAESdecryptRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::encrypt(::grpc::ClientContext* context, const ::crypto::EncryptRequest& request, ::crypto::EncryptResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::EncryptRequest, ::crypto::EncryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_encrypt_, context, request, response); +} + +void CryptoService::Stub::async::encrypt(::grpc::ClientContext* context, const ::crypto::EncryptRequest* request, ::crypto::EncryptResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::EncryptRequest, ::crypto::EncryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_encrypt_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::encrypt(::grpc::ClientContext* context, const ::crypto::EncryptRequest* request, ::crypto::EncryptResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_encrypt_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::EncryptResponse>* CryptoService::Stub::PrepareAsyncencryptRaw(::grpc::ClientContext* context, const ::crypto::EncryptRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::EncryptResponse, ::crypto::EncryptRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_encrypt_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::EncryptResponse>* CryptoService::Stub::AsyncencryptRaw(::grpc::ClientContext* context, const ::crypto::EncryptRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncencryptRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::decrypt(::grpc::ClientContext* context, const ::crypto::DecryptRequest& request, ::crypto::DecryptResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::DecryptRequest, ::crypto::DecryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_decrypt_, context, request, response); +} + +void CryptoService::Stub::async::decrypt(::grpc::ClientContext* context, const ::crypto::DecryptRequest* request, ::crypto::DecryptResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::DecryptRequest, ::crypto::DecryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_decrypt_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::decrypt(::grpc::ClientContext* context, const ::crypto::DecryptRequest* request, ::crypto::DecryptResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_decrypt_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::DecryptResponse>* CryptoService::Stub::PrepareAsyncdecryptRaw(::grpc::ClientContext* context, const ::crypto::DecryptRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::DecryptResponse, ::crypto::DecryptRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_decrypt_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::DecryptResponse>* CryptoService::Stub::AsyncdecryptRaw(::grpc::ClientContext* context, const ::crypto::DecryptRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncdecryptRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::signUpdate(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::crypto::SignResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::SignRequest, ::crypto::SignResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_signUpdate_, context, request, response); +} + +void CryptoService::Stub::async::signUpdate(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::SignRequest, ::crypto::SignResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_signUpdate_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::signUpdate(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_signUpdate_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>* CryptoService::Stub::PrepareAsyncsignUpdateRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::SignResponse, ::crypto::SignRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_signUpdate_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>* CryptoService::Stub::AsyncsignUpdateRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncsignUpdateRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::signFinalize(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::crypto::SignResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::SignRequest, ::crypto::SignResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_signFinalize_, context, request, response); +} + +void CryptoService::Stub::async::signFinalize(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::SignRequest, ::crypto::SignResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_signFinalize_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::signFinalize(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_signFinalize_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>* CryptoService::Stub::PrepareAsyncsignFinalizeRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::SignResponse, ::crypto::SignRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_signFinalize_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>* CryptoService::Stub::AsyncsignFinalizeRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncsignFinalizeRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::verifyUpdate(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::crypto::VerifyResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::VerifyRequest, ::crypto::VerifyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_verifyUpdate_, context, request, response); +} + +void CryptoService::Stub::async::verifyUpdate(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::VerifyRequest, ::crypto::VerifyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_verifyUpdate_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::verifyUpdate(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_verifyUpdate_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>* CryptoService::Stub::PrepareAsyncverifyUpdateRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::VerifyResponse, ::crypto::VerifyRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_verifyUpdate_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>* CryptoService::Stub::AsyncverifyUpdateRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncverifyUpdateRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status CryptoService::Stub::verifyFinalize(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::crypto::VerifyResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::crypto::VerifyRequest, ::crypto::VerifyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_verifyFinalize_, context, request, response); +} + +void CryptoService::Stub::async::verifyFinalize(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::crypto::VerifyRequest, ::crypto::VerifyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_verifyFinalize_, context, request, response, std::move(f)); +} + +void CryptoService::Stub::async::verifyFinalize(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_verifyFinalize_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>* CryptoService::Stub::PrepareAsyncverifyFinalizeRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::crypto::VerifyResponse, ::crypto::VerifyRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_verifyFinalize_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>* CryptoService::Stub::AsyncverifyFinalizeRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncverifyFinalizeRaw(context, request, cq); + result->StartCall(); + return result; +} + +CryptoService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::BootSystemRequest, ::crypto::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::BootSystemRequest* req, + ::crypto::Empty* resp) { + return service->bootSystem(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::AddProcessRequest, ::crypto::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::AddProcessRequest* req, + ::crypto::Empty* resp) { + return service->addProccess(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[2], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::ConfigureRequest, ::crypto::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::ConfigureRequest* req, + ::crypto::Empty* resp) { + return service->configure(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[3], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::GenerateAESKeyRequest, ::crypto::GenerateAESKeyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::GenerateAESKeyRequest* req, + ::crypto::GenerateAESKeyResponse* resp) { + return service->generateAESKey(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[4], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::GenerateKeyPairRequest* req, + ::crypto::GenerateKeyPairResponse* resp) { + return service->generateRSAKeyPair(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[5], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::GenerateKeyPairRequest* req, + ::crypto::GenerateKeyPairResponse* resp) { + return service->generateECCKeyPair(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[6], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::GetHashLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::GetHashLengthRequest* req, + ::crypto::GetLengthResponse* resp) { + return service->getSignedDataLength(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[7], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::GetLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::GetLengthRequest* req, + ::crypto::GetLengthResponse* resp) { + return service->getECCencryptedLength(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[8], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::GetLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::GetLengthRequest* req, + ::crypto::GetLengthResponse* resp) { + return service->getECCDecryptedLength(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[9], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::GetLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::GetLengthRequest* req, + ::crypto::GetLengthResponse* resp) { + return service->getRSAencryptedLength(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[10], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::GetLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::GetLengthRequest* req, + ::crypto::GetLengthResponse* resp) { + return service->getRSAdecryptedLength(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[11], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::GetAESLengthRequest* req, + ::crypto::GetLengthResponse* resp) { + return service->getAESencryptedLength(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[12], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::GetAESLengthRequest* req, + ::crypto::GetLengthResponse* resp) { + return service->getAESdecryptedLength(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[13], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::GetWholeLength, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::GetWholeLength* req, + ::crypto::GetLengthResponse* resp) { + return service->getEncryptedLen(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[14], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::GetWholeLength, ::crypto::GetLengthResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::GetWholeLength* req, + ::crypto::GetLengthResponse* resp) { + return service->getDecryptedLen(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[15], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::SignRequest, ::crypto::SignResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::SignRequest* req, + ::crypto::SignResponse* resp) { + return service->sign(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[16], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::VerifyRequest, ::crypto::VerifyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::VerifyRequest* req, + ::crypto::VerifyResponse* resp) { + return service->verify(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[17], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::KeyRequest, ::crypto::KeyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::KeyRequest* req, + ::crypto::KeyResponse* resp) { + return service->getPublicECCKeyByUserId(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[18], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::KeyRequest, ::crypto::KeyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::KeyRequest* req, + ::crypto::KeyResponse* resp) { + return service->getPublicRSAKeyByUserId(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[19], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::AsymetricEncryptRequest* req, + ::crypto::AsymetricEncryptResponse* resp) { + return service->ECCencrypt(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[20], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::AsymetricDecryptRequest* req, + ::crypto::AsymetricDecryptResponse* resp) { + return service->ECCdecrypt(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[21], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::AsymetricEncryptRequest* req, + ::crypto::AsymetricEncryptResponse* resp) { + return service->RSAencrypt(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[22], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::AsymetricDecryptRequest* req, + ::crypto::AsymetricDecryptResponse* resp) { + return service->RSAdecrypt(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[23], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::AESEncryptRequest, ::crypto::AESEncryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::AESEncryptRequest* req, + ::crypto::AESEncryptResponse* resp) { + return service->AESencrypt(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[24], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::AESDecryptRequest, ::crypto::AESDecryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::AESDecryptRequest* req, + ::crypto::AESDecryptResponse* resp) { + return service->AESdecrypt(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[25], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::EncryptRequest, ::crypto::EncryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::EncryptRequest* req, + ::crypto::EncryptResponse* resp) { + return service->encrypt(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[26], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::DecryptRequest, ::crypto::DecryptResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::DecryptRequest* req, + ::crypto::DecryptResponse* resp) { + return service->decrypt(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[27], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::SignRequest, ::crypto::SignResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::SignRequest* req, + ::crypto::SignResponse* resp) { + return service->signUpdate(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[28], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::SignRequest, ::crypto::SignResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::SignRequest* req, + ::crypto::SignResponse* resp) { + return service->signFinalize(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[29], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::VerifyRequest, ::crypto::VerifyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::VerifyRequest* req, + ::crypto::VerifyResponse* resp) { + return service->verifyUpdate(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + CryptoService_method_names[30], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< CryptoService::Service, ::crypto::VerifyRequest, ::crypto::VerifyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](CryptoService::Service* service, + ::grpc::ServerContext* ctx, + const ::crypto::VerifyRequest* req, + ::crypto::VerifyResponse* resp) { + return service->verifyFinalize(ctx, req, resp); + }, this))); +} + +CryptoService::Service::~Service() { +} + +::grpc::Status CryptoService::Service::bootSystem(::grpc::ServerContext* context, const ::crypto::BootSystemRequest* request, ::crypto::Empty* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::addProccess(::grpc::ServerContext* context, const ::crypto::AddProcessRequest* request, ::crypto::Empty* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::configure(::grpc::ServerContext* context, const ::crypto::ConfigureRequest* request, ::crypto::Empty* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::generateAESKey(::grpc::ServerContext* context, const ::crypto::GenerateAESKeyRequest* request, ::crypto::GenerateAESKeyResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::generateRSAKeyPair(::grpc::ServerContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::generateECCKeyPair(::grpc::ServerContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::getSignedDataLength(::grpc::ServerContext* context, const ::crypto::GetHashLengthRequest* request, ::crypto::GetLengthResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::getECCencryptedLength(::grpc::ServerContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::getECCDecryptedLength(::grpc::ServerContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::getRSAencryptedLength(::grpc::ServerContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::getRSAdecryptedLength(::grpc::ServerContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::getAESencryptedLength(::grpc::ServerContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::getAESdecryptedLength(::grpc::ServerContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::getEncryptedLen(::grpc::ServerContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::getDecryptedLen(::grpc::ServerContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::sign(::grpc::ServerContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::verify(::grpc::ServerContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::getPublicECCKeyByUserId(::grpc::ServerContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::getPublicRSAKeyByUserId(::grpc::ServerContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::ECCencrypt(::grpc::ServerContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::ECCdecrypt(::grpc::ServerContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::RSAencrypt(::grpc::ServerContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::RSAdecrypt(::grpc::ServerContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::AESencrypt(::grpc::ServerContext* context, const ::crypto::AESEncryptRequest* request, ::crypto::AESEncryptResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::AESdecrypt(::grpc::ServerContext* context, const ::crypto::AESDecryptRequest* request, ::crypto::AESDecryptResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::encrypt(::grpc::ServerContext* context, const ::crypto::EncryptRequest* request, ::crypto::EncryptResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::decrypt(::grpc::ServerContext* context, const ::crypto::DecryptRequest* request, ::crypto::DecryptResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::signUpdate(::grpc::ServerContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::signFinalize(::grpc::ServerContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::verifyUpdate(::grpc::ServerContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status CryptoService::Service::verifyFinalize(::grpc::ServerContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace crypto + diff --git a/proto/encryption.grpc.pb.h b/proto/encryption.grpc.pb.h new file mode 100644 index 00000000..b9b42fa2 --- /dev/null +++ b/proto/encryption.grpc.pb.h @@ -0,0 +1,4950 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: proto/encryption.proto +#ifndef GRPC_proto_2fencryption_2eproto__INCLUDED +#define GRPC_proto_2fencryption_2eproto__INCLUDED + +#include "encryption.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace crypto { + +class CryptoService final { + public: + static constexpr char const* service_full_name() { + return "crypto.CryptoService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status bootSystem(::grpc::ClientContext* context, const ::crypto::BootSystemRequest& request, ::crypto::Empty* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>> AsyncbootSystem(::grpc::ClientContext* context, const ::crypto::BootSystemRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>>(AsyncbootSystemRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>> PrepareAsyncbootSystem(::grpc::ClientContext* context, const ::crypto::BootSystemRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>>(PrepareAsyncbootSystemRaw(context, request, cq)); + } + virtual ::grpc::Status addProccess(::grpc::ClientContext* context, const ::crypto::AddProcessRequest& request, ::crypto::Empty* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>> AsyncaddProccess(::grpc::ClientContext* context, const ::crypto::AddProcessRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>>(AsyncaddProccessRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>> PrepareAsyncaddProccess(::grpc::ClientContext* context, const ::crypto::AddProcessRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>>(PrepareAsyncaddProccessRaw(context, request, cq)); + } + virtual ::grpc::Status configure(::grpc::ClientContext* context, const ::crypto::ConfigureRequest& request, ::crypto::Empty* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>> Asyncconfigure(::grpc::ClientContext* context, const ::crypto::ConfigureRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>>(AsyncconfigureRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>> PrepareAsyncconfigure(::grpc::ClientContext* context, const ::crypto::ConfigureRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>>(PrepareAsyncconfigureRaw(context, request, cq)); + } + virtual ::grpc::Status generateAESKey(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest& request, ::crypto::GenerateAESKeyResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateAESKeyResponse>> AsyncgenerateAESKey(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateAESKeyResponse>>(AsyncgenerateAESKeyRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateAESKeyResponse>> PrepareAsyncgenerateAESKey(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateAESKeyResponse>>(PrepareAsyncgenerateAESKeyRaw(context, request, cq)); + } + virtual ::grpc::Status generateRSAKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::crypto::GenerateKeyPairResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateKeyPairResponse>> AsyncgenerateRSAKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateKeyPairResponse>>(AsyncgenerateRSAKeyPairRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateKeyPairResponse>> PrepareAsyncgenerateRSAKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateKeyPairResponse>>(PrepareAsyncgenerateRSAKeyPairRaw(context, request, cq)); + } + virtual ::grpc::Status generateECCKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::crypto::GenerateKeyPairResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateKeyPairResponse>> AsyncgenerateECCKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateKeyPairResponse>>(AsyncgenerateECCKeyPairRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateKeyPairResponse>> PrepareAsyncgenerateECCKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateKeyPairResponse>>(PrepareAsyncgenerateECCKeyPairRaw(context, request, cq)); + } + virtual ::grpc::Status getSignedDataLength(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest& request, ::crypto::GetLengthResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> AsyncgetSignedDataLength(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(AsyncgetSignedDataLengthRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> PrepareAsyncgetSignedDataLength(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(PrepareAsyncgetSignedDataLengthRaw(context, request, cq)); + } + virtual ::grpc::Status getECCencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::crypto::GetLengthResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> AsyncgetECCencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(AsyncgetECCencryptedLengthRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> PrepareAsyncgetECCencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(PrepareAsyncgetECCencryptedLengthRaw(context, request, cq)); + } + virtual ::grpc::Status getECCDecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::crypto::GetLengthResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> AsyncgetECCDecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(AsyncgetECCDecryptedLengthRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> PrepareAsyncgetECCDecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(PrepareAsyncgetECCDecryptedLengthRaw(context, request, cq)); + } + virtual ::grpc::Status getRSAencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::crypto::GetLengthResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> AsyncgetRSAencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(AsyncgetRSAencryptedLengthRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> PrepareAsyncgetRSAencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(PrepareAsyncgetRSAencryptedLengthRaw(context, request, cq)); + } + virtual ::grpc::Status getRSAdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::crypto::GetLengthResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> AsyncgetRSAdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(AsyncgetRSAdecryptedLengthRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> PrepareAsyncgetRSAdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(PrepareAsyncgetRSAdecryptedLengthRaw(context, request, cq)); + } + virtual ::grpc::Status getAESencryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::crypto::GetLengthResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> AsyncgetAESencryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(AsyncgetAESencryptedLengthRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> PrepareAsyncgetAESencryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(PrepareAsyncgetAESencryptedLengthRaw(context, request, cq)); + } + virtual ::grpc::Status getAESdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::crypto::GetLengthResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> AsyncgetAESdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(AsyncgetAESdecryptedLengthRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> PrepareAsyncgetAESdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(PrepareAsyncgetAESdecryptedLengthRaw(context, request, cq)); + } + virtual ::grpc::Status getEncryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::crypto::GetLengthResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> AsyncgetEncryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(AsyncgetEncryptedLenRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> PrepareAsyncgetEncryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(PrepareAsyncgetEncryptedLenRaw(context, request, cq)); + } + virtual ::grpc::Status getDecryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::crypto::GetLengthResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> AsyncgetDecryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(AsyncgetDecryptedLenRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>> PrepareAsyncgetDecryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>>(PrepareAsyncgetDecryptedLenRaw(context, request, cq)); + } + virtual ::grpc::Status sign(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::crypto::SignResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>> Asyncsign(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>>(AsyncsignRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>> PrepareAsyncsign(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>>(PrepareAsyncsignRaw(context, request, cq)); + } + virtual ::grpc::Status verify(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::crypto::VerifyResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>> Asyncverify(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>>(AsyncverifyRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>> PrepareAsyncverify(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>>(PrepareAsyncverifyRaw(context, request, cq)); + } + virtual ::grpc::Status getPublicECCKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::crypto::KeyResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::KeyResponse>> AsyncgetPublicECCKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::KeyResponse>>(AsyncgetPublicECCKeyByUserIdRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::KeyResponse>> PrepareAsyncgetPublicECCKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::KeyResponse>>(PrepareAsyncgetPublicECCKeyByUserIdRaw(context, request, cq)); + } + virtual ::grpc::Status getPublicRSAKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::crypto::KeyResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::KeyResponse>> AsyncgetPublicRSAKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::KeyResponse>>(AsyncgetPublicRSAKeyByUserIdRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::KeyResponse>> PrepareAsyncgetPublicRSAKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::KeyResponse>>(PrepareAsyncgetPublicRSAKeyByUserIdRaw(context, request, cq)); + } + virtual ::grpc::Status ECCencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::crypto::AsymetricEncryptResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricEncryptResponse>> AsyncECCencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricEncryptResponse>>(AsyncECCencryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricEncryptResponse>> PrepareAsyncECCencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricEncryptResponse>>(PrepareAsyncECCencryptRaw(context, request, cq)); + } + virtual ::grpc::Status ECCdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::crypto::AsymetricDecryptResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricDecryptResponse>> AsyncECCdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricDecryptResponse>>(AsyncECCdecryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricDecryptResponse>> PrepareAsyncECCdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricDecryptResponse>>(PrepareAsyncECCdecryptRaw(context, request, cq)); + } + virtual ::grpc::Status RSAencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::crypto::AsymetricEncryptResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricEncryptResponse>> AsyncRSAencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricEncryptResponse>>(AsyncRSAencryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricEncryptResponse>> PrepareAsyncRSAencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricEncryptResponse>>(PrepareAsyncRSAencryptRaw(context, request, cq)); + } + virtual ::grpc::Status RSAdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::crypto::AsymetricDecryptResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricDecryptResponse>> AsyncRSAdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricDecryptResponse>>(AsyncRSAdecryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricDecryptResponse>> PrepareAsyncRSAdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricDecryptResponse>>(PrepareAsyncRSAdecryptRaw(context, request, cq)); + } + virtual ::grpc::Status AESencrypt(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest& request, ::crypto::AESEncryptResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AESEncryptResponse>> AsyncAESencrypt(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AESEncryptResponse>>(AsyncAESencryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AESEncryptResponse>> PrepareAsyncAESencrypt(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AESEncryptResponse>>(PrepareAsyncAESencryptRaw(context, request, cq)); + } + virtual ::grpc::Status AESdecrypt(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest& request, ::crypto::AESDecryptResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AESDecryptResponse>> AsyncAESdecrypt(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AESDecryptResponse>>(AsyncAESdecryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AESDecryptResponse>> PrepareAsyncAESdecrypt(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AESDecryptResponse>>(PrepareAsyncAESdecryptRaw(context, request, cq)); + } + virtual ::grpc::Status encrypt(::grpc::ClientContext* context, const ::crypto::EncryptRequest& request, ::crypto::EncryptResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::EncryptResponse>> Asyncencrypt(::grpc::ClientContext* context, const ::crypto::EncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::EncryptResponse>>(AsyncencryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::EncryptResponse>> PrepareAsyncencrypt(::grpc::ClientContext* context, const ::crypto::EncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::EncryptResponse>>(PrepareAsyncencryptRaw(context, request, cq)); + } + virtual ::grpc::Status decrypt(::grpc::ClientContext* context, const ::crypto::DecryptRequest& request, ::crypto::DecryptResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::DecryptResponse>> Asyncdecrypt(::grpc::ClientContext* context, const ::crypto::DecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::DecryptResponse>>(AsyncdecryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::DecryptResponse>> PrepareAsyncdecrypt(::grpc::ClientContext* context, const ::crypto::DecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::DecryptResponse>>(PrepareAsyncdecryptRaw(context, request, cq)); + } + virtual ::grpc::Status signUpdate(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::crypto::SignResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>> AsyncsignUpdate(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>>(AsyncsignUpdateRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>> PrepareAsyncsignUpdate(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>>(PrepareAsyncsignUpdateRaw(context, request, cq)); + } + virtual ::grpc::Status signFinalize(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::crypto::SignResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>> AsyncsignFinalize(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>>(AsyncsignFinalizeRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>> PrepareAsyncsignFinalize(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>>(PrepareAsyncsignFinalizeRaw(context, request, cq)); + } + virtual ::grpc::Status verifyUpdate(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::crypto::VerifyResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>> AsyncverifyUpdate(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>>(AsyncverifyUpdateRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>> PrepareAsyncverifyUpdate(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>>(PrepareAsyncverifyUpdateRaw(context, request, cq)); + } + virtual ::grpc::Status verifyFinalize(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::crypto::VerifyResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>> AsyncverifyFinalize(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>>(AsyncverifyFinalizeRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>> PrepareAsyncverifyFinalize(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>>(PrepareAsyncverifyFinalizeRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + virtual void bootSystem(::grpc::ClientContext* context, const ::crypto::BootSystemRequest* request, ::crypto::Empty* response, std::function) = 0; + virtual void bootSystem(::grpc::ClientContext* context, const ::crypto::BootSystemRequest* request, ::crypto::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void addProccess(::grpc::ClientContext* context, const ::crypto::AddProcessRequest* request, ::crypto::Empty* response, std::function) = 0; + virtual void addProccess(::grpc::ClientContext* context, const ::crypto::AddProcessRequest* request, ::crypto::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void configure(::grpc::ClientContext* context, const ::crypto::ConfigureRequest* request, ::crypto::Empty* response, std::function) = 0; + virtual void configure(::grpc::ClientContext* context, const ::crypto::ConfigureRequest* request, ::crypto::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void generateAESKey(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest* request, ::crypto::GenerateAESKeyResponse* response, std::function) = 0; + virtual void generateAESKey(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest* request, ::crypto::GenerateAESKeyResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void generateRSAKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response, std::function) = 0; + virtual void generateRSAKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void generateECCKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response, std::function) = 0; + virtual void generateECCKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void getSignedDataLength(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest* request, ::crypto::GetLengthResponse* response, std::function) = 0; + virtual void getSignedDataLength(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void getECCencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, std::function) = 0; + virtual void getECCencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void getECCDecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, std::function) = 0; + virtual void getECCDecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void getRSAencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, std::function) = 0; + virtual void getRSAencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void getRSAdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, std::function) = 0; + virtual void getRSAdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void getAESencryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response, std::function) = 0; + virtual void getAESencryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void getAESdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response, std::function) = 0; + virtual void getAESdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void getEncryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response, std::function) = 0; + virtual void getEncryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void getDecryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response, std::function) = 0; + virtual void getDecryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void sign(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, std::function) = 0; + virtual void sign(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void verify(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, std::function) = 0; + virtual void verify(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void getPublicECCKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response, std::function) = 0; + virtual void getPublicECCKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void getPublicRSAKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response, std::function) = 0; + virtual void getPublicRSAKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void ECCencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response, std::function) = 0; + virtual void ECCencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void ECCdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response, std::function) = 0; + virtual void ECCdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void RSAencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response, std::function) = 0; + virtual void RSAencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void RSAdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response, std::function) = 0; + virtual void RSAdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void AESencrypt(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest* request, ::crypto::AESEncryptResponse* response, std::function) = 0; + virtual void AESencrypt(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest* request, ::crypto::AESEncryptResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void AESdecrypt(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest* request, ::crypto::AESDecryptResponse* response, std::function) = 0; + virtual void AESdecrypt(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest* request, ::crypto::AESDecryptResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void encrypt(::grpc::ClientContext* context, const ::crypto::EncryptRequest* request, ::crypto::EncryptResponse* response, std::function) = 0; + virtual void encrypt(::grpc::ClientContext* context, const ::crypto::EncryptRequest* request, ::crypto::EncryptResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void decrypt(::grpc::ClientContext* context, const ::crypto::DecryptRequest* request, ::crypto::DecryptResponse* response, std::function) = 0; + virtual void decrypt(::grpc::ClientContext* context, const ::crypto::DecryptRequest* request, ::crypto::DecryptResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void signUpdate(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, std::function) = 0; + virtual void signUpdate(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void signFinalize(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, std::function) = 0; + virtual void signFinalize(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void verifyUpdate(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, std::function) = 0; + virtual void verifyUpdate(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void verifyFinalize(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, std::function) = 0; + virtual void verifyFinalize(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>* AsyncbootSystemRaw(::grpc::ClientContext* context, const ::crypto::BootSystemRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>* PrepareAsyncbootSystemRaw(::grpc::ClientContext* context, const ::crypto::BootSystemRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>* AsyncaddProccessRaw(::grpc::ClientContext* context, const ::crypto::AddProcessRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>* PrepareAsyncaddProccessRaw(::grpc::ClientContext* context, const ::crypto::AddProcessRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>* AsyncconfigureRaw(::grpc::ClientContext* context, const ::crypto::ConfigureRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::Empty>* PrepareAsyncconfigureRaw(::grpc::ClientContext* context, const ::crypto::ConfigureRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateAESKeyResponse>* AsyncgenerateAESKeyRaw(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateAESKeyResponse>* PrepareAsyncgenerateAESKeyRaw(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateKeyPairResponse>* AsyncgenerateRSAKeyPairRaw(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateKeyPairResponse>* PrepareAsyncgenerateRSAKeyPairRaw(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateKeyPairResponse>* AsyncgenerateECCKeyPairRaw(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GenerateKeyPairResponse>* PrepareAsyncgenerateECCKeyPairRaw(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* AsyncgetSignedDataLengthRaw(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* PrepareAsyncgetSignedDataLengthRaw(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* AsyncgetECCencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* PrepareAsyncgetECCencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* AsyncgetECCDecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* PrepareAsyncgetECCDecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* AsyncgetRSAencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* PrepareAsyncgetRSAencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* AsyncgetRSAdecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* PrepareAsyncgetRSAdecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* AsyncgetAESencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* PrepareAsyncgetAESencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* AsyncgetAESdecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* PrepareAsyncgetAESdecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* AsyncgetEncryptedLenRaw(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* PrepareAsyncgetEncryptedLenRaw(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* AsyncgetDecryptedLenRaw(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::GetLengthResponse>* PrepareAsyncgetDecryptedLenRaw(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>* AsyncsignRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>* PrepareAsyncsignRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>* AsyncverifyRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>* PrepareAsyncverifyRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::KeyResponse>* AsyncgetPublicECCKeyByUserIdRaw(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::KeyResponse>* PrepareAsyncgetPublicECCKeyByUserIdRaw(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::KeyResponse>* AsyncgetPublicRSAKeyByUserIdRaw(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::KeyResponse>* PrepareAsyncgetPublicRSAKeyByUserIdRaw(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricEncryptResponse>* AsyncECCencryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricEncryptResponse>* PrepareAsyncECCencryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricDecryptResponse>* AsyncECCdecryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricDecryptResponse>* PrepareAsyncECCdecryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricEncryptResponse>* AsyncRSAencryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricEncryptResponse>* PrepareAsyncRSAencryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricDecryptResponse>* AsyncRSAdecryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AsymetricDecryptResponse>* PrepareAsyncRSAdecryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AESEncryptResponse>* AsyncAESencryptRaw(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AESEncryptResponse>* PrepareAsyncAESencryptRaw(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AESDecryptResponse>* AsyncAESdecryptRaw(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::AESDecryptResponse>* PrepareAsyncAESdecryptRaw(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::EncryptResponse>* AsyncencryptRaw(::grpc::ClientContext* context, const ::crypto::EncryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::EncryptResponse>* PrepareAsyncencryptRaw(::grpc::ClientContext* context, const ::crypto::EncryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::DecryptResponse>* AsyncdecryptRaw(::grpc::ClientContext* context, const ::crypto::DecryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::DecryptResponse>* PrepareAsyncdecryptRaw(::grpc::ClientContext* context, const ::crypto::DecryptRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>* AsyncsignUpdateRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>* PrepareAsyncsignUpdateRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>* AsyncsignFinalizeRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::SignResponse>* PrepareAsyncsignFinalizeRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>* AsyncverifyUpdateRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>* PrepareAsyncverifyUpdateRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>* AsyncverifyFinalizeRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::crypto::VerifyResponse>* PrepareAsyncverifyFinalizeRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status bootSystem(::grpc::ClientContext* context, const ::crypto::BootSystemRequest& request, ::crypto::Empty* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::Empty>> AsyncbootSystem(::grpc::ClientContext* context, const ::crypto::BootSystemRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::Empty>>(AsyncbootSystemRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::Empty>> PrepareAsyncbootSystem(::grpc::ClientContext* context, const ::crypto::BootSystemRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::Empty>>(PrepareAsyncbootSystemRaw(context, request, cq)); + } + ::grpc::Status addProccess(::grpc::ClientContext* context, const ::crypto::AddProcessRequest& request, ::crypto::Empty* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::Empty>> AsyncaddProccess(::grpc::ClientContext* context, const ::crypto::AddProcessRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::Empty>>(AsyncaddProccessRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::Empty>> PrepareAsyncaddProccess(::grpc::ClientContext* context, const ::crypto::AddProcessRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::Empty>>(PrepareAsyncaddProccessRaw(context, request, cq)); + } + ::grpc::Status configure(::grpc::ClientContext* context, const ::crypto::ConfigureRequest& request, ::crypto::Empty* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::Empty>> Asyncconfigure(::grpc::ClientContext* context, const ::crypto::ConfigureRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::Empty>>(AsyncconfigureRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::Empty>> PrepareAsyncconfigure(::grpc::ClientContext* context, const ::crypto::ConfigureRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::Empty>>(PrepareAsyncconfigureRaw(context, request, cq)); + } + ::grpc::Status generateAESKey(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest& request, ::crypto::GenerateAESKeyResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GenerateAESKeyResponse>> AsyncgenerateAESKey(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GenerateAESKeyResponse>>(AsyncgenerateAESKeyRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GenerateAESKeyResponse>> PrepareAsyncgenerateAESKey(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GenerateAESKeyResponse>>(PrepareAsyncgenerateAESKeyRaw(context, request, cq)); + } + ::grpc::Status generateRSAKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::crypto::GenerateKeyPairResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>> AsyncgenerateRSAKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>>(AsyncgenerateRSAKeyPairRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>> PrepareAsyncgenerateRSAKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>>(PrepareAsyncgenerateRSAKeyPairRaw(context, request, cq)); + } + ::grpc::Status generateECCKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::crypto::GenerateKeyPairResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>> AsyncgenerateECCKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>>(AsyncgenerateECCKeyPairRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>> PrepareAsyncgenerateECCKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>>(PrepareAsyncgenerateECCKeyPairRaw(context, request, cq)); + } + ::grpc::Status getSignedDataLength(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest& request, ::crypto::GetLengthResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> AsyncgetSignedDataLength(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(AsyncgetSignedDataLengthRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> PrepareAsyncgetSignedDataLength(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(PrepareAsyncgetSignedDataLengthRaw(context, request, cq)); + } + ::grpc::Status getECCencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::crypto::GetLengthResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> AsyncgetECCencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(AsyncgetECCencryptedLengthRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> PrepareAsyncgetECCencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(PrepareAsyncgetECCencryptedLengthRaw(context, request, cq)); + } + ::grpc::Status getECCDecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::crypto::GetLengthResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> AsyncgetECCDecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(AsyncgetECCDecryptedLengthRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> PrepareAsyncgetECCDecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(PrepareAsyncgetECCDecryptedLengthRaw(context, request, cq)); + } + ::grpc::Status getRSAencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::crypto::GetLengthResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> AsyncgetRSAencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(AsyncgetRSAencryptedLengthRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> PrepareAsyncgetRSAencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(PrepareAsyncgetRSAencryptedLengthRaw(context, request, cq)); + } + ::grpc::Status getRSAdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::crypto::GetLengthResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> AsyncgetRSAdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(AsyncgetRSAdecryptedLengthRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> PrepareAsyncgetRSAdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(PrepareAsyncgetRSAdecryptedLengthRaw(context, request, cq)); + } + ::grpc::Status getAESencryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::crypto::GetLengthResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> AsyncgetAESencryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(AsyncgetAESencryptedLengthRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> PrepareAsyncgetAESencryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(PrepareAsyncgetAESencryptedLengthRaw(context, request, cq)); + } + ::grpc::Status getAESdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::crypto::GetLengthResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> AsyncgetAESdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(AsyncgetAESdecryptedLengthRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> PrepareAsyncgetAESdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(PrepareAsyncgetAESdecryptedLengthRaw(context, request, cq)); + } + ::grpc::Status getEncryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::crypto::GetLengthResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> AsyncgetEncryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(AsyncgetEncryptedLenRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> PrepareAsyncgetEncryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(PrepareAsyncgetEncryptedLenRaw(context, request, cq)); + } + ::grpc::Status getDecryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::crypto::GetLengthResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> AsyncgetDecryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(AsyncgetDecryptedLenRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>> PrepareAsyncgetDecryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>>(PrepareAsyncgetDecryptedLenRaw(context, request, cq)); + } + ::grpc::Status sign(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::crypto::SignResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>> Asyncsign(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>>(AsyncsignRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>> PrepareAsyncsign(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>>(PrepareAsyncsignRaw(context, request, cq)); + } + ::grpc::Status verify(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::crypto::VerifyResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>> Asyncverify(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>>(AsyncverifyRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>> PrepareAsyncverify(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>>(PrepareAsyncverifyRaw(context, request, cq)); + } + ::grpc::Status getPublicECCKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::crypto::KeyResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>> AsyncgetPublicECCKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>>(AsyncgetPublicECCKeyByUserIdRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>> PrepareAsyncgetPublicECCKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>>(PrepareAsyncgetPublicECCKeyByUserIdRaw(context, request, cq)); + } + ::grpc::Status getPublicRSAKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::crypto::KeyResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>> AsyncgetPublicRSAKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>>(AsyncgetPublicRSAKeyByUserIdRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>> PrepareAsyncgetPublicRSAKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>>(PrepareAsyncgetPublicRSAKeyByUserIdRaw(context, request, cq)); + } + ::grpc::Status ECCencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::crypto::AsymetricEncryptResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>> AsyncECCencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>>(AsyncECCencryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>> PrepareAsyncECCencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>>(PrepareAsyncECCencryptRaw(context, request, cq)); + } + ::grpc::Status ECCdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::crypto::AsymetricDecryptResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>> AsyncECCdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>>(AsyncECCdecryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>> PrepareAsyncECCdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>>(PrepareAsyncECCdecryptRaw(context, request, cq)); + } + ::grpc::Status RSAencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::crypto::AsymetricEncryptResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>> AsyncRSAencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>>(AsyncRSAencryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>> PrepareAsyncRSAencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>>(PrepareAsyncRSAencryptRaw(context, request, cq)); + } + ::grpc::Status RSAdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::crypto::AsymetricDecryptResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>> AsyncRSAdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>>(AsyncRSAdecryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>> PrepareAsyncRSAdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>>(PrepareAsyncRSAdecryptRaw(context, request, cq)); + } + ::grpc::Status AESencrypt(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest& request, ::crypto::AESEncryptResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AESEncryptResponse>> AsyncAESencrypt(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AESEncryptResponse>>(AsyncAESencryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AESEncryptResponse>> PrepareAsyncAESencrypt(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AESEncryptResponse>>(PrepareAsyncAESencryptRaw(context, request, cq)); + } + ::grpc::Status AESdecrypt(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest& request, ::crypto::AESDecryptResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AESDecryptResponse>> AsyncAESdecrypt(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AESDecryptResponse>>(AsyncAESdecryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AESDecryptResponse>> PrepareAsyncAESdecrypt(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::AESDecryptResponse>>(PrepareAsyncAESdecryptRaw(context, request, cq)); + } + ::grpc::Status encrypt(::grpc::ClientContext* context, const ::crypto::EncryptRequest& request, ::crypto::EncryptResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::EncryptResponse>> Asyncencrypt(::grpc::ClientContext* context, const ::crypto::EncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::EncryptResponse>>(AsyncencryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::EncryptResponse>> PrepareAsyncencrypt(::grpc::ClientContext* context, const ::crypto::EncryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::EncryptResponse>>(PrepareAsyncencryptRaw(context, request, cq)); + } + ::grpc::Status decrypt(::grpc::ClientContext* context, const ::crypto::DecryptRequest& request, ::crypto::DecryptResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::DecryptResponse>> Asyncdecrypt(::grpc::ClientContext* context, const ::crypto::DecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::DecryptResponse>>(AsyncdecryptRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::DecryptResponse>> PrepareAsyncdecrypt(::grpc::ClientContext* context, const ::crypto::DecryptRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::DecryptResponse>>(PrepareAsyncdecryptRaw(context, request, cq)); + } + ::grpc::Status signUpdate(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::crypto::SignResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>> AsyncsignUpdate(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>>(AsyncsignUpdateRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>> PrepareAsyncsignUpdate(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>>(PrepareAsyncsignUpdateRaw(context, request, cq)); + } + ::grpc::Status signFinalize(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::crypto::SignResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>> AsyncsignFinalize(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>>(AsyncsignFinalizeRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>> PrepareAsyncsignFinalize(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>>(PrepareAsyncsignFinalizeRaw(context, request, cq)); + } + ::grpc::Status verifyUpdate(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::crypto::VerifyResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>> AsyncverifyUpdate(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>>(AsyncverifyUpdateRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>> PrepareAsyncverifyUpdate(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>>(PrepareAsyncverifyUpdateRaw(context, request, cq)); + } + ::grpc::Status verifyFinalize(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::crypto::VerifyResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>> AsyncverifyFinalize(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>>(AsyncverifyFinalizeRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>> PrepareAsyncverifyFinalize(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>>(PrepareAsyncverifyFinalizeRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void bootSystem(::grpc::ClientContext* context, const ::crypto::BootSystemRequest* request, ::crypto::Empty* response, std::function) override; + void bootSystem(::grpc::ClientContext* context, const ::crypto::BootSystemRequest* request, ::crypto::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + void addProccess(::grpc::ClientContext* context, const ::crypto::AddProcessRequest* request, ::crypto::Empty* response, std::function) override; + void addProccess(::grpc::ClientContext* context, const ::crypto::AddProcessRequest* request, ::crypto::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + void configure(::grpc::ClientContext* context, const ::crypto::ConfigureRequest* request, ::crypto::Empty* response, std::function) override; + void configure(::grpc::ClientContext* context, const ::crypto::ConfigureRequest* request, ::crypto::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + void generateAESKey(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest* request, ::crypto::GenerateAESKeyResponse* response, std::function) override; + void generateAESKey(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest* request, ::crypto::GenerateAESKeyResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void generateRSAKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response, std::function) override; + void generateRSAKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void generateECCKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response, std::function) override; + void generateECCKeyPair(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void getSignedDataLength(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest* request, ::crypto::GetLengthResponse* response, std::function) override; + void getSignedDataLength(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void getECCencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, std::function) override; + void getECCencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void getECCDecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, std::function) override; + void getECCDecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void getRSAencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, std::function) override; + void getRSAencryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void getRSAdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, std::function) override; + void getRSAdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void getAESencryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response, std::function) override; + void getAESencryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void getAESdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response, std::function) override; + void getAESdecryptedLength(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void getEncryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response, std::function) override; + void getEncryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void getDecryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response, std::function) override; + void getDecryptedLen(::grpc::ClientContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void sign(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, std::function) override; + void sign(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void verify(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, std::function) override; + void verify(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void getPublicECCKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response, std::function) override; + void getPublicECCKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void getPublicRSAKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response, std::function) override; + void getPublicRSAKeyByUserId(::grpc::ClientContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void ECCencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response, std::function) override; + void ECCencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void ECCdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response, std::function) override; + void ECCdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void RSAencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response, std::function) override; + void RSAencrypt(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void RSAdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response, std::function) override; + void RSAdecrypt(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void AESencrypt(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest* request, ::crypto::AESEncryptResponse* response, std::function) override; + void AESencrypt(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest* request, ::crypto::AESEncryptResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void AESdecrypt(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest* request, ::crypto::AESDecryptResponse* response, std::function) override; + void AESdecrypt(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest* request, ::crypto::AESDecryptResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void encrypt(::grpc::ClientContext* context, const ::crypto::EncryptRequest* request, ::crypto::EncryptResponse* response, std::function) override; + void encrypt(::grpc::ClientContext* context, const ::crypto::EncryptRequest* request, ::crypto::EncryptResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void decrypt(::grpc::ClientContext* context, const ::crypto::DecryptRequest* request, ::crypto::DecryptResponse* response, std::function) override; + void decrypt(::grpc::ClientContext* context, const ::crypto::DecryptRequest* request, ::crypto::DecryptResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void signUpdate(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, std::function) override; + void signUpdate(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void signFinalize(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, std::function) override; + void signFinalize(::grpc::ClientContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void verifyUpdate(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, std::function) override; + void verifyUpdate(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void verifyFinalize(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, std::function) override; + void verifyFinalize(::grpc::ClientContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::crypto::Empty>* AsyncbootSystemRaw(::grpc::ClientContext* context, const ::crypto::BootSystemRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::Empty>* PrepareAsyncbootSystemRaw(::grpc::ClientContext* context, const ::crypto::BootSystemRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::Empty>* AsyncaddProccessRaw(::grpc::ClientContext* context, const ::crypto::AddProcessRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::Empty>* PrepareAsyncaddProccessRaw(::grpc::ClientContext* context, const ::crypto::AddProcessRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::Empty>* AsyncconfigureRaw(::grpc::ClientContext* context, const ::crypto::ConfigureRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::Empty>* PrepareAsyncconfigureRaw(::grpc::ClientContext* context, const ::crypto::ConfigureRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GenerateAESKeyResponse>* AsyncgenerateAESKeyRaw(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GenerateAESKeyResponse>* PrepareAsyncgenerateAESKeyRaw(::grpc::ClientContext* context, const ::crypto::GenerateAESKeyRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>* AsyncgenerateRSAKeyPairRaw(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>* PrepareAsyncgenerateRSAKeyPairRaw(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>* AsyncgenerateECCKeyPairRaw(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GenerateKeyPairResponse>* PrepareAsyncgenerateECCKeyPairRaw(::grpc::ClientContext* context, const ::crypto::GenerateKeyPairRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* AsyncgetSignedDataLengthRaw(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* PrepareAsyncgetSignedDataLengthRaw(::grpc::ClientContext* context, const ::crypto::GetHashLengthRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* AsyncgetECCencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* PrepareAsyncgetECCencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* AsyncgetECCDecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* PrepareAsyncgetECCDecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* AsyncgetRSAencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* PrepareAsyncgetRSAencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* AsyncgetRSAdecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* PrepareAsyncgetRSAdecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetLengthRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* AsyncgetAESencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* PrepareAsyncgetAESencryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* AsyncgetAESdecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* PrepareAsyncgetAESdecryptedLengthRaw(::grpc::ClientContext* context, const ::crypto::GetAESLengthRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* AsyncgetEncryptedLenRaw(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* PrepareAsyncgetEncryptedLenRaw(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* AsyncgetDecryptedLenRaw(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::GetLengthResponse>* PrepareAsyncgetDecryptedLenRaw(::grpc::ClientContext* context, const ::crypto::GetWholeLength& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>* AsyncsignRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>* PrepareAsyncsignRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>* AsyncverifyRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>* PrepareAsyncverifyRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>* AsyncgetPublicECCKeyByUserIdRaw(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>* PrepareAsyncgetPublicECCKeyByUserIdRaw(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>* AsyncgetPublicRSAKeyByUserIdRaw(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::KeyResponse>* PrepareAsyncgetPublicRSAKeyByUserIdRaw(::grpc::ClientContext* context, const ::crypto::KeyRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>* AsyncECCencryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>* PrepareAsyncECCencryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>* AsyncECCdecryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>* PrepareAsyncECCdecryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>* AsyncRSAencryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricEncryptResponse>* PrepareAsyncRSAencryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricEncryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>* AsyncRSAdecryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::AsymetricDecryptResponse>* PrepareAsyncRSAdecryptRaw(::grpc::ClientContext* context, const ::crypto::AsymetricDecryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::AESEncryptResponse>* AsyncAESencryptRaw(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::AESEncryptResponse>* PrepareAsyncAESencryptRaw(::grpc::ClientContext* context, const ::crypto::AESEncryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::AESDecryptResponse>* AsyncAESdecryptRaw(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::AESDecryptResponse>* PrepareAsyncAESdecryptRaw(::grpc::ClientContext* context, const ::crypto::AESDecryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::EncryptResponse>* AsyncencryptRaw(::grpc::ClientContext* context, const ::crypto::EncryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::EncryptResponse>* PrepareAsyncencryptRaw(::grpc::ClientContext* context, const ::crypto::EncryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::DecryptResponse>* AsyncdecryptRaw(::grpc::ClientContext* context, const ::crypto::DecryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::DecryptResponse>* PrepareAsyncdecryptRaw(::grpc::ClientContext* context, const ::crypto::DecryptRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>* AsyncsignUpdateRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>* PrepareAsyncsignUpdateRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>* AsyncsignFinalizeRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::SignResponse>* PrepareAsyncsignFinalizeRaw(::grpc::ClientContext* context, const ::crypto::SignRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>* AsyncverifyUpdateRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>* PrepareAsyncverifyUpdateRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>* AsyncverifyFinalizeRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::crypto::VerifyResponse>* PrepareAsyncverifyFinalizeRaw(::grpc::ClientContext* context, const ::crypto::VerifyRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_bootSystem_; + const ::grpc::internal::RpcMethod rpcmethod_addProccess_; + const ::grpc::internal::RpcMethod rpcmethod_configure_; + const ::grpc::internal::RpcMethod rpcmethod_generateAESKey_; + const ::grpc::internal::RpcMethod rpcmethod_generateRSAKeyPair_; + const ::grpc::internal::RpcMethod rpcmethod_generateECCKeyPair_; + const ::grpc::internal::RpcMethod rpcmethod_getSignedDataLength_; + const ::grpc::internal::RpcMethod rpcmethod_getECCencryptedLength_; + const ::grpc::internal::RpcMethod rpcmethod_getECCDecryptedLength_; + const ::grpc::internal::RpcMethod rpcmethod_getRSAencryptedLength_; + const ::grpc::internal::RpcMethod rpcmethod_getRSAdecryptedLength_; + const ::grpc::internal::RpcMethod rpcmethod_getAESencryptedLength_; + const ::grpc::internal::RpcMethod rpcmethod_getAESdecryptedLength_; + const ::grpc::internal::RpcMethod rpcmethod_getEncryptedLen_; + const ::grpc::internal::RpcMethod rpcmethod_getDecryptedLen_; + const ::grpc::internal::RpcMethod rpcmethod_sign_; + const ::grpc::internal::RpcMethod rpcmethod_verify_; + const ::grpc::internal::RpcMethod rpcmethod_getPublicECCKeyByUserId_; + const ::grpc::internal::RpcMethod rpcmethod_getPublicRSAKeyByUserId_; + const ::grpc::internal::RpcMethod rpcmethod_ECCencrypt_; + const ::grpc::internal::RpcMethod rpcmethod_ECCdecrypt_; + const ::grpc::internal::RpcMethod rpcmethod_RSAencrypt_; + const ::grpc::internal::RpcMethod rpcmethod_RSAdecrypt_; + const ::grpc::internal::RpcMethod rpcmethod_AESencrypt_; + const ::grpc::internal::RpcMethod rpcmethod_AESdecrypt_; + const ::grpc::internal::RpcMethod rpcmethod_encrypt_; + const ::grpc::internal::RpcMethod rpcmethod_decrypt_; + const ::grpc::internal::RpcMethod rpcmethod_signUpdate_; + const ::grpc::internal::RpcMethod rpcmethod_signFinalize_; + const ::grpc::internal::RpcMethod rpcmethod_verifyUpdate_; + const ::grpc::internal::RpcMethod rpcmethod_verifyFinalize_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + virtual ::grpc::Status bootSystem(::grpc::ServerContext* context, const ::crypto::BootSystemRequest* request, ::crypto::Empty* response); + virtual ::grpc::Status addProccess(::grpc::ServerContext* context, const ::crypto::AddProcessRequest* request, ::crypto::Empty* response); + virtual ::grpc::Status configure(::grpc::ServerContext* context, const ::crypto::ConfigureRequest* request, ::crypto::Empty* response); + virtual ::grpc::Status generateAESKey(::grpc::ServerContext* context, const ::crypto::GenerateAESKeyRequest* request, ::crypto::GenerateAESKeyResponse* response); + virtual ::grpc::Status generateRSAKeyPair(::grpc::ServerContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response); + virtual ::grpc::Status generateECCKeyPair(::grpc::ServerContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response); + virtual ::grpc::Status getSignedDataLength(::grpc::ServerContext* context, const ::crypto::GetHashLengthRequest* request, ::crypto::GetLengthResponse* response); + virtual ::grpc::Status getECCencryptedLength(::grpc::ServerContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response); + virtual ::grpc::Status getECCDecryptedLength(::grpc::ServerContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response); + virtual ::grpc::Status getRSAencryptedLength(::grpc::ServerContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response); + virtual ::grpc::Status getRSAdecryptedLength(::grpc::ServerContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response); + virtual ::grpc::Status getAESencryptedLength(::grpc::ServerContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response); + virtual ::grpc::Status getAESdecryptedLength(::grpc::ServerContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response); + virtual ::grpc::Status getEncryptedLen(::grpc::ServerContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response); + virtual ::grpc::Status getDecryptedLen(::grpc::ServerContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response); + virtual ::grpc::Status sign(::grpc::ServerContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response); + virtual ::grpc::Status verify(::grpc::ServerContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response); + virtual ::grpc::Status getPublicECCKeyByUserId(::grpc::ServerContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response); + virtual ::grpc::Status getPublicRSAKeyByUserId(::grpc::ServerContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response); + virtual ::grpc::Status ECCencrypt(::grpc::ServerContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response); + virtual ::grpc::Status ECCdecrypt(::grpc::ServerContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response); + virtual ::grpc::Status RSAencrypt(::grpc::ServerContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response); + virtual ::grpc::Status RSAdecrypt(::grpc::ServerContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response); + virtual ::grpc::Status AESencrypt(::grpc::ServerContext* context, const ::crypto::AESEncryptRequest* request, ::crypto::AESEncryptResponse* response); + virtual ::grpc::Status AESdecrypt(::grpc::ServerContext* context, const ::crypto::AESDecryptRequest* request, ::crypto::AESDecryptResponse* response); + virtual ::grpc::Status encrypt(::grpc::ServerContext* context, const ::crypto::EncryptRequest* request, ::crypto::EncryptResponse* response); + virtual ::grpc::Status decrypt(::grpc::ServerContext* context, const ::crypto::DecryptRequest* request, ::crypto::DecryptResponse* response); + virtual ::grpc::Status signUpdate(::grpc::ServerContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response); + virtual ::grpc::Status signFinalize(::grpc::ServerContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response); + virtual ::grpc::Status verifyUpdate(::grpc::ServerContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response); + virtual ::grpc::Status verifyFinalize(::grpc::ServerContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response); + }; + template + class WithAsyncMethod_bootSystem : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_bootSystem() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_bootSystem() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status bootSystem(::grpc::ServerContext* /*context*/, const ::crypto::BootSystemRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestbootSystem(::grpc::ServerContext* context, ::crypto::BootSystemRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_addProccess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_addProccess() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_addProccess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status addProccess(::grpc::ServerContext* /*context*/, const ::crypto::AddProcessRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestaddProccess(::grpc::ServerContext* context, ::crypto::AddProcessRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_configure : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_configure() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_configure() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status configure(::grpc::ServerContext* /*context*/, const ::crypto::ConfigureRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void Requestconfigure(::grpc::ServerContext* context, ::crypto::ConfigureRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_generateAESKey : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_generateAESKey() { + ::grpc::Service::MarkMethodAsync(3); + } + ~WithAsyncMethod_generateAESKey() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateAESKey(::grpc::ServerContext* /*context*/, const ::crypto::GenerateAESKeyRequest* /*request*/, ::crypto::GenerateAESKeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgenerateAESKey(::grpc::ServerContext* context, ::crypto::GenerateAESKeyRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::GenerateAESKeyResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_generateRSAKeyPair : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_generateRSAKeyPair() { + ::grpc::Service::MarkMethodAsync(4); + } + ~WithAsyncMethod_generateRSAKeyPair() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateRSAKeyPair(::grpc::ServerContext* /*context*/, const ::crypto::GenerateKeyPairRequest* /*request*/, ::crypto::GenerateKeyPairResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgenerateRSAKeyPair(::grpc::ServerContext* context, ::crypto::GenerateKeyPairRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::GenerateKeyPairResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_generateECCKeyPair : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_generateECCKeyPair() { + ::grpc::Service::MarkMethodAsync(5); + } + ~WithAsyncMethod_generateECCKeyPair() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateECCKeyPair(::grpc::ServerContext* /*context*/, const ::crypto::GenerateKeyPairRequest* /*request*/, ::crypto::GenerateKeyPairResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgenerateECCKeyPair(::grpc::ServerContext* context, ::crypto::GenerateKeyPairRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::GenerateKeyPairResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_getSignedDataLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_getSignedDataLength() { + ::grpc::Service::MarkMethodAsync(6); + } + ~WithAsyncMethod_getSignedDataLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getSignedDataLength(::grpc::ServerContext* /*context*/, const ::crypto::GetHashLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetSignedDataLength(::grpc::ServerContext* context, ::crypto::GetHashLengthRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::GetLengthResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(6, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_getECCencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_getECCencryptedLength() { + ::grpc::Service::MarkMethodAsync(7); + } + ~WithAsyncMethod_getECCencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getECCencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetECCencryptedLength(::grpc::ServerContext* context, ::crypto::GetLengthRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::GetLengthResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(7, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_getECCDecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_getECCDecryptedLength() { + ::grpc::Service::MarkMethodAsync(8); + } + ~WithAsyncMethod_getECCDecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getECCDecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetECCDecryptedLength(::grpc::ServerContext* context, ::crypto::GetLengthRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::GetLengthResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(8, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_getRSAencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_getRSAencryptedLength() { + ::grpc::Service::MarkMethodAsync(9); + } + ~WithAsyncMethod_getRSAencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getRSAencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetRSAencryptedLength(::grpc::ServerContext* context, ::crypto::GetLengthRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::GetLengthResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_getRSAdecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_getRSAdecryptedLength() { + ::grpc::Service::MarkMethodAsync(10); + } + ~WithAsyncMethod_getRSAdecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getRSAdecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetRSAdecryptedLength(::grpc::ServerContext* context, ::crypto::GetLengthRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::GetLengthResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_getAESencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_getAESencryptedLength() { + ::grpc::Service::MarkMethodAsync(11); + } + ~WithAsyncMethod_getAESencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getAESencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetAESLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetAESencryptedLength(::grpc::ServerContext* context, ::crypto::GetAESLengthRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::GetLengthResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_getAESdecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_getAESdecryptedLength() { + ::grpc::Service::MarkMethodAsync(12); + } + ~WithAsyncMethod_getAESdecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getAESdecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetAESLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetAESdecryptedLength(::grpc::ServerContext* context, ::crypto::GetAESLengthRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::GetLengthResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_getEncryptedLen : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_getEncryptedLen() { + ::grpc::Service::MarkMethodAsync(13); + } + ~WithAsyncMethod_getEncryptedLen() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getEncryptedLen(::grpc::ServerContext* /*context*/, const ::crypto::GetWholeLength* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetEncryptedLen(::grpc::ServerContext* context, ::crypto::GetWholeLength* request, ::grpc::ServerAsyncResponseWriter< ::crypto::GetLengthResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_getDecryptedLen : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_getDecryptedLen() { + ::grpc::Service::MarkMethodAsync(14); + } + ~WithAsyncMethod_getDecryptedLen() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getDecryptedLen(::grpc::ServerContext* /*context*/, const ::crypto::GetWholeLength* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetDecryptedLen(::grpc::ServerContext* context, ::crypto::GetWholeLength* request, ::grpc::ServerAsyncResponseWriter< ::crypto::GetLengthResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(14, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_sign : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_sign() { + ::grpc::Service::MarkMethodAsync(15); + } + ~WithAsyncMethod_sign() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status sign(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void Requestsign(::grpc::ServerContext* context, ::crypto::SignRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::SignResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(15, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_verify : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_verify() { + ::grpc::Service::MarkMethodAsync(16); + } + ~WithAsyncMethod_verify() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verify(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void Requestverify(::grpc::ServerContext* context, ::crypto::VerifyRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::VerifyResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(16, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_getPublicECCKeyByUserId : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_getPublicECCKeyByUserId() { + ::grpc::Service::MarkMethodAsync(17); + } + ~WithAsyncMethod_getPublicECCKeyByUserId() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getPublicECCKeyByUserId(::grpc::ServerContext* /*context*/, const ::crypto::KeyRequest* /*request*/, ::crypto::KeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetPublicECCKeyByUserId(::grpc::ServerContext* context, ::crypto::KeyRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::KeyResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(17, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_getPublicRSAKeyByUserId : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_getPublicRSAKeyByUserId() { + ::grpc::Service::MarkMethodAsync(18); + } + ~WithAsyncMethod_getPublicRSAKeyByUserId() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getPublicRSAKeyByUserId(::grpc::ServerContext* /*context*/, const ::crypto::KeyRequest* /*request*/, ::crypto::KeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetPublicRSAKeyByUserId(::grpc::ServerContext* context, ::crypto::KeyRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::KeyResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(18, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_ECCencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_ECCencrypt() { + ::grpc::Service::MarkMethodAsync(19); + } + ~WithAsyncMethod_ECCencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ECCencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricEncryptRequest* /*request*/, ::crypto::AsymetricEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestECCencrypt(::grpc::ServerContext* context, ::crypto::AsymetricEncryptRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::AsymetricEncryptResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(19, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_ECCdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_ECCdecrypt() { + ::grpc::Service::MarkMethodAsync(20); + } + ~WithAsyncMethod_ECCdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ECCdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricDecryptRequest* /*request*/, ::crypto::AsymetricDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestECCdecrypt(::grpc::ServerContext* context, ::crypto::AsymetricDecryptRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::AsymetricDecryptResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(20, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_RSAencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_RSAencrypt() { + ::grpc::Service::MarkMethodAsync(21); + } + ~WithAsyncMethod_RSAencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RSAencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricEncryptRequest* /*request*/, ::crypto::AsymetricEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRSAencrypt(::grpc::ServerContext* context, ::crypto::AsymetricEncryptRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::AsymetricEncryptResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(21, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_RSAdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_RSAdecrypt() { + ::grpc::Service::MarkMethodAsync(22); + } + ~WithAsyncMethod_RSAdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RSAdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricDecryptRequest* /*request*/, ::crypto::AsymetricDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRSAdecrypt(::grpc::ServerContext* context, ::crypto::AsymetricDecryptRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::AsymetricDecryptResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(22, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_AESencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_AESencrypt() { + ::grpc::Service::MarkMethodAsync(23); + } + ~WithAsyncMethod_AESencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AESencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AESEncryptRequest* /*request*/, ::crypto::AESEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAESencrypt(::grpc::ServerContext* context, ::crypto::AESEncryptRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::AESEncryptResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(23, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_AESdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_AESdecrypt() { + ::grpc::Service::MarkMethodAsync(24); + } + ~WithAsyncMethod_AESdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AESdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AESDecryptRequest* /*request*/, ::crypto::AESDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAESdecrypt(::grpc::ServerContext* context, ::crypto::AESDecryptRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::AESDecryptResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(24, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_encrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_encrypt() { + ::grpc::Service::MarkMethodAsync(25); + } + ~WithAsyncMethod_encrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status encrypt(::grpc::ServerContext* /*context*/, const ::crypto::EncryptRequest* /*request*/, ::crypto::EncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void Requestencrypt(::grpc::ServerContext* context, ::crypto::EncryptRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::EncryptResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(25, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_decrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_decrypt() { + ::grpc::Service::MarkMethodAsync(26); + } + ~WithAsyncMethod_decrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status decrypt(::grpc::ServerContext* /*context*/, const ::crypto::DecryptRequest* /*request*/, ::crypto::DecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void Requestdecrypt(::grpc::ServerContext* context, ::crypto::DecryptRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::DecryptResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(26, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_signUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_signUpdate() { + ::grpc::Service::MarkMethodAsync(27); + } + ~WithAsyncMethod_signUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status signUpdate(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestsignUpdate(::grpc::ServerContext* context, ::crypto::SignRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::SignResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(27, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_signFinalize : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_signFinalize() { + ::grpc::Service::MarkMethodAsync(28); + } + ~WithAsyncMethod_signFinalize() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status signFinalize(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestsignFinalize(::grpc::ServerContext* context, ::crypto::SignRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::SignResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(28, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_verifyUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_verifyUpdate() { + ::grpc::Service::MarkMethodAsync(29); + } + ~WithAsyncMethod_verifyUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verifyUpdate(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestverifyUpdate(::grpc::ServerContext* context, ::crypto::VerifyRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::VerifyResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(29, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_verifyFinalize : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_verifyFinalize() { + ::grpc::Service::MarkMethodAsync(30); + } + ~WithAsyncMethod_verifyFinalize() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verifyFinalize(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestverifyFinalize(::grpc::ServerContext* context, ::crypto::VerifyRequest* request, ::grpc::ServerAsyncResponseWriter< ::crypto::VerifyResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(30, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_bootSystem > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService; + template + class WithCallbackMethod_bootSystem : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_bootSystem() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::BootSystemRequest, ::crypto::Empty>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::BootSystemRequest* request, ::crypto::Empty* response) { return this->bootSystem(context, request, response); }));} + void SetMessageAllocatorFor_bootSystem( + ::grpc::MessageAllocator< ::crypto::BootSystemRequest, ::crypto::Empty>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::BootSystemRequest, ::crypto::Empty>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_bootSystem() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status bootSystem(::grpc::ServerContext* /*context*/, const ::crypto::BootSystemRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* bootSystem( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::BootSystemRequest* /*request*/, ::crypto::Empty* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_addProccess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_addProccess() { + ::grpc::Service::MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::AddProcessRequest, ::crypto::Empty>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::AddProcessRequest* request, ::crypto::Empty* response) { return this->addProccess(context, request, response); }));} + void SetMessageAllocatorFor_addProccess( + ::grpc::MessageAllocator< ::crypto::AddProcessRequest, ::crypto::Empty>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::AddProcessRequest, ::crypto::Empty>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_addProccess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status addProccess(::grpc::ServerContext* /*context*/, const ::crypto::AddProcessRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* addProccess( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::AddProcessRequest* /*request*/, ::crypto::Empty* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_configure : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_configure() { + ::grpc::Service::MarkMethodCallback(2, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::ConfigureRequest, ::crypto::Empty>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::ConfigureRequest* request, ::crypto::Empty* response) { return this->configure(context, request, response); }));} + void SetMessageAllocatorFor_configure( + ::grpc::MessageAllocator< ::crypto::ConfigureRequest, ::crypto::Empty>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::ConfigureRequest, ::crypto::Empty>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_configure() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status configure(::grpc::ServerContext* /*context*/, const ::crypto::ConfigureRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* configure( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::ConfigureRequest* /*request*/, ::crypto::Empty* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_generateAESKey : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_generateAESKey() { + ::grpc::Service::MarkMethodCallback(3, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::GenerateAESKeyRequest, ::crypto::GenerateAESKeyResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::GenerateAESKeyRequest* request, ::crypto::GenerateAESKeyResponse* response) { return this->generateAESKey(context, request, response); }));} + void SetMessageAllocatorFor_generateAESKey( + ::grpc::MessageAllocator< ::crypto::GenerateAESKeyRequest, ::crypto::GenerateAESKeyResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(3); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::GenerateAESKeyRequest, ::crypto::GenerateAESKeyResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_generateAESKey() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateAESKey(::grpc::ServerContext* /*context*/, const ::crypto::GenerateAESKeyRequest* /*request*/, ::crypto::GenerateAESKeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* generateAESKey( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::GenerateAESKeyRequest* /*request*/, ::crypto::GenerateAESKeyResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_generateRSAKeyPair : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_generateRSAKeyPair() { + ::grpc::Service::MarkMethodCallback(4, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response) { return this->generateRSAKeyPair(context, request, response); }));} + void SetMessageAllocatorFor_generateRSAKeyPair( + ::grpc::MessageAllocator< ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(4); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_generateRSAKeyPair() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateRSAKeyPair(::grpc::ServerContext* /*context*/, const ::crypto::GenerateKeyPairRequest* /*request*/, ::crypto::GenerateKeyPairResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* generateRSAKeyPair( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::GenerateKeyPairRequest* /*request*/, ::crypto::GenerateKeyPairResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_generateECCKeyPair : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_generateECCKeyPair() { + ::grpc::Service::MarkMethodCallback(5, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::GenerateKeyPairRequest* request, ::crypto::GenerateKeyPairResponse* response) { return this->generateECCKeyPair(context, request, response); }));} + void SetMessageAllocatorFor_generateECCKeyPair( + ::grpc::MessageAllocator< ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(5); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_generateECCKeyPair() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateECCKeyPair(::grpc::ServerContext* /*context*/, const ::crypto::GenerateKeyPairRequest* /*request*/, ::crypto::GenerateKeyPairResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* generateECCKeyPair( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::GenerateKeyPairRequest* /*request*/, ::crypto::GenerateKeyPairResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_getSignedDataLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_getSignedDataLength() { + ::grpc::Service::MarkMethodCallback(6, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::GetHashLengthRequest, ::crypto::GetLengthResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::GetHashLengthRequest* request, ::crypto::GetLengthResponse* response) { return this->getSignedDataLength(context, request, response); }));} + void SetMessageAllocatorFor_getSignedDataLength( + ::grpc::MessageAllocator< ::crypto::GetHashLengthRequest, ::crypto::GetLengthResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(6); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::GetHashLengthRequest, ::crypto::GetLengthResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_getSignedDataLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getSignedDataLength(::grpc::ServerContext* /*context*/, const ::crypto::GetHashLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getSignedDataLength( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::GetHashLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_getECCencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_getECCencryptedLength() { + ::grpc::Service::MarkMethodCallback(7, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response) { return this->getECCencryptedLength(context, request, response); }));} + void SetMessageAllocatorFor_getECCencryptedLength( + ::grpc::MessageAllocator< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(7); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_getECCencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getECCencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getECCencryptedLength( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_getECCDecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_getECCDecryptedLength() { + ::grpc::Service::MarkMethodCallback(8, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response) { return this->getECCDecryptedLength(context, request, response); }));} + void SetMessageAllocatorFor_getECCDecryptedLength( + ::grpc::MessageAllocator< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(8); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_getECCDecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getECCDecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getECCDecryptedLength( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_getRSAencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_getRSAencryptedLength() { + ::grpc::Service::MarkMethodCallback(9, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response) { return this->getRSAencryptedLength(context, request, response); }));} + void SetMessageAllocatorFor_getRSAencryptedLength( + ::grpc::MessageAllocator< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(9); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_getRSAencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getRSAencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getRSAencryptedLength( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_getRSAdecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_getRSAdecryptedLength() { + ::grpc::Service::MarkMethodCallback(10, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::GetLengthRequest* request, ::crypto::GetLengthResponse* response) { return this->getRSAdecryptedLength(context, request, response); }));} + void SetMessageAllocatorFor_getRSAdecryptedLength( + ::grpc::MessageAllocator< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(10); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_getRSAdecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getRSAdecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getRSAdecryptedLength( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_getAESencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_getAESencryptedLength() { + ::grpc::Service::MarkMethodCallback(11, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response) { return this->getAESencryptedLength(context, request, response); }));} + void SetMessageAllocatorFor_getAESencryptedLength( + ::grpc::MessageAllocator< ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(11); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_getAESencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getAESencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetAESLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getAESencryptedLength( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::GetAESLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_getAESdecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_getAESdecryptedLength() { + ::grpc::Service::MarkMethodCallback(12, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::GetAESLengthRequest* request, ::crypto::GetLengthResponse* response) { return this->getAESdecryptedLength(context, request, response); }));} + void SetMessageAllocatorFor_getAESdecryptedLength( + ::grpc::MessageAllocator< ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(12); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_getAESdecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getAESdecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetAESLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getAESdecryptedLength( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::GetAESLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_getEncryptedLen : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_getEncryptedLen() { + ::grpc::Service::MarkMethodCallback(13, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::GetWholeLength, ::crypto::GetLengthResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response) { return this->getEncryptedLen(context, request, response); }));} + void SetMessageAllocatorFor_getEncryptedLen( + ::grpc::MessageAllocator< ::crypto::GetWholeLength, ::crypto::GetLengthResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(13); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::GetWholeLength, ::crypto::GetLengthResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_getEncryptedLen() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getEncryptedLen(::grpc::ServerContext* /*context*/, const ::crypto::GetWholeLength* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getEncryptedLen( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::GetWholeLength* /*request*/, ::crypto::GetLengthResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_getDecryptedLen : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_getDecryptedLen() { + ::grpc::Service::MarkMethodCallback(14, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::GetWholeLength, ::crypto::GetLengthResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::GetWholeLength* request, ::crypto::GetLengthResponse* response) { return this->getDecryptedLen(context, request, response); }));} + void SetMessageAllocatorFor_getDecryptedLen( + ::grpc::MessageAllocator< ::crypto::GetWholeLength, ::crypto::GetLengthResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(14); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::GetWholeLength, ::crypto::GetLengthResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_getDecryptedLen() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getDecryptedLen(::grpc::ServerContext* /*context*/, const ::crypto::GetWholeLength* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getDecryptedLen( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::GetWholeLength* /*request*/, ::crypto::GetLengthResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_sign : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_sign() { + ::grpc::Service::MarkMethodCallback(15, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::SignRequest, ::crypto::SignResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response) { return this->sign(context, request, response); }));} + void SetMessageAllocatorFor_sign( + ::grpc::MessageAllocator< ::crypto::SignRequest, ::crypto::SignResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(15); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::SignRequest, ::crypto::SignResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_sign() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status sign(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* sign( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_verify : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_verify() { + ::grpc::Service::MarkMethodCallback(16, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::VerifyRequest, ::crypto::VerifyResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response) { return this->verify(context, request, response); }));} + void SetMessageAllocatorFor_verify( + ::grpc::MessageAllocator< ::crypto::VerifyRequest, ::crypto::VerifyResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(16); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::VerifyRequest, ::crypto::VerifyResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_verify() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verify(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* verify( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_getPublicECCKeyByUserId : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_getPublicECCKeyByUserId() { + ::grpc::Service::MarkMethodCallback(17, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::KeyRequest, ::crypto::KeyResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response) { return this->getPublicECCKeyByUserId(context, request, response); }));} + void SetMessageAllocatorFor_getPublicECCKeyByUserId( + ::grpc::MessageAllocator< ::crypto::KeyRequest, ::crypto::KeyResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(17); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::KeyRequest, ::crypto::KeyResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_getPublicECCKeyByUserId() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getPublicECCKeyByUserId(::grpc::ServerContext* /*context*/, const ::crypto::KeyRequest* /*request*/, ::crypto::KeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getPublicECCKeyByUserId( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::KeyRequest* /*request*/, ::crypto::KeyResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_getPublicRSAKeyByUserId : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_getPublicRSAKeyByUserId() { + ::grpc::Service::MarkMethodCallback(18, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::KeyRequest, ::crypto::KeyResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::KeyRequest* request, ::crypto::KeyResponse* response) { return this->getPublicRSAKeyByUserId(context, request, response); }));} + void SetMessageAllocatorFor_getPublicRSAKeyByUserId( + ::grpc::MessageAllocator< ::crypto::KeyRequest, ::crypto::KeyResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(18); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::KeyRequest, ::crypto::KeyResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_getPublicRSAKeyByUserId() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getPublicRSAKeyByUserId(::grpc::ServerContext* /*context*/, const ::crypto::KeyRequest* /*request*/, ::crypto::KeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getPublicRSAKeyByUserId( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::KeyRequest* /*request*/, ::crypto::KeyResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_ECCencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_ECCencrypt() { + ::grpc::Service::MarkMethodCallback(19, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response) { return this->ECCencrypt(context, request, response); }));} + void SetMessageAllocatorFor_ECCencrypt( + ::grpc::MessageAllocator< ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(19); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_ECCencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ECCencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricEncryptRequest* /*request*/, ::crypto::AsymetricEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* ECCencrypt( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::AsymetricEncryptRequest* /*request*/, ::crypto::AsymetricEncryptResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_ECCdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_ECCdecrypt() { + ::grpc::Service::MarkMethodCallback(20, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response) { return this->ECCdecrypt(context, request, response); }));} + void SetMessageAllocatorFor_ECCdecrypt( + ::grpc::MessageAllocator< ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(20); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_ECCdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ECCdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricDecryptRequest* /*request*/, ::crypto::AsymetricDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* ECCdecrypt( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::AsymetricDecryptRequest* /*request*/, ::crypto::AsymetricDecryptResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_RSAencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_RSAencrypt() { + ::grpc::Service::MarkMethodCallback(21, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::AsymetricEncryptRequest* request, ::crypto::AsymetricEncryptResponse* response) { return this->RSAencrypt(context, request, response); }));} + void SetMessageAllocatorFor_RSAencrypt( + ::grpc::MessageAllocator< ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(21); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_RSAencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RSAencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricEncryptRequest* /*request*/, ::crypto::AsymetricEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RSAencrypt( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::AsymetricEncryptRequest* /*request*/, ::crypto::AsymetricEncryptResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_RSAdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_RSAdecrypt() { + ::grpc::Service::MarkMethodCallback(22, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::AsymetricDecryptRequest* request, ::crypto::AsymetricDecryptResponse* response) { return this->RSAdecrypt(context, request, response); }));} + void SetMessageAllocatorFor_RSAdecrypt( + ::grpc::MessageAllocator< ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(22); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_RSAdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RSAdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricDecryptRequest* /*request*/, ::crypto::AsymetricDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RSAdecrypt( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::AsymetricDecryptRequest* /*request*/, ::crypto::AsymetricDecryptResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_AESencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_AESencrypt() { + ::grpc::Service::MarkMethodCallback(23, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::AESEncryptRequest, ::crypto::AESEncryptResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::AESEncryptRequest* request, ::crypto::AESEncryptResponse* response) { return this->AESencrypt(context, request, response); }));} + void SetMessageAllocatorFor_AESencrypt( + ::grpc::MessageAllocator< ::crypto::AESEncryptRequest, ::crypto::AESEncryptResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(23); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::AESEncryptRequest, ::crypto::AESEncryptResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_AESencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AESencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AESEncryptRequest* /*request*/, ::crypto::AESEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* AESencrypt( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::AESEncryptRequest* /*request*/, ::crypto::AESEncryptResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_AESdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_AESdecrypt() { + ::grpc::Service::MarkMethodCallback(24, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::AESDecryptRequest, ::crypto::AESDecryptResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::AESDecryptRequest* request, ::crypto::AESDecryptResponse* response) { return this->AESdecrypt(context, request, response); }));} + void SetMessageAllocatorFor_AESdecrypt( + ::grpc::MessageAllocator< ::crypto::AESDecryptRequest, ::crypto::AESDecryptResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(24); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::AESDecryptRequest, ::crypto::AESDecryptResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_AESdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AESdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AESDecryptRequest* /*request*/, ::crypto::AESDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* AESdecrypt( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::AESDecryptRequest* /*request*/, ::crypto::AESDecryptResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_encrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_encrypt() { + ::grpc::Service::MarkMethodCallback(25, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::EncryptRequest, ::crypto::EncryptResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::EncryptRequest* request, ::crypto::EncryptResponse* response) { return this->encrypt(context, request, response); }));} + void SetMessageAllocatorFor_encrypt( + ::grpc::MessageAllocator< ::crypto::EncryptRequest, ::crypto::EncryptResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(25); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::EncryptRequest, ::crypto::EncryptResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_encrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status encrypt(::grpc::ServerContext* /*context*/, const ::crypto::EncryptRequest* /*request*/, ::crypto::EncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* encrypt( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::EncryptRequest* /*request*/, ::crypto::EncryptResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_decrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_decrypt() { + ::grpc::Service::MarkMethodCallback(26, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::DecryptRequest, ::crypto::DecryptResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::DecryptRequest* request, ::crypto::DecryptResponse* response) { return this->decrypt(context, request, response); }));} + void SetMessageAllocatorFor_decrypt( + ::grpc::MessageAllocator< ::crypto::DecryptRequest, ::crypto::DecryptResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(26); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::DecryptRequest, ::crypto::DecryptResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_decrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status decrypt(::grpc::ServerContext* /*context*/, const ::crypto::DecryptRequest* /*request*/, ::crypto::DecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* decrypt( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::DecryptRequest* /*request*/, ::crypto::DecryptResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_signUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_signUpdate() { + ::grpc::Service::MarkMethodCallback(27, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::SignRequest, ::crypto::SignResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response) { return this->signUpdate(context, request, response); }));} + void SetMessageAllocatorFor_signUpdate( + ::grpc::MessageAllocator< ::crypto::SignRequest, ::crypto::SignResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(27); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::SignRequest, ::crypto::SignResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_signUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status signUpdate(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* signUpdate( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_signFinalize : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_signFinalize() { + ::grpc::Service::MarkMethodCallback(28, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::SignRequest, ::crypto::SignResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::SignRequest* request, ::crypto::SignResponse* response) { return this->signFinalize(context, request, response); }));} + void SetMessageAllocatorFor_signFinalize( + ::grpc::MessageAllocator< ::crypto::SignRequest, ::crypto::SignResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(28); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::SignRequest, ::crypto::SignResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_signFinalize() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status signFinalize(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* signFinalize( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_verifyUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_verifyUpdate() { + ::grpc::Service::MarkMethodCallback(29, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::VerifyRequest, ::crypto::VerifyResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response) { return this->verifyUpdate(context, request, response); }));} + void SetMessageAllocatorFor_verifyUpdate( + ::grpc::MessageAllocator< ::crypto::VerifyRequest, ::crypto::VerifyResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(29); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::VerifyRequest, ::crypto::VerifyResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_verifyUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verifyUpdate(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* verifyUpdate( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_verifyFinalize : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_verifyFinalize() { + ::grpc::Service::MarkMethodCallback(30, + new ::grpc::internal::CallbackUnaryHandler< ::crypto::VerifyRequest, ::crypto::VerifyResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::crypto::VerifyRequest* request, ::crypto::VerifyResponse* response) { return this->verifyFinalize(context, request, response); }));} + void SetMessageAllocatorFor_verifyFinalize( + ::grpc::MessageAllocator< ::crypto::VerifyRequest, ::crypto::VerifyResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(30); + static_cast<::grpc::internal::CallbackUnaryHandler< ::crypto::VerifyRequest, ::crypto::VerifyResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_verifyFinalize() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verifyFinalize(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* verifyFinalize( + ::grpc::CallbackServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_bootSystem > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_bootSystem : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_bootSystem() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_bootSystem() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status bootSystem(::grpc::ServerContext* /*context*/, const ::crypto::BootSystemRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_addProccess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_addProccess() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_addProccess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status addProccess(::grpc::ServerContext* /*context*/, const ::crypto::AddProcessRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_configure : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_configure() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_configure() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status configure(::grpc::ServerContext* /*context*/, const ::crypto::ConfigureRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_generateAESKey : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_generateAESKey() { + ::grpc::Service::MarkMethodGeneric(3); + } + ~WithGenericMethod_generateAESKey() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateAESKey(::grpc::ServerContext* /*context*/, const ::crypto::GenerateAESKeyRequest* /*request*/, ::crypto::GenerateAESKeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_generateRSAKeyPair : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_generateRSAKeyPair() { + ::grpc::Service::MarkMethodGeneric(4); + } + ~WithGenericMethod_generateRSAKeyPair() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateRSAKeyPair(::grpc::ServerContext* /*context*/, const ::crypto::GenerateKeyPairRequest* /*request*/, ::crypto::GenerateKeyPairResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_generateECCKeyPair : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_generateECCKeyPair() { + ::grpc::Service::MarkMethodGeneric(5); + } + ~WithGenericMethod_generateECCKeyPair() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateECCKeyPair(::grpc::ServerContext* /*context*/, const ::crypto::GenerateKeyPairRequest* /*request*/, ::crypto::GenerateKeyPairResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_getSignedDataLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_getSignedDataLength() { + ::grpc::Service::MarkMethodGeneric(6); + } + ~WithGenericMethod_getSignedDataLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getSignedDataLength(::grpc::ServerContext* /*context*/, const ::crypto::GetHashLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_getECCencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_getECCencryptedLength() { + ::grpc::Service::MarkMethodGeneric(7); + } + ~WithGenericMethod_getECCencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getECCencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_getECCDecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_getECCDecryptedLength() { + ::grpc::Service::MarkMethodGeneric(8); + } + ~WithGenericMethod_getECCDecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getECCDecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_getRSAencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_getRSAencryptedLength() { + ::grpc::Service::MarkMethodGeneric(9); + } + ~WithGenericMethod_getRSAencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getRSAencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_getRSAdecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_getRSAdecryptedLength() { + ::grpc::Service::MarkMethodGeneric(10); + } + ~WithGenericMethod_getRSAdecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getRSAdecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_getAESencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_getAESencryptedLength() { + ::grpc::Service::MarkMethodGeneric(11); + } + ~WithGenericMethod_getAESencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getAESencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetAESLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_getAESdecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_getAESdecryptedLength() { + ::grpc::Service::MarkMethodGeneric(12); + } + ~WithGenericMethod_getAESdecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getAESdecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetAESLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_getEncryptedLen : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_getEncryptedLen() { + ::grpc::Service::MarkMethodGeneric(13); + } + ~WithGenericMethod_getEncryptedLen() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getEncryptedLen(::grpc::ServerContext* /*context*/, const ::crypto::GetWholeLength* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_getDecryptedLen : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_getDecryptedLen() { + ::grpc::Service::MarkMethodGeneric(14); + } + ~WithGenericMethod_getDecryptedLen() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getDecryptedLen(::grpc::ServerContext* /*context*/, const ::crypto::GetWholeLength* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_sign : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_sign() { + ::grpc::Service::MarkMethodGeneric(15); + } + ~WithGenericMethod_sign() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status sign(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_verify : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_verify() { + ::grpc::Service::MarkMethodGeneric(16); + } + ~WithGenericMethod_verify() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verify(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_getPublicECCKeyByUserId : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_getPublicECCKeyByUserId() { + ::grpc::Service::MarkMethodGeneric(17); + } + ~WithGenericMethod_getPublicECCKeyByUserId() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getPublicECCKeyByUserId(::grpc::ServerContext* /*context*/, const ::crypto::KeyRequest* /*request*/, ::crypto::KeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_getPublicRSAKeyByUserId : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_getPublicRSAKeyByUserId() { + ::grpc::Service::MarkMethodGeneric(18); + } + ~WithGenericMethod_getPublicRSAKeyByUserId() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getPublicRSAKeyByUserId(::grpc::ServerContext* /*context*/, const ::crypto::KeyRequest* /*request*/, ::crypto::KeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_ECCencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_ECCencrypt() { + ::grpc::Service::MarkMethodGeneric(19); + } + ~WithGenericMethod_ECCencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ECCencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricEncryptRequest* /*request*/, ::crypto::AsymetricEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_ECCdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_ECCdecrypt() { + ::grpc::Service::MarkMethodGeneric(20); + } + ~WithGenericMethod_ECCdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ECCdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricDecryptRequest* /*request*/, ::crypto::AsymetricDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_RSAencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_RSAencrypt() { + ::grpc::Service::MarkMethodGeneric(21); + } + ~WithGenericMethod_RSAencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RSAencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricEncryptRequest* /*request*/, ::crypto::AsymetricEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_RSAdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_RSAdecrypt() { + ::grpc::Service::MarkMethodGeneric(22); + } + ~WithGenericMethod_RSAdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RSAdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricDecryptRequest* /*request*/, ::crypto::AsymetricDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_AESencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_AESencrypt() { + ::grpc::Service::MarkMethodGeneric(23); + } + ~WithGenericMethod_AESencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AESencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AESEncryptRequest* /*request*/, ::crypto::AESEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_AESdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_AESdecrypt() { + ::grpc::Service::MarkMethodGeneric(24); + } + ~WithGenericMethod_AESdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AESdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AESDecryptRequest* /*request*/, ::crypto::AESDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_encrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_encrypt() { + ::grpc::Service::MarkMethodGeneric(25); + } + ~WithGenericMethod_encrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status encrypt(::grpc::ServerContext* /*context*/, const ::crypto::EncryptRequest* /*request*/, ::crypto::EncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_decrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_decrypt() { + ::grpc::Service::MarkMethodGeneric(26); + } + ~WithGenericMethod_decrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status decrypt(::grpc::ServerContext* /*context*/, const ::crypto::DecryptRequest* /*request*/, ::crypto::DecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_signUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_signUpdate() { + ::grpc::Service::MarkMethodGeneric(27); + } + ~WithGenericMethod_signUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status signUpdate(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_signFinalize : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_signFinalize() { + ::grpc::Service::MarkMethodGeneric(28); + } + ~WithGenericMethod_signFinalize() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status signFinalize(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_verifyUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_verifyUpdate() { + ::grpc::Service::MarkMethodGeneric(29); + } + ~WithGenericMethod_verifyUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verifyUpdate(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_verifyFinalize : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_verifyFinalize() { + ::grpc::Service::MarkMethodGeneric(30); + } + ~WithGenericMethod_verifyFinalize() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verifyFinalize(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_bootSystem : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_bootSystem() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_bootSystem() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status bootSystem(::grpc::ServerContext* /*context*/, const ::crypto::BootSystemRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestbootSystem(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_addProccess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_addProccess() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_addProccess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status addProccess(::grpc::ServerContext* /*context*/, const ::crypto::AddProcessRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestaddProccess(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_configure : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_configure() { + ::grpc::Service::MarkMethodRaw(2); + } + ~WithRawMethod_configure() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status configure(::grpc::ServerContext* /*context*/, const ::crypto::ConfigureRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void Requestconfigure(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_generateAESKey : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_generateAESKey() { + ::grpc::Service::MarkMethodRaw(3); + } + ~WithRawMethod_generateAESKey() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateAESKey(::grpc::ServerContext* /*context*/, const ::crypto::GenerateAESKeyRequest* /*request*/, ::crypto::GenerateAESKeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgenerateAESKey(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_generateRSAKeyPair : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_generateRSAKeyPair() { + ::grpc::Service::MarkMethodRaw(4); + } + ~WithRawMethod_generateRSAKeyPair() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateRSAKeyPair(::grpc::ServerContext* /*context*/, const ::crypto::GenerateKeyPairRequest* /*request*/, ::crypto::GenerateKeyPairResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgenerateRSAKeyPair(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_generateECCKeyPair : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_generateECCKeyPair() { + ::grpc::Service::MarkMethodRaw(5); + } + ~WithRawMethod_generateECCKeyPair() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateECCKeyPair(::grpc::ServerContext* /*context*/, const ::crypto::GenerateKeyPairRequest* /*request*/, ::crypto::GenerateKeyPairResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgenerateECCKeyPair(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_getSignedDataLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_getSignedDataLength() { + ::grpc::Service::MarkMethodRaw(6); + } + ~WithRawMethod_getSignedDataLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getSignedDataLength(::grpc::ServerContext* /*context*/, const ::crypto::GetHashLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetSignedDataLength(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(6, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_getECCencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_getECCencryptedLength() { + ::grpc::Service::MarkMethodRaw(7); + } + ~WithRawMethod_getECCencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getECCencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetECCencryptedLength(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(7, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_getECCDecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_getECCDecryptedLength() { + ::grpc::Service::MarkMethodRaw(8); + } + ~WithRawMethod_getECCDecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getECCDecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetECCDecryptedLength(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(8, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_getRSAencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_getRSAencryptedLength() { + ::grpc::Service::MarkMethodRaw(9); + } + ~WithRawMethod_getRSAencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getRSAencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetRSAencryptedLength(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_getRSAdecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_getRSAdecryptedLength() { + ::grpc::Service::MarkMethodRaw(10); + } + ~WithRawMethod_getRSAdecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getRSAdecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetRSAdecryptedLength(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_getAESencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_getAESencryptedLength() { + ::grpc::Service::MarkMethodRaw(11); + } + ~WithRawMethod_getAESencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getAESencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetAESLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetAESencryptedLength(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_getAESdecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_getAESdecryptedLength() { + ::grpc::Service::MarkMethodRaw(12); + } + ~WithRawMethod_getAESdecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getAESdecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetAESLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetAESdecryptedLength(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_getEncryptedLen : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_getEncryptedLen() { + ::grpc::Service::MarkMethodRaw(13); + } + ~WithRawMethod_getEncryptedLen() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getEncryptedLen(::grpc::ServerContext* /*context*/, const ::crypto::GetWholeLength* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetEncryptedLen(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_getDecryptedLen : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_getDecryptedLen() { + ::grpc::Service::MarkMethodRaw(14); + } + ~WithRawMethod_getDecryptedLen() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getDecryptedLen(::grpc::ServerContext* /*context*/, const ::crypto::GetWholeLength* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetDecryptedLen(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(14, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_sign : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_sign() { + ::grpc::Service::MarkMethodRaw(15); + } + ~WithRawMethod_sign() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status sign(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void Requestsign(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(15, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_verify : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_verify() { + ::grpc::Service::MarkMethodRaw(16); + } + ~WithRawMethod_verify() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verify(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void Requestverify(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(16, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_getPublicECCKeyByUserId : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_getPublicECCKeyByUserId() { + ::grpc::Service::MarkMethodRaw(17); + } + ~WithRawMethod_getPublicECCKeyByUserId() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getPublicECCKeyByUserId(::grpc::ServerContext* /*context*/, const ::crypto::KeyRequest* /*request*/, ::crypto::KeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetPublicECCKeyByUserId(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(17, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_getPublicRSAKeyByUserId : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_getPublicRSAKeyByUserId() { + ::grpc::Service::MarkMethodRaw(18); + } + ~WithRawMethod_getPublicRSAKeyByUserId() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getPublicRSAKeyByUserId(::grpc::ServerContext* /*context*/, const ::crypto::KeyRequest* /*request*/, ::crypto::KeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestgetPublicRSAKeyByUserId(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(18, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_ECCencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_ECCencrypt() { + ::grpc::Service::MarkMethodRaw(19); + } + ~WithRawMethod_ECCencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ECCencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricEncryptRequest* /*request*/, ::crypto::AsymetricEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestECCencrypt(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(19, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_ECCdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_ECCdecrypt() { + ::grpc::Service::MarkMethodRaw(20); + } + ~WithRawMethod_ECCdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ECCdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricDecryptRequest* /*request*/, ::crypto::AsymetricDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestECCdecrypt(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(20, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_RSAencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_RSAencrypt() { + ::grpc::Service::MarkMethodRaw(21); + } + ~WithRawMethod_RSAencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RSAencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricEncryptRequest* /*request*/, ::crypto::AsymetricEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRSAencrypt(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(21, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_RSAdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_RSAdecrypt() { + ::grpc::Service::MarkMethodRaw(22); + } + ~WithRawMethod_RSAdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RSAdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricDecryptRequest* /*request*/, ::crypto::AsymetricDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRSAdecrypt(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(22, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_AESencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_AESencrypt() { + ::grpc::Service::MarkMethodRaw(23); + } + ~WithRawMethod_AESencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AESencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AESEncryptRequest* /*request*/, ::crypto::AESEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAESencrypt(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(23, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_AESdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_AESdecrypt() { + ::grpc::Service::MarkMethodRaw(24); + } + ~WithRawMethod_AESdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AESdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AESDecryptRequest* /*request*/, ::crypto::AESDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAESdecrypt(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(24, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_encrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_encrypt() { + ::grpc::Service::MarkMethodRaw(25); + } + ~WithRawMethod_encrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status encrypt(::grpc::ServerContext* /*context*/, const ::crypto::EncryptRequest* /*request*/, ::crypto::EncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void Requestencrypt(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(25, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_decrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_decrypt() { + ::grpc::Service::MarkMethodRaw(26); + } + ~WithRawMethod_decrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status decrypt(::grpc::ServerContext* /*context*/, const ::crypto::DecryptRequest* /*request*/, ::crypto::DecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void Requestdecrypt(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(26, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_signUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_signUpdate() { + ::grpc::Service::MarkMethodRaw(27); + } + ~WithRawMethod_signUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status signUpdate(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestsignUpdate(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(27, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_signFinalize : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_signFinalize() { + ::grpc::Service::MarkMethodRaw(28); + } + ~WithRawMethod_signFinalize() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status signFinalize(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestsignFinalize(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(28, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_verifyUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_verifyUpdate() { + ::grpc::Service::MarkMethodRaw(29); + } + ~WithRawMethod_verifyUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verifyUpdate(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestverifyUpdate(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(29, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_verifyFinalize : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_verifyFinalize() { + ::grpc::Service::MarkMethodRaw(30); + } + ~WithRawMethod_verifyFinalize() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verifyFinalize(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestverifyFinalize(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(30, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawCallbackMethod_bootSystem : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_bootSystem() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->bootSystem(context, request, response); })); + } + ~WithRawCallbackMethod_bootSystem() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status bootSystem(::grpc::ServerContext* /*context*/, const ::crypto::BootSystemRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* bootSystem( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_addProccess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_addProccess() { + ::grpc::Service::MarkMethodRawCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->addProccess(context, request, response); })); + } + ~WithRawCallbackMethod_addProccess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status addProccess(::grpc::ServerContext* /*context*/, const ::crypto::AddProcessRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* addProccess( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_configure : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_configure() { + ::grpc::Service::MarkMethodRawCallback(2, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->configure(context, request, response); })); + } + ~WithRawCallbackMethod_configure() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status configure(::grpc::ServerContext* /*context*/, const ::crypto::ConfigureRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* configure( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_generateAESKey : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_generateAESKey() { + ::grpc::Service::MarkMethodRawCallback(3, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->generateAESKey(context, request, response); })); + } + ~WithRawCallbackMethod_generateAESKey() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateAESKey(::grpc::ServerContext* /*context*/, const ::crypto::GenerateAESKeyRequest* /*request*/, ::crypto::GenerateAESKeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* generateAESKey( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_generateRSAKeyPair : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_generateRSAKeyPair() { + ::grpc::Service::MarkMethodRawCallback(4, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->generateRSAKeyPair(context, request, response); })); + } + ~WithRawCallbackMethod_generateRSAKeyPair() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateRSAKeyPair(::grpc::ServerContext* /*context*/, const ::crypto::GenerateKeyPairRequest* /*request*/, ::crypto::GenerateKeyPairResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* generateRSAKeyPair( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_generateECCKeyPair : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_generateECCKeyPair() { + ::grpc::Service::MarkMethodRawCallback(5, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->generateECCKeyPair(context, request, response); })); + } + ~WithRawCallbackMethod_generateECCKeyPair() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status generateECCKeyPair(::grpc::ServerContext* /*context*/, const ::crypto::GenerateKeyPairRequest* /*request*/, ::crypto::GenerateKeyPairResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* generateECCKeyPair( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_getSignedDataLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_getSignedDataLength() { + ::grpc::Service::MarkMethodRawCallback(6, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->getSignedDataLength(context, request, response); })); + } + ~WithRawCallbackMethod_getSignedDataLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getSignedDataLength(::grpc::ServerContext* /*context*/, const ::crypto::GetHashLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getSignedDataLength( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_getECCencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_getECCencryptedLength() { + ::grpc::Service::MarkMethodRawCallback(7, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->getECCencryptedLength(context, request, response); })); + } + ~WithRawCallbackMethod_getECCencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getECCencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getECCencryptedLength( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_getECCDecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_getECCDecryptedLength() { + ::grpc::Service::MarkMethodRawCallback(8, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->getECCDecryptedLength(context, request, response); })); + } + ~WithRawCallbackMethod_getECCDecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getECCDecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getECCDecryptedLength( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_getRSAencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_getRSAencryptedLength() { + ::grpc::Service::MarkMethodRawCallback(9, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->getRSAencryptedLength(context, request, response); })); + } + ~WithRawCallbackMethod_getRSAencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getRSAencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getRSAencryptedLength( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_getRSAdecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_getRSAdecryptedLength() { + ::grpc::Service::MarkMethodRawCallback(10, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->getRSAdecryptedLength(context, request, response); })); + } + ~WithRawCallbackMethod_getRSAdecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getRSAdecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getRSAdecryptedLength( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_getAESencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_getAESencryptedLength() { + ::grpc::Service::MarkMethodRawCallback(11, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->getAESencryptedLength(context, request, response); })); + } + ~WithRawCallbackMethod_getAESencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getAESencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetAESLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getAESencryptedLength( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_getAESdecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_getAESdecryptedLength() { + ::grpc::Service::MarkMethodRawCallback(12, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->getAESdecryptedLength(context, request, response); })); + } + ~WithRawCallbackMethod_getAESdecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getAESdecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetAESLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getAESdecryptedLength( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_getEncryptedLen : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_getEncryptedLen() { + ::grpc::Service::MarkMethodRawCallback(13, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->getEncryptedLen(context, request, response); })); + } + ~WithRawCallbackMethod_getEncryptedLen() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getEncryptedLen(::grpc::ServerContext* /*context*/, const ::crypto::GetWholeLength* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getEncryptedLen( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_getDecryptedLen : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_getDecryptedLen() { + ::grpc::Service::MarkMethodRawCallback(14, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->getDecryptedLen(context, request, response); })); + } + ~WithRawCallbackMethod_getDecryptedLen() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getDecryptedLen(::grpc::ServerContext* /*context*/, const ::crypto::GetWholeLength* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getDecryptedLen( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_sign : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_sign() { + ::grpc::Service::MarkMethodRawCallback(15, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->sign(context, request, response); })); + } + ~WithRawCallbackMethod_sign() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status sign(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* sign( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_verify : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_verify() { + ::grpc::Service::MarkMethodRawCallback(16, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->verify(context, request, response); })); + } + ~WithRawCallbackMethod_verify() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verify(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* verify( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_getPublicECCKeyByUserId : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_getPublicECCKeyByUserId() { + ::grpc::Service::MarkMethodRawCallback(17, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->getPublicECCKeyByUserId(context, request, response); })); + } + ~WithRawCallbackMethod_getPublicECCKeyByUserId() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getPublicECCKeyByUserId(::grpc::ServerContext* /*context*/, const ::crypto::KeyRequest* /*request*/, ::crypto::KeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getPublicECCKeyByUserId( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_getPublicRSAKeyByUserId : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_getPublicRSAKeyByUserId() { + ::grpc::Service::MarkMethodRawCallback(18, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->getPublicRSAKeyByUserId(context, request, response); })); + } + ~WithRawCallbackMethod_getPublicRSAKeyByUserId() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status getPublicRSAKeyByUserId(::grpc::ServerContext* /*context*/, const ::crypto::KeyRequest* /*request*/, ::crypto::KeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* getPublicRSAKeyByUserId( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_ECCencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_ECCencrypt() { + ::grpc::Service::MarkMethodRawCallback(19, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->ECCencrypt(context, request, response); })); + } + ~WithRawCallbackMethod_ECCencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ECCencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricEncryptRequest* /*request*/, ::crypto::AsymetricEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* ECCencrypt( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_ECCdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_ECCdecrypt() { + ::grpc::Service::MarkMethodRawCallback(20, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->ECCdecrypt(context, request, response); })); + } + ~WithRawCallbackMethod_ECCdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ECCdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricDecryptRequest* /*request*/, ::crypto::AsymetricDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* ECCdecrypt( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_RSAencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_RSAencrypt() { + ::grpc::Service::MarkMethodRawCallback(21, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->RSAencrypt(context, request, response); })); + } + ~WithRawCallbackMethod_RSAencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RSAencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricEncryptRequest* /*request*/, ::crypto::AsymetricEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RSAencrypt( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_RSAdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_RSAdecrypt() { + ::grpc::Service::MarkMethodRawCallback(22, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->RSAdecrypt(context, request, response); })); + } + ~WithRawCallbackMethod_RSAdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RSAdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricDecryptRequest* /*request*/, ::crypto::AsymetricDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RSAdecrypt( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_AESencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_AESencrypt() { + ::grpc::Service::MarkMethodRawCallback(23, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->AESencrypt(context, request, response); })); + } + ~WithRawCallbackMethod_AESencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AESencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AESEncryptRequest* /*request*/, ::crypto::AESEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* AESencrypt( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_AESdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_AESdecrypt() { + ::grpc::Service::MarkMethodRawCallback(24, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->AESdecrypt(context, request, response); })); + } + ~WithRawCallbackMethod_AESdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AESdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AESDecryptRequest* /*request*/, ::crypto::AESDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* AESdecrypt( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_encrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_encrypt() { + ::grpc::Service::MarkMethodRawCallback(25, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->encrypt(context, request, response); })); + } + ~WithRawCallbackMethod_encrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status encrypt(::grpc::ServerContext* /*context*/, const ::crypto::EncryptRequest* /*request*/, ::crypto::EncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* encrypt( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_decrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_decrypt() { + ::grpc::Service::MarkMethodRawCallback(26, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->decrypt(context, request, response); })); + } + ~WithRawCallbackMethod_decrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status decrypt(::grpc::ServerContext* /*context*/, const ::crypto::DecryptRequest* /*request*/, ::crypto::DecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* decrypt( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_signUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_signUpdate() { + ::grpc::Service::MarkMethodRawCallback(27, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->signUpdate(context, request, response); })); + } + ~WithRawCallbackMethod_signUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status signUpdate(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* signUpdate( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_signFinalize : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_signFinalize() { + ::grpc::Service::MarkMethodRawCallback(28, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->signFinalize(context, request, response); })); + } + ~WithRawCallbackMethod_signFinalize() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status signFinalize(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* signFinalize( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_verifyUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_verifyUpdate() { + ::grpc::Service::MarkMethodRawCallback(29, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->verifyUpdate(context, request, response); })); + } + ~WithRawCallbackMethod_verifyUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verifyUpdate(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* verifyUpdate( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_verifyFinalize : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_verifyFinalize() { + ::grpc::Service::MarkMethodRawCallback(30, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->verifyFinalize(context, request, response); })); + } + ~WithRawCallbackMethod_verifyFinalize() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status verifyFinalize(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* verifyFinalize( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_bootSystem : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_bootSystem() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::BootSystemRequest, ::crypto::Empty>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::BootSystemRequest, ::crypto::Empty>* streamer) { + return this->StreamedbootSystem(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_bootSystem() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status bootSystem(::grpc::ServerContext* /*context*/, const ::crypto::BootSystemRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedbootSystem(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::BootSystemRequest,::crypto::Empty>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_addProccess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_addProccess() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::AddProcessRequest, ::crypto::Empty>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::AddProcessRequest, ::crypto::Empty>* streamer) { + return this->StreamedaddProccess(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_addProccess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status addProccess(::grpc::ServerContext* /*context*/, const ::crypto::AddProcessRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedaddProccess(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::AddProcessRequest,::crypto::Empty>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_configure : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_configure() { + ::grpc::Service::MarkMethodStreamed(2, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::ConfigureRequest, ::crypto::Empty>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::ConfigureRequest, ::crypto::Empty>* streamer) { + return this->Streamedconfigure(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_configure() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status configure(::grpc::ServerContext* /*context*/, const ::crypto::ConfigureRequest* /*request*/, ::crypto::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status Streamedconfigure(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::ConfigureRequest,::crypto::Empty>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_generateAESKey : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_generateAESKey() { + ::grpc::Service::MarkMethodStreamed(3, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::GenerateAESKeyRequest, ::crypto::GenerateAESKeyResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::GenerateAESKeyRequest, ::crypto::GenerateAESKeyResponse>* streamer) { + return this->StreamedgenerateAESKey(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_generateAESKey() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status generateAESKey(::grpc::ServerContext* /*context*/, const ::crypto::GenerateAESKeyRequest* /*request*/, ::crypto::GenerateAESKeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedgenerateAESKey(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::GenerateAESKeyRequest,::crypto::GenerateAESKeyResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_generateRSAKeyPair : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_generateRSAKeyPair() { + ::grpc::Service::MarkMethodStreamed(4, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse>* streamer) { + return this->StreamedgenerateRSAKeyPair(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_generateRSAKeyPair() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status generateRSAKeyPair(::grpc::ServerContext* /*context*/, const ::crypto::GenerateKeyPairRequest* /*request*/, ::crypto::GenerateKeyPairResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedgenerateRSAKeyPair(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::GenerateKeyPairRequest,::crypto::GenerateKeyPairResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_generateECCKeyPair : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_generateECCKeyPair() { + ::grpc::Service::MarkMethodStreamed(5, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::GenerateKeyPairRequest, ::crypto::GenerateKeyPairResponse>* streamer) { + return this->StreamedgenerateECCKeyPair(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_generateECCKeyPair() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status generateECCKeyPair(::grpc::ServerContext* /*context*/, const ::crypto::GenerateKeyPairRequest* /*request*/, ::crypto::GenerateKeyPairResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedgenerateECCKeyPair(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::GenerateKeyPairRequest,::crypto::GenerateKeyPairResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_getSignedDataLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_getSignedDataLength() { + ::grpc::Service::MarkMethodStreamed(6, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::GetHashLengthRequest, ::crypto::GetLengthResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::GetHashLengthRequest, ::crypto::GetLengthResponse>* streamer) { + return this->StreamedgetSignedDataLength(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_getSignedDataLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status getSignedDataLength(::grpc::ServerContext* /*context*/, const ::crypto::GetHashLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedgetSignedDataLength(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::GetHashLengthRequest,::crypto::GetLengthResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_getECCencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_getECCencryptedLength() { + ::grpc::Service::MarkMethodStreamed(7, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>* streamer) { + return this->StreamedgetECCencryptedLength(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_getECCencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status getECCencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedgetECCencryptedLength(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::GetLengthRequest,::crypto::GetLengthResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_getECCDecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_getECCDecryptedLength() { + ::grpc::Service::MarkMethodStreamed(8, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>* streamer) { + return this->StreamedgetECCDecryptedLength(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_getECCDecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status getECCDecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedgetECCDecryptedLength(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::GetLengthRequest,::crypto::GetLengthResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_getRSAencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_getRSAencryptedLength() { + ::grpc::Service::MarkMethodStreamed(9, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>* streamer) { + return this->StreamedgetRSAencryptedLength(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_getRSAencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status getRSAencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedgetRSAencryptedLength(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::GetLengthRequest,::crypto::GetLengthResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_getRSAdecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_getRSAdecryptedLength() { + ::grpc::Service::MarkMethodStreamed(10, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::GetLengthRequest, ::crypto::GetLengthResponse>* streamer) { + return this->StreamedgetRSAdecryptedLength(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_getRSAdecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status getRSAdecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedgetRSAdecryptedLength(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::GetLengthRequest,::crypto::GetLengthResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_getAESencryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_getAESencryptedLength() { + ::grpc::Service::MarkMethodStreamed(11, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse>* streamer) { + return this->StreamedgetAESencryptedLength(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_getAESencryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status getAESencryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetAESLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedgetAESencryptedLength(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::GetAESLengthRequest,::crypto::GetLengthResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_getAESdecryptedLength : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_getAESdecryptedLength() { + ::grpc::Service::MarkMethodStreamed(12, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::GetAESLengthRequest, ::crypto::GetLengthResponse>* streamer) { + return this->StreamedgetAESdecryptedLength(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_getAESdecryptedLength() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status getAESdecryptedLength(::grpc::ServerContext* /*context*/, const ::crypto::GetAESLengthRequest* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedgetAESdecryptedLength(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::GetAESLengthRequest,::crypto::GetLengthResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_getEncryptedLen : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_getEncryptedLen() { + ::grpc::Service::MarkMethodStreamed(13, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::GetWholeLength, ::crypto::GetLengthResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::GetWholeLength, ::crypto::GetLengthResponse>* streamer) { + return this->StreamedgetEncryptedLen(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_getEncryptedLen() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status getEncryptedLen(::grpc::ServerContext* /*context*/, const ::crypto::GetWholeLength* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedgetEncryptedLen(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::GetWholeLength,::crypto::GetLengthResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_getDecryptedLen : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_getDecryptedLen() { + ::grpc::Service::MarkMethodStreamed(14, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::GetWholeLength, ::crypto::GetLengthResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::GetWholeLength, ::crypto::GetLengthResponse>* streamer) { + return this->StreamedgetDecryptedLen(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_getDecryptedLen() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status getDecryptedLen(::grpc::ServerContext* /*context*/, const ::crypto::GetWholeLength* /*request*/, ::crypto::GetLengthResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedgetDecryptedLen(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::GetWholeLength,::crypto::GetLengthResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_sign : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_sign() { + ::grpc::Service::MarkMethodStreamed(15, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::SignRequest, ::crypto::SignResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::SignRequest, ::crypto::SignResponse>* streamer) { + return this->Streamedsign(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_sign() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status sign(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status Streamedsign(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::SignRequest,::crypto::SignResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_verify : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_verify() { + ::grpc::Service::MarkMethodStreamed(16, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::VerifyRequest, ::crypto::VerifyResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::VerifyRequest, ::crypto::VerifyResponse>* streamer) { + return this->Streamedverify(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_verify() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status verify(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status Streamedverify(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::VerifyRequest,::crypto::VerifyResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_getPublicECCKeyByUserId : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_getPublicECCKeyByUserId() { + ::grpc::Service::MarkMethodStreamed(17, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::KeyRequest, ::crypto::KeyResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::KeyRequest, ::crypto::KeyResponse>* streamer) { + return this->StreamedgetPublicECCKeyByUserId(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_getPublicECCKeyByUserId() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status getPublicECCKeyByUserId(::grpc::ServerContext* /*context*/, const ::crypto::KeyRequest* /*request*/, ::crypto::KeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedgetPublicECCKeyByUserId(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::KeyRequest,::crypto::KeyResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_getPublicRSAKeyByUserId : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_getPublicRSAKeyByUserId() { + ::grpc::Service::MarkMethodStreamed(18, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::KeyRequest, ::crypto::KeyResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::KeyRequest, ::crypto::KeyResponse>* streamer) { + return this->StreamedgetPublicRSAKeyByUserId(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_getPublicRSAKeyByUserId() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status getPublicRSAKeyByUserId(::grpc::ServerContext* /*context*/, const ::crypto::KeyRequest* /*request*/, ::crypto::KeyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedgetPublicRSAKeyByUserId(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::KeyRequest,::crypto::KeyResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_ECCencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_ECCencrypt() { + ::grpc::Service::MarkMethodStreamed(19, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse>* streamer) { + return this->StreamedECCencrypt(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_ECCencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status ECCencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricEncryptRequest* /*request*/, ::crypto::AsymetricEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedECCencrypt(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::AsymetricEncryptRequest,::crypto::AsymetricEncryptResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_ECCdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_ECCdecrypt() { + ::grpc::Service::MarkMethodStreamed(20, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse>* streamer) { + return this->StreamedECCdecrypt(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_ECCdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status ECCdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricDecryptRequest* /*request*/, ::crypto::AsymetricDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedECCdecrypt(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::AsymetricDecryptRequest,::crypto::AsymetricDecryptResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_RSAencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_RSAencrypt() { + ::grpc::Service::MarkMethodStreamed(21, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::AsymetricEncryptRequest, ::crypto::AsymetricEncryptResponse>* streamer) { + return this->StreamedRSAencrypt(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_RSAencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status RSAencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricEncryptRequest* /*request*/, ::crypto::AsymetricEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedRSAencrypt(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::AsymetricEncryptRequest,::crypto::AsymetricEncryptResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_RSAdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_RSAdecrypt() { + ::grpc::Service::MarkMethodStreamed(22, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::AsymetricDecryptRequest, ::crypto::AsymetricDecryptResponse>* streamer) { + return this->StreamedRSAdecrypt(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_RSAdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status RSAdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AsymetricDecryptRequest* /*request*/, ::crypto::AsymetricDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedRSAdecrypt(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::AsymetricDecryptRequest,::crypto::AsymetricDecryptResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_AESencrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_AESencrypt() { + ::grpc::Service::MarkMethodStreamed(23, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::AESEncryptRequest, ::crypto::AESEncryptResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::AESEncryptRequest, ::crypto::AESEncryptResponse>* streamer) { + return this->StreamedAESencrypt(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_AESencrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status AESencrypt(::grpc::ServerContext* /*context*/, const ::crypto::AESEncryptRequest* /*request*/, ::crypto::AESEncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedAESencrypt(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::AESEncryptRequest,::crypto::AESEncryptResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_AESdecrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_AESdecrypt() { + ::grpc::Service::MarkMethodStreamed(24, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::AESDecryptRequest, ::crypto::AESDecryptResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::AESDecryptRequest, ::crypto::AESDecryptResponse>* streamer) { + return this->StreamedAESdecrypt(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_AESdecrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status AESdecrypt(::grpc::ServerContext* /*context*/, const ::crypto::AESDecryptRequest* /*request*/, ::crypto::AESDecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedAESdecrypt(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::AESDecryptRequest,::crypto::AESDecryptResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_encrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_encrypt() { + ::grpc::Service::MarkMethodStreamed(25, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::EncryptRequest, ::crypto::EncryptResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::EncryptRequest, ::crypto::EncryptResponse>* streamer) { + return this->Streamedencrypt(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_encrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status encrypt(::grpc::ServerContext* /*context*/, const ::crypto::EncryptRequest* /*request*/, ::crypto::EncryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status Streamedencrypt(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::EncryptRequest,::crypto::EncryptResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_decrypt : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_decrypt() { + ::grpc::Service::MarkMethodStreamed(26, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::DecryptRequest, ::crypto::DecryptResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::DecryptRequest, ::crypto::DecryptResponse>* streamer) { + return this->Streameddecrypt(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_decrypt() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status decrypt(::grpc::ServerContext* /*context*/, const ::crypto::DecryptRequest* /*request*/, ::crypto::DecryptResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status Streameddecrypt(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::DecryptRequest,::crypto::DecryptResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_signUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_signUpdate() { + ::grpc::Service::MarkMethodStreamed(27, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::SignRequest, ::crypto::SignResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::SignRequest, ::crypto::SignResponse>* streamer) { + return this->StreamedsignUpdate(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_signUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status signUpdate(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedsignUpdate(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::SignRequest,::crypto::SignResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_signFinalize : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_signFinalize() { + ::grpc::Service::MarkMethodStreamed(28, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::SignRequest, ::crypto::SignResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::SignRequest, ::crypto::SignResponse>* streamer) { + return this->StreamedsignFinalize(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_signFinalize() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status signFinalize(::grpc::ServerContext* /*context*/, const ::crypto::SignRequest* /*request*/, ::crypto::SignResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedsignFinalize(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::SignRequest,::crypto::SignResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_verifyUpdate : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_verifyUpdate() { + ::grpc::Service::MarkMethodStreamed(29, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::VerifyRequest, ::crypto::VerifyResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::VerifyRequest, ::crypto::VerifyResponse>* streamer) { + return this->StreamedverifyUpdate(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_verifyUpdate() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status verifyUpdate(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedverifyUpdate(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::VerifyRequest,::crypto::VerifyResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_verifyFinalize : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_verifyFinalize() { + ::grpc::Service::MarkMethodStreamed(30, + new ::grpc::internal::StreamedUnaryHandler< + ::crypto::VerifyRequest, ::crypto::VerifyResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::crypto::VerifyRequest, ::crypto::VerifyResponse>* streamer) { + return this->StreamedverifyFinalize(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_verifyFinalize() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status verifyFinalize(::grpc::ServerContext* /*context*/, const ::crypto::VerifyRequest* /*request*/, ::crypto::VerifyResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedverifyFinalize(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::crypto::VerifyRequest,::crypto::VerifyResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_bootSystem > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_bootSystem > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService; +}; + +} // namespace crypto + + +#endif // GRPC_proto_2fencryption_2eproto__INCLUDED diff --git a/proto/encryption.pb.cc b/proto/encryption.pb.cc new file mode 100644 index 00000000..67cf4d5c --- /dev/null +++ b/proto/encryption.pb.cc @@ -0,0 +1,8982 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/encryption.proto + +#include "encryption.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace crypto { +constexpr AsymetricEncryptRequest::AsymetricEncryptRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : keyid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , senderid_(0){} +struct AsymetricEncryptRequestDefaultTypeInternal { + constexpr AsymetricEncryptRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~AsymetricEncryptRequestDefaultTypeInternal() {} + union { + AsymetricEncryptRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AsymetricEncryptRequestDefaultTypeInternal _AsymetricEncryptRequest_default_instance_; +constexpr AsymetricEncryptResponse::AsymetricEncryptResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : encrypted_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct AsymetricEncryptResponseDefaultTypeInternal { + constexpr AsymetricEncryptResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~AsymetricEncryptResponseDefaultTypeInternal() {} + union { + AsymetricEncryptResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AsymetricEncryptResponseDefaultTypeInternal _AsymetricEncryptResponse_default_instance_; +constexpr AsymetricDecryptRequest::AsymetricDecryptRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : keyid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , receiverid_(0){} +struct AsymetricDecryptRequestDefaultTypeInternal { + constexpr AsymetricDecryptRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~AsymetricDecryptRequestDefaultTypeInternal() {} + union { + AsymetricDecryptRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AsymetricDecryptRequestDefaultTypeInternal _AsymetricDecryptRequest_default_instance_; +constexpr GetHashLengthRequest::GetHashLengthRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : func_(0) + + , datalen_(0){} +struct GetHashLengthRequestDefaultTypeInternal { + constexpr GetHashLengthRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GetHashLengthRequestDefaultTypeInternal() {} + union { + GetHashLengthRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetHashLengthRequestDefaultTypeInternal _GetHashLengthRequest_default_instance_; +constexpr GetAESLengthRequest::GetAESLengthRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : datalen_(0) + , isfirst_(false) + , chainingmode_(0) +{} +struct GetAESLengthRequestDefaultTypeInternal { + constexpr GetAESLengthRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GetAESLengthRequestDefaultTypeInternal() {} + union { + GetAESLengthRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetAESLengthRequestDefaultTypeInternal _GetAESLengthRequest_default_instance_; +constexpr AsymetricDecryptResponse::AsymetricDecryptResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : decrypted_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct AsymetricDecryptResponseDefaultTypeInternal { + constexpr AsymetricDecryptResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~AsymetricDecryptResponseDefaultTypeInternal() {} + union { + AsymetricDecryptResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AsymetricDecryptResponseDefaultTypeInternal _AsymetricDecryptResponse_default_instance_; +constexpr GetLengthRequest::GetLengthRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : in_len_(0){} +struct GetLengthRequestDefaultTypeInternal { + constexpr GetLengthRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GetLengthRequestDefaultTypeInternal() {} + union { + GetLengthRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetLengthRequestDefaultTypeInternal _GetLengthRequest_default_instance_; +constexpr GetLengthResponse::GetLengthResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : len_(0){} +struct GetLengthResponseDefaultTypeInternal { + constexpr GetLengthResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GetLengthResponseDefaultTypeInternal() {} + union { + GetLengthResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetLengthResponseDefaultTypeInternal _GetLengthResponse_default_instance_; +constexpr GetWholeLength::GetWholeLength( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : senderid_(0) + , inlen_(0){} +struct GetWholeLengthDefaultTypeInternal { + constexpr GetWholeLengthDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GetWholeLengthDefaultTypeInternal() {} + union { + GetWholeLength _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetWholeLengthDefaultTypeInternal _GetWholeLength_default_instance_; +constexpr GenerateAESKeyRequest::GenerateAESKeyRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : permissions_() + , _permissions_cached_byte_size_(0) + , user_id_(0) + , keylength_(0) + + , destuserid_(0){} +struct GenerateAESKeyRequestDefaultTypeInternal { + constexpr GenerateAESKeyRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GenerateAESKeyRequestDefaultTypeInternal() {} + union { + GenerateAESKeyRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GenerateAESKeyRequestDefaultTypeInternal _GenerateAESKeyRequest_default_instance_; +constexpr GenerateAESKeyResponse::GenerateAESKeyResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : aes_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct GenerateAESKeyResponseDefaultTypeInternal { + constexpr GenerateAESKeyResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GenerateAESKeyResponseDefaultTypeInternal() {} + union { + GenerateAESKeyResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GenerateAESKeyResponseDefaultTypeInternal _GenerateAESKeyResponse_default_instance_; +constexpr GenerateKeyPairRequest::GenerateKeyPairRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : permissions_() + , _permissions_cached_byte_size_(0) + , user_id_(0){} +struct GenerateKeyPairRequestDefaultTypeInternal { + constexpr GenerateKeyPairRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GenerateKeyPairRequestDefaultTypeInternal() {} + union { + GenerateKeyPairRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GenerateKeyPairRequestDefaultTypeInternal _GenerateKeyPairRequest_default_instance_; +constexpr GenerateKeyPairResponse::GenerateKeyPairResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : public_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , private_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct GenerateKeyPairResponseDefaultTypeInternal { + constexpr GenerateKeyPairResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GenerateKeyPairResponseDefaultTypeInternal() {} + union { + GenerateKeyPairResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GenerateKeyPairResponseDefaultTypeInternal _GenerateKeyPairResponse_default_instance_; +constexpr SignRequest::SignRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , key_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , sender_id_(0) + , hash_func_(0) + + , counter_(int64_t{0}){} +struct SignRequestDefaultTypeInternal { + constexpr SignRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~SignRequestDefaultTypeInternal() {} + union { + SignRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SignRequestDefaultTypeInternal _SignRequest_default_instance_; +constexpr SignResponse::SignResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : signature_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct SignResponseDefaultTypeInternal { + constexpr SignResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~SignResponseDefaultTypeInternal() {} + union { + SignResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SignResponseDefaultTypeInternal _SignResponse_default_instance_; +constexpr VerifyRequest::VerifyRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , signature_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , key_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , sender_id_(0) + , receiver_id_(0) + , hash_func_(0) + + , counter_(0){} +struct VerifyRequestDefaultTypeInternal { + constexpr VerifyRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~VerifyRequestDefaultTypeInternal() {} + union { + VerifyRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT VerifyRequestDefaultTypeInternal _VerifyRequest_default_instance_; +constexpr VerifyResponse::VerifyResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : out_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , valid_(false){} +struct VerifyResponseDefaultTypeInternal { + constexpr VerifyResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~VerifyResponseDefaultTypeInternal() {} + union { + VerifyResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT VerifyResponseDefaultTypeInternal _VerifyResponse_default_instance_; +constexpr KeyRequest::KeyRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : user_id_(0){} +struct KeyRequestDefaultTypeInternal { + constexpr KeyRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~KeyRequestDefaultTypeInternal() {} + union { + KeyRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT KeyRequestDefaultTypeInternal _KeyRequest_default_instance_; +constexpr KeyResponse::KeyResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct KeyResponseDefaultTypeInternal { + constexpr KeyResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~KeyResponseDefaultTypeInternal() {} + union { + KeyResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT KeyResponseDefaultTypeInternal _KeyResponse_default_instance_; +constexpr UserKeyPermissions::UserKeyPermissions( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : permissions_() + , _permissions_cached_byte_size_(0) + , userid_(0){} +struct UserKeyPermissionsDefaultTypeInternal { + constexpr UserKeyPermissionsDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~UserKeyPermissionsDefaultTypeInternal() {} + union { + UserKeyPermissions _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UserKeyPermissionsDefaultTypeInternal _UserKeyPermissions_default_instance_; +constexpr BootSystemRequest::BootSystemRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : usersidspermissions_(){} +struct BootSystemRequestDefaultTypeInternal { + constexpr BootSystemRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~BootSystemRequestDefaultTypeInternal() {} + union { + BootSystemRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BootSystemRequestDefaultTypeInternal _BootSystemRequest_default_instance_; +constexpr Empty::Empty( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} +struct EmptyDefaultTypeInternal { + constexpr EmptyDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~EmptyDefaultTypeInternal() {} + union { + Empty _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EmptyDefaultTypeInternal _Empty_default_instance_; +constexpr CryptoConfig::CryptoConfig( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : hashfunction_(0) + + , aeskeylength_(0) + + , aeschainingmode_(0) + + , asymmetricfunction_(0) +{} +struct CryptoConfigDefaultTypeInternal { + constexpr CryptoConfigDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~CryptoConfigDefaultTypeInternal() {} + union { + CryptoConfig _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT CryptoConfigDefaultTypeInternal _CryptoConfig_default_instance_; +constexpr ConfigureRequest::ConfigureRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : config_(nullptr) + , userid_(0){} +struct ConfigureRequestDefaultTypeInternal { + constexpr ConfigureRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConfigureRequestDefaultTypeInternal() {} + union { + ConfigureRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConfigureRequestDefaultTypeInternal _ConfigureRequest_default_instance_; +constexpr AddProcessRequest::AddProcessRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : permissions_() + , _permissions_cached_byte_size_(0) + , userid_(0){} +struct AddProcessRequestDefaultTypeInternal { + constexpr AddProcessRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~AddProcessRequestDefaultTypeInternal() {} + union { + AddProcessRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AddProcessRequestDefaultTypeInternal _AddProcessRequest_default_instance_; +constexpr EncryptRequest::EncryptRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , sender_id_(0) + , receiver_id_(0) + , counter_(int64_t{0}) + , isfirst_(false){} +struct EncryptRequestDefaultTypeInternal { + constexpr EncryptRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~EncryptRequestDefaultTypeInternal() {} + union { + EncryptRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EncryptRequestDefaultTypeInternal _EncryptRequest_default_instance_; +constexpr EncryptResponse::EncryptResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : encrypted_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , signature_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct EncryptResponseDefaultTypeInternal { + constexpr EncryptResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~EncryptResponseDefaultTypeInternal() {} + union { + EncryptResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EncryptResponseDefaultTypeInternal _EncryptResponse_default_instance_; +constexpr DecryptRequest::DecryptRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : encrypted_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , signature_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , sender_id_(0) + , receiver_id_(0) + , counter_(int64_t{0}) + , isfirst_(false){} +struct DecryptRequestDefaultTypeInternal { + constexpr DecryptRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~DecryptRequestDefaultTypeInternal() {} + union { + DecryptRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DecryptRequestDefaultTypeInternal _DecryptRequest_default_instance_; +constexpr DecryptResponse::DecryptResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : decrypted_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct DecryptResponseDefaultTypeInternal { + constexpr DecryptResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~DecryptResponseDefaultTypeInternal() {} + union { + DecryptResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DecryptResponseDefaultTypeInternal _DecryptResponse_default_instance_; +constexpr AESEncryptRequest::AESEncryptRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , key_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , sender_id_(0) + , receiver_id_(0) + , counter_(int64_t{0}) + , func_(0) + + , key_length_(0) + + , chainingmode_(0) +{} +struct AESEncryptRequestDefaultTypeInternal { + constexpr AESEncryptRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~AESEncryptRequestDefaultTypeInternal() {} + union { + AESEncryptRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AESEncryptRequestDefaultTypeInternal _AESEncryptRequest_default_instance_; +constexpr AESEncryptResponse::AESEncryptResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : encrypted_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct AESEncryptResponseDefaultTypeInternal { + constexpr AESEncryptResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~AESEncryptResponseDefaultTypeInternal() {} + union { + AESEncryptResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AESEncryptResponseDefaultTypeInternal _AESEncryptResponse_default_instance_; +constexpr AESDecryptRequest::AESDecryptRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : data_in_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , data_out_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , key_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , sender_id_(0) + , receiver_id_(0) + , in_len_(0) + , func_(0) + + , key_length_(0) + + , chainingmode_(0) + + , counter_(int64_t{0}){} +struct AESDecryptRequestDefaultTypeInternal { + constexpr AESDecryptRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~AESDecryptRequestDefaultTypeInternal() {} + union { + AESDecryptRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AESDecryptRequestDefaultTypeInternal _AESDecryptRequest_default_instance_; +constexpr AESDecryptResponse::AESDecryptResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : decrypted_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct AESDecryptResponseDefaultTypeInternal { + constexpr AESDecryptResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~AESDecryptResponseDefaultTypeInternal() {} + union { + AESDecryptResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AESDecryptResponseDefaultTypeInternal _AESDecryptResponse_default_instance_; +} // namespace crypto +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_proto_2fencryption_2eproto[33]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_proto_2fencryption_2eproto[5]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_proto_2fencryption_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricEncryptRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricEncryptRequest, senderid_), + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricEncryptRequest, keyid_), + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricEncryptRequest, data_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricEncryptResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricEncryptResponse, encrypted_data_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptRequest, receiverid_), + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptRequest, keyid_), + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptRequest, data_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::GetHashLengthRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::GetHashLengthRequest, func_), + PROTOBUF_FIELD_OFFSET(::crypto::GetHashLengthRequest, datalen_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::GetAESLengthRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::GetAESLengthRequest, datalen_), + PROTOBUF_FIELD_OFFSET(::crypto::GetAESLengthRequest, isfirst_), + PROTOBUF_FIELD_OFFSET(::crypto::GetAESLengthRequest, chainingmode_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptResponse, decrypted_data_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::GetLengthRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::GetLengthRequest, in_len_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::GetLengthResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::GetLengthResponse, len_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::GetWholeLength, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::GetWholeLength, senderid_), + PROTOBUF_FIELD_OFFSET(::crypto::GetWholeLength, inlen_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyRequest, user_id_), + PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyRequest, permissions_), + PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyRequest, keylength_), + PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyRequest, destuserid_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyResponse, aes_key_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairRequest, user_id_), + PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairRequest, permissions_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairResponse, public_key_), + PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairResponse, private_key_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, sender_id_), + PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, data_), + PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, hash_func_), + PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, counter_), + PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, key_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::SignResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::SignResponse, signature_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, sender_id_), + PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, receiver_id_), + PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, data_), + PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, signature_), + PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, hash_func_), + PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, key_id_), + PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, counter_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::VerifyResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::VerifyResponse, valid_), + PROTOBUF_FIELD_OFFSET(::crypto::VerifyResponse, out_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::KeyRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::KeyRequest, user_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::KeyResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::KeyResponse, key_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::UserKeyPermissions, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::UserKeyPermissions, userid_), + PROTOBUF_FIELD_OFFSET(::crypto::UserKeyPermissions, permissions_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::BootSystemRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::BootSystemRequest, usersidspermissions_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::Empty, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::CryptoConfig, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::CryptoConfig, hashfunction_), + PROTOBUF_FIELD_OFFSET(::crypto::CryptoConfig, aeskeylength_), + PROTOBUF_FIELD_OFFSET(::crypto::CryptoConfig, aeschainingmode_), + PROTOBUF_FIELD_OFFSET(::crypto::CryptoConfig, asymmetricfunction_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::ConfigureRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::ConfigureRequest, userid_), + PROTOBUF_FIELD_OFFSET(::crypto::ConfigureRequest, config_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::AddProcessRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::AddProcessRequest, userid_), + PROTOBUF_FIELD_OFFSET(::crypto::AddProcessRequest, permissions_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, sender_id_), + PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, receiver_id_), + PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, data_), + PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, counter_), + PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, isfirst_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::EncryptResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::EncryptResponse, encrypted_data_), + PROTOBUF_FIELD_OFFSET(::crypto::EncryptResponse, signature_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, sender_id_), + PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, receiver_id_), + PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, encrypted_data_), + PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, counter_), + PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, signature_), + PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, isfirst_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::DecryptResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::DecryptResponse, decrypted_data_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, sender_id_), + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, receiver_id_), + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, data_), + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, func_), + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, counter_), + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, key_id_), + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, key_length_), + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, chainingmode_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptResponse, encrypted_data_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, sender_id_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, receiver_id_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, data_in_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, in_len_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, data_out_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, func_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, key_length_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, chainingmode_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, counter_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, key_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptResponse, decrypted_data_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, -1, sizeof(::crypto::AsymetricEncryptRequest)}, + { 9, -1, -1, sizeof(::crypto::AsymetricEncryptResponse)}, + { 16, -1, -1, sizeof(::crypto::AsymetricDecryptRequest)}, + { 25, -1, -1, sizeof(::crypto::GetHashLengthRequest)}, + { 33, -1, -1, sizeof(::crypto::GetAESLengthRequest)}, + { 42, -1, -1, sizeof(::crypto::AsymetricDecryptResponse)}, + { 49, -1, -1, sizeof(::crypto::GetLengthRequest)}, + { 56, -1, -1, sizeof(::crypto::GetLengthResponse)}, + { 63, -1, -1, sizeof(::crypto::GetWholeLength)}, + { 71, -1, -1, sizeof(::crypto::GenerateAESKeyRequest)}, + { 81, -1, -1, sizeof(::crypto::GenerateAESKeyResponse)}, + { 88, -1, -1, sizeof(::crypto::GenerateKeyPairRequest)}, + { 96, -1, -1, sizeof(::crypto::GenerateKeyPairResponse)}, + { 104, -1, -1, sizeof(::crypto::SignRequest)}, + { 115, -1, -1, sizeof(::crypto::SignResponse)}, + { 122, -1, -1, sizeof(::crypto::VerifyRequest)}, + { 135, -1, -1, sizeof(::crypto::VerifyResponse)}, + { 143, -1, -1, sizeof(::crypto::KeyRequest)}, + { 150, -1, -1, sizeof(::crypto::KeyResponse)}, + { 157, -1, -1, sizeof(::crypto::UserKeyPermissions)}, + { 165, -1, -1, sizeof(::crypto::BootSystemRequest)}, + { 172, -1, -1, sizeof(::crypto::Empty)}, + { 178, -1, -1, sizeof(::crypto::CryptoConfig)}, + { 188, -1, -1, sizeof(::crypto::ConfigureRequest)}, + { 196, -1, -1, sizeof(::crypto::AddProcessRequest)}, + { 204, -1, -1, sizeof(::crypto::EncryptRequest)}, + { 215, -1, -1, sizeof(::crypto::EncryptResponse)}, + { 223, -1, -1, sizeof(::crypto::DecryptRequest)}, + { 235, -1, -1, sizeof(::crypto::DecryptResponse)}, + { 242, -1, -1, sizeof(::crypto::AESEncryptRequest)}, + { 256, -1, -1, sizeof(::crypto::AESEncryptResponse)}, + { 263, -1, -1, sizeof(::crypto::AESDecryptRequest)}, + { 279, -1, -1, sizeof(::crypto::AESDecryptResponse)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::crypto::_AsymetricEncryptRequest_default_instance_), + reinterpret_cast(&::crypto::_AsymetricEncryptResponse_default_instance_), + reinterpret_cast(&::crypto::_AsymetricDecryptRequest_default_instance_), + reinterpret_cast(&::crypto::_GetHashLengthRequest_default_instance_), + reinterpret_cast(&::crypto::_GetAESLengthRequest_default_instance_), + reinterpret_cast(&::crypto::_AsymetricDecryptResponse_default_instance_), + reinterpret_cast(&::crypto::_GetLengthRequest_default_instance_), + reinterpret_cast(&::crypto::_GetLengthResponse_default_instance_), + reinterpret_cast(&::crypto::_GetWholeLength_default_instance_), + reinterpret_cast(&::crypto::_GenerateAESKeyRequest_default_instance_), + reinterpret_cast(&::crypto::_GenerateAESKeyResponse_default_instance_), + reinterpret_cast(&::crypto::_GenerateKeyPairRequest_default_instance_), + reinterpret_cast(&::crypto::_GenerateKeyPairResponse_default_instance_), + reinterpret_cast(&::crypto::_SignRequest_default_instance_), + reinterpret_cast(&::crypto::_SignResponse_default_instance_), + reinterpret_cast(&::crypto::_VerifyRequest_default_instance_), + reinterpret_cast(&::crypto::_VerifyResponse_default_instance_), + reinterpret_cast(&::crypto::_KeyRequest_default_instance_), + reinterpret_cast(&::crypto::_KeyResponse_default_instance_), + reinterpret_cast(&::crypto::_UserKeyPermissions_default_instance_), + reinterpret_cast(&::crypto::_BootSystemRequest_default_instance_), + reinterpret_cast(&::crypto::_Empty_default_instance_), + reinterpret_cast(&::crypto::_CryptoConfig_default_instance_), + reinterpret_cast(&::crypto::_ConfigureRequest_default_instance_), + reinterpret_cast(&::crypto::_AddProcessRequest_default_instance_), + reinterpret_cast(&::crypto::_EncryptRequest_default_instance_), + reinterpret_cast(&::crypto::_EncryptResponse_default_instance_), + reinterpret_cast(&::crypto::_DecryptRequest_default_instance_), + reinterpret_cast(&::crypto::_DecryptResponse_default_instance_), + reinterpret_cast(&::crypto::_AESEncryptRequest_default_instance_), + reinterpret_cast(&::crypto::_AESEncryptResponse_default_instance_), + reinterpret_cast(&::crypto::_AESDecryptRequest_default_instance_), + reinterpret_cast(&::crypto::_AESDecryptResponse_default_instance_), +}; + +const char descriptor_table_protodef_proto_2fencryption_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\026proto/encryption.proto\022\006crypto\"H\n\027Asym" + "etricEncryptRequest\022\020\n\010senderId\030\001 \001(\005\022\r\n" + "\005keyId\030\002 \001(\t\022\014\n\004data\030\003 \001(\014\"2\n\030AsymetricE" + "ncryptResponse\022\026\n\016encrypted_data\030\001 \001(\014\"J" + "\n\027AsymetricDecryptRequest\022\022\n\nreceiverId\030" + "\001 \001(\005\022\r\n\005keyId\030\002 \001(\t\022\014\n\004data\030\003 \001(\014\"K\n\024Ge" + "tHashLengthRequest\022\"\n\004func\030\001 \001(\0162\024.crypt" + "o.SHAAlgorithm\022\017\n\007dataLen\030\002 \001(\005\"f\n\023GetAE" + "SLengthRequest\022\017\n\007dataLen\030\001 \001(\005\022\017\n\007isFir" + "st\030\002 \001(\010\022-\n\014chainingMode\030\003 \001(\0162\027.crypto." + "AESChainingMode\"2\n\030AsymetricDecryptRespo" + "nse\022\026\n\016decrypted_data\030\001 \001(\014\"\"\n\020GetLength" + "Request\022\016\n\006in_len\030\001 \001(\005\" \n\021GetLengthResp" + "onse\022\013\n\003len\030\001 \001(\005\"1\n\016GetWholeLength\022\020\n\010s" + "enderId\030\001 \001(\005\022\r\n\005inLen\030\002 \001(\005\"\221\001\n\025Generat" + "eAESKeyRequest\022\017\n\007user_id\030\001 \001(\005\022*\n\013permi" + "ssions\030\002 \003(\0162\025.crypto.KeyPermission\022\'\n\tk" + "eyLength\030\003 \001(\0162\024.crypto.AESKeyLength\022\022\n\n" + "destUserId\030\004 \001(\005\")\n\026GenerateAESKeyRespon" + "se\022\017\n\007aes_key\030\001 \001(\t\"U\n\026GenerateKeyPairRe" + "quest\022\017\n\007user_id\030\001 \001(\005\022*\n\013permissions\030\002 " + "\003(\0162\025.crypto.KeyPermission\"B\n\027GenerateKe" + "yPairResponse\022\022\n\npublic_key\030\001 \001(\t\022\023\n\013pri" + "vate_key\030\002 \001(\t\"x\n\013SignRequest\022\021\n\tsender_" + "id\030\001 \001(\005\022\014\n\004data\030\002 \001(\014\022\'\n\thash_func\030\003 \001(" + "\0162\024.crypto.SHAAlgorithm\022\017\n\007counter\030\005 \001(\003" + "\022\016\n\006key_id\030\006 \001(\t\"!\n\014SignResponse\022\021\n\tsign" + "ature\030\001 \001(\014\"\242\001\n\rVerifyRequest\022\021\n\tsender_" + "id\030\001 \001(\005\022\023\n\013receiver_id\030\002 \001(\005\022\014\n\004data\030\003 " + "\001(\014\022\021\n\tsignature\030\004 \001(\014\022\'\n\thash_func\030\005 \001(" + "\0162\024.crypto.SHAAlgorithm\022\016\n\006key_id\030\006 \001(\t\022" + "\017\n\007counter\030\007 \001(\005\",\n\016VerifyResponse\022\r\n\005va" + "lid\030\001 \001(\010\022\013\n\003out\030\002 \001(\014\"\035\n\nKeyRequest\022\017\n\007" + "user_id\030\001 \001(\005\"\032\n\013KeyResponse\022\013\n\003key\030\001 \001(" + "\t\"P\n\022UserKeyPermissions\022\016\n\006userId\030\001 \001(\005\022" + "*\n\013permissions\030\002 \003(\0162\025.crypto.KeyPermiss" + "ion\"L\n\021BootSystemRequest\0227\n\023usersIdsPerm" + "issions\030\001 \003(\0132\032.crypto.UserKeyPermission" + "s\"\007\n\005Empty\"\320\001\n\014CryptoConfig\022*\n\014hashFunct" + "ion\030\001 \001(\0162\024.crypto.SHAAlgorithm\022*\n\014aesKe" + "yLength\030\002 \001(\0162\024.crypto.AESKeyLength\0220\n\017a" + "esChainingMode\030\003 \001(\0162\027.crypto.AESChainin" + "gMode\0226\n\022asymmetricFunction\030\004 \001(\0162\032.cryp" + "to.AsymmetricFunction\"H\n\020ConfigureReques" + "t\022\016\n\006userId\030\001 \001(\005\022$\n\006config\030\002 \001(\0132\024.cryp" + "to.CryptoConfig\"O\n\021AddProcessRequest\022\016\n\006" + "userId\030\001 \001(\005\022*\n\013permissions\030\002 \003(\0162\025.cryp" + "to.KeyPermission\"h\n\016EncryptRequest\022\021\n\tse" + "nder_id\030\001 \001(\005\022\023\n\013receiver_id\030\002 \001(\005\022\014\n\004da" + "ta\030\003 \001(\014\022\017\n\007counter\030\004 \001(\003\022\017\n\007isFirst\030\005 \001" + "(\010\"<\n\017EncryptResponse\022\026\n\016encrypted_data\030" + "\001 \001(\014\022\021\n\tsignature\030\002 \001(\014\"\205\001\n\016DecryptRequ" + "est\022\021\n\tsender_id\030\001 \001(\005\022\023\n\013receiver_id\030\002 " + "\001(\005\022\026\n\016encrypted_data\030\003 \001(\014\022\017\n\007counter\030\004" + " \001(\003\022\021\n\tsignature\030\005 \001(\014\022\017\n\007isFirst\030\006 \001(\010" + "\")\n\017DecryptResponse\022\026\n\016decrypted_data\030\001 " + "\001(\014\"\355\001\n\021AESEncryptRequest\022\021\n\tsender_id\030\001" + " \001(\005\022\023\n\013receiver_id\030\002 \001(\005\022\014\n\004data\030\003 \001(\014\022" + "(\n\004func\030\004 \001(\0162\032.crypto.AsymmetricFunctio" + "n\022\017\n\007counter\030\005 \001(\003\022\016\n\006key_id\030\006 \001(\t\022(\n\nke" + "y_length\030\007 \001(\0162\024.crypto.AESKeyLength\022-\n\014" + "chainingMode\030\010 \001(\0162\027.crypto.AESChainingM" + "ode\",\n\022AESEncryptResponse\022\026\n\016encrypted_d" + "ata\030\001 \001(\014\"\222\002\n\021AESDecryptRequest\022\021\n\tsende" + "r_id\030\001 \001(\005\022\023\n\013receiver_id\030\002 \001(\005\022\017\n\007data_" + "in\030\003 \001(\014\022\016\n\006in_len\030\004 \001(\005\022\020\n\010data_out\030\005 \001" + "(\014\022(\n\004func\030\006 \001(\0162\032.crypto.AsymmetricFunc" + "tion\022(\n\nkey_length\030\007 \001(\0162\024.crypto.AESKey" + "Length\022-\n\014chainingMode\030\010 \001(\0162\027.crypto.AE" + "SChainingMode\022\017\n\007counter\030\t \001(\003\022\016\n\006key_id" + "\030\n \001(\t\",\n\022AESDecryptResponse\022\026\n\016decrypte" + "d_data\030\001 \001(\014*O\n\rKeyPermission\022\n\n\006VERIFY\020" + "\000\022\010\n\004SIGN\020\001\022\013\n\007ENCRYPT\020\002\022\013\n\007DECRYPT\020\003\022\016\n" + "\nEXPORTABLE\020\004*>\n\017AESChainingMode\022\007\n\003ECB\020" + "\000\022\007\n\003CBC\020\001\022\007\n\003CFB\020\002\022\007\n\003OFB\020\003\022\007\n\003CTR\020\004*&\n" + "\022AsymmetricFunction\022\007\n\003RSA\020\000\022\007\n\003ECC\020\001*(\n" + "\014SHAAlgorithm\022\n\n\006SHA256\020\000\022\014\n\010SHA3_512\020\001*" + "5\n\014AESKeyLength\022\013\n\007AES_128\020\000\022\013\n\007AES_192\020" + "\001\022\013\n\007AES_256\020\0022\231\021\n\rCryptoService\0226\n\nboot" + "System\022\031.crypto.BootSystemRequest\032\r.cryp" + "to.Empty\0227\n\013addProccess\022\031.crypto.AddProc" + "essRequest\032\r.crypto.Empty\0224\n\tconfigure\022\030" + ".crypto.ConfigureRequest\032\r.crypto.Empty\022" + "O\n\016generateAESKey\022\035.crypto.GenerateAESKe" + "yRequest\032\036.crypto.GenerateAESKeyResponse" + "\022U\n\022generateRSAKeyPair\022\036.crypto.Generate" + "KeyPairRequest\032\037.crypto.GenerateKeyPairR" + "esponse\022U\n\022generateECCKeyPair\022\036.crypto.G" + "enerateKeyPairRequest\032\037.crypto.GenerateK" + "eyPairResponse\022N\n\023getSignedDataLength\022\034." + "crypto.GetHashLengthRequest\032\031.crypto.Get" + "LengthResponse\022L\n\025getECCencryptedLength\022" + "\030.crypto.GetLengthRequest\032\031.crypto.GetLe" + "ngthResponse\022L\n\025getECCDecryptedLength\022\030." + "crypto.GetLengthRequest\032\031.crypto.GetLeng" + "thResponse\022L\n\025getRSAencryptedLength\022\030.cr" + "ypto.GetLengthRequest\032\031.crypto.GetLength" + "Response\022L\n\025getRSAdecryptedLength\022\030.cryp" + "to.GetLengthRequest\032\031.crypto.GetLengthRe" + "sponse\022O\n\025getAESencryptedLength\022\033.crypto" + ".GetAESLengthRequest\032\031.crypto.GetLengthR" + "esponse\022O\n\025getAESdecryptedLength\022\033.crypt" + "o.GetAESLengthRequest\032\031.crypto.GetLength" + "Response\022D\n\017getEncryptedLen\022\026.crypto.Get" + "WholeLength\032\031.crypto.GetLengthResponse\022D" + "\n\017getDecryptedLen\022\026.crypto.GetWholeLengt" + "h\032\031.crypto.GetLengthResponse\0221\n\004sign\022\023.c" + "rypto.SignRequest\032\024.crypto.SignResponse\022" + "7\n\006verify\022\025.crypto.VerifyRequest\032\026.crypt" + "o.VerifyResponse\022B\n\027getPublicECCKeyByUse" + "rId\022\022.crypto.KeyRequest\032\023.crypto.KeyResp" + "onse\022B\n\027getPublicRSAKeyByUserId\022\022.crypto" + ".KeyRequest\032\023.crypto.KeyResponse\022O\n\nECCe" + "ncrypt\022\037.crypto.AsymetricEncryptRequest\032" + " .crypto.AsymetricEncryptResponse\022O\n\nECC" + "decrypt\022\037.crypto.AsymetricDecryptRequest" + "\032 .crypto.AsymetricDecryptResponse\022O\n\nRS" + "Aencrypt\022\037.crypto.AsymetricEncryptReques" + "t\032 .crypto.AsymetricEncryptResponse\022O\n\nR" + "SAdecrypt\022\037.crypto.AsymetricDecryptReque" + "st\032 .crypto.AsymetricDecryptResponse\022C\n\n" + "AESencrypt\022\031.crypto.AESEncryptRequest\032\032." + "crypto.AESEncryptResponse\022C\n\nAESdecrypt\022" + "\031.crypto.AESDecryptRequest\032\032.crypto.AESD" + "ecryptResponse\022:\n\007encrypt\022\026.crypto.Encry" + "ptRequest\032\027.crypto.EncryptResponse\022:\n\007de" + "crypt\022\026.crypto.DecryptRequest\032\027.crypto.D" + "ecryptResponse\0227\n\nsignUpdate\022\023.crypto.Si" + "gnRequest\032\024.crypto.SignResponse\0229\n\014signF" + "inalize\022\023.crypto.SignRequest\032\024.crypto.Si" + "gnResponse\022=\n\014verifyUpdate\022\025.crypto.Veri" + "fyRequest\032\026.crypto.VerifyResponse\022\?\n\016ver" + "ifyFinalize\022\025.crypto.VerifyRequest\032\026.cry" + "pto.VerifyResponseb\006proto3" + ; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_proto_2fencryption_2eproto_once; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_proto_2fencryption_2eproto = { + false, false, 5346, descriptor_table_protodef_proto_2fencryption_2eproto, "proto/encryption.proto", + &descriptor_table_proto_2fencryption_2eproto_once, nullptr, 0, 33, + schemas, file_default_instances, TableStruct_proto_2fencryption_2eproto::offsets, + file_level_metadata_proto_2fencryption_2eproto, file_level_enum_descriptors_proto_2fencryption_2eproto, file_level_service_descriptors_proto_2fencryption_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_proto_2fencryption_2eproto_getter() { + return &descriptor_table_proto_2fencryption_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_proto_2fencryption_2eproto(&descriptor_table_proto_2fencryption_2eproto); +namespace crypto { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* KeyPermission_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_proto_2fencryption_2eproto); + return file_level_enum_descriptors_proto_2fencryption_2eproto[0]; +} +bool KeyPermission_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AESChainingMode_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_proto_2fencryption_2eproto); + return file_level_enum_descriptors_proto_2fencryption_2eproto[1]; +} +bool AESChainingMode_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AsymmetricFunction_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_proto_2fencryption_2eproto); + return file_level_enum_descriptors_proto_2fencryption_2eproto[2]; +} +bool AsymmetricFunction_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SHAAlgorithm_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_proto_2fencryption_2eproto); + return file_level_enum_descriptors_proto_2fencryption_2eproto[3]; +} +bool SHAAlgorithm_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AESKeyLength_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_proto_2fencryption_2eproto); + return file_level_enum_descriptors_proto_2fencryption_2eproto[4]; +} +bool AESKeyLength_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + + +// =================================================================== + +class AsymetricEncryptRequest::_Internal { + public: +}; + +AsymetricEncryptRequest::AsymetricEncryptRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.AsymetricEncryptRequest) +} +AsymetricEncryptRequest::AsymetricEncryptRequest(const AsymetricEncryptRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_keyid().empty()) { + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_keyid(), + GetArenaForAllocation()); + } + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_data().empty()) { + data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data(), + GetArenaForAllocation()); + } + senderid_ = from.senderid_; + // @@protoc_insertion_point(copy_constructor:crypto.AsymetricEncryptRequest) +} + +void AsymetricEncryptRequest::SharedCtor() { +keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +senderid_ = 0; +} + +AsymetricEncryptRequest::~AsymetricEncryptRequest() { + // @@protoc_insertion_point(destructor:crypto.AsymetricEncryptRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void AsymetricEncryptRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + keyid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AsymetricEncryptRequest::ArenaDtor(void* object) { + AsymetricEncryptRequest* _this = reinterpret_cast< AsymetricEncryptRequest* >(object); + (void)_this; +} +void AsymetricEncryptRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AsymetricEncryptRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AsymetricEncryptRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.AsymetricEncryptRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + keyid_.ClearToEmpty(); + data_.ClearToEmpty(); + senderid_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AsymetricEncryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 senderId = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + senderid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string keyId = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_keyid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.AsymetricEncryptRequest.keyId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes data = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AsymetricEncryptRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.AsymetricEncryptRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_senderid(), target); + } + + // string keyId = 2; + if (!this->_internal_keyid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_keyid().data(), static_cast(this->_internal_keyid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.AsymetricEncryptRequest.keyId"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_keyid(), target); + } + + // bytes data = 3; + if (!this->_internal_data().empty()) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_data(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.AsymetricEncryptRequest) + return target; +} + +size_t AsymetricEncryptRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.AsymetricEncryptRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string keyId = 2; + if (!this->_internal_keyid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_keyid()); + } + + // bytes data = 3; + if (!this->_internal_data().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_data()); + } + + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AsymetricEncryptRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + AsymetricEncryptRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AsymetricEncryptRequest::GetClassData() const { return &_class_data_; } + +void AsymetricEncryptRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void AsymetricEncryptRequest::MergeFrom(const AsymetricEncryptRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.AsymetricEncryptRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_keyid().empty()) { + _internal_set_keyid(from._internal_keyid()); + } + if (!from._internal_data().empty()) { + _internal_set_data(from._internal_data()); + } + if (from._internal_senderid() != 0) { + _internal_set_senderid(from._internal_senderid()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void AsymetricEncryptRequest::CopyFrom(const AsymetricEncryptRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.AsymetricEncryptRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AsymetricEncryptRequest::IsInitialized() const { + return true; +} + +void AsymetricEncryptRequest::InternalSwap(AsymetricEncryptRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &keyid_, lhs_arena, + &other->keyid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &data_, lhs_arena, + &other->data_, rhs_arena + ); + swap(senderid_, other->senderid_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AsymetricEncryptRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[0]); +} + +// =================================================================== + +class AsymetricEncryptResponse::_Internal { + public: +}; + +AsymetricEncryptResponse::AsymetricEncryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.AsymetricEncryptResponse) +} +AsymetricEncryptResponse::AsymetricEncryptResponse(const AsymetricEncryptResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_encrypted_data().empty()) { + encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_encrypted_data(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:crypto.AsymetricEncryptResponse) +} + +void AsymetricEncryptResponse::SharedCtor() { +encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +AsymetricEncryptResponse::~AsymetricEncryptResponse() { + // @@protoc_insertion_point(destructor:crypto.AsymetricEncryptResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void AsymetricEncryptResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + encrypted_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AsymetricEncryptResponse::ArenaDtor(void* object) { + AsymetricEncryptResponse* _this = reinterpret_cast< AsymetricEncryptResponse* >(object); + (void)_this; +} +void AsymetricEncryptResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AsymetricEncryptResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AsymetricEncryptResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.AsymetricEncryptResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + encrypted_data_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AsymetricEncryptResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // bytes encrypted_data = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_encrypted_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AsymetricEncryptResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.AsymetricEncryptResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes encrypted_data = 1; + if (!this->_internal_encrypted_data().empty()) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_encrypted_data(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.AsymetricEncryptResponse) + return target; +} + +size_t AsymetricEncryptResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.AsymetricEncryptResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes encrypted_data = 1; + if (!this->_internal_encrypted_data().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_encrypted_data()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AsymetricEncryptResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + AsymetricEncryptResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AsymetricEncryptResponse::GetClassData() const { return &_class_data_; } + +void AsymetricEncryptResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void AsymetricEncryptResponse::MergeFrom(const AsymetricEncryptResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.AsymetricEncryptResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_encrypted_data().empty()) { + _internal_set_encrypted_data(from._internal_encrypted_data()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void AsymetricEncryptResponse::CopyFrom(const AsymetricEncryptResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.AsymetricEncryptResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AsymetricEncryptResponse::IsInitialized() const { + return true; +} + +void AsymetricEncryptResponse::InternalSwap(AsymetricEncryptResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &encrypted_data_, lhs_arena, + &other->encrypted_data_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AsymetricEncryptResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[1]); +} + +// =================================================================== + +class AsymetricDecryptRequest::_Internal { + public: +}; + +AsymetricDecryptRequest::AsymetricDecryptRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.AsymetricDecryptRequest) +} +AsymetricDecryptRequest::AsymetricDecryptRequest(const AsymetricDecryptRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_keyid().empty()) { + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_keyid(), + GetArenaForAllocation()); + } + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_data().empty()) { + data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data(), + GetArenaForAllocation()); + } + receiverid_ = from.receiverid_; + // @@protoc_insertion_point(copy_constructor:crypto.AsymetricDecryptRequest) +} + +void AsymetricDecryptRequest::SharedCtor() { +keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +receiverid_ = 0; +} + +AsymetricDecryptRequest::~AsymetricDecryptRequest() { + // @@protoc_insertion_point(destructor:crypto.AsymetricDecryptRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void AsymetricDecryptRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + keyid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AsymetricDecryptRequest::ArenaDtor(void* object) { + AsymetricDecryptRequest* _this = reinterpret_cast< AsymetricDecryptRequest* >(object); + (void)_this; +} +void AsymetricDecryptRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AsymetricDecryptRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AsymetricDecryptRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.AsymetricDecryptRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + keyid_.ClearToEmpty(); + data_.ClearToEmpty(); + receiverid_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AsymetricDecryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 receiverId = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + receiverid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string keyId = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_keyid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.AsymetricDecryptRequest.keyId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes data = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AsymetricDecryptRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.AsymetricDecryptRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 receiverId = 1; + if (this->_internal_receiverid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_receiverid(), target); + } + + // string keyId = 2; + if (!this->_internal_keyid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_keyid().data(), static_cast(this->_internal_keyid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.AsymetricDecryptRequest.keyId"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_keyid(), target); + } + + // bytes data = 3; + if (!this->_internal_data().empty()) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_data(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.AsymetricDecryptRequest) + return target; +} + +size_t AsymetricDecryptRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.AsymetricDecryptRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string keyId = 2; + if (!this->_internal_keyid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_keyid()); + } + + // bytes data = 3; + if (!this->_internal_data().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_data()); + } + + // int32 receiverId = 1; + if (this->_internal_receiverid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiverid()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AsymetricDecryptRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + AsymetricDecryptRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AsymetricDecryptRequest::GetClassData() const { return &_class_data_; } + +void AsymetricDecryptRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void AsymetricDecryptRequest::MergeFrom(const AsymetricDecryptRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.AsymetricDecryptRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_keyid().empty()) { + _internal_set_keyid(from._internal_keyid()); + } + if (!from._internal_data().empty()) { + _internal_set_data(from._internal_data()); + } + if (from._internal_receiverid() != 0) { + _internal_set_receiverid(from._internal_receiverid()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void AsymetricDecryptRequest::CopyFrom(const AsymetricDecryptRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.AsymetricDecryptRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AsymetricDecryptRequest::IsInitialized() const { + return true; +} + +void AsymetricDecryptRequest::InternalSwap(AsymetricDecryptRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &keyid_, lhs_arena, + &other->keyid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &data_, lhs_arena, + &other->data_, rhs_arena + ); + swap(receiverid_, other->receiverid_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AsymetricDecryptRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[2]); +} + +// =================================================================== + +class GetHashLengthRequest::_Internal { + public: +}; + +GetHashLengthRequest::GetHashLengthRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.GetHashLengthRequest) +} +GetHashLengthRequest::GetHashLengthRequest(const GetHashLengthRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&func_, &from.func_, + static_cast(reinterpret_cast(&datalen_) - + reinterpret_cast(&func_)) + sizeof(datalen_)); + // @@protoc_insertion_point(copy_constructor:crypto.GetHashLengthRequest) +} + +void GetHashLengthRequest::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&func_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&datalen_) - + reinterpret_cast(&func_)) + sizeof(datalen_)); +} + +GetHashLengthRequest::~GetHashLengthRequest() { + // @@protoc_insertion_point(destructor:crypto.GetHashLengthRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void GetHashLengthRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void GetHashLengthRequest::ArenaDtor(void* object) { + GetHashLengthRequest* _this = reinterpret_cast< GetHashLengthRequest* >(object); + (void)_this; +} +void GetHashLengthRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GetHashLengthRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GetHashLengthRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.GetHashLengthRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&func_, 0, static_cast( + reinterpret_cast(&datalen_) - + reinterpret_cast(&func_)) + sizeof(datalen_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetHashLengthRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .crypto.SHAAlgorithm func = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_func(static_cast<::crypto::SHAAlgorithm>(val)); + } else + goto handle_unusual; + continue; + // int32 dataLen = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + datalen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* GetHashLengthRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.GetHashLengthRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .crypto.SHAAlgorithm func = 1; + if (this->_internal_func() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_func(), target); + } + + // int32 dataLen = 2; + if (this->_internal_datalen() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_datalen(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.GetHashLengthRequest) + return target; +} + +size_t GetHashLengthRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.GetHashLengthRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .crypto.SHAAlgorithm func = 1; + if (this->_internal_func() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_func()); + } + + // int32 dataLen = 2; + if (this->_internal_datalen() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_datalen()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetHashLengthRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GetHashLengthRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetHashLengthRequest::GetClassData() const { return &_class_data_; } + +void GetHashLengthRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GetHashLengthRequest::MergeFrom(const GetHashLengthRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.GetHashLengthRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_func() != 0) { + _internal_set_func(from._internal_func()); + } + if (from._internal_datalen() != 0) { + _internal_set_datalen(from._internal_datalen()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetHashLengthRequest::CopyFrom(const GetHashLengthRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.GetHashLengthRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetHashLengthRequest::IsInitialized() const { + return true; +} + +void GetHashLengthRequest::InternalSwap(GetHashLengthRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(GetHashLengthRequest, datalen_) + + sizeof(GetHashLengthRequest::datalen_) + - PROTOBUF_FIELD_OFFSET(GetHashLengthRequest, func_)>( + reinterpret_cast(&func_), + reinterpret_cast(&other->func_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetHashLengthRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[3]); +} + +// =================================================================== + +class GetAESLengthRequest::_Internal { + public: +}; + +GetAESLengthRequest::GetAESLengthRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.GetAESLengthRequest) +} +GetAESLengthRequest::GetAESLengthRequest(const GetAESLengthRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&datalen_, &from.datalen_, + static_cast(reinterpret_cast(&chainingmode_) - + reinterpret_cast(&datalen_)) + sizeof(chainingmode_)); + // @@protoc_insertion_point(copy_constructor:crypto.GetAESLengthRequest) +} + +void GetAESLengthRequest::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&datalen_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&chainingmode_) - + reinterpret_cast(&datalen_)) + sizeof(chainingmode_)); +} + +GetAESLengthRequest::~GetAESLengthRequest() { + // @@protoc_insertion_point(destructor:crypto.GetAESLengthRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void GetAESLengthRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void GetAESLengthRequest::ArenaDtor(void* object) { + GetAESLengthRequest* _this = reinterpret_cast< GetAESLengthRequest* >(object); + (void)_this; +} +void GetAESLengthRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GetAESLengthRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GetAESLengthRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.GetAESLengthRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&datalen_, 0, static_cast( + reinterpret_cast(&chainingmode_) - + reinterpret_cast(&datalen_)) + sizeof(chainingmode_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetAESLengthRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 dataLen = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + datalen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool isFirst = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + isfirst_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .crypto.AESChainingMode chainingMode = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_chainingmode(static_cast<::crypto::AESChainingMode>(val)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* GetAESLengthRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.GetAESLengthRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 dataLen = 1; + if (this->_internal_datalen() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_datalen(), target); + } + + // bool isFirst = 2; + if (this->_internal_isfirst() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_isfirst(), target); + } + + // .crypto.AESChainingMode chainingMode = 3; + if (this->_internal_chainingmode() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 3, this->_internal_chainingmode(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.GetAESLengthRequest) + return target; +} + +size_t GetAESLengthRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.GetAESLengthRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // int32 dataLen = 1; + if (this->_internal_datalen() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_datalen()); + } + + // bool isFirst = 2; + if (this->_internal_isfirst() != 0) { + total_size += 1 + 1; + } + + // .crypto.AESChainingMode chainingMode = 3; + if (this->_internal_chainingmode() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_chainingmode()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetAESLengthRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GetAESLengthRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetAESLengthRequest::GetClassData() const { return &_class_data_; } + +void GetAESLengthRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GetAESLengthRequest::MergeFrom(const GetAESLengthRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.GetAESLengthRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_datalen() != 0) { + _internal_set_datalen(from._internal_datalen()); + } + if (from._internal_isfirst() != 0) { + _internal_set_isfirst(from._internal_isfirst()); + } + if (from._internal_chainingmode() != 0) { + _internal_set_chainingmode(from._internal_chainingmode()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetAESLengthRequest::CopyFrom(const GetAESLengthRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.GetAESLengthRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetAESLengthRequest::IsInitialized() const { + return true; +} + +void GetAESLengthRequest::InternalSwap(GetAESLengthRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(GetAESLengthRequest, chainingmode_) + + sizeof(GetAESLengthRequest::chainingmode_) + - PROTOBUF_FIELD_OFFSET(GetAESLengthRequest, datalen_)>( + reinterpret_cast(&datalen_), + reinterpret_cast(&other->datalen_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetAESLengthRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[4]); +} + +// =================================================================== + +class AsymetricDecryptResponse::_Internal { + public: +}; + +AsymetricDecryptResponse::AsymetricDecryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.AsymetricDecryptResponse) +} +AsymetricDecryptResponse::AsymetricDecryptResponse(const AsymetricDecryptResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + decrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_decrypted_data().empty()) { + decrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_decrypted_data(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:crypto.AsymetricDecryptResponse) +} + +void AsymetricDecryptResponse::SharedCtor() { +decrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +AsymetricDecryptResponse::~AsymetricDecryptResponse() { + // @@protoc_insertion_point(destructor:crypto.AsymetricDecryptResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void AsymetricDecryptResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + decrypted_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AsymetricDecryptResponse::ArenaDtor(void* object) { + AsymetricDecryptResponse* _this = reinterpret_cast< AsymetricDecryptResponse* >(object); + (void)_this; +} +void AsymetricDecryptResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AsymetricDecryptResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AsymetricDecryptResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.AsymetricDecryptResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + decrypted_data_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AsymetricDecryptResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // bytes decrypted_data = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_decrypted_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AsymetricDecryptResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.AsymetricDecryptResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes decrypted_data = 1; + if (!this->_internal_decrypted_data().empty()) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_decrypted_data(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.AsymetricDecryptResponse) + return target; +} + +size_t AsymetricDecryptResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.AsymetricDecryptResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes decrypted_data = 1; + if (!this->_internal_decrypted_data().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_decrypted_data()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AsymetricDecryptResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + AsymetricDecryptResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AsymetricDecryptResponse::GetClassData() const { return &_class_data_; } + +void AsymetricDecryptResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void AsymetricDecryptResponse::MergeFrom(const AsymetricDecryptResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.AsymetricDecryptResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_decrypted_data().empty()) { + _internal_set_decrypted_data(from._internal_decrypted_data()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void AsymetricDecryptResponse::CopyFrom(const AsymetricDecryptResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.AsymetricDecryptResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AsymetricDecryptResponse::IsInitialized() const { + return true; +} + +void AsymetricDecryptResponse::InternalSwap(AsymetricDecryptResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &decrypted_data_, lhs_arena, + &other->decrypted_data_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AsymetricDecryptResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[5]); +} + +// =================================================================== + +class GetLengthRequest::_Internal { + public: +}; + +GetLengthRequest::GetLengthRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.GetLengthRequest) +} +GetLengthRequest::GetLengthRequest(const GetLengthRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + in_len_ = from.in_len_; + // @@protoc_insertion_point(copy_constructor:crypto.GetLengthRequest) +} + +void GetLengthRequest::SharedCtor() { +in_len_ = 0; +} + +GetLengthRequest::~GetLengthRequest() { + // @@protoc_insertion_point(destructor:crypto.GetLengthRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void GetLengthRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void GetLengthRequest::ArenaDtor(void* object) { + GetLengthRequest* _this = reinterpret_cast< GetLengthRequest* >(object); + (void)_this; +} +void GetLengthRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GetLengthRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GetLengthRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.GetLengthRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + in_len_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetLengthRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 in_len = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + in_len_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* GetLengthRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.GetLengthRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 in_len = 1; + if (this->_internal_in_len() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_in_len(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.GetLengthRequest) + return target; +} + +size_t GetLengthRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.GetLengthRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // int32 in_len = 1; + if (this->_internal_in_len() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_in_len()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetLengthRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GetLengthRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetLengthRequest::GetClassData() const { return &_class_data_; } + +void GetLengthRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GetLengthRequest::MergeFrom(const GetLengthRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.GetLengthRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_in_len() != 0) { + _internal_set_in_len(from._internal_in_len()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetLengthRequest::CopyFrom(const GetLengthRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.GetLengthRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetLengthRequest::IsInitialized() const { + return true; +} + +void GetLengthRequest::InternalSwap(GetLengthRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(in_len_, other->in_len_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetLengthRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[6]); +} + +// =================================================================== + +class GetLengthResponse::_Internal { + public: +}; + +GetLengthResponse::GetLengthResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.GetLengthResponse) +} +GetLengthResponse::GetLengthResponse(const GetLengthResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + len_ = from.len_; + // @@protoc_insertion_point(copy_constructor:crypto.GetLengthResponse) +} + +void GetLengthResponse::SharedCtor() { +len_ = 0; +} + +GetLengthResponse::~GetLengthResponse() { + // @@protoc_insertion_point(destructor:crypto.GetLengthResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void GetLengthResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void GetLengthResponse::ArenaDtor(void* object) { + GetLengthResponse* _this = reinterpret_cast< GetLengthResponse* >(object); + (void)_this; +} +void GetLengthResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GetLengthResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GetLengthResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.GetLengthResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + len_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetLengthResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 len = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + len_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* GetLengthResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.GetLengthResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 len = 1; + if (this->_internal_len() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_len(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.GetLengthResponse) + return target; +} + +size_t GetLengthResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.GetLengthResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // int32 len = 1; + if (this->_internal_len() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_len()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetLengthResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GetLengthResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetLengthResponse::GetClassData() const { return &_class_data_; } + +void GetLengthResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GetLengthResponse::MergeFrom(const GetLengthResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.GetLengthResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_len() != 0) { + _internal_set_len(from._internal_len()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetLengthResponse::CopyFrom(const GetLengthResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.GetLengthResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetLengthResponse::IsInitialized() const { + return true; +} + +void GetLengthResponse::InternalSwap(GetLengthResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(len_, other->len_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetLengthResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[7]); +} + +// =================================================================== + +class GetWholeLength::_Internal { + public: +}; + +GetWholeLength::GetWholeLength(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.GetWholeLength) +} +GetWholeLength::GetWholeLength(const GetWholeLength& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&senderid_, &from.senderid_, + static_cast(reinterpret_cast(&inlen_) - + reinterpret_cast(&senderid_)) + sizeof(inlen_)); + // @@protoc_insertion_point(copy_constructor:crypto.GetWholeLength) +} + +void GetWholeLength::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&senderid_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&inlen_) - + reinterpret_cast(&senderid_)) + sizeof(inlen_)); +} + +GetWholeLength::~GetWholeLength() { + // @@protoc_insertion_point(destructor:crypto.GetWholeLength) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void GetWholeLength::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void GetWholeLength::ArenaDtor(void* object) { + GetWholeLength* _this = reinterpret_cast< GetWholeLength* >(object); + (void)_this; +} +void GetWholeLength::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GetWholeLength::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GetWholeLength::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.GetWholeLength) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&senderid_, 0, static_cast( + reinterpret_cast(&inlen_) - + reinterpret_cast(&senderid_)) + sizeof(inlen_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetWholeLength::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 senderId = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + senderid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 inLen = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + inlen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* GetWholeLength::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.GetWholeLength) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_senderid(), target); + } + + // int32 inLen = 2; + if (this->_internal_inlen() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_inlen(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.GetWholeLength) + return target; +} + +size_t GetWholeLength::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.GetWholeLength) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); + } + + // int32 inLen = 2; + if (this->_internal_inlen() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_inlen()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetWholeLength::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GetWholeLength::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetWholeLength::GetClassData() const { return &_class_data_; } + +void GetWholeLength::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GetWholeLength::MergeFrom(const GetWholeLength& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.GetWholeLength) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_senderid() != 0) { + _internal_set_senderid(from._internal_senderid()); + } + if (from._internal_inlen() != 0) { + _internal_set_inlen(from._internal_inlen()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetWholeLength::CopyFrom(const GetWholeLength& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.GetWholeLength) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetWholeLength::IsInitialized() const { + return true; +} + +void GetWholeLength::InternalSwap(GetWholeLength* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(GetWholeLength, inlen_) + + sizeof(GetWholeLength::inlen_) + - PROTOBUF_FIELD_OFFSET(GetWholeLength, senderid_)>( + reinterpret_cast(&senderid_), + reinterpret_cast(&other->senderid_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetWholeLength::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[8]); +} + +// =================================================================== + +class GenerateAESKeyRequest::_Internal { + public: +}; + +GenerateAESKeyRequest::GenerateAESKeyRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + permissions_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.GenerateAESKeyRequest) +} +GenerateAESKeyRequest::GenerateAESKeyRequest(const GenerateAESKeyRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + permissions_(from.permissions_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&user_id_, &from.user_id_, + static_cast(reinterpret_cast(&destuserid_) - + reinterpret_cast(&user_id_)) + sizeof(destuserid_)); + // @@protoc_insertion_point(copy_constructor:crypto.GenerateAESKeyRequest) +} + +void GenerateAESKeyRequest::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&user_id_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&destuserid_) - + reinterpret_cast(&user_id_)) + sizeof(destuserid_)); +} + +GenerateAESKeyRequest::~GenerateAESKeyRequest() { + // @@protoc_insertion_point(destructor:crypto.GenerateAESKeyRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void GenerateAESKeyRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void GenerateAESKeyRequest::ArenaDtor(void* object) { + GenerateAESKeyRequest* _this = reinterpret_cast< GenerateAESKeyRequest* >(object); + (void)_this; +} +void GenerateAESKeyRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GenerateAESKeyRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GenerateAESKeyRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.GenerateAESKeyRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + permissions_.Clear(); + ::memset(&user_id_, 0, static_cast( + reinterpret_cast(&destuserid_) - + reinterpret_cast(&user_id_)) + sizeof(destuserid_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GenerateAESKeyRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 user_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + user_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .crypto.KeyPermission permissions = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_permissions(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_add_permissions(static_cast<::crypto::KeyPermission>(val)); + } else + goto handle_unusual; + continue; + // .crypto.AESKeyLength keyLength = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_keylength(static_cast<::crypto::AESKeyLength>(val)); + } else + goto handle_unusual; + continue; + // int32 destUserId = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + destuserid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* GenerateAESKeyRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.GenerateAESKeyRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 user_id = 1; + if (this->_internal_user_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_user_id(), target); + } + + // repeated .crypto.KeyPermission permissions = 2; + { + int byte_size = _permissions_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteEnumPacked( + 2, permissions_, byte_size, target); + } + } + + // .crypto.AESKeyLength keyLength = 3; + if (this->_internal_keylength() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 3, this->_internal_keylength(), target); + } + + // int32 destUserId = 4; + if (this->_internal_destuserid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_destuserid(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.GenerateAESKeyRequest) + return target; +} + +size_t GenerateAESKeyRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.GenerateAESKeyRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .crypto.KeyPermission permissions = 2; + { + size_t data_size = 0; + unsigned int count = static_cast(this->_internal_permissions_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize( + this->_internal_permissions(static_cast(i))); + } + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _permissions_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // int32 user_id = 1; + if (this->_internal_user_id() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_user_id()); + } + + // .crypto.AESKeyLength keyLength = 3; + if (this->_internal_keylength() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_keylength()); + } + + // int32 destUserId = 4; + if (this->_internal_destuserid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_destuserid()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GenerateAESKeyRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GenerateAESKeyRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GenerateAESKeyRequest::GetClassData() const { return &_class_data_; } + +void GenerateAESKeyRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GenerateAESKeyRequest::MergeFrom(const GenerateAESKeyRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.GenerateAESKeyRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + permissions_.MergeFrom(from.permissions_); + if (from._internal_user_id() != 0) { + _internal_set_user_id(from._internal_user_id()); + } + if (from._internal_keylength() != 0) { + _internal_set_keylength(from._internal_keylength()); + } + if (from._internal_destuserid() != 0) { + _internal_set_destuserid(from._internal_destuserid()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GenerateAESKeyRequest::CopyFrom(const GenerateAESKeyRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.GenerateAESKeyRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GenerateAESKeyRequest::IsInitialized() const { + return true; +} + +void GenerateAESKeyRequest::InternalSwap(GenerateAESKeyRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + permissions_.InternalSwap(&other->permissions_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(GenerateAESKeyRequest, destuserid_) + + sizeof(GenerateAESKeyRequest::destuserid_) + - PROTOBUF_FIELD_OFFSET(GenerateAESKeyRequest, user_id_)>( + reinterpret_cast(&user_id_), + reinterpret_cast(&other->user_id_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GenerateAESKeyRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[9]); +} + +// =================================================================== + +class GenerateAESKeyResponse::_Internal { + public: +}; + +GenerateAESKeyResponse::GenerateAESKeyResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.GenerateAESKeyResponse) +} +GenerateAESKeyResponse::GenerateAESKeyResponse(const GenerateAESKeyResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + aes_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_aes_key().empty()) { + aes_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_aes_key(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:crypto.GenerateAESKeyResponse) +} + +void GenerateAESKeyResponse::SharedCtor() { +aes_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +GenerateAESKeyResponse::~GenerateAESKeyResponse() { + // @@protoc_insertion_point(destructor:crypto.GenerateAESKeyResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void GenerateAESKeyResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + aes_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void GenerateAESKeyResponse::ArenaDtor(void* object) { + GenerateAESKeyResponse* _this = reinterpret_cast< GenerateAESKeyResponse* >(object); + (void)_this; +} +void GenerateAESKeyResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GenerateAESKeyResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GenerateAESKeyResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.GenerateAESKeyResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + aes_key_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GenerateAESKeyResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string aes_key = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_aes_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GenerateAESKeyResponse.aes_key")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* GenerateAESKeyResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.GenerateAESKeyResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string aes_key = 1; + if (!this->_internal_aes_key().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_aes_key().data(), static_cast(this->_internal_aes_key().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.GenerateAESKeyResponse.aes_key"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_aes_key(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.GenerateAESKeyResponse) + return target; +} + +size_t GenerateAESKeyResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.GenerateAESKeyResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string aes_key = 1; + if (!this->_internal_aes_key().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_aes_key()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GenerateAESKeyResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GenerateAESKeyResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GenerateAESKeyResponse::GetClassData() const { return &_class_data_; } + +void GenerateAESKeyResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GenerateAESKeyResponse::MergeFrom(const GenerateAESKeyResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.GenerateAESKeyResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_aes_key().empty()) { + _internal_set_aes_key(from._internal_aes_key()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GenerateAESKeyResponse::CopyFrom(const GenerateAESKeyResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.GenerateAESKeyResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GenerateAESKeyResponse::IsInitialized() const { + return true; +} + +void GenerateAESKeyResponse::InternalSwap(GenerateAESKeyResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &aes_key_, lhs_arena, + &other->aes_key_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GenerateAESKeyResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[10]); +} + +// =================================================================== + +class GenerateKeyPairRequest::_Internal { + public: +}; + +GenerateKeyPairRequest::GenerateKeyPairRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + permissions_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.GenerateKeyPairRequest) +} +GenerateKeyPairRequest::GenerateKeyPairRequest(const GenerateKeyPairRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + permissions_(from.permissions_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + user_id_ = from.user_id_; + // @@protoc_insertion_point(copy_constructor:crypto.GenerateKeyPairRequest) +} + +void GenerateKeyPairRequest::SharedCtor() { +user_id_ = 0; +} + +GenerateKeyPairRequest::~GenerateKeyPairRequest() { + // @@protoc_insertion_point(destructor:crypto.GenerateKeyPairRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void GenerateKeyPairRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void GenerateKeyPairRequest::ArenaDtor(void* object) { + GenerateKeyPairRequest* _this = reinterpret_cast< GenerateKeyPairRequest* >(object); + (void)_this; +} +void GenerateKeyPairRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GenerateKeyPairRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GenerateKeyPairRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.GenerateKeyPairRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + permissions_.Clear(); + user_id_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GenerateKeyPairRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 user_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + user_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .crypto.KeyPermission permissions = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_permissions(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_add_permissions(static_cast<::crypto::KeyPermission>(val)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* GenerateKeyPairRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.GenerateKeyPairRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 user_id = 1; + if (this->_internal_user_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_user_id(), target); + } + + // repeated .crypto.KeyPermission permissions = 2; + { + int byte_size = _permissions_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteEnumPacked( + 2, permissions_, byte_size, target); + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.GenerateKeyPairRequest) + return target; +} + +size_t GenerateKeyPairRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.GenerateKeyPairRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .crypto.KeyPermission permissions = 2; + { + size_t data_size = 0; + unsigned int count = static_cast(this->_internal_permissions_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize( + this->_internal_permissions(static_cast(i))); + } + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _permissions_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // int32 user_id = 1; + if (this->_internal_user_id() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_user_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GenerateKeyPairRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GenerateKeyPairRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GenerateKeyPairRequest::GetClassData() const { return &_class_data_; } + +void GenerateKeyPairRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GenerateKeyPairRequest::MergeFrom(const GenerateKeyPairRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.GenerateKeyPairRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + permissions_.MergeFrom(from.permissions_); + if (from._internal_user_id() != 0) { + _internal_set_user_id(from._internal_user_id()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GenerateKeyPairRequest::CopyFrom(const GenerateKeyPairRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.GenerateKeyPairRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GenerateKeyPairRequest::IsInitialized() const { + return true; +} + +void GenerateKeyPairRequest::InternalSwap(GenerateKeyPairRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + permissions_.InternalSwap(&other->permissions_); + swap(user_id_, other->user_id_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GenerateKeyPairRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[11]); +} + +// =================================================================== + +class GenerateKeyPairResponse::_Internal { + public: +}; + +GenerateKeyPairResponse::GenerateKeyPairResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.GenerateKeyPairResponse) +} +GenerateKeyPairResponse::GenerateKeyPairResponse(const GenerateKeyPairResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + public_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_public_key().empty()) { + public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_public_key(), + GetArenaForAllocation()); + } + private_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_private_key().empty()) { + private_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_private_key(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:crypto.GenerateKeyPairResponse) +} + +void GenerateKeyPairResponse::SharedCtor() { +public_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +private_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +GenerateKeyPairResponse::~GenerateKeyPairResponse() { + // @@protoc_insertion_point(destructor:crypto.GenerateKeyPairResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void GenerateKeyPairResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + public_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + private_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void GenerateKeyPairResponse::ArenaDtor(void* object) { + GenerateKeyPairResponse* _this = reinterpret_cast< GenerateKeyPairResponse* >(object); + (void)_this; +} +void GenerateKeyPairResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GenerateKeyPairResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GenerateKeyPairResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.GenerateKeyPairResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + public_key_.ClearToEmpty(); + private_key_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GenerateKeyPairResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string public_key = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_public_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GenerateKeyPairResponse.public_key")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string private_key = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_private_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GenerateKeyPairResponse.private_key")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* GenerateKeyPairResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.GenerateKeyPairResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string public_key = 1; + if (!this->_internal_public_key().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_public_key().data(), static_cast(this->_internal_public_key().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.GenerateKeyPairResponse.public_key"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_public_key(), target); + } + + // string private_key = 2; + if (!this->_internal_private_key().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_private_key().data(), static_cast(this->_internal_private_key().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.GenerateKeyPairResponse.private_key"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_private_key(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.GenerateKeyPairResponse) + return target; +} + +size_t GenerateKeyPairResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.GenerateKeyPairResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string public_key = 1; + if (!this->_internal_public_key().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_public_key()); + } + + // string private_key = 2; + if (!this->_internal_private_key().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_private_key()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GenerateKeyPairResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GenerateKeyPairResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GenerateKeyPairResponse::GetClassData() const { return &_class_data_; } + +void GenerateKeyPairResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GenerateKeyPairResponse::MergeFrom(const GenerateKeyPairResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.GenerateKeyPairResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_public_key().empty()) { + _internal_set_public_key(from._internal_public_key()); + } + if (!from._internal_private_key().empty()) { + _internal_set_private_key(from._internal_private_key()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GenerateKeyPairResponse::CopyFrom(const GenerateKeyPairResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.GenerateKeyPairResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GenerateKeyPairResponse::IsInitialized() const { + return true; +} + +void GenerateKeyPairResponse::InternalSwap(GenerateKeyPairResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &public_key_, lhs_arena, + &other->public_key_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &private_key_, lhs_arena, + &other->private_key_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GenerateKeyPairResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[12]); +} + +// =================================================================== + +class SignRequest::_Internal { + public: +}; + +SignRequest::SignRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.SignRequest) +} +SignRequest::SignRequest(const SignRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_data().empty()) { + data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data(), + GetArenaForAllocation()); + } + key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_key_id().empty()) { + key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_key_id(), + GetArenaForAllocation()); + } + ::memcpy(&sender_id_, &from.sender_id_, + static_cast(reinterpret_cast(&counter_) - + reinterpret_cast(&sender_id_)) + sizeof(counter_)); + // @@protoc_insertion_point(copy_constructor:crypto.SignRequest) +} + +void SignRequest::SharedCtor() { +data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&sender_id_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&counter_) - + reinterpret_cast(&sender_id_)) + sizeof(counter_)); +} + +SignRequest::~SignRequest() { + // @@protoc_insertion_point(destructor:crypto.SignRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void SignRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + key_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void SignRequest::ArenaDtor(void* object) { + SignRequest* _this = reinterpret_cast< SignRequest* >(object); + (void)_this; +} +void SignRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void SignRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void SignRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.SignRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + data_.ClearToEmpty(); + key_id_.ClearToEmpty(); + ::memset(&sender_id_, 0, static_cast( + reinterpret_cast(&counter_) - + reinterpret_cast(&sender_id_)) + sizeof(counter_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* SignRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 sender_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + sender_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes data = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .crypto.SHAAlgorithm hash_func = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_hash_func(static_cast<::crypto::SHAAlgorithm>(val)); + } else + goto handle_unusual; + continue; + // int64 counter = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + counter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string key_id = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + auto str = _internal_mutable_key_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.SignRequest.key_id")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* SignRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.SignRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 sender_id = 1; + if (this->_internal_sender_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_sender_id(), target); + } + + // bytes data = 2; + if (!this->_internal_data().empty()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_data(), target); + } + + // .crypto.SHAAlgorithm hash_func = 3; + if (this->_internal_hash_func() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 3, this->_internal_hash_func(), target); + } + + // int64 counter = 5; + if (this->_internal_counter() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->_internal_counter(), target); + } + + // string key_id = 6; + if (!this->_internal_key_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_key_id().data(), static_cast(this->_internal_key_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.SignRequest.key_id"); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_key_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.SignRequest) + return target; +} + +size_t SignRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.SignRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes data = 2; + if (!this->_internal_data().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_data()); + } + + // string key_id = 6; + if (!this->_internal_key_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_key_id()); + } + + // int32 sender_id = 1; + if (this->_internal_sender_id() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sender_id()); + } + + // .crypto.SHAAlgorithm hash_func = 3; + if (this->_internal_hash_func() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_hash_func()); + } + + // int64 counter = 5; + if (this->_internal_counter() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_counter()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SignRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + SignRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SignRequest::GetClassData() const { return &_class_data_; } + +void SignRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void SignRequest::MergeFrom(const SignRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.SignRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_data().empty()) { + _internal_set_data(from._internal_data()); + } + if (!from._internal_key_id().empty()) { + _internal_set_key_id(from._internal_key_id()); + } + if (from._internal_sender_id() != 0) { + _internal_set_sender_id(from._internal_sender_id()); + } + if (from._internal_hash_func() != 0) { + _internal_set_hash_func(from._internal_hash_func()); + } + if (from._internal_counter() != 0) { + _internal_set_counter(from._internal_counter()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void SignRequest::CopyFrom(const SignRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.SignRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SignRequest::IsInitialized() const { + return true; +} + +void SignRequest::InternalSwap(SignRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &data_, lhs_arena, + &other->data_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &key_id_, lhs_arena, + &other->key_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(SignRequest, counter_) + + sizeof(SignRequest::counter_) + - PROTOBUF_FIELD_OFFSET(SignRequest, sender_id_)>( + reinterpret_cast(&sender_id_), + reinterpret_cast(&other->sender_id_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata SignRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[13]); +} + +// =================================================================== + +class SignResponse::_Internal { + public: +}; + +SignResponse::SignResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.SignResponse) +} +SignResponse::SignResponse(const SignResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_signature().empty()) { + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_signature(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:crypto.SignResponse) +} + +void SignResponse::SharedCtor() { +signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +SignResponse::~SignResponse() { + // @@protoc_insertion_point(destructor:crypto.SignResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void SignResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + signature_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void SignResponse::ArenaDtor(void* object) { + SignResponse* _this = reinterpret_cast< SignResponse* >(object); + (void)_this; +} +void SignResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void SignResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void SignResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.SignResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + signature_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* SignResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // bytes signature = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_signature(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* SignResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.SignResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes signature = 1; + if (!this->_internal_signature().empty()) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_signature(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.SignResponse) + return target; +} + +size_t SignResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.SignResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes signature = 1; + if (!this->_internal_signature().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_signature()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SignResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + SignResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SignResponse::GetClassData() const { return &_class_data_; } + +void SignResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void SignResponse::MergeFrom(const SignResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.SignResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_signature().empty()) { + _internal_set_signature(from._internal_signature()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void SignResponse::CopyFrom(const SignResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.SignResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SignResponse::IsInitialized() const { + return true; +} + +void SignResponse::InternalSwap(SignResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &signature_, lhs_arena, + &other->signature_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata SignResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[14]); +} + +// =================================================================== + +class VerifyRequest::_Internal { + public: +}; + +VerifyRequest::VerifyRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.VerifyRequest) +} +VerifyRequest::VerifyRequest(const VerifyRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_data().empty()) { + data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data(), + GetArenaForAllocation()); + } + signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_signature().empty()) { + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_signature(), + GetArenaForAllocation()); + } + key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_key_id().empty()) { + key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_key_id(), + GetArenaForAllocation()); + } + ::memcpy(&sender_id_, &from.sender_id_, + static_cast(reinterpret_cast(&counter_) - + reinterpret_cast(&sender_id_)) + sizeof(counter_)); + // @@protoc_insertion_point(copy_constructor:crypto.VerifyRequest) +} + +void VerifyRequest::SharedCtor() { +data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&sender_id_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&counter_) - + reinterpret_cast(&sender_id_)) + sizeof(counter_)); +} + +VerifyRequest::~VerifyRequest() { + // @@protoc_insertion_point(destructor:crypto.VerifyRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void VerifyRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + signature_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + key_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void VerifyRequest::ArenaDtor(void* object) { + VerifyRequest* _this = reinterpret_cast< VerifyRequest* >(object); + (void)_this; +} +void VerifyRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void VerifyRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void VerifyRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.VerifyRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + data_.ClearToEmpty(); + signature_.ClearToEmpty(); + key_id_.ClearToEmpty(); + ::memset(&sender_id_, 0, static_cast( + reinterpret_cast(&counter_) - + reinterpret_cast(&sender_id_)) + sizeof(counter_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* VerifyRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 sender_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + sender_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 receiver_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + receiver_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes data = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes signature = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + auto str = _internal_mutable_signature(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .crypto.SHAAlgorithm hash_func = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_hash_func(static_cast<::crypto::SHAAlgorithm>(val)); + } else + goto handle_unusual; + continue; + // string key_id = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + auto str = _internal_mutable_key_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.VerifyRequest.key_id")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 counter = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + counter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* VerifyRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.VerifyRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 sender_id = 1; + if (this->_internal_sender_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_sender_id(), target); + } + + // int32 receiver_id = 2; + if (this->_internal_receiver_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiver_id(), target); + } + + // bytes data = 3; + if (!this->_internal_data().empty()) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_data(), target); + } + + // bytes signature = 4; + if (!this->_internal_signature().empty()) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_signature(), target); + } + + // .crypto.SHAAlgorithm hash_func = 5; + if (this->_internal_hash_func() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 5, this->_internal_hash_func(), target); + } + + // string key_id = 6; + if (!this->_internal_key_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_key_id().data(), static_cast(this->_internal_key_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.VerifyRequest.key_id"); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_key_id(), target); + } + + // int32 counter = 7; + if (this->_internal_counter() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_counter(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.VerifyRequest) + return target; +} + +size_t VerifyRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.VerifyRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes data = 3; + if (!this->_internal_data().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_data()); + } + + // bytes signature = 4; + if (!this->_internal_signature().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_signature()); + } + + // string key_id = 6; + if (!this->_internal_key_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_key_id()); + } + + // int32 sender_id = 1; + if (this->_internal_sender_id() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sender_id()); + } + + // int32 receiver_id = 2; + if (this->_internal_receiver_id() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiver_id()); + } + + // .crypto.SHAAlgorithm hash_func = 5; + if (this->_internal_hash_func() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_hash_func()); + } + + // int32 counter = 7; + if (this->_internal_counter() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_counter()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData VerifyRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + VerifyRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*VerifyRequest::GetClassData() const { return &_class_data_; } + +void VerifyRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void VerifyRequest::MergeFrom(const VerifyRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.VerifyRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_data().empty()) { + _internal_set_data(from._internal_data()); + } + if (!from._internal_signature().empty()) { + _internal_set_signature(from._internal_signature()); + } + if (!from._internal_key_id().empty()) { + _internal_set_key_id(from._internal_key_id()); + } + if (from._internal_sender_id() != 0) { + _internal_set_sender_id(from._internal_sender_id()); + } + if (from._internal_receiver_id() != 0) { + _internal_set_receiver_id(from._internal_receiver_id()); + } + if (from._internal_hash_func() != 0) { + _internal_set_hash_func(from._internal_hash_func()); + } + if (from._internal_counter() != 0) { + _internal_set_counter(from._internal_counter()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void VerifyRequest::CopyFrom(const VerifyRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.VerifyRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool VerifyRequest::IsInitialized() const { + return true; +} + +void VerifyRequest::InternalSwap(VerifyRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &data_, lhs_arena, + &other->data_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &signature_, lhs_arena, + &other->signature_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &key_id_, lhs_arena, + &other->key_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(VerifyRequest, counter_) + + sizeof(VerifyRequest::counter_) + - PROTOBUF_FIELD_OFFSET(VerifyRequest, sender_id_)>( + reinterpret_cast(&sender_id_), + reinterpret_cast(&other->sender_id_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata VerifyRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[15]); +} + +// =================================================================== + +class VerifyResponse::_Internal { + public: +}; + +VerifyResponse::VerifyResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.VerifyResponse) +} +VerifyResponse::VerifyResponse(const VerifyResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + out_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_out().empty()) { + out_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_out(), + GetArenaForAllocation()); + } + valid_ = from.valid_; + // @@protoc_insertion_point(copy_constructor:crypto.VerifyResponse) +} + +void VerifyResponse::SharedCtor() { +out_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +valid_ = false; +} + +VerifyResponse::~VerifyResponse() { + // @@protoc_insertion_point(destructor:crypto.VerifyResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void VerifyResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + out_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void VerifyResponse::ArenaDtor(void* object) { + VerifyResponse* _this = reinterpret_cast< VerifyResponse* >(object); + (void)_this; +} +void VerifyResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void VerifyResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void VerifyResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.VerifyResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + out_.ClearToEmpty(); + valid_ = false; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* VerifyResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // bool valid = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + valid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes out = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_out(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* VerifyResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.VerifyResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bool valid = 1; + if (this->_internal_valid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_valid(), target); + } + + // bytes out = 2; + if (!this->_internal_out().empty()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_out(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.VerifyResponse) + return target; +} + +size_t VerifyResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.VerifyResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes out = 2; + if (!this->_internal_out().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_out()); + } + + // bool valid = 1; + if (this->_internal_valid() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData VerifyResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + VerifyResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*VerifyResponse::GetClassData() const { return &_class_data_; } + +void VerifyResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void VerifyResponse::MergeFrom(const VerifyResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.VerifyResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_out().empty()) { + _internal_set_out(from._internal_out()); + } + if (from._internal_valid() != 0) { + _internal_set_valid(from._internal_valid()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void VerifyResponse::CopyFrom(const VerifyResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.VerifyResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool VerifyResponse::IsInitialized() const { + return true; +} + +void VerifyResponse::InternalSwap(VerifyResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &out_, lhs_arena, + &other->out_, rhs_arena + ); + swap(valid_, other->valid_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata VerifyResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[16]); +} + +// =================================================================== + +class KeyRequest::_Internal { + public: +}; + +KeyRequest::KeyRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.KeyRequest) +} +KeyRequest::KeyRequest(const KeyRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + user_id_ = from.user_id_; + // @@protoc_insertion_point(copy_constructor:crypto.KeyRequest) +} + +void KeyRequest::SharedCtor() { +user_id_ = 0; +} + +KeyRequest::~KeyRequest() { + // @@protoc_insertion_point(destructor:crypto.KeyRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void KeyRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void KeyRequest::ArenaDtor(void* object) { + KeyRequest* _this = reinterpret_cast< KeyRequest* >(object); + (void)_this; +} +void KeyRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void KeyRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void KeyRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.KeyRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + user_id_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* KeyRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 user_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + user_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* KeyRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.KeyRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 user_id = 1; + if (this->_internal_user_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_user_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.KeyRequest) + return target; +} + +size_t KeyRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.KeyRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // int32 user_id = 1; + if (this->_internal_user_id() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_user_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData KeyRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + KeyRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*KeyRequest::GetClassData() const { return &_class_data_; } + +void KeyRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void KeyRequest::MergeFrom(const KeyRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.KeyRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_user_id() != 0) { + _internal_set_user_id(from._internal_user_id()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void KeyRequest::CopyFrom(const KeyRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.KeyRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool KeyRequest::IsInitialized() const { + return true; +} + +void KeyRequest::InternalSwap(KeyRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(user_id_, other->user_id_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata KeyRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[17]); +} + +// =================================================================== + +class KeyResponse::_Internal { + public: +}; + +KeyResponse::KeyResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.KeyResponse) +} +KeyResponse::KeyResponse(const KeyResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_key().empty()) { + key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_key(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:crypto.KeyResponse) +} + +void KeyResponse::SharedCtor() { +key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +KeyResponse::~KeyResponse() { + // @@protoc_insertion_point(destructor:crypto.KeyResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void KeyResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void KeyResponse::ArenaDtor(void* object) { + KeyResponse* _this = reinterpret_cast< KeyResponse* >(object); + (void)_this; +} +void KeyResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void KeyResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void KeyResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.KeyResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + key_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* KeyResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string key = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.KeyResponse.key")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* KeyResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.KeyResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string key = 1; + if (!this->_internal_key().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_key().data(), static_cast(this->_internal_key().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.KeyResponse.key"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_key(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.KeyResponse) + return target; +} + +size_t KeyResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.KeyResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string key = 1; + if (!this->_internal_key().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_key()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData KeyResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + KeyResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*KeyResponse::GetClassData() const { return &_class_data_; } + +void KeyResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void KeyResponse::MergeFrom(const KeyResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.KeyResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_key().empty()) { + _internal_set_key(from._internal_key()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void KeyResponse::CopyFrom(const KeyResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.KeyResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool KeyResponse::IsInitialized() const { + return true; +} + +void KeyResponse::InternalSwap(KeyResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &key_, lhs_arena, + &other->key_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata KeyResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[18]); +} + +// =================================================================== + +class UserKeyPermissions::_Internal { + public: +}; + +UserKeyPermissions::UserKeyPermissions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + permissions_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.UserKeyPermissions) +} +UserKeyPermissions::UserKeyPermissions(const UserKeyPermissions& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + permissions_(from.permissions_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + userid_ = from.userid_; + // @@protoc_insertion_point(copy_constructor:crypto.UserKeyPermissions) +} + +void UserKeyPermissions::SharedCtor() { +userid_ = 0; +} + +UserKeyPermissions::~UserKeyPermissions() { + // @@protoc_insertion_point(destructor:crypto.UserKeyPermissions) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void UserKeyPermissions::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void UserKeyPermissions::ArenaDtor(void* object) { + UserKeyPermissions* _this = reinterpret_cast< UserKeyPermissions* >(object); + (void)_this; +} +void UserKeyPermissions::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void UserKeyPermissions::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void UserKeyPermissions::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.UserKeyPermissions) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + permissions_.Clear(); + userid_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* UserKeyPermissions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 userId = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + userid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .crypto.KeyPermission permissions = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_permissions(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_add_permissions(static_cast<::crypto::KeyPermission>(val)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* UserKeyPermissions::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.UserKeyPermissions) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 userId = 1; + if (this->_internal_userid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_userid(), target); + } + + // repeated .crypto.KeyPermission permissions = 2; + { + int byte_size = _permissions_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteEnumPacked( + 2, permissions_, byte_size, target); + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.UserKeyPermissions) + return target; +} + +size_t UserKeyPermissions::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.UserKeyPermissions) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .crypto.KeyPermission permissions = 2; + { + size_t data_size = 0; + unsigned int count = static_cast(this->_internal_permissions_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize( + this->_internal_permissions(static_cast(i))); + } + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _permissions_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // int32 userId = 1; + if (this->_internal_userid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_userid()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UserKeyPermissions::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + UserKeyPermissions::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UserKeyPermissions::GetClassData() const { return &_class_data_; } + +void UserKeyPermissions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void UserKeyPermissions::MergeFrom(const UserKeyPermissions& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.UserKeyPermissions) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + permissions_.MergeFrom(from.permissions_); + if (from._internal_userid() != 0) { + _internal_set_userid(from._internal_userid()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void UserKeyPermissions::CopyFrom(const UserKeyPermissions& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.UserKeyPermissions) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool UserKeyPermissions::IsInitialized() const { + return true; +} + +void UserKeyPermissions::InternalSwap(UserKeyPermissions* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + permissions_.InternalSwap(&other->permissions_); + swap(userid_, other->userid_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata UserKeyPermissions::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[19]); +} + +// =================================================================== + +class BootSystemRequest::_Internal { + public: +}; + +BootSystemRequest::BootSystemRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + usersidspermissions_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.BootSystemRequest) +} +BootSystemRequest::BootSystemRequest(const BootSystemRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + usersidspermissions_(from.usersidspermissions_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:crypto.BootSystemRequest) +} + +void BootSystemRequest::SharedCtor() { +} + +BootSystemRequest::~BootSystemRequest() { + // @@protoc_insertion_point(destructor:crypto.BootSystemRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void BootSystemRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void BootSystemRequest::ArenaDtor(void* object) { + BootSystemRequest* _this = reinterpret_cast< BootSystemRequest* >(object); + (void)_this; +} +void BootSystemRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void BootSystemRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BootSystemRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.BootSystemRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + usersidspermissions_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* BootSystemRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .crypto.UserKeyPermissions usersIdsPermissions = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_usersidspermissions(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* BootSystemRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.BootSystemRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .crypto.UserKeyPermissions usersIdsPermissions = 1; + for (unsigned int i = 0, + n = static_cast(this->_internal_usersidspermissions_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, this->_internal_usersidspermissions(i), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.BootSystemRequest) + return target; +} + +size_t BootSystemRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.BootSystemRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .crypto.UserKeyPermissions usersIdsPermissions = 1; + total_size += 1UL * this->_internal_usersidspermissions_size(); + for (const auto& msg : this->usersidspermissions_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BootSystemRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + BootSystemRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BootSystemRequest::GetClassData() const { return &_class_data_; } + +void BootSystemRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void BootSystemRequest::MergeFrom(const BootSystemRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.BootSystemRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + usersidspermissions_.MergeFrom(from.usersidspermissions_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void BootSystemRequest::CopyFrom(const BootSystemRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.BootSystemRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BootSystemRequest::IsInitialized() const { + return true; +} + +void BootSystemRequest::InternalSwap(BootSystemRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + usersidspermissions_.InternalSwap(&other->usersidspermissions_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BootSystemRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[20]); +} + +// =================================================================== + +class Empty::_Internal { + public: +}; + +Empty::Empty(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase(arena, is_message_owned) { + // @@protoc_insertion_point(arena_constructor:crypto.Empty) +} +Empty::Empty(const Empty& from) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:crypto.Empty) +} + + + + + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Empty::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl, + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl, +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Empty::GetClassData() const { return &_class_data_; } + + + + + + + +::PROTOBUF_NAMESPACE_ID::Metadata Empty::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[21]); +} + +// =================================================================== + +class CryptoConfig::_Internal { + public: +}; + +CryptoConfig::CryptoConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.CryptoConfig) +} +CryptoConfig::CryptoConfig(const CryptoConfig& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&hashfunction_, &from.hashfunction_, + static_cast(reinterpret_cast(&asymmetricfunction_) - + reinterpret_cast(&hashfunction_)) + sizeof(asymmetricfunction_)); + // @@protoc_insertion_point(copy_constructor:crypto.CryptoConfig) +} + +void CryptoConfig::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&hashfunction_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&asymmetricfunction_) - + reinterpret_cast(&hashfunction_)) + sizeof(asymmetricfunction_)); +} + +CryptoConfig::~CryptoConfig() { + // @@protoc_insertion_point(destructor:crypto.CryptoConfig) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void CryptoConfig::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void CryptoConfig::ArenaDtor(void* object) { + CryptoConfig* _this = reinterpret_cast< CryptoConfig* >(object); + (void)_this; +} +void CryptoConfig::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void CryptoConfig::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void CryptoConfig::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.CryptoConfig) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&hashfunction_, 0, static_cast( + reinterpret_cast(&asymmetricfunction_) - + reinterpret_cast(&hashfunction_)) + sizeof(asymmetricfunction_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CryptoConfig::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .crypto.SHAAlgorithm hashFunction = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_hashfunction(static_cast<::crypto::SHAAlgorithm>(val)); + } else + goto handle_unusual; + continue; + // .crypto.AESKeyLength aesKeyLength = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_aeskeylength(static_cast<::crypto::AESKeyLength>(val)); + } else + goto handle_unusual; + continue; + // .crypto.AESChainingMode aesChainingMode = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_aeschainingmode(static_cast<::crypto::AESChainingMode>(val)); + } else + goto handle_unusual; + continue; + // .crypto.AsymmetricFunction asymmetricFunction = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_asymmetricfunction(static_cast<::crypto::AsymmetricFunction>(val)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* CryptoConfig::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.CryptoConfig) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .crypto.SHAAlgorithm hashFunction = 1; + if (this->_internal_hashfunction() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_hashfunction(), target); + } + + // .crypto.AESKeyLength aesKeyLength = 2; + if (this->_internal_aeskeylength() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_aeskeylength(), target); + } + + // .crypto.AESChainingMode aesChainingMode = 3; + if (this->_internal_aeschainingmode() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 3, this->_internal_aeschainingmode(), target); + } + + // .crypto.AsymmetricFunction asymmetricFunction = 4; + if (this->_internal_asymmetricfunction() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 4, this->_internal_asymmetricfunction(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.CryptoConfig) + return target; +} + +size_t CryptoConfig::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.CryptoConfig) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .crypto.SHAAlgorithm hashFunction = 1; + if (this->_internal_hashfunction() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_hashfunction()); + } + + // .crypto.AESKeyLength aesKeyLength = 2; + if (this->_internal_aeskeylength() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_aeskeylength()); + } + + // .crypto.AESChainingMode aesChainingMode = 3; + if (this->_internal_aeschainingmode() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_aeschainingmode()); + } + + // .crypto.AsymmetricFunction asymmetricFunction = 4; + if (this->_internal_asymmetricfunction() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_asymmetricfunction()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CryptoConfig::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + CryptoConfig::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CryptoConfig::GetClassData() const { return &_class_data_; } + +void CryptoConfig::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void CryptoConfig::MergeFrom(const CryptoConfig& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.CryptoConfig) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_hashfunction() != 0) { + _internal_set_hashfunction(from._internal_hashfunction()); + } + if (from._internal_aeskeylength() != 0) { + _internal_set_aeskeylength(from._internal_aeskeylength()); + } + if (from._internal_aeschainingmode() != 0) { + _internal_set_aeschainingmode(from._internal_aeschainingmode()); + } + if (from._internal_asymmetricfunction() != 0) { + _internal_set_asymmetricfunction(from._internal_asymmetricfunction()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CryptoConfig::CopyFrom(const CryptoConfig& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.CryptoConfig) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CryptoConfig::IsInitialized() const { + return true; +} + +void CryptoConfig::InternalSwap(CryptoConfig* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(CryptoConfig, asymmetricfunction_) + + sizeof(CryptoConfig::asymmetricfunction_) + - PROTOBUF_FIELD_OFFSET(CryptoConfig, hashfunction_)>( + reinterpret_cast(&hashfunction_), + reinterpret_cast(&other->hashfunction_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CryptoConfig::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[22]); +} + +// =================================================================== + +class ConfigureRequest::_Internal { + public: + static const ::crypto::CryptoConfig& config(const ConfigureRequest* msg); +}; + +const ::crypto::CryptoConfig& +ConfigureRequest::_Internal::config(const ConfigureRequest* msg) { + return *msg->config_; +} +ConfigureRequest::ConfigureRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.ConfigureRequest) +} +ConfigureRequest::ConfigureRequest(const ConfigureRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_config()) { + config_ = new ::crypto::CryptoConfig(*from.config_); + } else { + config_ = nullptr; + } + userid_ = from.userid_; + // @@protoc_insertion_point(copy_constructor:crypto.ConfigureRequest) +} + +void ConfigureRequest::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&config_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&userid_) - + reinterpret_cast(&config_)) + sizeof(userid_)); +} + +ConfigureRequest::~ConfigureRequest() { + // @@protoc_insertion_point(destructor:crypto.ConfigureRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void ConfigureRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete config_; +} + +void ConfigureRequest::ArenaDtor(void* object) { + ConfigureRequest* _this = reinterpret_cast< ConfigureRequest* >(object); + (void)_this; +} +void ConfigureRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConfigureRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConfigureRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.ConfigureRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && config_ != nullptr) { + delete config_; + } + config_ = nullptr; + userid_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ConfigureRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 userId = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + userid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .crypto.CryptoConfig config = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_config(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* ConfigureRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.ConfigureRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 userId = 1; + if (this->_internal_userid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_userid(), target); + } + + // .crypto.CryptoConfig config = 2; + if (this->_internal_has_config()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::config(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.ConfigureRequest) + return target; +} + +size_t ConfigureRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.ConfigureRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .crypto.CryptoConfig config = 2; + if (this->_internal_has_config()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *config_); + } + + // int32 userId = 1; + if (this->_internal_userid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_userid()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ConfigureRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + ConfigureRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ConfigureRequest::GetClassData() const { return &_class_data_; } + +void ConfigureRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void ConfigureRequest::MergeFrom(const ConfigureRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.ConfigureRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_config()) { + _internal_mutable_config()->::crypto::CryptoConfig::MergeFrom(from._internal_config()); + } + if (from._internal_userid() != 0) { + _internal_set_userid(from._internal_userid()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ConfigureRequest::CopyFrom(const ConfigureRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.ConfigureRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConfigureRequest::IsInitialized() const { + return true; +} + +void ConfigureRequest::InternalSwap(ConfigureRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConfigureRequest, userid_) + + sizeof(ConfigureRequest::userid_) + - PROTOBUF_FIELD_OFFSET(ConfigureRequest, config_)>( + reinterpret_cast(&config_), + reinterpret_cast(&other->config_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ConfigureRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[23]); +} + +// =================================================================== + +class AddProcessRequest::_Internal { + public: +}; + +AddProcessRequest::AddProcessRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + permissions_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.AddProcessRequest) +} +AddProcessRequest::AddProcessRequest(const AddProcessRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + permissions_(from.permissions_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + userid_ = from.userid_; + // @@protoc_insertion_point(copy_constructor:crypto.AddProcessRequest) +} + +void AddProcessRequest::SharedCtor() { +userid_ = 0; +} + +AddProcessRequest::~AddProcessRequest() { + // @@protoc_insertion_point(destructor:crypto.AddProcessRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void AddProcessRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void AddProcessRequest::ArenaDtor(void* object) { + AddProcessRequest* _this = reinterpret_cast< AddProcessRequest* >(object); + (void)_this; +} +void AddProcessRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AddProcessRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AddProcessRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.AddProcessRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + permissions_.Clear(); + userid_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AddProcessRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 userId = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + userid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .crypto.KeyPermission permissions = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_permissions(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_add_permissions(static_cast<::crypto::KeyPermission>(val)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AddProcessRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.AddProcessRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 userId = 1; + if (this->_internal_userid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_userid(), target); + } + + // repeated .crypto.KeyPermission permissions = 2; + { + int byte_size = _permissions_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteEnumPacked( + 2, permissions_, byte_size, target); + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.AddProcessRequest) + return target; +} + +size_t AddProcessRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.AddProcessRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .crypto.KeyPermission permissions = 2; + { + size_t data_size = 0; + unsigned int count = static_cast(this->_internal_permissions_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize( + this->_internal_permissions(static_cast(i))); + } + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _permissions_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // int32 userId = 1; + if (this->_internal_userid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_userid()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AddProcessRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + AddProcessRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AddProcessRequest::GetClassData() const { return &_class_data_; } + +void AddProcessRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void AddProcessRequest::MergeFrom(const AddProcessRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.AddProcessRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + permissions_.MergeFrom(from.permissions_); + if (from._internal_userid() != 0) { + _internal_set_userid(from._internal_userid()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void AddProcessRequest::CopyFrom(const AddProcessRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.AddProcessRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AddProcessRequest::IsInitialized() const { + return true; +} + +void AddProcessRequest::InternalSwap(AddProcessRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + permissions_.InternalSwap(&other->permissions_); + swap(userid_, other->userid_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AddProcessRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[24]); +} + +// =================================================================== + +class EncryptRequest::_Internal { + public: +}; + +EncryptRequest::EncryptRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.EncryptRequest) +} +EncryptRequest::EncryptRequest(const EncryptRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_data().empty()) { + data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data(), + GetArenaForAllocation()); + } + ::memcpy(&sender_id_, &from.sender_id_, + static_cast(reinterpret_cast(&isfirst_) - + reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + // @@protoc_insertion_point(copy_constructor:crypto.EncryptRequest) +} + +void EncryptRequest::SharedCtor() { +data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&sender_id_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&isfirst_) - + reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); +} + +EncryptRequest::~EncryptRequest() { + // @@protoc_insertion_point(destructor:crypto.EncryptRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void EncryptRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void EncryptRequest::ArenaDtor(void* object) { + EncryptRequest* _this = reinterpret_cast< EncryptRequest* >(object); + (void)_this; +} +void EncryptRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void EncryptRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void EncryptRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.EncryptRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + data_.ClearToEmpty(); + ::memset(&sender_id_, 0, static_cast( + reinterpret_cast(&isfirst_) - + reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* EncryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 sender_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + sender_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 receiver_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + receiver_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes data = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int64 counter = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + counter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool isFirst = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + isfirst_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* EncryptRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.EncryptRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 sender_id = 1; + if (this->_internal_sender_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_sender_id(), target); + } + + // int32 receiver_id = 2; + if (this->_internal_receiver_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiver_id(), target); + } + + // bytes data = 3; + if (!this->_internal_data().empty()) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_data(), target); + } + + // int64 counter = 4; + if (this->_internal_counter() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_counter(), target); + } + + // bool isFirst = 5; + if (this->_internal_isfirst() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_isfirst(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.EncryptRequest) + return target; +} + +size_t EncryptRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.EncryptRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes data = 3; + if (!this->_internal_data().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_data()); + } + + // int32 sender_id = 1; + if (this->_internal_sender_id() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sender_id()); + } + + // int32 receiver_id = 2; + if (this->_internal_receiver_id() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiver_id()); + } + + // int64 counter = 4; + if (this->_internal_counter() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_counter()); + } + + // bool isFirst = 5; + if (this->_internal_isfirst() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EncryptRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + EncryptRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EncryptRequest::GetClassData() const { return &_class_data_; } + +void EncryptRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void EncryptRequest::MergeFrom(const EncryptRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.EncryptRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_data().empty()) { + _internal_set_data(from._internal_data()); + } + if (from._internal_sender_id() != 0) { + _internal_set_sender_id(from._internal_sender_id()); + } + if (from._internal_receiver_id() != 0) { + _internal_set_receiver_id(from._internal_receiver_id()); + } + if (from._internal_counter() != 0) { + _internal_set_counter(from._internal_counter()); + } + if (from._internal_isfirst() != 0) { + _internal_set_isfirst(from._internal_isfirst()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void EncryptRequest::CopyFrom(const EncryptRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.EncryptRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EncryptRequest::IsInitialized() const { + return true; +} + +void EncryptRequest::InternalSwap(EncryptRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &data_, lhs_arena, + &other->data_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(EncryptRequest, isfirst_) + + sizeof(EncryptRequest::isfirst_) + - PROTOBUF_FIELD_OFFSET(EncryptRequest, sender_id_)>( + reinterpret_cast(&sender_id_), + reinterpret_cast(&other->sender_id_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata EncryptRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[25]); +} + +// =================================================================== + +class EncryptResponse::_Internal { + public: +}; + +EncryptResponse::EncryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.EncryptResponse) +} +EncryptResponse::EncryptResponse(const EncryptResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_encrypted_data().empty()) { + encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_encrypted_data(), + GetArenaForAllocation()); + } + signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_signature().empty()) { + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_signature(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:crypto.EncryptResponse) +} + +void EncryptResponse::SharedCtor() { +encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +EncryptResponse::~EncryptResponse() { + // @@protoc_insertion_point(destructor:crypto.EncryptResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void EncryptResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + encrypted_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + signature_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void EncryptResponse::ArenaDtor(void* object) { + EncryptResponse* _this = reinterpret_cast< EncryptResponse* >(object); + (void)_this; +} +void EncryptResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void EncryptResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void EncryptResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.EncryptResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + encrypted_data_.ClearToEmpty(); + signature_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* EncryptResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // bytes encrypted_data = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_encrypted_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes signature = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_signature(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* EncryptResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.EncryptResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes encrypted_data = 1; + if (!this->_internal_encrypted_data().empty()) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_encrypted_data(), target); + } + + // bytes signature = 2; + if (!this->_internal_signature().empty()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_signature(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.EncryptResponse) + return target; +} + +size_t EncryptResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.EncryptResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes encrypted_data = 1; + if (!this->_internal_encrypted_data().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_encrypted_data()); + } + + // bytes signature = 2; + if (!this->_internal_signature().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_signature()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EncryptResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + EncryptResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EncryptResponse::GetClassData() const { return &_class_data_; } + +void EncryptResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void EncryptResponse::MergeFrom(const EncryptResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.EncryptResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_encrypted_data().empty()) { + _internal_set_encrypted_data(from._internal_encrypted_data()); + } + if (!from._internal_signature().empty()) { + _internal_set_signature(from._internal_signature()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void EncryptResponse::CopyFrom(const EncryptResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.EncryptResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EncryptResponse::IsInitialized() const { + return true; +} + +void EncryptResponse::InternalSwap(EncryptResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &encrypted_data_, lhs_arena, + &other->encrypted_data_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &signature_, lhs_arena, + &other->signature_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata EncryptResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[26]); +} + +// =================================================================== + +class DecryptRequest::_Internal { + public: +}; + +DecryptRequest::DecryptRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.DecryptRequest) +} +DecryptRequest::DecryptRequest(const DecryptRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_encrypted_data().empty()) { + encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_encrypted_data(), + GetArenaForAllocation()); + } + signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_signature().empty()) { + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_signature(), + GetArenaForAllocation()); + } + ::memcpy(&sender_id_, &from.sender_id_, + static_cast(reinterpret_cast(&isfirst_) - + reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + // @@protoc_insertion_point(copy_constructor:crypto.DecryptRequest) +} + +void DecryptRequest::SharedCtor() { +encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&sender_id_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&isfirst_) - + reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); +} + +DecryptRequest::~DecryptRequest() { + // @@protoc_insertion_point(destructor:crypto.DecryptRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void DecryptRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + encrypted_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + signature_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void DecryptRequest::ArenaDtor(void* object) { + DecryptRequest* _this = reinterpret_cast< DecryptRequest* >(object); + (void)_this; +} +void DecryptRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void DecryptRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void DecryptRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.DecryptRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + encrypted_data_.ClearToEmpty(); + signature_.ClearToEmpty(); + ::memset(&sender_id_, 0, static_cast( + reinterpret_cast(&isfirst_) - + reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* DecryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 sender_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + sender_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 receiver_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + receiver_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes encrypted_data = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_encrypted_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int64 counter = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + counter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes signature = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_signature(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool isFirst = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + isfirst_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* DecryptRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.DecryptRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 sender_id = 1; + if (this->_internal_sender_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_sender_id(), target); + } + + // int32 receiver_id = 2; + if (this->_internal_receiver_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiver_id(), target); + } + + // bytes encrypted_data = 3; + if (!this->_internal_encrypted_data().empty()) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_encrypted_data(), target); + } + + // int64 counter = 4; + if (this->_internal_counter() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_counter(), target); + } + + // bytes signature = 5; + if (!this->_internal_signature().empty()) { + target = stream->WriteBytesMaybeAliased( + 5, this->_internal_signature(), target); + } + + // bool isFirst = 6; + if (this->_internal_isfirst() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_isfirst(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.DecryptRequest) + return target; +} + +size_t DecryptRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.DecryptRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes encrypted_data = 3; + if (!this->_internal_encrypted_data().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_encrypted_data()); + } + + // bytes signature = 5; + if (!this->_internal_signature().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_signature()); + } + + // int32 sender_id = 1; + if (this->_internal_sender_id() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sender_id()); + } + + // int32 receiver_id = 2; + if (this->_internal_receiver_id() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiver_id()); + } + + // int64 counter = 4; + if (this->_internal_counter() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_counter()); + } + + // bool isFirst = 6; + if (this->_internal_isfirst() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DecryptRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + DecryptRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DecryptRequest::GetClassData() const { return &_class_data_; } + +void DecryptRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void DecryptRequest::MergeFrom(const DecryptRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.DecryptRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_encrypted_data().empty()) { + _internal_set_encrypted_data(from._internal_encrypted_data()); + } + if (!from._internal_signature().empty()) { + _internal_set_signature(from._internal_signature()); + } + if (from._internal_sender_id() != 0) { + _internal_set_sender_id(from._internal_sender_id()); + } + if (from._internal_receiver_id() != 0) { + _internal_set_receiver_id(from._internal_receiver_id()); + } + if (from._internal_counter() != 0) { + _internal_set_counter(from._internal_counter()); + } + if (from._internal_isfirst() != 0) { + _internal_set_isfirst(from._internal_isfirst()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void DecryptRequest::CopyFrom(const DecryptRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.DecryptRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DecryptRequest::IsInitialized() const { + return true; +} + +void DecryptRequest::InternalSwap(DecryptRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &encrypted_data_, lhs_arena, + &other->encrypted_data_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &signature_, lhs_arena, + &other->signature_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(DecryptRequest, isfirst_) + + sizeof(DecryptRequest::isfirst_) + - PROTOBUF_FIELD_OFFSET(DecryptRequest, sender_id_)>( + reinterpret_cast(&sender_id_), + reinterpret_cast(&other->sender_id_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata DecryptRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[27]); +} + +// =================================================================== + +class DecryptResponse::_Internal { + public: +}; + +DecryptResponse::DecryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.DecryptResponse) +} +DecryptResponse::DecryptResponse(const DecryptResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + decrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_decrypted_data().empty()) { + decrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_decrypted_data(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:crypto.DecryptResponse) +} + +void DecryptResponse::SharedCtor() { +decrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +DecryptResponse::~DecryptResponse() { + // @@protoc_insertion_point(destructor:crypto.DecryptResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void DecryptResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + decrypted_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void DecryptResponse::ArenaDtor(void* object) { + DecryptResponse* _this = reinterpret_cast< DecryptResponse* >(object); + (void)_this; +} +void DecryptResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void DecryptResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void DecryptResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.DecryptResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + decrypted_data_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* DecryptResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // bytes decrypted_data = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_decrypted_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* DecryptResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.DecryptResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes decrypted_data = 1; + if (!this->_internal_decrypted_data().empty()) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_decrypted_data(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.DecryptResponse) + return target; +} + +size_t DecryptResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.DecryptResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes decrypted_data = 1; + if (!this->_internal_decrypted_data().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_decrypted_data()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DecryptResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + DecryptResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DecryptResponse::GetClassData() const { return &_class_data_; } + +void DecryptResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void DecryptResponse::MergeFrom(const DecryptResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.DecryptResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_decrypted_data().empty()) { + _internal_set_decrypted_data(from._internal_decrypted_data()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void DecryptResponse::CopyFrom(const DecryptResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.DecryptResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DecryptResponse::IsInitialized() const { + return true; +} + +void DecryptResponse::InternalSwap(DecryptResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &decrypted_data_, lhs_arena, + &other->decrypted_data_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata DecryptResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[28]); +} + +// =================================================================== + +class AESEncryptRequest::_Internal { + public: +}; + +AESEncryptRequest::AESEncryptRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.AESEncryptRequest) +} +AESEncryptRequest::AESEncryptRequest(const AESEncryptRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_data().empty()) { + data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data(), + GetArenaForAllocation()); + } + key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_key_id().empty()) { + key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_key_id(), + GetArenaForAllocation()); + } + ::memcpy(&sender_id_, &from.sender_id_, + static_cast(reinterpret_cast(&chainingmode_) - + reinterpret_cast(&sender_id_)) + sizeof(chainingmode_)); + // @@protoc_insertion_point(copy_constructor:crypto.AESEncryptRequest) +} + +void AESEncryptRequest::SharedCtor() { +data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&sender_id_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&chainingmode_) - + reinterpret_cast(&sender_id_)) + sizeof(chainingmode_)); +} + +AESEncryptRequest::~AESEncryptRequest() { + // @@protoc_insertion_point(destructor:crypto.AESEncryptRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void AESEncryptRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + key_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AESEncryptRequest::ArenaDtor(void* object) { + AESEncryptRequest* _this = reinterpret_cast< AESEncryptRequest* >(object); + (void)_this; +} +void AESEncryptRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AESEncryptRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AESEncryptRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.AESEncryptRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + data_.ClearToEmpty(); + key_id_.ClearToEmpty(); + ::memset(&sender_id_, 0, static_cast( + reinterpret_cast(&chainingmode_) - + reinterpret_cast(&sender_id_)) + sizeof(chainingmode_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AESEncryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 sender_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + sender_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 receiver_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + receiver_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes data = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .crypto.AsymmetricFunction func = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_func(static_cast<::crypto::AsymmetricFunction>(val)); + } else + goto handle_unusual; + continue; + // int64 counter = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + counter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string key_id = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + auto str = _internal_mutable_key_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.AESEncryptRequest.key_id")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .crypto.AESKeyLength key_length = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_key_length(static_cast<::crypto::AESKeyLength>(val)); + } else + goto handle_unusual; + continue; + // .crypto.AESChainingMode chainingMode = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_chainingmode(static_cast<::crypto::AESChainingMode>(val)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AESEncryptRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.AESEncryptRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 sender_id = 1; + if (this->_internal_sender_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_sender_id(), target); + } + + // int32 receiver_id = 2; + if (this->_internal_receiver_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiver_id(), target); + } + + // bytes data = 3; + if (!this->_internal_data().empty()) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_data(), target); + } + + // .crypto.AsymmetricFunction func = 4; + if (this->_internal_func() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 4, this->_internal_func(), target); + } + + // int64 counter = 5; + if (this->_internal_counter() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->_internal_counter(), target); + } + + // string key_id = 6; + if (!this->_internal_key_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_key_id().data(), static_cast(this->_internal_key_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.AESEncryptRequest.key_id"); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_key_id(), target); + } + + // .crypto.AESKeyLength key_length = 7; + if (this->_internal_key_length() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 7, this->_internal_key_length(), target); + } + + // .crypto.AESChainingMode chainingMode = 8; + if (this->_internal_chainingmode() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 8, this->_internal_chainingmode(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.AESEncryptRequest) + return target; +} + +size_t AESEncryptRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.AESEncryptRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes data = 3; + if (!this->_internal_data().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_data()); + } + + // string key_id = 6; + if (!this->_internal_key_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_key_id()); + } + + // int32 sender_id = 1; + if (this->_internal_sender_id() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sender_id()); + } + + // int32 receiver_id = 2; + if (this->_internal_receiver_id() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiver_id()); + } + + // int64 counter = 5; + if (this->_internal_counter() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_counter()); + } + + // .crypto.AsymmetricFunction func = 4; + if (this->_internal_func() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_func()); + } + + // .crypto.AESKeyLength key_length = 7; + if (this->_internal_key_length() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_key_length()); + } + + // .crypto.AESChainingMode chainingMode = 8; + if (this->_internal_chainingmode() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_chainingmode()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AESEncryptRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + AESEncryptRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AESEncryptRequest::GetClassData() const { return &_class_data_; } + +void AESEncryptRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void AESEncryptRequest::MergeFrom(const AESEncryptRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.AESEncryptRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_data().empty()) { + _internal_set_data(from._internal_data()); + } + if (!from._internal_key_id().empty()) { + _internal_set_key_id(from._internal_key_id()); + } + if (from._internal_sender_id() != 0) { + _internal_set_sender_id(from._internal_sender_id()); + } + if (from._internal_receiver_id() != 0) { + _internal_set_receiver_id(from._internal_receiver_id()); + } + if (from._internal_counter() != 0) { + _internal_set_counter(from._internal_counter()); + } + if (from._internal_func() != 0) { + _internal_set_func(from._internal_func()); + } + if (from._internal_key_length() != 0) { + _internal_set_key_length(from._internal_key_length()); + } + if (from._internal_chainingmode() != 0) { + _internal_set_chainingmode(from._internal_chainingmode()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void AESEncryptRequest::CopyFrom(const AESEncryptRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.AESEncryptRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AESEncryptRequest::IsInitialized() const { + return true; +} + +void AESEncryptRequest::InternalSwap(AESEncryptRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &data_, lhs_arena, + &other->data_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &key_id_, lhs_arena, + &other->key_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(AESEncryptRequest, chainingmode_) + + sizeof(AESEncryptRequest::chainingmode_) + - PROTOBUF_FIELD_OFFSET(AESEncryptRequest, sender_id_)>( + reinterpret_cast(&sender_id_), + reinterpret_cast(&other->sender_id_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AESEncryptRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[29]); +} + +// =================================================================== + +class AESEncryptResponse::_Internal { + public: +}; + +AESEncryptResponse::AESEncryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.AESEncryptResponse) +} +AESEncryptResponse::AESEncryptResponse(const AESEncryptResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_encrypted_data().empty()) { + encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_encrypted_data(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:crypto.AESEncryptResponse) +} + +void AESEncryptResponse::SharedCtor() { +encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +AESEncryptResponse::~AESEncryptResponse() { + // @@protoc_insertion_point(destructor:crypto.AESEncryptResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void AESEncryptResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + encrypted_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AESEncryptResponse::ArenaDtor(void* object) { + AESEncryptResponse* _this = reinterpret_cast< AESEncryptResponse* >(object); + (void)_this; +} +void AESEncryptResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AESEncryptResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AESEncryptResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.AESEncryptResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + encrypted_data_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AESEncryptResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // bytes encrypted_data = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_encrypted_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AESEncryptResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.AESEncryptResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes encrypted_data = 1; + if (!this->_internal_encrypted_data().empty()) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_encrypted_data(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.AESEncryptResponse) + return target; +} + +size_t AESEncryptResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.AESEncryptResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes encrypted_data = 1; + if (!this->_internal_encrypted_data().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_encrypted_data()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AESEncryptResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + AESEncryptResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AESEncryptResponse::GetClassData() const { return &_class_data_; } + +void AESEncryptResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void AESEncryptResponse::MergeFrom(const AESEncryptResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.AESEncryptResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_encrypted_data().empty()) { + _internal_set_encrypted_data(from._internal_encrypted_data()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void AESEncryptResponse::CopyFrom(const AESEncryptResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.AESEncryptResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AESEncryptResponse::IsInitialized() const { + return true; +} + +void AESEncryptResponse::InternalSwap(AESEncryptResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &encrypted_data_, lhs_arena, + &other->encrypted_data_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AESEncryptResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[30]); +} + +// =================================================================== + +class AESDecryptRequest::_Internal { + public: +}; + +AESDecryptRequest::AESDecryptRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.AESDecryptRequest) +} +AESDecryptRequest::AESDecryptRequest(const AESDecryptRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + data_in_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_data_in().empty()) { + data_in_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data_in(), + GetArenaForAllocation()); + } + data_out_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_data_out().empty()) { + data_out_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data_out(), + GetArenaForAllocation()); + } + key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_key_id().empty()) { + key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_key_id(), + GetArenaForAllocation()); + } + ::memcpy(&sender_id_, &from.sender_id_, + static_cast(reinterpret_cast(&counter_) - + reinterpret_cast(&sender_id_)) + sizeof(counter_)); + // @@protoc_insertion_point(copy_constructor:crypto.AESDecryptRequest) +} + +void AESDecryptRequest::SharedCtor() { +data_in_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +data_out_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&sender_id_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&counter_) - + reinterpret_cast(&sender_id_)) + sizeof(counter_)); +} + +AESDecryptRequest::~AESDecryptRequest() { + // @@protoc_insertion_point(destructor:crypto.AESDecryptRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void AESDecryptRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + data_in_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + data_out_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + key_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AESDecryptRequest::ArenaDtor(void* object) { + AESDecryptRequest* _this = reinterpret_cast< AESDecryptRequest* >(object); + (void)_this; +} +void AESDecryptRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AESDecryptRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AESDecryptRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.AESDecryptRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + data_in_.ClearToEmpty(); + data_out_.ClearToEmpty(); + key_id_.ClearToEmpty(); + ::memset(&sender_id_, 0, static_cast( + reinterpret_cast(&counter_) - + reinterpret_cast(&sender_id_)) + sizeof(counter_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AESDecryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 sender_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + sender_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 receiver_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + receiver_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes data_in = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_data_in(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 in_len = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + in_len_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes data_out = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_data_out(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .crypto.AsymmetricFunction func = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_func(static_cast<::crypto::AsymmetricFunction>(val)); + } else + goto handle_unusual; + continue; + // .crypto.AESKeyLength key_length = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_key_length(static_cast<::crypto::AESKeyLength>(val)); + } else + goto handle_unusual; + continue; + // .crypto.AESChainingMode chainingMode = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_chainingmode(static_cast<::crypto::AESChainingMode>(val)); + } else + goto handle_unusual; + continue; + // int64 counter = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + counter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string key_id = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) { + auto str = _internal_mutable_key_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.AESDecryptRequest.key_id")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AESDecryptRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.AESDecryptRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 sender_id = 1; + if (this->_internal_sender_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_sender_id(), target); + } + + // int32 receiver_id = 2; + if (this->_internal_receiver_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiver_id(), target); + } + + // bytes data_in = 3; + if (!this->_internal_data_in().empty()) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_data_in(), target); + } + + // int32 in_len = 4; + if (this->_internal_in_len() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_in_len(), target); + } + + // bytes data_out = 5; + if (!this->_internal_data_out().empty()) { + target = stream->WriteBytesMaybeAliased( + 5, this->_internal_data_out(), target); + } + + // .crypto.AsymmetricFunction func = 6; + if (this->_internal_func() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 6, this->_internal_func(), target); + } + + // .crypto.AESKeyLength key_length = 7; + if (this->_internal_key_length() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 7, this->_internal_key_length(), target); + } + + // .crypto.AESChainingMode chainingMode = 8; + if (this->_internal_chainingmode() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 8, this->_internal_chainingmode(), target); + } + + // int64 counter = 9; + if (this->_internal_counter() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(9, this->_internal_counter(), target); + } + + // string key_id = 10; + if (!this->_internal_key_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_key_id().data(), static_cast(this->_internal_key_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.AESDecryptRequest.key_id"); + target = stream->WriteStringMaybeAliased( + 10, this->_internal_key_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.AESDecryptRequest) + return target; +} + +size_t AESDecryptRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.AESDecryptRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes data_in = 3; + if (!this->_internal_data_in().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_data_in()); + } + + // bytes data_out = 5; + if (!this->_internal_data_out().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_data_out()); + } + + // string key_id = 10; + if (!this->_internal_key_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_key_id()); + } + + // int32 sender_id = 1; + if (this->_internal_sender_id() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sender_id()); + } + + // int32 receiver_id = 2; + if (this->_internal_receiver_id() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiver_id()); + } + + // int32 in_len = 4; + if (this->_internal_in_len() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_in_len()); + } + + // .crypto.AsymmetricFunction func = 6; + if (this->_internal_func() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_func()); + } + + // .crypto.AESKeyLength key_length = 7; + if (this->_internal_key_length() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_key_length()); + } + + // .crypto.AESChainingMode chainingMode = 8; + if (this->_internal_chainingmode() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_chainingmode()); + } + + // int64 counter = 9; + if (this->_internal_counter() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_counter()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AESDecryptRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + AESDecryptRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AESDecryptRequest::GetClassData() const { return &_class_data_; } + +void AESDecryptRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void AESDecryptRequest::MergeFrom(const AESDecryptRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.AESDecryptRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_data_in().empty()) { + _internal_set_data_in(from._internal_data_in()); + } + if (!from._internal_data_out().empty()) { + _internal_set_data_out(from._internal_data_out()); + } + if (!from._internal_key_id().empty()) { + _internal_set_key_id(from._internal_key_id()); + } + if (from._internal_sender_id() != 0) { + _internal_set_sender_id(from._internal_sender_id()); + } + if (from._internal_receiver_id() != 0) { + _internal_set_receiver_id(from._internal_receiver_id()); + } + if (from._internal_in_len() != 0) { + _internal_set_in_len(from._internal_in_len()); + } + if (from._internal_func() != 0) { + _internal_set_func(from._internal_func()); + } + if (from._internal_key_length() != 0) { + _internal_set_key_length(from._internal_key_length()); + } + if (from._internal_chainingmode() != 0) { + _internal_set_chainingmode(from._internal_chainingmode()); + } + if (from._internal_counter() != 0) { + _internal_set_counter(from._internal_counter()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void AESDecryptRequest::CopyFrom(const AESDecryptRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.AESDecryptRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AESDecryptRequest::IsInitialized() const { + return true; +} + +void AESDecryptRequest::InternalSwap(AESDecryptRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &data_in_, lhs_arena, + &other->data_in_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &data_out_, lhs_arena, + &other->data_out_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &key_id_, lhs_arena, + &other->key_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(AESDecryptRequest, counter_) + + sizeof(AESDecryptRequest::counter_) + - PROTOBUF_FIELD_OFFSET(AESDecryptRequest, sender_id_)>( + reinterpret_cast(&sender_id_), + reinterpret_cast(&other->sender_id_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AESDecryptRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[31]); +} + +// =================================================================== + +class AESDecryptResponse::_Internal { + public: +}; + +AESDecryptResponse::AESDecryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:crypto.AESDecryptResponse) +} +AESDecryptResponse::AESDecryptResponse(const AESDecryptResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + decrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_decrypted_data().empty()) { + decrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_decrypted_data(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:crypto.AESDecryptResponse) +} + +void AESDecryptResponse::SharedCtor() { +decrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +AESDecryptResponse::~AESDecryptResponse() { + // @@protoc_insertion_point(destructor:crypto.AESDecryptResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void AESDecryptResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + decrypted_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AESDecryptResponse::ArenaDtor(void* object) { + AESDecryptResponse* _this = reinterpret_cast< AESDecryptResponse* >(object); + (void)_this; +} +void AESDecryptResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AESDecryptResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AESDecryptResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:crypto.AESDecryptResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + decrypted_data_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AESDecryptResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // bytes decrypted_data = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_decrypted_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AESDecryptResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:crypto.AESDecryptResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes decrypted_data = 1; + if (!this->_internal_decrypted_data().empty()) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_decrypted_data(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:crypto.AESDecryptResponse) + return target; +} + +size_t AESDecryptResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:crypto.AESDecryptResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes decrypted_data = 1; + if (!this->_internal_decrypted_data().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_decrypted_data()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AESDecryptResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + AESDecryptResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AESDecryptResponse::GetClassData() const { return &_class_data_; } + +void AESDecryptResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void AESDecryptResponse::MergeFrom(const AESDecryptResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:crypto.AESDecryptResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_decrypted_data().empty()) { + _internal_set_decrypted_data(from._internal_decrypted_data()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void AESDecryptResponse::CopyFrom(const AESDecryptResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:crypto.AESDecryptResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AESDecryptResponse::IsInitialized() const { + return true; +} + +void AESDecryptResponse::InternalSwap(AESDecryptResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &decrypted_data_, lhs_arena, + &other->decrypted_data_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AESDecryptResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_proto_2fencryption_2eproto_getter, &descriptor_table_proto_2fencryption_2eproto_once, + file_level_metadata_proto_2fencryption_2eproto[32]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace crypto +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::crypto::AsymetricEncryptRequest* Arena::CreateMaybeMessage< ::crypto::AsymetricEncryptRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::AsymetricEncryptRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::AsymetricEncryptResponse* Arena::CreateMaybeMessage< ::crypto::AsymetricEncryptResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::AsymetricEncryptResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::AsymetricDecryptRequest* Arena::CreateMaybeMessage< ::crypto::AsymetricDecryptRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::AsymetricDecryptRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::GetHashLengthRequest* Arena::CreateMaybeMessage< ::crypto::GetHashLengthRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::GetHashLengthRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::GetAESLengthRequest* Arena::CreateMaybeMessage< ::crypto::GetAESLengthRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::GetAESLengthRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::AsymetricDecryptResponse* Arena::CreateMaybeMessage< ::crypto::AsymetricDecryptResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::AsymetricDecryptResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::GetLengthRequest* Arena::CreateMaybeMessage< ::crypto::GetLengthRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::GetLengthRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::GetLengthResponse* Arena::CreateMaybeMessage< ::crypto::GetLengthResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::GetLengthResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::GetWholeLength* Arena::CreateMaybeMessage< ::crypto::GetWholeLength >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::GetWholeLength >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::GenerateAESKeyRequest* Arena::CreateMaybeMessage< ::crypto::GenerateAESKeyRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::GenerateAESKeyRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::GenerateAESKeyResponse* Arena::CreateMaybeMessage< ::crypto::GenerateAESKeyResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::GenerateAESKeyResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::GenerateKeyPairRequest* Arena::CreateMaybeMessage< ::crypto::GenerateKeyPairRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::GenerateKeyPairRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::GenerateKeyPairResponse* Arena::CreateMaybeMessage< ::crypto::GenerateKeyPairResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::GenerateKeyPairResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::SignRequest* Arena::CreateMaybeMessage< ::crypto::SignRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::SignRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::SignResponse* Arena::CreateMaybeMessage< ::crypto::SignResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::SignResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::VerifyRequest* Arena::CreateMaybeMessage< ::crypto::VerifyRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::VerifyRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::VerifyResponse* Arena::CreateMaybeMessage< ::crypto::VerifyResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::VerifyResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::KeyRequest* Arena::CreateMaybeMessage< ::crypto::KeyRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::KeyRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::KeyResponse* Arena::CreateMaybeMessage< ::crypto::KeyResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::KeyResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::UserKeyPermissions* Arena::CreateMaybeMessage< ::crypto::UserKeyPermissions >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::UserKeyPermissions >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::BootSystemRequest* Arena::CreateMaybeMessage< ::crypto::BootSystemRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::BootSystemRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::Empty* Arena::CreateMaybeMessage< ::crypto::Empty >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::Empty >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::CryptoConfig* Arena::CreateMaybeMessage< ::crypto::CryptoConfig >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::CryptoConfig >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::ConfigureRequest* Arena::CreateMaybeMessage< ::crypto::ConfigureRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::ConfigureRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::AddProcessRequest* Arena::CreateMaybeMessage< ::crypto::AddProcessRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::AddProcessRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::EncryptRequest* Arena::CreateMaybeMessage< ::crypto::EncryptRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::EncryptRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::EncryptResponse* Arena::CreateMaybeMessage< ::crypto::EncryptResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::EncryptResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::DecryptRequest* Arena::CreateMaybeMessage< ::crypto::DecryptRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::DecryptRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::DecryptResponse* Arena::CreateMaybeMessage< ::crypto::DecryptResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::DecryptResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::AESEncryptRequest* Arena::CreateMaybeMessage< ::crypto::AESEncryptRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::AESEncryptRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::AESEncryptResponse* Arena::CreateMaybeMessage< ::crypto::AESEncryptResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::AESEncryptResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::AESDecryptRequest* Arena::CreateMaybeMessage< ::crypto::AESDecryptRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::AESDecryptRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::crypto::AESDecryptResponse* Arena::CreateMaybeMessage< ::crypto::AESDecryptResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::crypto::AESDecryptResponse >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/proto/encryption.pb.h b/proto/encryption.pb.h new file mode 100644 index 00000000..3b5088b4 --- /dev/null +++ b/proto/encryption.pb.h @@ -0,0 +1,8805 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/encryption.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fencryption_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fencryption_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3018000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3018001 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fencryption_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fencryption_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[33] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_proto_2fencryption_2eproto; +namespace crypto { +class AESDecryptRequest; +struct AESDecryptRequestDefaultTypeInternal; +extern AESDecryptRequestDefaultTypeInternal _AESDecryptRequest_default_instance_; +class AESDecryptResponse; +struct AESDecryptResponseDefaultTypeInternal; +extern AESDecryptResponseDefaultTypeInternal _AESDecryptResponse_default_instance_; +class AESEncryptRequest; +struct AESEncryptRequestDefaultTypeInternal; +extern AESEncryptRequestDefaultTypeInternal _AESEncryptRequest_default_instance_; +class AESEncryptResponse; +struct AESEncryptResponseDefaultTypeInternal; +extern AESEncryptResponseDefaultTypeInternal _AESEncryptResponse_default_instance_; +class AddProcessRequest; +struct AddProcessRequestDefaultTypeInternal; +extern AddProcessRequestDefaultTypeInternal _AddProcessRequest_default_instance_; +class AsymetricDecryptRequest; +struct AsymetricDecryptRequestDefaultTypeInternal; +extern AsymetricDecryptRequestDefaultTypeInternal _AsymetricDecryptRequest_default_instance_; +class AsymetricDecryptResponse; +struct AsymetricDecryptResponseDefaultTypeInternal; +extern AsymetricDecryptResponseDefaultTypeInternal _AsymetricDecryptResponse_default_instance_; +class AsymetricEncryptRequest; +struct AsymetricEncryptRequestDefaultTypeInternal; +extern AsymetricEncryptRequestDefaultTypeInternal _AsymetricEncryptRequest_default_instance_; +class AsymetricEncryptResponse; +struct AsymetricEncryptResponseDefaultTypeInternal; +extern AsymetricEncryptResponseDefaultTypeInternal _AsymetricEncryptResponse_default_instance_; +class BootSystemRequest; +struct BootSystemRequestDefaultTypeInternal; +extern BootSystemRequestDefaultTypeInternal _BootSystemRequest_default_instance_; +class ConfigureRequest; +struct ConfigureRequestDefaultTypeInternal; +extern ConfigureRequestDefaultTypeInternal _ConfigureRequest_default_instance_; +class CryptoConfig; +struct CryptoConfigDefaultTypeInternal; +extern CryptoConfigDefaultTypeInternal _CryptoConfig_default_instance_; +class DecryptRequest; +struct DecryptRequestDefaultTypeInternal; +extern DecryptRequestDefaultTypeInternal _DecryptRequest_default_instance_; +class DecryptResponse; +struct DecryptResponseDefaultTypeInternal; +extern DecryptResponseDefaultTypeInternal _DecryptResponse_default_instance_; +class Empty; +struct EmptyDefaultTypeInternal; +extern EmptyDefaultTypeInternal _Empty_default_instance_; +class EncryptRequest; +struct EncryptRequestDefaultTypeInternal; +extern EncryptRequestDefaultTypeInternal _EncryptRequest_default_instance_; +class EncryptResponse; +struct EncryptResponseDefaultTypeInternal; +extern EncryptResponseDefaultTypeInternal _EncryptResponse_default_instance_; +class GenerateAESKeyRequest; +struct GenerateAESKeyRequestDefaultTypeInternal; +extern GenerateAESKeyRequestDefaultTypeInternal _GenerateAESKeyRequest_default_instance_; +class GenerateAESKeyResponse; +struct GenerateAESKeyResponseDefaultTypeInternal; +extern GenerateAESKeyResponseDefaultTypeInternal _GenerateAESKeyResponse_default_instance_; +class GenerateKeyPairRequest; +struct GenerateKeyPairRequestDefaultTypeInternal; +extern GenerateKeyPairRequestDefaultTypeInternal _GenerateKeyPairRequest_default_instance_; +class GenerateKeyPairResponse; +struct GenerateKeyPairResponseDefaultTypeInternal; +extern GenerateKeyPairResponseDefaultTypeInternal _GenerateKeyPairResponse_default_instance_; +class GetAESLengthRequest; +struct GetAESLengthRequestDefaultTypeInternal; +extern GetAESLengthRequestDefaultTypeInternal _GetAESLengthRequest_default_instance_; +class GetHashLengthRequest; +struct GetHashLengthRequestDefaultTypeInternal; +extern GetHashLengthRequestDefaultTypeInternal _GetHashLengthRequest_default_instance_; +class GetLengthRequest; +struct GetLengthRequestDefaultTypeInternal; +extern GetLengthRequestDefaultTypeInternal _GetLengthRequest_default_instance_; +class GetLengthResponse; +struct GetLengthResponseDefaultTypeInternal; +extern GetLengthResponseDefaultTypeInternal _GetLengthResponse_default_instance_; +class GetWholeLength; +struct GetWholeLengthDefaultTypeInternal; +extern GetWholeLengthDefaultTypeInternal _GetWholeLength_default_instance_; +class KeyRequest; +struct KeyRequestDefaultTypeInternal; +extern KeyRequestDefaultTypeInternal _KeyRequest_default_instance_; +class KeyResponse; +struct KeyResponseDefaultTypeInternal; +extern KeyResponseDefaultTypeInternal _KeyResponse_default_instance_; +class SignRequest; +struct SignRequestDefaultTypeInternal; +extern SignRequestDefaultTypeInternal _SignRequest_default_instance_; +class SignResponse; +struct SignResponseDefaultTypeInternal; +extern SignResponseDefaultTypeInternal _SignResponse_default_instance_; +class UserKeyPermissions; +struct UserKeyPermissionsDefaultTypeInternal; +extern UserKeyPermissionsDefaultTypeInternal _UserKeyPermissions_default_instance_; +class VerifyRequest; +struct VerifyRequestDefaultTypeInternal; +extern VerifyRequestDefaultTypeInternal _VerifyRequest_default_instance_; +class VerifyResponse; +struct VerifyResponseDefaultTypeInternal; +extern VerifyResponseDefaultTypeInternal _VerifyResponse_default_instance_; +} // namespace crypto +PROTOBUF_NAMESPACE_OPEN +template<> ::crypto::AESDecryptRequest* Arena::CreateMaybeMessage<::crypto::AESDecryptRequest>(Arena*); +template<> ::crypto::AESDecryptResponse* Arena::CreateMaybeMessage<::crypto::AESDecryptResponse>(Arena*); +template<> ::crypto::AESEncryptRequest* Arena::CreateMaybeMessage<::crypto::AESEncryptRequest>(Arena*); +template<> ::crypto::AESEncryptResponse* Arena::CreateMaybeMessage<::crypto::AESEncryptResponse>(Arena*); +template<> ::crypto::AddProcessRequest* Arena::CreateMaybeMessage<::crypto::AddProcessRequest>(Arena*); +template<> ::crypto::AsymetricDecryptRequest* Arena::CreateMaybeMessage<::crypto::AsymetricDecryptRequest>(Arena*); +template<> ::crypto::AsymetricDecryptResponse* Arena::CreateMaybeMessage<::crypto::AsymetricDecryptResponse>(Arena*); +template<> ::crypto::AsymetricEncryptRequest* Arena::CreateMaybeMessage<::crypto::AsymetricEncryptRequest>(Arena*); +template<> ::crypto::AsymetricEncryptResponse* Arena::CreateMaybeMessage<::crypto::AsymetricEncryptResponse>(Arena*); +template<> ::crypto::BootSystemRequest* Arena::CreateMaybeMessage<::crypto::BootSystemRequest>(Arena*); +template<> ::crypto::ConfigureRequest* Arena::CreateMaybeMessage<::crypto::ConfigureRequest>(Arena*); +template<> ::crypto::CryptoConfig* Arena::CreateMaybeMessage<::crypto::CryptoConfig>(Arena*); +template<> ::crypto::DecryptRequest* Arena::CreateMaybeMessage<::crypto::DecryptRequest>(Arena*); +template<> ::crypto::DecryptResponse* Arena::CreateMaybeMessage<::crypto::DecryptResponse>(Arena*); +template<> ::crypto::Empty* Arena::CreateMaybeMessage<::crypto::Empty>(Arena*); +template<> ::crypto::EncryptRequest* Arena::CreateMaybeMessage<::crypto::EncryptRequest>(Arena*); +template<> ::crypto::EncryptResponse* Arena::CreateMaybeMessage<::crypto::EncryptResponse>(Arena*); +template<> ::crypto::GenerateAESKeyRequest* Arena::CreateMaybeMessage<::crypto::GenerateAESKeyRequest>(Arena*); +template<> ::crypto::GenerateAESKeyResponse* Arena::CreateMaybeMessage<::crypto::GenerateAESKeyResponse>(Arena*); +template<> ::crypto::GenerateKeyPairRequest* Arena::CreateMaybeMessage<::crypto::GenerateKeyPairRequest>(Arena*); +template<> ::crypto::GenerateKeyPairResponse* Arena::CreateMaybeMessage<::crypto::GenerateKeyPairResponse>(Arena*); +template<> ::crypto::GetAESLengthRequest* Arena::CreateMaybeMessage<::crypto::GetAESLengthRequest>(Arena*); +template<> ::crypto::GetHashLengthRequest* Arena::CreateMaybeMessage<::crypto::GetHashLengthRequest>(Arena*); +template<> ::crypto::GetLengthRequest* Arena::CreateMaybeMessage<::crypto::GetLengthRequest>(Arena*); +template<> ::crypto::GetLengthResponse* Arena::CreateMaybeMessage<::crypto::GetLengthResponse>(Arena*); +template<> ::crypto::GetWholeLength* Arena::CreateMaybeMessage<::crypto::GetWholeLength>(Arena*); +template<> ::crypto::KeyRequest* Arena::CreateMaybeMessage<::crypto::KeyRequest>(Arena*); +template<> ::crypto::KeyResponse* Arena::CreateMaybeMessage<::crypto::KeyResponse>(Arena*); +template<> ::crypto::SignRequest* Arena::CreateMaybeMessage<::crypto::SignRequest>(Arena*); +template<> ::crypto::SignResponse* Arena::CreateMaybeMessage<::crypto::SignResponse>(Arena*); +template<> ::crypto::UserKeyPermissions* Arena::CreateMaybeMessage<::crypto::UserKeyPermissions>(Arena*); +template<> ::crypto::VerifyRequest* Arena::CreateMaybeMessage<::crypto::VerifyRequest>(Arena*); +template<> ::crypto::VerifyResponse* Arena::CreateMaybeMessage<::crypto::VerifyResponse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace crypto { + +enum KeyPermission : int { + VERIFY = 0, + SIGN = 1, + ENCRYPT = 2, + DECRYPT = 3, + EXPORTABLE = 4, + KeyPermission_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + KeyPermission_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool KeyPermission_IsValid(int value); +constexpr KeyPermission KeyPermission_MIN = VERIFY; +constexpr KeyPermission KeyPermission_MAX = EXPORTABLE; +constexpr int KeyPermission_ARRAYSIZE = KeyPermission_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* KeyPermission_descriptor(); +template +inline const std::string& KeyPermission_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function KeyPermission_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + KeyPermission_descriptor(), enum_t_value); +} +inline bool KeyPermission_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, KeyPermission* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + KeyPermission_descriptor(), name, value); +} +enum AESChainingMode : int { + ECB = 0, + CBC = 1, + CFB = 2, + OFB = 3, + CTR = 4, + AESChainingMode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + AESChainingMode_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool AESChainingMode_IsValid(int value); +constexpr AESChainingMode AESChainingMode_MIN = ECB; +constexpr AESChainingMode AESChainingMode_MAX = CTR; +constexpr int AESChainingMode_ARRAYSIZE = AESChainingMode_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AESChainingMode_descriptor(); +template +inline const std::string& AESChainingMode_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function AESChainingMode_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + AESChainingMode_descriptor(), enum_t_value); +} +inline bool AESChainingMode_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AESChainingMode* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + AESChainingMode_descriptor(), name, value); +} +enum AsymmetricFunction : int { + RSA = 0, + ECC = 1, + AsymmetricFunction_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + AsymmetricFunction_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool AsymmetricFunction_IsValid(int value); +constexpr AsymmetricFunction AsymmetricFunction_MIN = RSA; +constexpr AsymmetricFunction AsymmetricFunction_MAX = ECC; +constexpr int AsymmetricFunction_ARRAYSIZE = AsymmetricFunction_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AsymmetricFunction_descriptor(); +template +inline const std::string& AsymmetricFunction_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function AsymmetricFunction_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + AsymmetricFunction_descriptor(), enum_t_value); +} +inline bool AsymmetricFunction_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AsymmetricFunction* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + AsymmetricFunction_descriptor(), name, value); +} +enum SHAAlgorithm : int { + SHA256 = 0, + SHA3_512 = 1, + SHAAlgorithm_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + SHAAlgorithm_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool SHAAlgorithm_IsValid(int value); +constexpr SHAAlgorithm SHAAlgorithm_MIN = SHA256; +constexpr SHAAlgorithm SHAAlgorithm_MAX = SHA3_512; +constexpr int SHAAlgorithm_ARRAYSIZE = SHAAlgorithm_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SHAAlgorithm_descriptor(); +template +inline const std::string& SHAAlgorithm_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SHAAlgorithm_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + SHAAlgorithm_descriptor(), enum_t_value); +} +inline bool SHAAlgorithm_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SHAAlgorithm* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + SHAAlgorithm_descriptor(), name, value); +} +enum AESKeyLength : int { + AES_128 = 0, + AES_192 = 1, + AES_256 = 2, + AESKeyLength_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + AESKeyLength_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool AESKeyLength_IsValid(int value); +constexpr AESKeyLength AESKeyLength_MIN = AES_128; +constexpr AESKeyLength AESKeyLength_MAX = AES_256; +constexpr int AESKeyLength_ARRAYSIZE = AESKeyLength_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AESKeyLength_descriptor(); +template +inline const std::string& AESKeyLength_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function AESKeyLength_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + AESKeyLength_descriptor(), enum_t_value); +} +inline bool AESKeyLength_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AESKeyLength* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + AESKeyLength_descriptor(), name, value); +} +// =================================================================== + +class AsymetricEncryptRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.AsymetricEncryptRequest) */ { + public: + inline AsymetricEncryptRequest() : AsymetricEncryptRequest(nullptr) {} + ~AsymetricEncryptRequest() override; + explicit constexpr AsymetricEncryptRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AsymetricEncryptRequest(const AsymetricEncryptRequest& from); + AsymetricEncryptRequest(AsymetricEncryptRequest&& from) noexcept + : AsymetricEncryptRequest() { + *this = ::std::move(from); + } + + inline AsymetricEncryptRequest& operator=(const AsymetricEncryptRequest& from) { + CopyFrom(from); + return *this; + } + inline AsymetricEncryptRequest& operator=(AsymetricEncryptRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AsymetricEncryptRequest& default_instance() { + return *internal_default_instance(); + } + static inline const AsymetricEncryptRequest* internal_default_instance() { + return reinterpret_cast( + &_AsymetricEncryptRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(AsymetricEncryptRequest& a, AsymetricEncryptRequest& b) { + a.Swap(&b); + } + inline void Swap(AsymetricEncryptRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AsymetricEncryptRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AsymetricEncryptRequest* New() const final { + return new AsymetricEncryptRequest(); + } + + AsymetricEncryptRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AsymetricEncryptRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const AsymetricEncryptRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AsymetricEncryptRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.AsymetricEncryptRequest"; + } + protected: + explicit AsymetricEncryptRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kKeyIdFieldNumber = 2, + kDataFieldNumber = 3, + kSenderIdFieldNumber = 1, + }; + // string keyId = 2; + void clear_keyid(); + const std::string& keyid() const; + template + void set_keyid(ArgT0&& arg0, ArgT... args); + std::string* mutable_keyid(); + PROTOBUF_MUST_USE_RESULT std::string* release_keyid(); + void set_allocated_keyid(std::string* keyid); + private: + const std::string& _internal_keyid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_keyid(const std::string& value); + std::string* _internal_mutable_keyid(); + public: + + // bytes data = 3; + void clear_data(); + const std::string& data() const; + template + void set_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_data(); + PROTOBUF_MUST_USE_RESULT std::string* release_data(); + void set_allocated_data(std::string* data); + private: + const std::string& _internal_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_data(const std::string& value); + std::string* _internal_mutable_data(); + public: + + // int32 senderId = 1; + void clear_senderid(); + ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; + void set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_senderid() const; + void _internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.AsymetricEncryptRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr keyid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + ::PROTOBUF_NAMESPACE_ID::int32 senderid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class AsymetricEncryptResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.AsymetricEncryptResponse) */ { + public: + inline AsymetricEncryptResponse() : AsymetricEncryptResponse(nullptr) {} + ~AsymetricEncryptResponse() override; + explicit constexpr AsymetricEncryptResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AsymetricEncryptResponse(const AsymetricEncryptResponse& from); + AsymetricEncryptResponse(AsymetricEncryptResponse&& from) noexcept + : AsymetricEncryptResponse() { + *this = ::std::move(from); + } + + inline AsymetricEncryptResponse& operator=(const AsymetricEncryptResponse& from) { + CopyFrom(from); + return *this; + } + inline AsymetricEncryptResponse& operator=(AsymetricEncryptResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AsymetricEncryptResponse& default_instance() { + return *internal_default_instance(); + } + static inline const AsymetricEncryptResponse* internal_default_instance() { + return reinterpret_cast( + &_AsymetricEncryptResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(AsymetricEncryptResponse& a, AsymetricEncryptResponse& b) { + a.Swap(&b); + } + inline void Swap(AsymetricEncryptResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AsymetricEncryptResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AsymetricEncryptResponse* New() const final { + return new AsymetricEncryptResponse(); + } + + AsymetricEncryptResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AsymetricEncryptResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const AsymetricEncryptResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AsymetricEncryptResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.AsymetricEncryptResponse"; + } + protected: + explicit AsymetricEncryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEncryptedDataFieldNumber = 1, + }; + // bytes encrypted_data = 1; + void clear_encrypted_data(); + const std::string& encrypted_data() const; + template + void set_encrypted_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_encrypted_data(); + PROTOBUF_MUST_USE_RESULT std::string* release_encrypted_data(); + void set_allocated_encrypted_data(std::string* encrypted_data); + private: + const std::string& _internal_encrypted_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_encrypted_data(const std::string& value); + std::string* _internal_mutable_encrypted_data(); + public: + + // @@protoc_insertion_point(class_scope:crypto.AsymetricEncryptResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encrypted_data_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class AsymetricDecryptRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.AsymetricDecryptRequest) */ { + public: + inline AsymetricDecryptRequest() : AsymetricDecryptRequest(nullptr) {} + ~AsymetricDecryptRequest() override; + explicit constexpr AsymetricDecryptRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AsymetricDecryptRequest(const AsymetricDecryptRequest& from); + AsymetricDecryptRequest(AsymetricDecryptRequest&& from) noexcept + : AsymetricDecryptRequest() { + *this = ::std::move(from); + } + + inline AsymetricDecryptRequest& operator=(const AsymetricDecryptRequest& from) { + CopyFrom(from); + return *this; + } + inline AsymetricDecryptRequest& operator=(AsymetricDecryptRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AsymetricDecryptRequest& default_instance() { + return *internal_default_instance(); + } + static inline const AsymetricDecryptRequest* internal_default_instance() { + return reinterpret_cast( + &_AsymetricDecryptRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(AsymetricDecryptRequest& a, AsymetricDecryptRequest& b) { + a.Swap(&b); + } + inline void Swap(AsymetricDecryptRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AsymetricDecryptRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AsymetricDecryptRequest* New() const final { + return new AsymetricDecryptRequest(); + } + + AsymetricDecryptRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AsymetricDecryptRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const AsymetricDecryptRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AsymetricDecryptRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.AsymetricDecryptRequest"; + } + protected: + explicit AsymetricDecryptRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kKeyIdFieldNumber = 2, + kDataFieldNumber = 3, + kReceiverIdFieldNumber = 1, + }; + // string keyId = 2; + void clear_keyid(); + const std::string& keyid() const; + template + void set_keyid(ArgT0&& arg0, ArgT... args); + std::string* mutable_keyid(); + PROTOBUF_MUST_USE_RESULT std::string* release_keyid(); + void set_allocated_keyid(std::string* keyid); + private: + const std::string& _internal_keyid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_keyid(const std::string& value); + std::string* _internal_mutable_keyid(); + public: + + // bytes data = 3; + void clear_data(); + const std::string& data() const; + template + void set_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_data(); + PROTOBUF_MUST_USE_RESULT std::string* release_data(); + void set_allocated_data(std::string* data); + private: + const std::string& _internal_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_data(const std::string& value); + std::string* _internal_mutable_data(); + public: + + // int32 receiverId = 1; + void clear_receiverid(); + ::PROTOBUF_NAMESPACE_ID::int32 receiverid() const; + void set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiverid() const; + void _internal_set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.AsymetricDecryptRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr keyid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + ::PROTOBUF_NAMESPACE_ID::int32 receiverid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class GetHashLengthRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.GetHashLengthRequest) */ { + public: + inline GetHashLengthRequest() : GetHashLengthRequest(nullptr) {} + ~GetHashLengthRequest() override; + explicit constexpr GetHashLengthRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetHashLengthRequest(const GetHashLengthRequest& from); + GetHashLengthRequest(GetHashLengthRequest&& from) noexcept + : GetHashLengthRequest() { + *this = ::std::move(from); + } + + inline GetHashLengthRequest& operator=(const GetHashLengthRequest& from) { + CopyFrom(from); + return *this; + } + inline GetHashLengthRequest& operator=(GetHashLengthRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetHashLengthRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GetHashLengthRequest* internal_default_instance() { + return reinterpret_cast( + &_GetHashLengthRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(GetHashLengthRequest& a, GetHashLengthRequest& b) { + a.Swap(&b); + } + inline void Swap(GetHashLengthRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetHashLengthRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline GetHashLengthRequest* New() const final { + return new GetHashLengthRequest(); + } + + GetHashLengthRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetHashLengthRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GetHashLengthRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetHashLengthRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.GetHashLengthRequest"; + } + protected: + explicit GetHashLengthRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFuncFieldNumber = 1, + kDataLenFieldNumber = 2, + }; + // .crypto.SHAAlgorithm func = 1; + void clear_func(); + ::crypto::SHAAlgorithm func() const; + void set_func(::crypto::SHAAlgorithm value); + private: + ::crypto::SHAAlgorithm _internal_func() const; + void _internal_set_func(::crypto::SHAAlgorithm value); + public: + + // int32 dataLen = 2; + void clear_datalen(); + ::PROTOBUF_NAMESPACE_ID::int32 datalen() const; + void set_datalen(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_datalen() const; + void _internal_set_datalen(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.GetHashLengthRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + int func_; + ::PROTOBUF_NAMESPACE_ID::int32 datalen_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class GetAESLengthRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.GetAESLengthRequest) */ { + public: + inline GetAESLengthRequest() : GetAESLengthRequest(nullptr) {} + ~GetAESLengthRequest() override; + explicit constexpr GetAESLengthRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetAESLengthRequest(const GetAESLengthRequest& from); + GetAESLengthRequest(GetAESLengthRequest&& from) noexcept + : GetAESLengthRequest() { + *this = ::std::move(from); + } + + inline GetAESLengthRequest& operator=(const GetAESLengthRequest& from) { + CopyFrom(from); + return *this; + } + inline GetAESLengthRequest& operator=(GetAESLengthRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetAESLengthRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GetAESLengthRequest* internal_default_instance() { + return reinterpret_cast( + &_GetAESLengthRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(GetAESLengthRequest& a, GetAESLengthRequest& b) { + a.Swap(&b); + } + inline void Swap(GetAESLengthRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetAESLengthRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline GetAESLengthRequest* New() const final { + return new GetAESLengthRequest(); + } + + GetAESLengthRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetAESLengthRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GetAESLengthRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetAESLengthRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.GetAESLengthRequest"; + } + protected: + explicit GetAESLengthRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDataLenFieldNumber = 1, + kIsFirstFieldNumber = 2, + kChainingModeFieldNumber = 3, + }; + // int32 dataLen = 1; + void clear_datalen(); + ::PROTOBUF_NAMESPACE_ID::int32 datalen() const; + void set_datalen(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_datalen() const; + void _internal_set_datalen(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // bool isFirst = 2; + void clear_isfirst(); + bool isfirst() const; + void set_isfirst(bool value); + private: + bool _internal_isfirst() const; + void _internal_set_isfirst(bool value); + public: + + // .crypto.AESChainingMode chainingMode = 3; + void clear_chainingmode(); + ::crypto::AESChainingMode chainingmode() const; + void set_chainingmode(::crypto::AESChainingMode value); + private: + ::crypto::AESChainingMode _internal_chainingmode() const; + void _internal_set_chainingmode(::crypto::AESChainingMode value); + public: + + // @@protoc_insertion_point(class_scope:crypto.GetAESLengthRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::int32 datalen_; + bool isfirst_; + int chainingmode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class AsymetricDecryptResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.AsymetricDecryptResponse) */ { + public: + inline AsymetricDecryptResponse() : AsymetricDecryptResponse(nullptr) {} + ~AsymetricDecryptResponse() override; + explicit constexpr AsymetricDecryptResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AsymetricDecryptResponse(const AsymetricDecryptResponse& from); + AsymetricDecryptResponse(AsymetricDecryptResponse&& from) noexcept + : AsymetricDecryptResponse() { + *this = ::std::move(from); + } + + inline AsymetricDecryptResponse& operator=(const AsymetricDecryptResponse& from) { + CopyFrom(from); + return *this; + } + inline AsymetricDecryptResponse& operator=(AsymetricDecryptResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AsymetricDecryptResponse& default_instance() { + return *internal_default_instance(); + } + static inline const AsymetricDecryptResponse* internal_default_instance() { + return reinterpret_cast( + &_AsymetricDecryptResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(AsymetricDecryptResponse& a, AsymetricDecryptResponse& b) { + a.Swap(&b); + } + inline void Swap(AsymetricDecryptResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AsymetricDecryptResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AsymetricDecryptResponse* New() const final { + return new AsymetricDecryptResponse(); + } + + AsymetricDecryptResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AsymetricDecryptResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const AsymetricDecryptResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AsymetricDecryptResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.AsymetricDecryptResponse"; + } + protected: + explicit AsymetricDecryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDecryptedDataFieldNumber = 1, + }; + // bytes decrypted_data = 1; + void clear_decrypted_data(); + const std::string& decrypted_data() const; + template + void set_decrypted_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_decrypted_data(); + PROTOBUF_MUST_USE_RESULT std::string* release_decrypted_data(); + void set_allocated_decrypted_data(std::string* decrypted_data); + private: + const std::string& _internal_decrypted_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_decrypted_data(const std::string& value); + std::string* _internal_mutable_decrypted_data(); + public: + + // @@protoc_insertion_point(class_scope:crypto.AsymetricDecryptResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr decrypted_data_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class GetLengthRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.GetLengthRequest) */ { + public: + inline GetLengthRequest() : GetLengthRequest(nullptr) {} + ~GetLengthRequest() override; + explicit constexpr GetLengthRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetLengthRequest(const GetLengthRequest& from); + GetLengthRequest(GetLengthRequest&& from) noexcept + : GetLengthRequest() { + *this = ::std::move(from); + } + + inline GetLengthRequest& operator=(const GetLengthRequest& from) { + CopyFrom(from); + return *this; + } + inline GetLengthRequest& operator=(GetLengthRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetLengthRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GetLengthRequest* internal_default_instance() { + return reinterpret_cast( + &_GetLengthRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(GetLengthRequest& a, GetLengthRequest& b) { + a.Swap(&b); + } + inline void Swap(GetLengthRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetLengthRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline GetLengthRequest* New() const final { + return new GetLengthRequest(); + } + + GetLengthRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetLengthRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GetLengthRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetLengthRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.GetLengthRequest"; + } + protected: + explicit GetLengthRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInLenFieldNumber = 1, + }; + // int32 in_len = 1; + void clear_in_len(); + ::PROTOBUF_NAMESPACE_ID::int32 in_len() const; + void set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_in_len() const; + void _internal_set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.GetLengthRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::int32 in_len_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class GetLengthResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.GetLengthResponse) */ { + public: + inline GetLengthResponse() : GetLengthResponse(nullptr) {} + ~GetLengthResponse() override; + explicit constexpr GetLengthResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetLengthResponse(const GetLengthResponse& from); + GetLengthResponse(GetLengthResponse&& from) noexcept + : GetLengthResponse() { + *this = ::std::move(from); + } + + inline GetLengthResponse& operator=(const GetLengthResponse& from) { + CopyFrom(from); + return *this; + } + inline GetLengthResponse& operator=(GetLengthResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetLengthResponse& default_instance() { + return *internal_default_instance(); + } + static inline const GetLengthResponse* internal_default_instance() { + return reinterpret_cast( + &_GetLengthResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(GetLengthResponse& a, GetLengthResponse& b) { + a.Swap(&b); + } + inline void Swap(GetLengthResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetLengthResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline GetLengthResponse* New() const final { + return new GetLengthResponse(); + } + + GetLengthResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetLengthResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GetLengthResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetLengthResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.GetLengthResponse"; + } + protected: + explicit GetLengthResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kLenFieldNumber = 1, + }; + // int32 len = 1; + void clear_len(); + ::PROTOBUF_NAMESPACE_ID::int32 len() const; + void set_len(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_len() const; + void _internal_set_len(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.GetLengthResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::int32 len_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class GetWholeLength final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.GetWholeLength) */ { + public: + inline GetWholeLength() : GetWholeLength(nullptr) {} + ~GetWholeLength() override; + explicit constexpr GetWholeLength(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetWholeLength(const GetWholeLength& from); + GetWholeLength(GetWholeLength&& from) noexcept + : GetWholeLength() { + *this = ::std::move(from); + } + + inline GetWholeLength& operator=(const GetWholeLength& from) { + CopyFrom(from); + return *this; + } + inline GetWholeLength& operator=(GetWholeLength&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetWholeLength& default_instance() { + return *internal_default_instance(); + } + static inline const GetWholeLength* internal_default_instance() { + return reinterpret_cast( + &_GetWholeLength_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(GetWholeLength& a, GetWholeLength& b) { + a.Swap(&b); + } + inline void Swap(GetWholeLength* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetWholeLength* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline GetWholeLength* New() const final { + return new GetWholeLength(); + } + + GetWholeLength* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetWholeLength& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GetWholeLength& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetWholeLength* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.GetWholeLength"; + } + protected: + explicit GetWholeLength(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSenderIdFieldNumber = 1, + kInLenFieldNumber = 2, + }; + // int32 senderId = 1; + void clear_senderid(); + ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; + void set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_senderid() const; + void _internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 inLen = 2; + void clear_inlen(); + ::PROTOBUF_NAMESPACE_ID::int32 inlen() const; + void set_inlen(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_inlen() const; + void _internal_set_inlen(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.GetWholeLength) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::int32 senderid_; + ::PROTOBUF_NAMESPACE_ID::int32 inlen_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class GenerateAESKeyRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.GenerateAESKeyRequest) */ { + public: + inline GenerateAESKeyRequest() : GenerateAESKeyRequest(nullptr) {} + ~GenerateAESKeyRequest() override; + explicit constexpr GenerateAESKeyRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GenerateAESKeyRequest(const GenerateAESKeyRequest& from); + GenerateAESKeyRequest(GenerateAESKeyRequest&& from) noexcept + : GenerateAESKeyRequest() { + *this = ::std::move(from); + } + + inline GenerateAESKeyRequest& operator=(const GenerateAESKeyRequest& from) { + CopyFrom(from); + return *this; + } + inline GenerateAESKeyRequest& operator=(GenerateAESKeyRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GenerateAESKeyRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GenerateAESKeyRequest* internal_default_instance() { + return reinterpret_cast( + &_GenerateAESKeyRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(GenerateAESKeyRequest& a, GenerateAESKeyRequest& b) { + a.Swap(&b); + } + inline void Swap(GenerateAESKeyRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GenerateAESKeyRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline GenerateAESKeyRequest* New() const final { + return new GenerateAESKeyRequest(); + } + + GenerateAESKeyRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GenerateAESKeyRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GenerateAESKeyRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GenerateAESKeyRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.GenerateAESKeyRequest"; + } + protected: + explicit GenerateAESKeyRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPermissionsFieldNumber = 2, + kUserIdFieldNumber = 1, + kKeyLengthFieldNumber = 3, + kDestUserIdFieldNumber = 4, + }; + // repeated .crypto.KeyPermission permissions = 2; + int permissions_size() const; + private: + int _internal_permissions_size() const; + public: + void clear_permissions(); + private: + ::crypto::KeyPermission _internal_permissions(int index) const; + void _internal_add_permissions(::crypto::KeyPermission value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_permissions(); + public: + ::crypto::KeyPermission permissions(int index) const; + void set_permissions(int index, ::crypto::KeyPermission value); + void add_permissions(::crypto::KeyPermission value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& permissions() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_permissions(); + + // int32 user_id = 1; + void clear_user_id(); + ::PROTOBUF_NAMESPACE_ID::int32 user_id() const; + void set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_user_id() const; + void _internal_set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // .crypto.AESKeyLength keyLength = 3; + void clear_keylength(); + ::crypto::AESKeyLength keylength() const; + void set_keylength(::crypto::AESKeyLength value); + private: + ::crypto::AESKeyLength _internal_keylength() const; + void _internal_set_keylength(::crypto::AESKeyLength value); + public: + + // int32 destUserId = 4; + void clear_destuserid(); + ::PROTOBUF_NAMESPACE_ID::int32 destuserid() const; + void set_destuserid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_destuserid() const; + void _internal_set_destuserid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.GenerateAESKeyRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField permissions_; + mutable std::atomic _permissions_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::int32 user_id_; + int keylength_; + ::PROTOBUF_NAMESPACE_ID::int32 destuserid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class GenerateAESKeyResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.GenerateAESKeyResponse) */ { + public: + inline GenerateAESKeyResponse() : GenerateAESKeyResponse(nullptr) {} + ~GenerateAESKeyResponse() override; + explicit constexpr GenerateAESKeyResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GenerateAESKeyResponse(const GenerateAESKeyResponse& from); + GenerateAESKeyResponse(GenerateAESKeyResponse&& from) noexcept + : GenerateAESKeyResponse() { + *this = ::std::move(from); + } + + inline GenerateAESKeyResponse& operator=(const GenerateAESKeyResponse& from) { + CopyFrom(from); + return *this; + } + inline GenerateAESKeyResponse& operator=(GenerateAESKeyResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GenerateAESKeyResponse& default_instance() { + return *internal_default_instance(); + } + static inline const GenerateAESKeyResponse* internal_default_instance() { + return reinterpret_cast( + &_GenerateAESKeyResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(GenerateAESKeyResponse& a, GenerateAESKeyResponse& b) { + a.Swap(&b); + } + inline void Swap(GenerateAESKeyResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GenerateAESKeyResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline GenerateAESKeyResponse* New() const final { + return new GenerateAESKeyResponse(); + } + + GenerateAESKeyResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GenerateAESKeyResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GenerateAESKeyResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GenerateAESKeyResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.GenerateAESKeyResponse"; + } + protected: + explicit GenerateAESKeyResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAesKeyFieldNumber = 1, + }; + // string aes_key = 1; + void clear_aes_key(); + const std::string& aes_key() const; + template + void set_aes_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_aes_key(); + PROTOBUF_MUST_USE_RESULT std::string* release_aes_key(); + void set_allocated_aes_key(std::string* aes_key); + private: + const std::string& _internal_aes_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_aes_key(const std::string& value); + std::string* _internal_mutable_aes_key(); + public: + + // @@protoc_insertion_point(class_scope:crypto.GenerateAESKeyResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr aes_key_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class GenerateKeyPairRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.GenerateKeyPairRequest) */ { + public: + inline GenerateKeyPairRequest() : GenerateKeyPairRequest(nullptr) {} + ~GenerateKeyPairRequest() override; + explicit constexpr GenerateKeyPairRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GenerateKeyPairRequest(const GenerateKeyPairRequest& from); + GenerateKeyPairRequest(GenerateKeyPairRequest&& from) noexcept + : GenerateKeyPairRequest() { + *this = ::std::move(from); + } + + inline GenerateKeyPairRequest& operator=(const GenerateKeyPairRequest& from) { + CopyFrom(from); + return *this; + } + inline GenerateKeyPairRequest& operator=(GenerateKeyPairRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GenerateKeyPairRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GenerateKeyPairRequest* internal_default_instance() { + return reinterpret_cast( + &_GenerateKeyPairRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(GenerateKeyPairRequest& a, GenerateKeyPairRequest& b) { + a.Swap(&b); + } + inline void Swap(GenerateKeyPairRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GenerateKeyPairRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline GenerateKeyPairRequest* New() const final { + return new GenerateKeyPairRequest(); + } + + GenerateKeyPairRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GenerateKeyPairRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GenerateKeyPairRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GenerateKeyPairRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.GenerateKeyPairRequest"; + } + protected: + explicit GenerateKeyPairRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPermissionsFieldNumber = 2, + kUserIdFieldNumber = 1, + }; + // repeated .crypto.KeyPermission permissions = 2; + int permissions_size() const; + private: + int _internal_permissions_size() const; + public: + void clear_permissions(); + private: + ::crypto::KeyPermission _internal_permissions(int index) const; + void _internal_add_permissions(::crypto::KeyPermission value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_permissions(); + public: + ::crypto::KeyPermission permissions(int index) const; + void set_permissions(int index, ::crypto::KeyPermission value); + void add_permissions(::crypto::KeyPermission value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& permissions() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_permissions(); + + // int32 user_id = 1; + void clear_user_id(); + ::PROTOBUF_NAMESPACE_ID::int32 user_id() const; + void set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_user_id() const; + void _internal_set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.GenerateKeyPairRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField permissions_; + mutable std::atomic _permissions_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::int32 user_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class GenerateKeyPairResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.GenerateKeyPairResponse) */ { + public: + inline GenerateKeyPairResponse() : GenerateKeyPairResponse(nullptr) {} + ~GenerateKeyPairResponse() override; + explicit constexpr GenerateKeyPairResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GenerateKeyPairResponse(const GenerateKeyPairResponse& from); + GenerateKeyPairResponse(GenerateKeyPairResponse&& from) noexcept + : GenerateKeyPairResponse() { + *this = ::std::move(from); + } + + inline GenerateKeyPairResponse& operator=(const GenerateKeyPairResponse& from) { + CopyFrom(from); + return *this; + } + inline GenerateKeyPairResponse& operator=(GenerateKeyPairResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GenerateKeyPairResponse& default_instance() { + return *internal_default_instance(); + } + static inline const GenerateKeyPairResponse* internal_default_instance() { + return reinterpret_cast( + &_GenerateKeyPairResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(GenerateKeyPairResponse& a, GenerateKeyPairResponse& b) { + a.Swap(&b); + } + inline void Swap(GenerateKeyPairResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GenerateKeyPairResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline GenerateKeyPairResponse* New() const final { + return new GenerateKeyPairResponse(); + } + + GenerateKeyPairResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GenerateKeyPairResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GenerateKeyPairResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GenerateKeyPairResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.GenerateKeyPairResponse"; + } + protected: + explicit GenerateKeyPairResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPublicKeyFieldNumber = 1, + kPrivateKeyFieldNumber = 2, + }; + // string public_key = 1; + void clear_public_key(); + const std::string& public_key() const; + template + void set_public_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_public_key(); + PROTOBUF_MUST_USE_RESULT std::string* release_public_key(); + void set_allocated_public_key(std::string* public_key); + private: + const std::string& _internal_public_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_public_key(const std::string& value); + std::string* _internal_mutable_public_key(); + public: + + // string private_key = 2; + void clear_private_key(); + const std::string& private_key() const; + template + void set_private_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_private_key(); + PROTOBUF_MUST_USE_RESULT std::string* release_private_key(); + void set_allocated_private_key(std::string* private_key); + private: + const std::string& _internal_private_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_private_key(const std::string& value); + std::string* _internal_mutable_private_key(); + public: + + // @@protoc_insertion_point(class_scope:crypto.GenerateKeyPairResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr public_key_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr private_key_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class SignRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.SignRequest) */ { + public: + inline SignRequest() : SignRequest(nullptr) {} + ~SignRequest() override; + explicit constexpr SignRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SignRequest(const SignRequest& from); + SignRequest(SignRequest&& from) noexcept + : SignRequest() { + *this = ::std::move(from); + } + + inline SignRequest& operator=(const SignRequest& from) { + CopyFrom(from); + return *this; + } + inline SignRequest& operator=(SignRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SignRequest& default_instance() { + return *internal_default_instance(); + } + static inline const SignRequest* internal_default_instance() { + return reinterpret_cast( + &_SignRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(SignRequest& a, SignRequest& b) { + a.Swap(&b); + } + inline void Swap(SignRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SignRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline SignRequest* New() const final { + return new SignRequest(); + } + + SignRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SignRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const SignRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SignRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.SignRequest"; + } + protected: + explicit SignRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDataFieldNumber = 2, + kKeyIdFieldNumber = 6, + kSenderIdFieldNumber = 1, + kHashFuncFieldNumber = 3, + kCounterFieldNumber = 5, + }; + // bytes data = 2; + void clear_data(); + const std::string& data() const; + template + void set_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_data(); + PROTOBUF_MUST_USE_RESULT std::string* release_data(); + void set_allocated_data(std::string* data); + private: + const std::string& _internal_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_data(const std::string& value); + std::string* _internal_mutable_data(); + public: + + // string key_id = 6; + void clear_key_id(); + const std::string& key_id() const; + template + void set_key_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_key_id(); + PROTOBUF_MUST_USE_RESULT std::string* release_key_id(); + void set_allocated_key_id(std::string* key_id); + private: + const std::string& _internal_key_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key_id(const std::string& value); + std::string* _internal_mutable_key_id(); + public: + + // int32 sender_id = 1; + void clear_sender_id(); + ::PROTOBUF_NAMESPACE_ID::int32 sender_id() const; + void set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_sender_id() const; + void _internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // .crypto.SHAAlgorithm hash_func = 3; + void clear_hash_func(); + ::crypto::SHAAlgorithm hash_func() const; + void set_hash_func(::crypto::SHAAlgorithm value); + private: + ::crypto::SHAAlgorithm _internal_hash_func() const; + void _internal_set_hash_func(::crypto::SHAAlgorithm value); + public: + + // int64 counter = 5; + void clear_counter(); + ::PROTOBUF_NAMESPACE_ID::int64 counter() const; + void set_counter(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_counter() const; + void _internal_set_counter(::PROTOBUF_NAMESPACE_ID::int64 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.SignRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_id_; + ::PROTOBUF_NAMESPACE_ID::int32 sender_id_; + int hash_func_; + ::PROTOBUF_NAMESPACE_ID::int64 counter_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class SignResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.SignResponse) */ { + public: + inline SignResponse() : SignResponse(nullptr) {} + ~SignResponse() override; + explicit constexpr SignResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SignResponse(const SignResponse& from); + SignResponse(SignResponse&& from) noexcept + : SignResponse() { + *this = ::std::move(from); + } + + inline SignResponse& operator=(const SignResponse& from) { + CopyFrom(from); + return *this; + } + inline SignResponse& operator=(SignResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SignResponse& default_instance() { + return *internal_default_instance(); + } + static inline const SignResponse* internal_default_instance() { + return reinterpret_cast( + &_SignResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(SignResponse& a, SignResponse& b) { + a.Swap(&b); + } + inline void Swap(SignResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SignResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline SignResponse* New() const final { + return new SignResponse(); + } + + SignResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const SignResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const SignResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(SignResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.SignResponse"; + } + protected: + explicit SignResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSignatureFieldNumber = 1, + }; + // bytes signature = 1; + void clear_signature(); + const std::string& signature() const; + template + void set_signature(ArgT0&& arg0, ArgT... args); + std::string* mutable_signature(); + PROTOBUF_MUST_USE_RESULT std::string* release_signature(); + void set_allocated_signature(std::string* signature); + private: + const std::string& _internal_signature() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_signature(const std::string& value); + std::string* _internal_mutable_signature(); + public: + + // @@protoc_insertion_point(class_scope:crypto.SignResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class VerifyRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.VerifyRequest) */ { + public: + inline VerifyRequest() : VerifyRequest(nullptr) {} + ~VerifyRequest() override; + explicit constexpr VerifyRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + VerifyRequest(const VerifyRequest& from); + VerifyRequest(VerifyRequest&& from) noexcept + : VerifyRequest() { + *this = ::std::move(from); + } + + inline VerifyRequest& operator=(const VerifyRequest& from) { + CopyFrom(from); + return *this; + } + inline VerifyRequest& operator=(VerifyRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const VerifyRequest& default_instance() { + return *internal_default_instance(); + } + static inline const VerifyRequest* internal_default_instance() { + return reinterpret_cast( + &_VerifyRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(VerifyRequest& a, VerifyRequest& b) { + a.Swap(&b); + } + inline void Swap(VerifyRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(VerifyRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline VerifyRequest* New() const final { + return new VerifyRequest(); + } + + VerifyRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const VerifyRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const VerifyRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(VerifyRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.VerifyRequest"; + } + protected: + explicit VerifyRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDataFieldNumber = 3, + kSignatureFieldNumber = 4, + kKeyIdFieldNumber = 6, + kSenderIdFieldNumber = 1, + kReceiverIdFieldNumber = 2, + kHashFuncFieldNumber = 5, + kCounterFieldNumber = 7, + }; + // bytes data = 3; + void clear_data(); + const std::string& data() const; + template + void set_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_data(); + PROTOBUF_MUST_USE_RESULT std::string* release_data(); + void set_allocated_data(std::string* data); + private: + const std::string& _internal_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_data(const std::string& value); + std::string* _internal_mutable_data(); + public: + + // bytes signature = 4; + void clear_signature(); + const std::string& signature() const; + template + void set_signature(ArgT0&& arg0, ArgT... args); + std::string* mutable_signature(); + PROTOBUF_MUST_USE_RESULT std::string* release_signature(); + void set_allocated_signature(std::string* signature); + private: + const std::string& _internal_signature() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_signature(const std::string& value); + std::string* _internal_mutable_signature(); + public: + + // string key_id = 6; + void clear_key_id(); + const std::string& key_id() const; + template + void set_key_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_key_id(); + PROTOBUF_MUST_USE_RESULT std::string* release_key_id(); + void set_allocated_key_id(std::string* key_id); + private: + const std::string& _internal_key_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key_id(const std::string& value); + std::string* _internal_mutable_key_id(); + public: + + // int32 sender_id = 1; + void clear_sender_id(); + ::PROTOBUF_NAMESPACE_ID::int32 sender_id() const; + void set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_sender_id() const; + void _internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 receiver_id = 2; + void clear_receiver_id(); + ::PROTOBUF_NAMESPACE_ID::int32 receiver_id() const; + void set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiver_id() const; + void _internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // .crypto.SHAAlgorithm hash_func = 5; + void clear_hash_func(); + ::crypto::SHAAlgorithm hash_func() const; + void set_hash_func(::crypto::SHAAlgorithm value); + private: + ::crypto::SHAAlgorithm _internal_hash_func() const; + void _internal_set_hash_func(::crypto::SHAAlgorithm value); + public: + + // int32 counter = 7; + void clear_counter(); + ::PROTOBUF_NAMESPACE_ID::int32 counter() const; + void set_counter(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_counter() const; + void _internal_set_counter(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.VerifyRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_id_; + ::PROTOBUF_NAMESPACE_ID::int32 sender_id_; + ::PROTOBUF_NAMESPACE_ID::int32 receiver_id_; + int hash_func_; + ::PROTOBUF_NAMESPACE_ID::int32 counter_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class VerifyResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.VerifyResponse) */ { + public: + inline VerifyResponse() : VerifyResponse(nullptr) {} + ~VerifyResponse() override; + explicit constexpr VerifyResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + VerifyResponse(const VerifyResponse& from); + VerifyResponse(VerifyResponse&& from) noexcept + : VerifyResponse() { + *this = ::std::move(from); + } + + inline VerifyResponse& operator=(const VerifyResponse& from) { + CopyFrom(from); + return *this; + } + inline VerifyResponse& operator=(VerifyResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const VerifyResponse& default_instance() { + return *internal_default_instance(); + } + static inline const VerifyResponse* internal_default_instance() { + return reinterpret_cast( + &_VerifyResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(VerifyResponse& a, VerifyResponse& b) { + a.Swap(&b); + } + inline void Swap(VerifyResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(VerifyResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline VerifyResponse* New() const final { + return new VerifyResponse(); + } + + VerifyResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const VerifyResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const VerifyResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(VerifyResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.VerifyResponse"; + } + protected: + explicit VerifyResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kOutFieldNumber = 2, + kValidFieldNumber = 1, + }; + // bytes out = 2; + void clear_out(); + const std::string& out() const; + template + void set_out(ArgT0&& arg0, ArgT... args); + std::string* mutable_out(); + PROTOBUF_MUST_USE_RESULT std::string* release_out(); + void set_allocated_out(std::string* out); + private: + const std::string& _internal_out() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_out(const std::string& value); + std::string* _internal_mutable_out(); + public: + + // bool valid = 1; + void clear_valid(); + bool valid() const; + void set_valid(bool value); + private: + bool _internal_valid() const; + void _internal_set_valid(bool value); + public: + + // @@protoc_insertion_point(class_scope:crypto.VerifyResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr out_; + bool valid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class KeyRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.KeyRequest) */ { + public: + inline KeyRequest() : KeyRequest(nullptr) {} + ~KeyRequest() override; + explicit constexpr KeyRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + KeyRequest(const KeyRequest& from); + KeyRequest(KeyRequest&& from) noexcept + : KeyRequest() { + *this = ::std::move(from); + } + + inline KeyRequest& operator=(const KeyRequest& from) { + CopyFrom(from); + return *this; + } + inline KeyRequest& operator=(KeyRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const KeyRequest& default_instance() { + return *internal_default_instance(); + } + static inline const KeyRequest* internal_default_instance() { + return reinterpret_cast( + &_KeyRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 17; + + friend void swap(KeyRequest& a, KeyRequest& b) { + a.Swap(&b); + } + inline void Swap(KeyRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(KeyRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline KeyRequest* New() const final { + return new KeyRequest(); + } + + KeyRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const KeyRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const KeyRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(KeyRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.KeyRequest"; + } + protected: + explicit KeyRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUserIdFieldNumber = 1, + }; + // int32 user_id = 1; + void clear_user_id(); + ::PROTOBUF_NAMESPACE_ID::int32 user_id() const; + void set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_user_id() const; + void _internal_set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.KeyRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::int32 user_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class KeyResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.KeyResponse) */ { + public: + inline KeyResponse() : KeyResponse(nullptr) {} + ~KeyResponse() override; + explicit constexpr KeyResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + KeyResponse(const KeyResponse& from); + KeyResponse(KeyResponse&& from) noexcept + : KeyResponse() { + *this = ::std::move(from); + } + + inline KeyResponse& operator=(const KeyResponse& from) { + CopyFrom(from); + return *this; + } + inline KeyResponse& operator=(KeyResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const KeyResponse& default_instance() { + return *internal_default_instance(); + } + static inline const KeyResponse* internal_default_instance() { + return reinterpret_cast( + &_KeyResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(KeyResponse& a, KeyResponse& b) { + a.Swap(&b); + } + inline void Swap(KeyResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(KeyResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline KeyResponse* New() const final { + return new KeyResponse(); + } + + KeyResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const KeyResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const KeyResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(KeyResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.KeyResponse"; + } + protected: + explicit KeyResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kKeyFieldNumber = 1, + }; + // string key = 1; + void clear_key(); + const std::string& key() const; + template + void set_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_key(); + PROTOBUF_MUST_USE_RESULT std::string* release_key(); + void set_allocated_key(std::string* key); + private: + const std::string& _internal_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key(const std::string& value); + std::string* _internal_mutable_key(); + public: + + // @@protoc_insertion_point(class_scope:crypto.KeyResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class UserKeyPermissions final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.UserKeyPermissions) */ { + public: + inline UserKeyPermissions() : UserKeyPermissions(nullptr) {} + ~UserKeyPermissions() override; + explicit constexpr UserKeyPermissions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + UserKeyPermissions(const UserKeyPermissions& from); + UserKeyPermissions(UserKeyPermissions&& from) noexcept + : UserKeyPermissions() { + *this = ::std::move(from); + } + + inline UserKeyPermissions& operator=(const UserKeyPermissions& from) { + CopyFrom(from); + return *this; + } + inline UserKeyPermissions& operator=(UserKeyPermissions&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UserKeyPermissions& default_instance() { + return *internal_default_instance(); + } + static inline const UserKeyPermissions* internal_default_instance() { + return reinterpret_cast( + &_UserKeyPermissions_default_instance_); + } + static constexpr int kIndexInFileMessages = + 19; + + friend void swap(UserKeyPermissions& a, UserKeyPermissions& b) { + a.Swap(&b); + } + inline void Swap(UserKeyPermissions* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UserKeyPermissions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline UserKeyPermissions* New() const final { + return new UserKeyPermissions(); + } + + UserKeyPermissions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const UserKeyPermissions& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const UserKeyPermissions& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(UserKeyPermissions* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.UserKeyPermissions"; + } + protected: + explicit UserKeyPermissions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPermissionsFieldNumber = 2, + kUserIdFieldNumber = 1, + }; + // repeated .crypto.KeyPermission permissions = 2; + int permissions_size() const; + private: + int _internal_permissions_size() const; + public: + void clear_permissions(); + private: + ::crypto::KeyPermission _internal_permissions(int index) const; + void _internal_add_permissions(::crypto::KeyPermission value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_permissions(); + public: + ::crypto::KeyPermission permissions(int index) const; + void set_permissions(int index, ::crypto::KeyPermission value); + void add_permissions(::crypto::KeyPermission value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& permissions() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_permissions(); + + // int32 userId = 1; + void clear_userid(); + ::PROTOBUF_NAMESPACE_ID::int32 userid() const; + void set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_userid() const; + void _internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.UserKeyPermissions) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField permissions_; + mutable std::atomic _permissions_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::int32 userid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class BootSystemRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.BootSystemRequest) */ { + public: + inline BootSystemRequest() : BootSystemRequest(nullptr) {} + ~BootSystemRequest() override; + explicit constexpr BootSystemRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BootSystemRequest(const BootSystemRequest& from); + BootSystemRequest(BootSystemRequest&& from) noexcept + : BootSystemRequest() { + *this = ::std::move(from); + } + + inline BootSystemRequest& operator=(const BootSystemRequest& from) { + CopyFrom(from); + return *this; + } + inline BootSystemRequest& operator=(BootSystemRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const BootSystemRequest& default_instance() { + return *internal_default_instance(); + } + static inline const BootSystemRequest* internal_default_instance() { + return reinterpret_cast( + &_BootSystemRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 20; + + friend void swap(BootSystemRequest& a, BootSystemRequest& b) { + a.Swap(&b); + } + inline void Swap(BootSystemRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BootSystemRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline BootSystemRequest* New() const final { + return new BootSystemRequest(); + } + + BootSystemRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BootSystemRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const BootSystemRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BootSystemRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.BootSystemRequest"; + } + protected: + explicit BootSystemRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUsersIdsPermissionsFieldNumber = 1, + }; + // repeated .crypto.UserKeyPermissions usersIdsPermissions = 1; + int usersidspermissions_size() const; + private: + int _internal_usersidspermissions_size() const; + public: + void clear_usersidspermissions(); + ::crypto::UserKeyPermissions* mutable_usersidspermissions(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::crypto::UserKeyPermissions >* + mutable_usersidspermissions(); + private: + const ::crypto::UserKeyPermissions& _internal_usersidspermissions(int index) const; + ::crypto::UserKeyPermissions* _internal_add_usersidspermissions(); + public: + const ::crypto::UserKeyPermissions& usersidspermissions(int index) const; + ::crypto::UserKeyPermissions* add_usersidspermissions(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::crypto::UserKeyPermissions >& + usersidspermissions() const; + + // @@protoc_insertion_point(class_scope:crypto.BootSystemRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::crypto::UserKeyPermissions > usersidspermissions_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class Empty final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:crypto.Empty) */ { + public: + inline Empty() : Empty(nullptr) {} + explicit constexpr Empty(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Empty(const Empty& from); + Empty(Empty&& from) noexcept + : Empty() { + *this = ::std::move(from); + } + + inline Empty& operator=(const Empty& from) { + CopyFrom(from); + return *this; + } + inline Empty& operator=(Empty&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Empty& default_instance() { + return *internal_default_instance(); + } + static inline const Empty* internal_default_instance() { + return reinterpret_cast( + &_Empty_default_instance_); + } + static constexpr int kIndexInFileMessages = + 21; + + friend void swap(Empty& a, Empty& b) { + a.Swap(&b); + } + inline void Swap(Empty* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Empty* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Empty* New() const final { + return new Empty(); + } + + Empty* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const Empty& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const Empty& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(this, from); + } + public: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.Empty"; + } + protected: + explicit Empty(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:crypto.Empty) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class CryptoConfig final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.CryptoConfig) */ { + public: + inline CryptoConfig() : CryptoConfig(nullptr) {} + ~CryptoConfig() override; + explicit constexpr CryptoConfig(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CryptoConfig(const CryptoConfig& from); + CryptoConfig(CryptoConfig&& from) noexcept + : CryptoConfig() { + *this = ::std::move(from); + } + + inline CryptoConfig& operator=(const CryptoConfig& from) { + CopyFrom(from); + return *this; + } + inline CryptoConfig& operator=(CryptoConfig&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CryptoConfig& default_instance() { + return *internal_default_instance(); + } + static inline const CryptoConfig* internal_default_instance() { + return reinterpret_cast( + &_CryptoConfig_default_instance_); + } + static constexpr int kIndexInFileMessages = + 22; + + friend void swap(CryptoConfig& a, CryptoConfig& b) { + a.Swap(&b); + } + inline void Swap(CryptoConfig* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CryptoConfig* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline CryptoConfig* New() const final { + return new CryptoConfig(); + } + + CryptoConfig* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CryptoConfig& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const CryptoConfig& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CryptoConfig* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.CryptoConfig"; + } + protected: + explicit CryptoConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHashFunctionFieldNumber = 1, + kAesKeyLengthFieldNumber = 2, + kAesChainingModeFieldNumber = 3, + kAsymmetricFunctionFieldNumber = 4, + }; + // .crypto.SHAAlgorithm hashFunction = 1; + void clear_hashfunction(); + ::crypto::SHAAlgorithm hashfunction() const; + void set_hashfunction(::crypto::SHAAlgorithm value); + private: + ::crypto::SHAAlgorithm _internal_hashfunction() const; + void _internal_set_hashfunction(::crypto::SHAAlgorithm value); + public: + + // .crypto.AESKeyLength aesKeyLength = 2; + void clear_aeskeylength(); + ::crypto::AESKeyLength aeskeylength() const; + void set_aeskeylength(::crypto::AESKeyLength value); + private: + ::crypto::AESKeyLength _internal_aeskeylength() const; + void _internal_set_aeskeylength(::crypto::AESKeyLength value); + public: + + // .crypto.AESChainingMode aesChainingMode = 3; + void clear_aeschainingmode(); + ::crypto::AESChainingMode aeschainingmode() const; + void set_aeschainingmode(::crypto::AESChainingMode value); + private: + ::crypto::AESChainingMode _internal_aeschainingmode() const; + void _internal_set_aeschainingmode(::crypto::AESChainingMode value); + public: + + // .crypto.AsymmetricFunction asymmetricFunction = 4; + void clear_asymmetricfunction(); + ::crypto::AsymmetricFunction asymmetricfunction() const; + void set_asymmetricfunction(::crypto::AsymmetricFunction value); + private: + ::crypto::AsymmetricFunction _internal_asymmetricfunction() const; + void _internal_set_asymmetricfunction(::crypto::AsymmetricFunction value); + public: + + // @@protoc_insertion_point(class_scope:crypto.CryptoConfig) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + int hashfunction_; + int aeskeylength_; + int aeschainingmode_; + int asymmetricfunction_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class ConfigureRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.ConfigureRequest) */ { + public: + inline ConfigureRequest() : ConfigureRequest(nullptr) {} + ~ConfigureRequest() override; + explicit constexpr ConfigureRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConfigureRequest(const ConfigureRequest& from); + ConfigureRequest(ConfigureRequest&& from) noexcept + : ConfigureRequest() { + *this = ::std::move(from); + } + + inline ConfigureRequest& operator=(const ConfigureRequest& from) { + CopyFrom(from); + return *this; + } + inline ConfigureRequest& operator=(ConfigureRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ConfigureRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ConfigureRequest* internal_default_instance() { + return reinterpret_cast( + &_ConfigureRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 23; + + friend void swap(ConfigureRequest& a, ConfigureRequest& b) { + a.Swap(&b); + } + inline void Swap(ConfigureRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ConfigureRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline ConfigureRequest* New() const final { + return new ConfigureRequest(); + } + + ConfigureRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ConfigureRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const ConfigureRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ConfigureRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.ConfigureRequest"; + } + protected: + explicit ConfigureRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kConfigFieldNumber = 2, + kUserIdFieldNumber = 1, + }; + // .crypto.CryptoConfig config = 2; + bool has_config() const; + private: + bool _internal_has_config() const; + public: + void clear_config(); + const ::crypto::CryptoConfig& config() const; + PROTOBUF_MUST_USE_RESULT ::crypto::CryptoConfig* release_config(); + ::crypto::CryptoConfig* mutable_config(); + void set_allocated_config(::crypto::CryptoConfig* config); + private: + const ::crypto::CryptoConfig& _internal_config() const; + ::crypto::CryptoConfig* _internal_mutable_config(); + public: + void unsafe_arena_set_allocated_config( + ::crypto::CryptoConfig* config); + ::crypto::CryptoConfig* unsafe_arena_release_config(); + + // int32 userId = 1; + void clear_userid(); + ::PROTOBUF_NAMESPACE_ID::int32 userid() const; + void set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_userid() const; + void _internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.ConfigureRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::crypto::CryptoConfig* config_; + ::PROTOBUF_NAMESPACE_ID::int32 userid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class AddProcessRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.AddProcessRequest) */ { + public: + inline AddProcessRequest() : AddProcessRequest(nullptr) {} + ~AddProcessRequest() override; + explicit constexpr AddProcessRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AddProcessRequest(const AddProcessRequest& from); + AddProcessRequest(AddProcessRequest&& from) noexcept + : AddProcessRequest() { + *this = ::std::move(from); + } + + inline AddProcessRequest& operator=(const AddProcessRequest& from) { + CopyFrom(from); + return *this; + } + inline AddProcessRequest& operator=(AddProcessRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AddProcessRequest& default_instance() { + return *internal_default_instance(); + } + static inline const AddProcessRequest* internal_default_instance() { + return reinterpret_cast( + &_AddProcessRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 24; + + friend void swap(AddProcessRequest& a, AddProcessRequest& b) { + a.Swap(&b); + } + inline void Swap(AddProcessRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AddProcessRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AddProcessRequest* New() const final { + return new AddProcessRequest(); + } + + AddProcessRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AddProcessRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const AddProcessRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AddProcessRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.AddProcessRequest"; + } + protected: + explicit AddProcessRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPermissionsFieldNumber = 2, + kUserIdFieldNumber = 1, + }; + // repeated .crypto.KeyPermission permissions = 2; + int permissions_size() const; + private: + int _internal_permissions_size() const; + public: + void clear_permissions(); + private: + ::crypto::KeyPermission _internal_permissions(int index) const; + void _internal_add_permissions(::crypto::KeyPermission value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_permissions(); + public: + ::crypto::KeyPermission permissions(int index) const; + void set_permissions(int index, ::crypto::KeyPermission value); + void add_permissions(::crypto::KeyPermission value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& permissions() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_permissions(); + + // int32 userId = 1; + void clear_userid(); + ::PROTOBUF_NAMESPACE_ID::int32 userid() const; + void set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_userid() const; + void _internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.AddProcessRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField permissions_; + mutable std::atomic _permissions_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::int32 userid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class EncryptRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.EncryptRequest) */ { + public: + inline EncryptRequest() : EncryptRequest(nullptr) {} + ~EncryptRequest() override; + explicit constexpr EncryptRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EncryptRequest(const EncryptRequest& from); + EncryptRequest(EncryptRequest&& from) noexcept + : EncryptRequest() { + *this = ::std::move(from); + } + + inline EncryptRequest& operator=(const EncryptRequest& from) { + CopyFrom(from); + return *this; + } + inline EncryptRequest& operator=(EncryptRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const EncryptRequest& default_instance() { + return *internal_default_instance(); + } + static inline const EncryptRequest* internal_default_instance() { + return reinterpret_cast( + &_EncryptRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 25; + + friend void swap(EncryptRequest& a, EncryptRequest& b) { + a.Swap(&b); + } + inline void Swap(EncryptRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EncryptRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline EncryptRequest* New() const final { + return new EncryptRequest(); + } + + EncryptRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EncryptRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const EncryptRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(EncryptRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.EncryptRequest"; + } + protected: + explicit EncryptRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDataFieldNumber = 3, + kSenderIdFieldNumber = 1, + kReceiverIdFieldNumber = 2, + kCounterFieldNumber = 4, + kIsFirstFieldNumber = 5, + }; + // bytes data = 3; + void clear_data(); + const std::string& data() const; + template + void set_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_data(); + PROTOBUF_MUST_USE_RESULT std::string* release_data(); + void set_allocated_data(std::string* data); + private: + const std::string& _internal_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_data(const std::string& value); + std::string* _internal_mutable_data(); + public: + + // int32 sender_id = 1; + void clear_sender_id(); + ::PROTOBUF_NAMESPACE_ID::int32 sender_id() const; + void set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_sender_id() const; + void _internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 receiver_id = 2; + void clear_receiver_id(); + ::PROTOBUF_NAMESPACE_ID::int32 receiver_id() const; + void set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiver_id() const; + void _internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int64 counter = 4; + void clear_counter(); + ::PROTOBUF_NAMESPACE_ID::int64 counter() const; + void set_counter(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_counter() const; + void _internal_set_counter(::PROTOBUF_NAMESPACE_ID::int64 value); + public: + + // bool isFirst = 5; + void clear_isfirst(); + bool isfirst() const; + void set_isfirst(bool value); + private: + bool _internal_isfirst() const; + void _internal_set_isfirst(bool value); + public: + + // @@protoc_insertion_point(class_scope:crypto.EncryptRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + ::PROTOBUF_NAMESPACE_ID::int32 sender_id_; + ::PROTOBUF_NAMESPACE_ID::int32 receiver_id_; + ::PROTOBUF_NAMESPACE_ID::int64 counter_; + bool isfirst_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class EncryptResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.EncryptResponse) */ { + public: + inline EncryptResponse() : EncryptResponse(nullptr) {} + ~EncryptResponse() override; + explicit constexpr EncryptResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EncryptResponse(const EncryptResponse& from); + EncryptResponse(EncryptResponse&& from) noexcept + : EncryptResponse() { + *this = ::std::move(from); + } + + inline EncryptResponse& operator=(const EncryptResponse& from) { + CopyFrom(from); + return *this; + } + inline EncryptResponse& operator=(EncryptResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const EncryptResponse& default_instance() { + return *internal_default_instance(); + } + static inline const EncryptResponse* internal_default_instance() { + return reinterpret_cast( + &_EncryptResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 26; + + friend void swap(EncryptResponse& a, EncryptResponse& b) { + a.Swap(&b); + } + inline void Swap(EncryptResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EncryptResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline EncryptResponse* New() const final { + return new EncryptResponse(); + } + + EncryptResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EncryptResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const EncryptResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(EncryptResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.EncryptResponse"; + } + protected: + explicit EncryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEncryptedDataFieldNumber = 1, + kSignatureFieldNumber = 2, + }; + // bytes encrypted_data = 1; + void clear_encrypted_data(); + const std::string& encrypted_data() const; + template + void set_encrypted_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_encrypted_data(); + PROTOBUF_MUST_USE_RESULT std::string* release_encrypted_data(); + void set_allocated_encrypted_data(std::string* encrypted_data); + private: + const std::string& _internal_encrypted_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_encrypted_data(const std::string& value); + std::string* _internal_mutable_encrypted_data(); + public: + + // bytes signature = 2; + void clear_signature(); + const std::string& signature() const; + template + void set_signature(ArgT0&& arg0, ArgT... args); + std::string* mutable_signature(); + PROTOBUF_MUST_USE_RESULT std::string* release_signature(); + void set_allocated_signature(std::string* signature); + private: + const std::string& _internal_signature() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_signature(const std::string& value); + std::string* _internal_mutable_signature(); + public: + + // @@protoc_insertion_point(class_scope:crypto.EncryptResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encrypted_data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class DecryptRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.DecryptRequest) */ { + public: + inline DecryptRequest() : DecryptRequest(nullptr) {} + ~DecryptRequest() override; + explicit constexpr DecryptRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DecryptRequest(const DecryptRequest& from); + DecryptRequest(DecryptRequest&& from) noexcept + : DecryptRequest() { + *this = ::std::move(from); + } + + inline DecryptRequest& operator=(const DecryptRequest& from) { + CopyFrom(from); + return *this; + } + inline DecryptRequest& operator=(DecryptRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DecryptRequest& default_instance() { + return *internal_default_instance(); + } + static inline const DecryptRequest* internal_default_instance() { + return reinterpret_cast( + &_DecryptRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 27; + + friend void swap(DecryptRequest& a, DecryptRequest& b) { + a.Swap(&b); + } + inline void Swap(DecryptRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DecryptRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline DecryptRequest* New() const final { + return new DecryptRequest(); + } + + DecryptRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DecryptRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const DecryptRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DecryptRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.DecryptRequest"; + } + protected: + explicit DecryptRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEncryptedDataFieldNumber = 3, + kSignatureFieldNumber = 5, + kSenderIdFieldNumber = 1, + kReceiverIdFieldNumber = 2, + kCounterFieldNumber = 4, + kIsFirstFieldNumber = 6, + }; + // bytes encrypted_data = 3; + void clear_encrypted_data(); + const std::string& encrypted_data() const; + template + void set_encrypted_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_encrypted_data(); + PROTOBUF_MUST_USE_RESULT std::string* release_encrypted_data(); + void set_allocated_encrypted_data(std::string* encrypted_data); + private: + const std::string& _internal_encrypted_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_encrypted_data(const std::string& value); + std::string* _internal_mutable_encrypted_data(); + public: + + // bytes signature = 5; + void clear_signature(); + const std::string& signature() const; + template + void set_signature(ArgT0&& arg0, ArgT... args); + std::string* mutable_signature(); + PROTOBUF_MUST_USE_RESULT std::string* release_signature(); + void set_allocated_signature(std::string* signature); + private: + const std::string& _internal_signature() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_signature(const std::string& value); + std::string* _internal_mutable_signature(); + public: + + // int32 sender_id = 1; + void clear_sender_id(); + ::PROTOBUF_NAMESPACE_ID::int32 sender_id() const; + void set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_sender_id() const; + void _internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 receiver_id = 2; + void clear_receiver_id(); + ::PROTOBUF_NAMESPACE_ID::int32 receiver_id() const; + void set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiver_id() const; + void _internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int64 counter = 4; + void clear_counter(); + ::PROTOBUF_NAMESPACE_ID::int64 counter() const; + void set_counter(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_counter() const; + void _internal_set_counter(::PROTOBUF_NAMESPACE_ID::int64 value); + public: + + // bool isFirst = 6; + void clear_isfirst(); + bool isfirst() const; + void set_isfirst(bool value); + private: + bool _internal_isfirst() const; + void _internal_set_isfirst(bool value); + public: + + // @@protoc_insertion_point(class_scope:crypto.DecryptRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encrypted_data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; + ::PROTOBUF_NAMESPACE_ID::int32 sender_id_; + ::PROTOBUF_NAMESPACE_ID::int32 receiver_id_; + ::PROTOBUF_NAMESPACE_ID::int64 counter_; + bool isfirst_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class DecryptResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.DecryptResponse) */ { + public: + inline DecryptResponse() : DecryptResponse(nullptr) {} + ~DecryptResponse() override; + explicit constexpr DecryptResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DecryptResponse(const DecryptResponse& from); + DecryptResponse(DecryptResponse&& from) noexcept + : DecryptResponse() { + *this = ::std::move(from); + } + + inline DecryptResponse& operator=(const DecryptResponse& from) { + CopyFrom(from); + return *this; + } + inline DecryptResponse& operator=(DecryptResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DecryptResponse& default_instance() { + return *internal_default_instance(); + } + static inline const DecryptResponse* internal_default_instance() { + return reinterpret_cast( + &_DecryptResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 28; + + friend void swap(DecryptResponse& a, DecryptResponse& b) { + a.Swap(&b); + } + inline void Swap(DecryptResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DecryptResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline DecryptResponse* New() const final { + return new DecryptResponse(); + } + + DecryptResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DecryptResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const DecryptResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DecryptResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.DecryptResponse"; + } + protected: + explicit DecryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDecryptedDataFieldNumber = 1, + }; + // bytes decrypted_data = 1; + void clear_decrypted_data(); + const std::string& decrypted_data() const; + template + void set_decrypted_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_decrypted_data(); + PROTOBUF_MUST_USE_RESULT std::string* release_decrypted_data(); + void set_allocated_decrypted_data(std::string* decrypted_data); + private: + const std::string& _internal_decrypted_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_decrypted_data(const std::string& value); + std::string* _internal_mutable_decrypted_data(); + public: + + // @@protoc_insertion_point(class_scope:crypto.DecryptResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr decrypted_data_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class AESEncryptRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.AESEncryptRequest) */ { + public: + inline AESEncryptRequest() : AESEncryptRequest(nullptr) {} + ~AESEncryptRequest() override; + explicit constexpr AESEncryptRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AESEncryptRequest(const AESEncryptRequest& from); + AESEncryptRequest(AESEncryptRequest&& from) noexcept + : AESEncryptRequest() { + *this = ::std::move(from); + } + + inline AESEncryptRequest& operator=(const AESEncryptRequest& from) { + CopyFrom(from); + return *this; + } + inline AESEncryptRequest& operator=(AESEncryptRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AESEncryptRequest& default_instance() { + return *internal_default_instance(); + } + static inline const AESEncryptRequest* internal_default_instance() { + return reinterpret_cast( + &_AESEncryptRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 29; + + friend void swap(AESEncryptRequest& a, AESEncryptRequest& b) { + a.Swap(&b); + } + inline void Swap(AESEncryptRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AESEncryptRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AESEncryptRequest* New() const final { + return new AESEncryptRequest(); + } + + AESEncryptRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AESEncryptRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const AESEncryptRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AESEncryptRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.AESEncryptRequest"; + } + protected: + explicit AESEncryptRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDataFieldNumber = 3, + kKeyIdFieldNumber = 6, + kSenderIdFieldNumber = 1, + kReceiverIdFieldNumber = 2, + kCounterFieldNumber = 5, + kFuncFieldNumber = 4, + kKeyLengthFieldNumber = 7, + kChainingModeFieldNumber = 8, + }; + // bytes data = 3; + void clear_data(); + const std::string& data() const; + template + void set_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_data(); + PROTOBUF_MUST_USE_RESULT std::string* release_data(); + void set_allocated_data(std::string* data); + private: + const std::string& _internal_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_data(const std::string& value); + std::string* _internal_mutable_data(); + public: + + // string key_id = 6; + void clear_key_id(); + const std::string& key_id() const; + template + void set_key_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_key_id(); + PROTOBUF_MUST_USE_RESULT std::string* release_key_id(); + void set_allocated_key_id(std::string* key_id); + private: + const std::string& _internal_key_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key_id(const std::string& value); + std::string* _internal_mutable_key_id(); + public: + + // int32 sender_id = 1; + void clear_sender_id(); + ::PROTOBUF_NAMESPACE_ID::int32 sender_id() const; + void set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_sender_id() const; + void _internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 receiver_id = 2; + void clear_receiver_id(); + ::PROTOBUF_NAMESPACE_ID::int32 receiver_id() const; + void set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiver_id() const; + void _internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int64 counter = 5; + void clear_counter(); + ::PROTOBUF_NAMESPACE_ID::int64 counter() const; + void set_counter(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_counter() const; + void _internal_set_counter(::PROTOBUF_NAMESPACE_ID::int64 value); + public: + + // .crypto.AsymmetricFunction func = 4; + void clear_func(); + ::crypto::AsymmetricFunction func() const; + void set_func(::crypto::AsymmetricFunction value); + private: + ::crypto::AsymmetricFunction _internal_func() const; + void _internal_set_func(::crypto::AsymmetricFunction value); + public: + + // .crypto.AESKeyLength key_length = 7; + void clear_key_length(); + ::crypto::AESKeyLength key_length() const; + void set_key_length(::crypto::AESKeyLength value); + private: + ::crypto::AESKeyLength _internal_key_length() const; + void _internal_set_key_length(::crypto::AESKeyLength value); + public: + + // .crypto.AESChainingMode chainingMode = 8; + void clear_chainingmode(); + ::crypto::AESChainingMode chainingmode() const; + void set_chainingmode(::crypto::AESChainingMode value); + private: + ::crypto::AESChainingMode _internal_chainingmode() const; + void _internal_set_chainingmode(::crypto::AESChainingMode value); + public: + + // @@protoc_insertion_point(class_scope:crypto.AESEncryptRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_id_; + ::PROTOBUF_NAMESPACE_ID::int32 sender_id_; + ::PROTOBUF_NAMESPACE_ID::int32 receiver_id_; + ::PROTOBUF_NAMESPACE_ID::int64 counter_; + int func_; + int key_length_; + int chainingmode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class AESEncryptResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.AESEncryptResponse) */ { + public: + inline AESEncryptResponse() : AESEncryptResponse(nullptr) {} + ~AESEncryptResponse() override; + explicit constexpr AESEncryptResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AESEncryptResponse(const AESEncryptResponse& from); + AESEncryptResponse(AESEncryptResponse&& from) noexcept + : AESEncryptResponse() { + *this = ::std::move(from); + } + + inline AESEncryptResponse& operator=(const AESEncryptResponse& from) { + CopyFrom(from); + return *this; + } + inline AESEncryptResponse& operator=(AESEncryptResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AESEncryptResponse& default_instance() { + return *internal_default_instance(); + } + static inline const AESEncryptResponse* internal_default_instance() { + return reinterpret_cast( + &_AESEncryptResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 30; + + friend void swap(AESEncryptResponse& a, AESEncryptResponse& b) { + a.Swap(&b); + } + inline void Swap(AESEncryptResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AESEncryptResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AESEncryptResponse* New() const final { + return new AESEncryptResponse(); + } + + AESEncryptResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AESEncryptResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const AESEncryptResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AESEncryptResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.AESEncryptResponse"; + } + protected: + explicit AESEncryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEncryptedDataFieldNumber = 1, + }; + // bytes encrypted_data = 1; + void clear_encrypted_data(); + const std::string& encrypted_data() const; + template + void set_encrypted_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_encrypted_data(); + PROTOBUF_MUST_USE_RESULT std::string* release_encrypted_data(); + void set_allocated_encrypted_data(std::string* encrypted_data); + private: + const std::string& _internal_encrypted_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_encrypted_data(const std::string& value); + std::string* _internal_mutable_encrypted_data(); + public: + + // @@protoc_insertion_point(class_scope:crypto.AESEncryptResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encrypted_data_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class AESDecryptRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.AESDecryptRequest) */ { + public: + inline AESDecryptRequest() : AESDecryptRequest(nullptr) {} + ~AESDecryptRequest() override; + explicit constexpr AESDecryptRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AESDecryptRequest(const AESDecryptRequest& from); + AESDecryptRequest(AESDecryptRequest&& from) noexcept + : AESDecryptRequest() { + *this = ::std::move(from); + } + + inline AESDecryptRequest& operator=(const AESDecryptRequest& from) { + CopyFrom(from); + return *this; + } + inline AESDecryptRequest& operator=(AESDecryptRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AESDecryptRequest& default_instance() { + return *internal_default_instance(); + } + static inline const AESDecryptRequest* internal_default_instance() { + return reinterpret_cast( + &_AESDecryptRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 31; + + friend void swap(AESDecryptRequest& a, AESDecryptRequest& b) { + a.Swap(&b); + } + inline void Swap(AESDecryptRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AESDecryptRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AESDecryptRequest* New() const final { + return new AESDecryptRequest(); + } + + AESDecryptRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AESDecryptRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const AESDecryptRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AESDecryptRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.AESDecryptRequest"; + } + protected: + explicit AESDecryptRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDataInFieldNumber = 3, + kDataOutFieldNumber = 5, + kKeyIdFieldNumber = 10, + kSenderIdFieldNumber = 1, + kReceiverIdFieldNumber = 2, + kInLenFieldNumber = 4, + kFuncFieldNumber = 6, + kKeyLengthFieldNumber = 7, + kChainingModeFieldNumber = 8, + kCounterFieldNumber = 9, + }; + // bytes data_in = 3; + void clear_data_in(); + const std::string& data_in() const; + template + void set_data_in(ArgT0&& arg0, ArgT... args); + std::string* mutable_data_in(); + PROTOBUF_MUST_USE_RESULT std::string* release_data_in(); + void set_allocated_data_in(std::string* data_in); + private: + const std::string& _internal_data_in() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_data_in(const std::string& value); + std::string* _internal_mutable_data_in(); + public: + + // bytes data_out = 5; + void clear_data_out(); + const std::string& data_out() const; + template + void set_data_out(ArgT0&& arg0, ArgT... args); + std::string* mutable_data_out(); + PROTOBUF_MUST_USE_RESULT std::string* release_data_out(); + void set_allocated_data_out(std::string* data_out); + private: + const std::string& _internal_data_out() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_data_out(const std::string& value); + std::string* _internal_mutable_data_out(); + public: + + // string key_id = 10; + void clear_key_id(); + const std::string& key_id() const; + template + void set_key_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_key_id(); + PROTOBUF_MUST_USE_RESULT std::string* release_key_id(); + void set_allocated_key_id(std::string* key_id); + private: + const std::string& _internal_key_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key_id(const std::string& value); + std::string* _internal_mutable_key_id(); + public: + + // int32 sender_id = 1; + void clear_sender_id(); + ::PROTOBUF_NAMESPACE_ID::int32 sender_id() const; + void set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_sender_id() const; + void _internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 receiver_id = 2; + void clear_receiver_id(); + ::PROTOBUF_NAMESPACE_ID::int32 receiver_id() const; + void set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiver_id() const; + void _internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 in_len = 4; + void clear_in_len(); + ::PROTOBUF_NAMESPACE_ID::int32 in_len() const; + void set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_in_len() const; + void _internal_set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // .crypto.AsymmetricFunction func = 6; + void clear_func(); + ::crypto::AsymmetricFunction func() const; + void set_func(::crypto::AsymmetricFunction value); + private: + ::crypto::AsymmetricFunction _internal_func() const; + void _internal_set_func(::crypto::AsymmetricFunction value); + public: + + // .crypto.AESKeyLength key_length = 7; + void clear_key_length(); + ::crypto::AESKeyLength key_length() const; + void set_key_length(::crypto::AESKeyLength value); + private: + ::crypto::AESKeyLength _internal_key_length() const; + void _internal_set_key_length(::crypto::AESKeyLength value); + public: + + // .crypto.AESChainingMode chainingMode = 8; + void clear_chainingmode(); + ::crypto::AESChainingMode chainingmode() const; + void set_chainingmode(::crypto::AESChainingMode value); + private: + ::crypto::AESChainingMode _internal_chainingmode() const; + void _internal_set_chainingmode(::crypto::AESChainingMode value); + public: + + // int64 counter = 9; + void clear_counter(); + ::PROTOBUF_NAMESPACE_ID::int64 counter() const; + void set_counter(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_counter() const; + void _internal_set_counter(::PROTOBUF_NAMESPACE_ID::int64 value); + public: + + // @@protoc_insertion_point(class_scope:crypto.AESDecryptRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_in_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_out_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_id_; + ::PROTOBUF_NAMESPACE_ID::int32 sender_id_; + ::PROTOBUF_NAMESPACE_ID::int32 receiver_id_; + ::PROTOBUF_NAMESPACE_ID::int32 in_len_; + int func_; + int key_length_; + int chainingmode_; + ::PROTOBUF_NAMESPACE_ID::int64 counter_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// ------------------------------------------------------------------- + +class AESDecryptResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:crypto.AESDecryptResponse) */ { + public: + inline AESDecryptResponse() : AESDecryptResponse(nullptr) {} + ~AESDecryptResponse() override; + explicit constexpr AESDecryptResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AESDecryptResponse(const AESDecryptResponse& from); + AESDecryptResponse(AESDecryptResponse&& from) noexcept + : AESDecryptResponse() { + *this = ::std::move(from); + } + + inline AESDecryptResponse& operator=(const AESDecryptResponse& from) { + CopyFrom(from); + return *this; + } + inline AESDecryptResponse& operator=(AESDecryptResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AESDecryptResponse& default_instance() { + return *internal_default_instance(); + } + static inline const AESDecryptResponse* internal_default_instance() { + return reinterpret_cast( + &_AESDecryptResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 32; + + friend void swap(AESDecryptResponse& a, AESDecryptResponse& b) { + a.Swap(&b); + } + inline void Swap(AESDecryptResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AESDecryptResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AESDecryptResponse* New() const final { + return new AESDecryptResponse(); + } + + AESDecryptResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AESDecryptResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const AESDecryptResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AESDecryptResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "crypto.AESDecryptResponse"; + } + protected: + explicit AESDecryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDecryptedDataFieldNumber = 1, + }; + // bytes decrypted_data = 1; + void clear_decrypted_data(); + const std::string& decrypted_data() const; + template + void set_decrypted_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_decrypted_data(); + PROTOBUF_MUST_USE_RESULT std::string* release_decrypted_data(); + void set_allocated_decrypted_data(std::string* decrypted_data); + private: + const std::string& _internal_decrypted_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_decrypted_data(const std::string& value); + std::string* _internal_mutable_decrypted_data(); + public: + + // @@protoc_insertion_point(class_scope:crypto.AESDecryptResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr decrypted_data_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fencryption_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// AsymetricEncryptRequest + +// int32 senderId = 1; +inline void AsymetricEncryptRequest::clear_senderid() { + senderid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AsymetricEncryptRequest::_internal_senderid() const { + return senderid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AsymetricEncryptRequest::senderid() const { + // @@protoc_insertion_point(field_get:crypto.AsymetricEncryptRequest.senderId) + return _internal_senderid(); +} +inline void AsymetricEncryptRequest::_internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + senderid_ = value; +} +inline void AsymetricEncryptRequest::set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_senderid(value); + // @@protoc_insertion_point(field_set:crypto.AsymetricEncryptRequest.senderId) +} + +// string keyId = 2; +inline void AsymetricEncryptRequest::clear_keyid() { + keyid_.ClearToEmpty(); +} +inline const std::string& AsymetricEncryptRequest::keyid() const { + // @@protoc_insertion_point(field_get:crypto.AsymetricEncryptRequest.keyId) + return _internal_keyid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AsymetricEncryptRequest::set_keyid(ArgT0&& arg0, ArgT... args) { + + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AsymetricEncryptRequest.keyId) +} +inline std::string* AsymetricEncryptRequest::mutable_keyid() { + std::string* _s = _internal_mutable_keyid(); + // @@protoc_insertion_point(field_mutable:crypto.AsymetricEncryptRequest.keyId) + return _s; +} +inline const std::string& AsymetricEncryptRequest::_internal_keyid() const { + return keyid_.Get(); +} +inline void AsymetricEncryptRequest::_internal_set_keyid(const std::string& value) { + + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AsymetricEncryptRequest::_internal_mutable_keyid() { + + return keyid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AsymetricEncryptRequest::release_keyid() { + // @@protoc_insertion_point(field_release:crypto.AsymetricEncryptRequest.keyId) + return keyid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AsymetricEncryptRequest::set_allocated_keyid(std::string* keyid) { + if (keyid != nullptr) { + + } else { + + } + keyid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), keyid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricEncryptRequest.keyId) +} + +// bytes data = 3; +inline void AsymetricEncryptRequest::clear_data() { + data_.ClearToEmpty(); +} +inline const std::string& AsymetricEncryptRequest::data() const { + // @@protoc_insertion_point(field_get:crypto.AsymetricEncryptRequest.data) + return _internal_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AsymetricEncryptRequest::set_data(ArgT0&& arg0, ArgT... args) { + + data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AsymetricEncryptRequest.data) +} +inline std::string* AsymetricEncryptRequest::mutable_data() { + std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:crypto.AsymetricEncryptRequest.data) + return _s; +} +inline const std::string& AsymetricEncryptRequest::_internal_data() const { + return data_.Get(); +} +inline void AsymetricEncryptRequest::_internal_set_data(const std::string& value) { + + data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AsymetricEncryptRequest::_internal_mutable_data() { + + return data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AsymetricEncryptRequest::release_data() { + // @@protoc_insertion_point(field_release:crypto.AsymetricEncryptRequest.data) + return data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AsymetricEncryptRequest::set_allocated_data(std::string* data) { + if (data != nullptr) { + + } else { + + } + data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricEncryptRequest.data) +} + +// ------------------------------------------------------------------- + +// AsymetricEncryptResponse + +// bytes encrypted_data = 1; +inline void AsymetricEncryptResponse::clear_encrypted_data() { + encrypted_data_.ClearToEmpty(); +} +inline const std::string& AsymetricEncryptResponse::encrypted_data() const { + // @@protoc_insertion_point(field_get:crypto.AsymetricEncryptResponse.encrypted_data) + return _internal_encrypted_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AsymetricEncryptResponse::set_encrypted_data(ArgT0&& arg0, ArgT... args) { + + encrypted_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AsymetricEncryptResponse.encrypted_data) +} +inline std::string* AsymetricEncryptResponse::mutable_encrypted_data() { + std::string* _s = _internal_mutable_encrypted_data(); + // @@protoc_insertion_point(field_mutable:crypto.AsymetricEncryptResponse.encrypted_data) + return _s; +} +inline const std::string& AsymetricEncryptResponse::_internal_encrypted_data() const { + return encrypted_data_.Get(); +} +inline void AsymetricEncryptResponse::_internal_set_encrypted_data(const std::string& value) { + + encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AsymetricEncryptResponse::_internal_mutable_encrypted_data() { + + return encrypted_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AsymetricEncryptResponse::release_encrypted_data() { + // @@protoc_insertion_point(field_release:crypto.AsymetricEncryptResponse.encrypted_data) + return encrypted_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AsymetricEncryptResponse::set_allocated_encrypted_data(std::string* encrypted_data) { + if (encrypted_data != nullptr) { + + } else { + + } + encrypted_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), encrypted_data, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricEncryptResponse.encrypted_data) +} + +// ------------------------------------------------------------------- + +// AsymetricDecryptRequest + +// int32 receiverId = 1; +inline void AsymetricDecryptRequest::clear_receiverid() { + receiverid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AsymetricDecryptRequest::_internal_receiverid() const { + return receiverid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AsymetricDecryptRequest::receiverid() const { + // @@protoc_insertion_point(field_get:crypto.AsymetricDecryptRequest.receiverId) + return _internal_receiverid(); +} +inline void AsymetricDecryptRequest::_internal_set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + receiverid_ = value; +} +inline void AsymetricDecryptRequest::set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_receiverid(value); + // @@protoc_insertion_point(field_set:crypto.AsymetricDecryptRequest.receiverId) +} + +// string keyId = 2; +inline void AsymetricDecryptRequest::clear_keyid() { + keyid_.ClearToEmpty(); +} +inline const std::string& AsymetricDecryptRequest::keyid() const { + // @@protoc_insertion_point(field_get:crypto.AsymetricDecryptRequest.keyId) + return _internal_keyid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AsymetricDecryptRequest::set_keyid(ArgT0&& arg0, ArgT... args) { + + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AsymetricDecryptRequest.keyId) +} +inline std::string* AsymetricDecryptRequest::mutable_keyid() { + std::string* _s = _internal_mutable_keyid(); + // @@protoc_insertion_point(field_mutable:crypto.AsymetricDecryptRequest.keyId) + return _s; +} +inline const std::string& AsymetricDecryptRequest::_internal_keyid() const { + return keyid_.Get(); +} +inline void AsymetricDecryptRequest::_internal_set_keyid(const std::string& value) { + + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AsymetricDecryptRequest::_internal_mutable_keyid() { + + return keyid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AsymetricDecryptRequest::release_keyid() { + // @@protoc_insertion_point(field_release:crypto.AsymetricDecryptRequest.keyId) + return keyid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AsymetricDecryptRequest::set_allocated_keyid(std::string* keyid) { + if (keyid != nullptr) { + + } else { + + } + keyid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), keyid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricDecryptRequest.keyId) +} + +// bytes data = 3; +inline void AsymetricDecryptRequest::clear_data() { + data_.ClearToEmpty(); +} +inline const std::string& AsymetricDecryptRequest::data() const { + // @@protoc_insertion_point(field_get:crypto.AsymetricDecryptRequest.data) + return _internal_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AsymetricDecryptRequest::set_data(ArgT0&& arg0, ArgT... args) { + + data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AsymetricDecryptRequest.data) +} +inline std::string* AsymetricDecryptRequest::mutable_data() { + std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:crypto.AsymetricDecryptRequest.data) + return _s; +} +inline const std::string& AsymetricDecryptRequest::_internal_data() const { + return data_.Get(); +} +inline void AsymetricDecryptRequest::_internal_set_data(const std::string& value) { + + data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AsymetricDecryptRequest::_internal_mutable_data() { + + return data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AsymetricDecryptRequest::release_data() { + // @@protoc_insertion_point(field_release:crypto.AsymetricDecryptRequest.data) + return data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AsymetricDecryptRequest::set_allocated_data(std::string* data) { + if (data != nullptr) { + + } else { + + } + data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricDecryptRequest.data) +} + +// ------------------------------------------------------------------- + +// GetHashLengthRequest + +// .crypto.SHAAlgorithm func = 1; +inline void GetHashLengthRequest::clear_func() { + func_ = 0; +} +inline ::crypto::SHAAlgorithm GetHashLengthRequest::_internal_func() const { + return static_cast< ::crypto::SHAAlgorithm >(func_); +} +inline ::crypto::SHAAlgorithm GetHashLengthRequest::func() const { + // @@protoc_insertion_point(field_get:crypto.GetHashLengthRequest.func) + return _internal_func(); +} +inline void GetHashLengthRequest::_internal_set_func(::crypto::SHAAlgorithm value) { + + func_ = value; +} +inline void GetHashLengthRequest::set_func(::crypto::SHAAlgorithm value) { + _internal_set_func(value); + // @@protoc_insertion_point(field_set:crypto.GetHashLengthRequest.func) +} + +// int32 dataLen = 2; +inline void GetHashLengthRequest::clear_datalen() { + datalen_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetHashLengthRequest::_internal_datalen() const { + return datalen_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetHashLengthRequest::datalen() const { + // @@protoc_insertion_point(field_get:crypto.GetHashLengthRequest.dataLen) + return _internal_datalen(); +} +inline void GetHashLengthRequest::_internal_set_datalen(::PROTOBUF_NAMESPACE_ID::int32 value) { + + datalen_ = value; +} +inline void GetHashLengthRequest::set_datalen(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_datalen(value); + // @@protoc_insertion_point(field_set:crypto.GetHashLengthRequest.dataLen) +} + +// ------------------------------------------------------------------- + +// GetAESLengthRequest + +// int32 dataLen = 1; +inline void GetAESLengthRequest::clear_datalen() { + datalen_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetAESLengthRequest::_internal_datalen() const { + return datalen_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetAESLengthRequest::datalen() const { + // @@protoc_insertion_point(field_get:crypto.GetAESLengthRequest.dataLen) + return _internal_datalen(); +} +inline void GetAESLengthRequest::_internal_set_datalen(::PROTOBUF_NAMESPACE_ID::int32 value) { + + datalen_ = value; +} +inline void GetAESLengthRequest::set_datalen(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_datalen(value); + // @@protoc_insertion_point(field_set:crypto.GetAESLengthRequest.dataLen) +} + +// bool isFirst = 2; +inline void GetAESLengthRequest::clear_isfirst() { + isfirst_ = false; +} +inline bool GetAESLengthRequest::_internal_isfirst() const { + return isfirst_; +} +inline bool GetAESLengthRequest::isfirst() const { + // @@protoc_insertion_point(field_get:crypto.GetAESLengthRequest.isFirst) + return _internal_isfirst(); +} +inline void GetAESLengthRequest::_internal_set_isfirst(bool value) { + + isfirst_ = value; +} +inline void GetAESLengthRequest::set_isfirst(bool value) { + _internal_set_isfirst(value); + // @@protoc_insertion_point(field_set:crypto.GetAESLengthRequest.isFirst) +} + +// .crypto.AESChainingMode chainingMode = 3; +inline void GetAESLengthRequest::clear_chainingmode() { + chainingmode_ = 0; +} +inline ::crypto::AESChainingMode GetAESLengthRequest::_internal_chainingmode() const { + return static_cast< ::crypto::AESChainingMode >(chainingmode_); +} +inline ::crypto::AESChainingMode GetAESLengthRequest::chainingmode() const { + // @@protoc_insertion_point(field_get:crypto.GetAESLengthRequest.chainingMode) + return _internal_chainingmode(); +} +inline void GetAESLengthRequest::_internal_set_chainingmode(::crypto::AESChainingMode value) { + + chainingmode_ = value; +} +inline void GetAESLengthRequest::set_chainingmode(::crypto::AESChainingMode value) { + _internal_set_chainingmode(value); + // @@protoc_insertion_point(field_set:crypto.GetAESLengthRequest.chainingMode) +} + +// ------------------------------------------------------------------- + +// AsymetricDecryptResponse + +// bytes decrypted_data = 1; +inline void AsymetricDecryptResponse::clear_decrypted_data() { + decrypted_data_.ClearToEmpty(); +} +inline const std::string& AsymetricDecryptResponse::decrypted_data() const { + // @@protoc_insertion_point(field_get:crypto.AsymetricDecryptResponse.decrypted_data) + return _internal_decrypted_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AsymetricDecryptResponse::set_decrypted_data(ArgT0&& arg0, ArgT... args) { + + decrypted_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AsymetricDecryptResponse.decrypted_data) +} +inline std::string* AsymetricDecryptResponse::mutable_decrypted_data() { + std::string* _s = _internal_mutable_decrypted_data(); + // @@protoc_insertion_point(field_mutable:crypto.AsymetricDecryptResponse.decrypted_data) + return _s; +} +inline const std::string& AsymetricDecryptResponse::_internal_decrypted_data() const { + return decrypted_data_.Get(); +} +inline void AsymetricDecryptResponse::_internal_set_decrypted_data(const std::string& value) { + + decrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AsymetricDecryptResponse::_internal_mutable_decrypted_data() { + + return decrypted_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AsymetricDecryptResponse::release_decrypted_data() { + // @@protoc_insertion_point(field_release:crypto.AsymetricDecryptResponse.decrypted_data) + return decrypted_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AsymetricDecryptResponse::set_allocated_decrypted_data(std::string* decrypted_data) { + if (decrypted_data != nullptr) { + + } else { + + } + decrypted_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), decrypted_data, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricDecryptResponse.decrypted_data) +} + +// ------------------------------------------------------------------- + +// GetLengthRequest + +// int32 in_len = 1; +inline void GetLengthRequest::clear_in_len() { + in_len_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetLengthRequest::_internal_in_len() const { + return in_len_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetLengthRequest::in_len() const { + // @@protoc_insertion_point(field_get:crypto.GetLengthRequest.in_len) + return _internal_in_len(); +} +inline void GetLengthRequest::_internal_set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value) { + + in_len_ = value; +} +inline void GetLengthRequest::set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_in_len(value); + // @@protoc_insertion_point(field_set:crypto.GetLengthRequest.in_len) +} + +// ------------------------------------------------------------------- + +// GetLengthResponse + +// int32 len = 1; +inline void GetLengthResponse::clear_len() { + len_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetLengthResponse::_internal_len() const { + return len_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetLengthResponse::len() const { + // @@protoc_insertion_point(field_get:crypto.GetLengthResponse.len) + return _internal_len(); +} +inline void GetLengthResponse::_internal_set_len(::PROTOBUF_NAMESPACE_ID::int32 value) { + + len_ = value; +} +inline void GetLengthResponse::set_len(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_len(value); + // @@protoc_insertion_point(field_set:crypto.GetLengthResponse.len) +} + +// ------------------------------------------------------------------- + +// GetWholeLength + +// int32 senderId = 1; +inline void GetWholeLength::clear_senderid() { + senderid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetWholeLength::_internal_senderid() const { + return senderid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetWholeLength::senderid() const { + // @@protoc_insertion_point(field_get:crypto.GetWholeLength.senderId) + return _internal_senderid(); +} +inline void GetWholeLength::_internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + senderid_ = value; +} +inline void GetWholeLength::set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_senderid(value); + // @@protoc_insertion_point(field_set:crypto.GetWholeLength.senderId) +} + +// int32 inLen = 2; +inline void GetWholeLength::clear_inlen() { + inlen_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetWholeLength::_internal_inlen() const { + return inlen_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetWholeLength::inlen() const { + // @@protoc_insertion_point(field_get:crypto.GetWholeLength.inLen) + return _internal_inlen(); +} +inline void GetWholeLength::_internal_set_inlen(::PROTOBUF_NAMESPACE_ID::int32 value) { + + inlen_ = value; +} +inline void GetWholeLength::set_inlen(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_inlen(value); + // @@protoc_insertion_point(field_set:crypto.GetWholeLength.inLen) +} + +// ------------------------------------------------------------------- + +// GenerateAESKeyRequest + +// int32 user_id = 1; +inline void GenerateAESKeyRequest::clear_user_id() { + user_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GenerateAESKeyRequest::_internal_user_id() const { + return user_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GenerateAESKeyRequest::user_id() const { + // @@protoc_insertion_point(field_get:crypto.GenerateAESKeyRequest.user_id) + return _internal_user_id(); +} +inline void GenerateAESKeyRequest::_internal_set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + user_id_ = value; +} +inline void GenerateAESKeyRequest::set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_user_id(value); + // @@protoc_insertion_point(field_set:crypto.GenerateAESKeyRequest.user_id) +} + +// repeated .crypto.KeyPermission permissions = 2; +inline int GenerateAESKeyRequest::_internal_permissions_size() const { + return permissions_.size(); +} +inline int GenerateAESKeyRequest::permissions_size() const { + return _internal_permissions_size(); +} +inline void GenerateAESKeyRequest::clear_permissions() { + permissions_.Clear(); +} +inline ::crypto::KeyPermission GenerateAESKeyRequest::_internal_permissions(int index) const { + return static_cast< ::crypto::KeyPermission >(permissions_.Get(index)); +} +inline ::crypto::KeyPermission GenerateAESKeyRequest::permissions(int index) const { + // @@protoc_insertion_point(field_get:crypto.GenerateAESKeyRequest.permissions) + return _internal_permissions(index); +} +inline void GenerateAESKeyRequest::set_permissions(int index, ::crypto::KeyPermission value) { + permissions_.Set(index, value); + // @@protoc_insertion_point(field_set:crypto.GenerateAESKeyRequest.permissions) +} +inline void GenerateAESKeyRequest::_internal_add_permissions(::crypto::KeyPermission value) { + permissions_.Add(value); +} +inline void GenerateAESKeyRequest::add_permissions(::crypto::KeyPermission value) { + _internal_add_permissions(value); + // @@protoc_insertion_point(field_add:crypto.GenerateAESKeyRequest.permissions) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& +GenerateAESKeyRequest::permissions() const { + // @@protoc_insertion_point(field_list:crypto.GenerateAESKeyRequest.permissions) + return permissions_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +GenerateAESKeyRequest::_internal_mutable_permissions() { + return &permissions_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +GenerateAESKeyRequest::mutable_permissions() { + // @@protoc_insertion_point(field_mutable_list:crypto.GenerateAESKeyRequest.permissions) + return _internal_mutable_permissions(); +} + +// .crypto.AESKeyLength keyLength = 3; +inline void GenerateAESKeyRequest::clear_keylength() { + keylength_ = 0; +} +inline ::crypto::AESKeyLength GenerateAESKeyRequest::_internal_keylength() const { + return static_cast< ::crypto::AESKeyLength >(keylength_); +} +inline ::crypto::AESKeyLength GenerateAESKeyRequest::keylength() const { + // @@protoc_insertion_point(field_get:crypto.GenerateAESKeyRequest.keyLength) + return _internal_keylength(); +} +inline void GenerateAESKeyRequest::_internal_set_keylength(::crypto::AESKeyLength value) { + + keylength_ = value; +} +inline void GenerateAESKeyRequest::set_keylength(::crypto::AESKeyLength value) { + _internal_set_keylength(value); + // @@protoc_insertion_point(field_set:crypto.GenerateAESKeyRequest.keyLength) +} + +// int32 destUserId = 4; +inline void GenerateAESKeyRequest::clear_destuserid() { + destuserid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GenerateAESKeyRequest::_internal_destuserid() const { + return destuserid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GenerateAESKeyRequest::destuserid() const { + // @@protoc_insertion_point(field_get:crypto.GenerateAESKeyRequest.destUserId) + return _internal_destuserid(); +} +inline void GenerateAESKeyRequest::_internal_set_destuserid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + destuserid_ = value; +} +inline void GenerateAESKeyRequest::set_destuserid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_destuserid(value); + // @@protoc_insertion_point(field_set:crypto.GenerateAESKeyRequest.destUserId) +} + +// ------------------------------------------------------------------- + +// GenerateAESKeyResponse + +// string aes_key = 1; +inline void GenerateAESKeyResponse::clear_aes_key() { + aes_key_.ClearToEmpty(); +} +inline const std::string& GenerateAESKeyResponse::aes_key() const { + // @@protoc_insertion_point(field_get:crypto.GenerateAESKeyResponse.aes_key) + return _internal_aes_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GenerateAESKeyResponse::set_aes_key(ArgT0&& arg0, ArgT... args) { + + aes_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.GenerateAESKeyResponse.aes_key) +} +inline std::string* GenerateAESKeyResponse::mutable_aes_key() { + std::string* _s = _internal_mutable_aes_key(); + // @@protoc_insertion_point(field_mutable:crypto.GenerateAESKeyResponse.aes_key) + return _s; +} +inline const std::string& GenerateAESKeyResponse::_internal_aes_key() const { + return aes_key_.Get(); +} +inline void GenerateAESKeyResponse::_internal_set_aes_key(const std::string& value) { + + aes_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GenerateAESKeyResponse::_internal_mutable_aes_key() { + + return aes_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GenerateAESKeyResponse::release_aes_key() { + // @@protoc_insertion_point(field_release:crypto.GenerateAESKeyResponse.aes_key) + return aes_key_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void GenerateAESKeyResponse::set_allocated_aes_key(std::string* aes_key) { + if (aes_key != nullptr) { + + } else { + + } + aes_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), aes_key, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.GenerateAESKeyResponse.aes_key) +} + +// ------------------------------------------------------------------- + +// GenerateKeyPairRequest + +// int32 user_id = 1; +inline void GenerateKeyPairRequest::clear_user_id() { + user_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GenerateKeyPairRequest::_internal_user_id() const { + return user_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GenerateKeyPairRequest::user_id() const { + // @@protoc_insertion_point(field_get:crypto.GenerateKeyPairRequest.user_id) + return _internal_user_id(); +} +inline void GenerateKeyPairRequest::_internal_set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + user_id_ = value; +} +inline void GenerateKeyPairRequest::set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_user_id(value); + // @@protoc_insertion_point(field_set:crypto.GenerateKeyPairRequest.user_id) +} + +// repeated .crypto.KeyPermission permissions = 2; +inline int GenerateKeyPairRequest::_internal_permissions_size() const { + return permissions_.size(); +} +inline int GenerateKeyPairRequest::permissions_size() const { + return _internal_permissions_size(); +} +inline void GenerateKeyPairRequest::clear_permissions() { + permissions_.Clear(); +} +inline ::crypto::KeyPermission GenerateKeyPairRequest::_internal_permissions(int index) const { + return static_cast< ::crypto::KeyPermission >(permissions_.Get(index)); +} +inline ::crypto::KeyPermission GenerateKeyPairRequest::permissions(int index) const { + // @@protoc_insertion_point(field_get:crypto.GenerateKeyPairRequest.permissions) + return _internal_permissions(index); +} +inline void GenerateKeyPairRequest::set_permissions(int index, ::crypto::KeyPermission value) { + permissions_.Set(index, value); + // @@protoc_insertion_point(field_set:crypto.GenerateKeyPairRequest.permissions) +} +inline void GenerateKeyPairRequest::_internal_add_permissions(::crypto::KeyPermission value) { + permissions_.Add(value); +} +inline void GenerateKeyPairRequest::add_permissions(::crypto::KeyPermission value) { + _internal_add_permissions(value); + // @@protoc_insertion_point(field_add:crypto.GenerateKeyPairRequest.permissions) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& +GenerateKeyPairRequest::permissions() const { + // @@protoc_insertion_point(field_list:crypto.GenerateKeyPairRequest.permissions) + return permissions_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +GenerateKeyPairRequest::_internal_mutable_permissions() { + return &permissions_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +GenerateKeyPairRequest::mutable_permissions() { + // @@protoc_insertion_point(field_mutable_list:crypto.GenerateKeyPairRequest.permissions) + return _internal_mutable_permissions(); +} + +// ------------------------------------------------------------------- + +// GenerateKeyPairResponse + +// string public_key = 1; +inline void GenerateKeyPairResponse::clear_public_key() { + public_key_.ClearToEmpty(); +} +inline const std::string& GenerateKeyPairResponse::public_key() const { + // @@protoc_insertion_point(field_get:crypto.GenerateKeyPairResponse.public_key) + return _internal_public_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GenerateKeyPairResponse::set_public_key(ArgT0&& arg0, ArgT... args) { + + public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.GenerateKeyPairResponse.public_key) +} +inline std::string* GenerateKeyPairResponse::mutable_public_key() { + std::string* _s = _internal_mutable_public_key(); + // @@protoc_insertion_point(field_mutable:crypto.GenerateKeyPairResponse.public_key) + return _s; +} +inline const std::string& GenerateKeyPairResponse::_internal_public_key() const { + return public_key_.Get(); +} +inline void GenerateKeyPairResponse::_internal_set_public_key(const std::string& value) { + + public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GenerateKeyPairResponse::_internal_mutable_public_key() { + + return public_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GenerateKeyPairResponse::release_public_key() { + // @@protoc_insertion_point(field_release:crypto.GenerateKeyPairResponse.public_key) + return public_key_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void GenerateKeyPairResponse::set_allocated_public_key(std::string* public_key) { + if (public_key != nullptr) { + + } else { + + } + public_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), public_key, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.GenerateKeyPairResponse.public_key) +} + +// string private_key = 2; +inline void GenerateKeyPairResponse::clear_private_key() { + private_key_.ClearToEmpty(); +} +inline const std::string& GenerateKeyPairResponse::private_key() const { + // @@protoc_insertion_point(field_get:crypto.GenerateKeyPairResponse.private_key) + return _internal_private_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GenerateKeyPairResponse::set_private_key(ArgT0&& arg0, ArgT... args) { + + private_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.GenerateKeyPairResponse.private_key) +} +inline std::string* GenerateKeyPairResponse::mutable_private_key() { + std::string* _s = _internal_mutable_private_key(); + // @@protoc_insertion_point(field_mutable:crypto.GenerateKeyPairResponse.private_key) + return _s; +} +inline const std::string& GenerateKeyPairResponse::_internal_private_key() const { + return private_key_.Get(); +} +inline void GenerateKeyPairResponse::_internal_set_private_key(const std::string& value) { + + private_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GenerateKeyPairResponse::_internal_mutable_private_key() { + + return private_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GenerateKeyPairResponse::release_private_key() { + // @@protoc_insertion_point(field_release:crypto.GenerateKeyPairResponse.private_key) + return private_key_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void GenerateKeyPairResponse::set_allocated_private_key(std::string* private_key) { + if (private_key != nullptr) { + + } else { + + } + private_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), private_key, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.GenerateKeyPairResponse.private_key) +} + +// ------------------------------------------------------------------- + +// SignRequest + +// int32 sender_id = 1; +inline void SignRequest::clear_sender_id() { + sender_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 SignRequest::_internal_sender_id() const { + return sender_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 SignRequest::sender_id() const { + // @@protoc_insertion_point(field_get:crypto.SignRequest.sender_id) + return _internal_sender_id(); +} +inline void SignRequest::_internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + sender_id_ = value; +} +inline void SignRequest::set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_sender_id(value); + // @@protoc_insertion_point(field_set:crypto.SignRequest.sender_id) +} + +// bytes data = 2; +inline void SignRequest::clear_data() { + data_.ClearToEmpty(); +} +inline const std::string& SignRequest::data() const { + // @@protoc_insertion_point(field_get:crypto.SignRequest.data) + return _internal_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SignRequest::set_data(ArgT0&& arg0, ArgT... args) { + + data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.SignRequest.data) +} +inline std::string* SignRequest::mutable_data() { + std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:crypto.SignRequest.data) + return _s; +} +inline const std::string& SignRequest::_internal_data() const { + return data_.Get(); +} +inline void SignRequest::_internal_set_data(const std::string& value) { + + data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SignRequest::_internal_mutable_data() { + + return data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SignRequest::release_data() { + // @@protoc_insertion_point(field_release:crypto.SignRequest.data) + return data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void SignRequest::set_allocated_data(std::string* data) { + if (data != nullptr) { + + } else { + + } + data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.SignRequest.data) +} + +// .crypto.SHAAlgorithm hash_func = 3; +inline void SignRequest::clear_hash_func() { + hash_func_ = 0; +} +inline ::crypto::SHAAlgorithm SignRequest::_internal_hash_func() const { + return static_cast< ::crypto::SHAAlgorithm >(hash_func_); +} +inline ::crypto::SHAAlgorithm SignRequest::hash_func() const { + // @@protoc_insertion_point(field_get:crypto.SignRequest.hash_func) + return _internal_hash_func(); +} +inline void SignRequest::_internal_set_hash_func(::crypto::SHAAlgorithm value) { + + hash_func_ = value; +} +inline void SignRequest::set_hash_func(::crypto::SHAAlgorithm value) { + _internal_set_hash_func(value); + // @@protoc_insertion_point(field_set:crypto.SignRequest.hash_func) +} + +// int64 counter = 5; +inline void SignRequest::clear_counter() { + counter_ = int64_t{0}; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 SignRequest::_internal_counter() const { + return counter_; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 SignRequest::counter() const { + // @@protoc_insertion_point(field_get:crypto.SignRequest.counter) + return _internal_counter(); +} +inline void SignRequest::_internal_set_counter(::PROTOBUF_NAMESPACE_ID::int64 value) { + + counter_ = value; +} +inline void SignRequest::set_counter(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_counter(value); + // @@protoc_insertion_point(field_set:crypto.SignRequest.counter) +} + +// string key_id = 6; +inline void SignRequest::clear_key_id() { + key_id_.ClearToEmpty(); +} +inline const std::string& SignRequest::key_id() const { + // @@protoc_insertion_point(field_get:crypto.SignRequest.key_id) + return _internal_key_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SignRequest::set_key_id(ArgT0&& arg0, ArgT... args) { + + key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.SignRequest.key_id) +} +inline std::string* SignRequest::mutable_key_id() { + std::string* _s = _internal_mutable_key_id(); + // @@protoc_insertion_point(field_mutable:crypto.SignRequest.key_id) + return _s; +} +inline const std::string& SignRequest::_internal_key_id() const { + return key_id_.Get(); +} +inline void SignRequest::_internal_set_key_id(const std::string& value) { + + key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SignRequest::_internal_mutable_key_id() { + + return key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SignRequest::release_key_id() { + // @@protoc_insertion_point(field_release:crypto.SignRequest.key_id) + return key_id_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void SignRequest::set_allocated_key_id(std::string* key_id) { + if (key_id != nullptr) { + + } else { + + } + key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key_id, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.SignRequest.key_id) +} + +// ------------------------------------------------------------------- + +// SignResponse + +// bytes signature = 1; +inline void SignResponse::clear_signature() { + signature_.ClearToEmpty(); +} +inline const std::string& SignResponse::signature() const { + // @@protoc_insertion_point(field_get:crypto.SignResponse.signature) + return _internal_signature(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SignResponse::set_signature(ArgT0&& arg0, ArgT... args) { + + signature_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.SignResponse.signature) +} +inline std::string* SignResponse::mutable_signature() { + std::string* _s = _internal_mutable_signature(); + // @@protoc_insertion_point(field_mutable:crypto.SignResponse.signature) + return _s; +} +inline const std::string& SignResponse::_internal_signature() const { + return signature_.Get(); +} +inline void SignResponse::_internal_set_signature(const std::string& value) { + + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SignResponse::_internal_mutable_signature() { + + return signature_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SignResponse::release_signature() { + // @@protoc_insertion_point(field_release:crypto.SignResponse.signature) + return signature_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void SignResponse::set_allocated_signature(std::string* signature) { + if (signature != nullptr) { + + } else { + + } + signature_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signature, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.SignResponse.signature) +} + +// ------------------------------------------------------------------- + +// VerifyRequest + +// int32 sender_id = 1; +inline void VerifyRequest::clear_sender_id() { + sender_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 VerifyRequest::_internal_sender_id() const { + return sender_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 VerifyRequest::sender_id() const { + // @@protoc_insertion_point(field_get:crypto.VerifyRequest.sender_id) + return _internal_sender_id(); +} +inline void VerifyRequest::_internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + sender_id_ = value; +} +inline void VerifyRequest::set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_sender_id(value); + // @@protoc_insertion_point(field_set:crypto.VerifyRequest.sender_id) +} + +// int32 receiver_id = 2; +inline void VerifyRequest::clear_receiver_id() { + receiver_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 VerifyRequest::_internal_receiver_id() const { + return receiver_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 VerifyRequest::receiver_id() const { + // @@protoc_insertion_point(field_get:crypto.VerifyRequest.receiver_id) + return _internal_receiver_id(); +} +inline void VerifyRequest::_internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + receiver_id_ = value; +} +inline void VerifyRequest::set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_receiver_id(value); + // @@protoc_insertion_point(field_set:crypto.VerifyRequest.receiver_id) +} + +// bytes data = 3; +inline void VerifyRequest::clear_data() { + data_.ClearToEmpty(); +} +inline const std::string& VerifyRequest::data() const { + // @@protoc_insertion_point(field_get:crypto.VerifyRequest.data) + return _internal_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void VerifyRequest::set_data(ArgT0&& arg0, ArgT... args) { + + data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.VerifyRequest.data) +} +inline std::string* VerifyRequest::mutable_data() { + std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:crypto.VerifyRequest.data) + return _s; +} +inline const std::string& VerifyRequest::_internal_data() const { + return data_.Get(); +} +inline void VerifyRequest::_internal_set_data(const std::string& value) { + + data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* VerifyRequest::_internal_mutable_data() { + + return data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* VerifyRequest::release_data() { + // @@protoc_insertion_point(field_release:crypto.VerifyRequest.data) + return data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void VerifyRequest::set_allocated_data(std::string* data) { + if (data != nullptr) { + + } else { + + } + data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.VerifyRequest.data) +} + +// bytes signature = 4; +inline void VerifyRequest::clear_signature() { + signature_.ClearToEmpty(); +} +inline const std::string& VerifyRequest::signature() const { + // @@protoc_insertion_point(field_get:crypto.VerifyRequest.signature) + return _internal_signature(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void VerifyRequest::set_signature(ArgT0&& arg0, ArgT... args) { + + signature_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.VerifyRequest.signature) +} +inline std::string* VerifyRequest::mutable_signature() { + std::string* _s = _internal_mutable_signature(); + // @@protoc_insertion_point(field_mutable:crypto.VerifyRequest.signature) + return _s; +} +inline const std::string& VerifyRequest::_internal_signature() const { + return signature_.Get(); +} +inline void VerifyRequest::_internal_set_signature(const std::string& value) { + + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* VerifyRequest::_internal_mutable_signature() { + + return signature_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* VerifyRequest::release_signature() { + // @@protoc_insertion_point(field_release:crypto.VerifyRequest.signature) + return signature_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void VerifyRequest::set_allocated_signature(std::string* signature) { + if (signature != nullptr) { + + } else { + + } + signature_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signature, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.VerifyRequest.signature) +} + +// .crypto.SHAAlgorithm hash_func = 5; +inline void VerifyRequest::clear_hash_func() { + hash_func_ = 0; +} +inline ::crypto::SHAAlgorithm VerifyRequest::_internal_hash_func() const { + return static_cast< ::crypto::SHAAlgorithm >(hash_func_); +} +inline ::crypto::SHAAlgorithm VerifyRequest::hash_func() const { + // @@protoc_insertion_point(field_get:crypto.VerifyRequest.hash_func) + return _internal_hash_func(); +} +inline void VerifyRequest::_internal_set_hash_func(::crypto::SHAAlgorithm value) { + + hash_func_ = value; +} +inline void VerifyRequest::set_hash_func(::crypto::SHAAlgorithm value) { + _internal_set_hash_func(value); + // @@protoc_insertion_point(field_set:crypto.VerifyRequest.hash_func) +} + +// string key_id = 6; +inline void VerifyRequest::clear_key_id() { + key_id_.ClearToEmpty(); +} +inline const std::string& VerifyRequest::key_id() const { + // @@protoc_insertion_point(field_get:crypto.VerifyRequest.key_id) + return _internal_key_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void VerifyRequest::set_key_id(ArgT0&& arg0, ArgT... args) { + + key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.VerifyRequest.key_id) +} +inline std::string* VerifyRequest::mutable_key_id() { + std::string* _s = _internal_mutable_key_id(); + // @@protoc_insertion_point(field_mutable:crypto.VerifyRequest.key_id) + return _s; +} +inline const std::string& VerifyRequest::_internal_key_id() const { + return key_id_.Get(); +} +inline void VerifyRequest::_internal_set_key_id(const std::string& value) { + + key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* VerifyRequest::_internal_mutable_key_id() { + + return key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* VerifyRequest::release_key_id() { + // @@protoc_insertion_point(field_release:crypto.VerifyRequest.key_id) + return key_id_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void VerifyRequest::set_allocated_key_id(std::string* key_id) { + if (key_id != nullptr) { + + } else { + + } + key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key_id, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.VerifyRequest.key_id) +} + +// int32 counter = 7; +inline void VerifyRequest::clear_counter() { + counter_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 VerifyRequest::_internal_counter() const { + return counter_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 VerifyRequest::counter() const { + // @@protoc_insertion_point(field_get:crypto.VerifyRequest.counter) + return _internal_counter(); +} +inline void VerifyRequest::_internal_set_counter(::PROTOBUF_NAMESPACE_ID::int32 value) { + + counter_ = value; +} +inline void VerifyRequest::set_counter(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_counter(value); + // @@protoc_insertion_point(field_set:crypto.VerifyRequest.counter) +} + +// ------------------------------------------------------------------- + +// VerifyResponse + +// bool valid = 1; +inline void VerifyResponse::clear_valid() { + valid_ = false; +} +inline bool VerifyResponse::_internal_valid() const { + return valid_; +} +inline bool VerifyResponse::valid() const { + // @@protoc_insertion_point(field_get:crypto.VerifyResponse.valid) + return _internal_valid(); +} +inline void VerifyResponse::_internal_set_valid(bool value) { + + valid_ = value; +} +inline void VerifyResponse::set_valid(bool value) { + _internal_set_valid(value); + // @@protoc_insertion_point(field_set:crypto.VerifyResponse.valid) +} + +// bytes out = 2; +inline void VerifyResponse::clear_out() { + out_.ClearToEmpty(); +} +inline const std::string& VerifyResponse::out() const { + // @@protoc_insertion_point(field_get:crypto.VerifyResponse.out) + return _internal_out(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void VerifyResponse::set_out(ArgT0&& arg0, ArgT... args) { + + out_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.VerifyResponse.out) +} +inline std::string* VerifyResponse::mutable_out() { + std::string* _s = _internal_mutable_out(); + // @@protoc_insertion_point(field_mutable:crypto.VerifyResponse.out) + return _s; +} +inline const std::string& VerifyResponse::_internal_out() const { + return out_.Get(); +} +inline void VerifyResponse::_internal_set_out(const std::string& value) { + + out_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* VerifyResponse::_internal_mutable_out() { + + return out_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* VerifyResponse::release_out() { + // @@protoc_insertion_point(field_release:crypto.VerifyResponse.out) + return out_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void VerifyResponse::set_allocated_out(std::string* out) { + if (out != nullptr) { + + } else { + + } + out_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), out, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.VerifyResponse.out) +} + +// ------------------------------------------------------------------- + +// KeyRequest + +// int32 user_id = 1; +inline void KeyRequest::clear_user_id() { + user_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 KeyRequest::_internal_user_id() const { + return user_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 KeyRequest::user_id() const { + // @@protoc_insertion_point(field_get:crypto.KeyRequest.user_id) + return _internal_user_id(); +} +inline void KeyRequest::_internal_set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + user_id_ = value; +} +inline void KeyRequest::set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_user_id(value); + // @@protoc_insertion_point(field_set:crypto.KeyRequest.user_id) +} + +// ------------------------------------------------------------------- + +// KeyResponse + +// string key = 1; +inline void KeyResponse::clear_key() { + key_.ClearToEmpty(); +} +inline const std::string& KeyResponse::key() const { + // @@protoc_insertion_point(field_get:crypto.KeyResponse.key) + return _internal_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void KeyResponse::set_key(ArgT0&& arg0, ArgT... args) { + + key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.KeyResponse.key) +} +inline std::string* KeyResponse::mutable_key() { + std::string* _s = _internal_mutable_key(); + // @@protoc_insertion_point(field_mutable:crypto.KeyResponse.key) + return _s; +} +inline const std::string& KeyResponse::_internal_key() const { + return key_.Get(); +} +inline void KeyResponse::_internal_set_key(const std::string& value) { + + key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* KeyResponse::_internal_mutable_key() { + + return key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* KeyResponse::release_key() { + // @@protoc_insertion_point(field_release:crypto.KeyResponse.key) + return key_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void KeyResponse::set_allocated_key(std::string* key) { + if (key != nullptr) { + + } else { + + } + key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.KeyResponse.key) +} + +// ------------------------------------------------------------------- + +// UserKeyPermissions + +// int32 userId = 1; +inline void UserKeyPermissions::clear_userid() { + userid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 UserKeyPermissions::_internal_userid() const { + return userid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 UserKeyPermissions::userid() const { + // @@protoc_insertion_point(field_get:crypto.UserKeyPermissions.userId) + return _internal_userid(); +} +inline void UserKeyPermissions::_internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + userid_ = value; +} +inline void UserKeyPermissions::set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_userid(value); + // @@protoc_insertion_point(field_set:crypto.UserKeyPermissions.userId) +} + +// repeated .crypto.KeyPermission permissions = 2; +inline int UserKeyPermissions::_internal_permissions_size() const { + return permissions_.size(); +} +inline int UserKeyPermissions::permissions_size() const { + return _internal_permissions_size(); +} +inline void UserKeyPermissions::clear_permissions() { + permissions_.Clear(); +} +inline ::crypto::KeyPermission UserKeyPermissions::_internal_permissions(int index) const { + return static_cast< ::crypto::KeyPermission >(permissions_.Get(index)); +} +inline ::crypto::KeyPermission UserKeyPermissions::permissions(int index) const { + // @@protoc_insertion_point(field_get:crypto.UserKeyPermissions.permissions) + return _internal_permissions(index); +} +inline void UserKeyPermissions::set_permissions(int index, ::crypto::KeyPermission value) { + permissions_.Set(index, value); + // @@protoc_insertion_point(field_set:crypto.UserKeyPermissions.permissions) +} +inline void UserKeyPermissions::_internal_add_permissions(::crypto::KeyPermission value) { + permissions_.Add(value); +} +inline void UserKeyPermissions::add_permissions(::crypto::KeyPermission value) { + _internal_add_permissions(value); + // @@protoc_insertion_point(field_add:crypto.UserKeyPermissions.permissions) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& +UserKeyPermissions::permissions() const { + // @@protoc_insertion_point(field_list:crypto.UserKeyPermissions.permissions) + return permissions_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +UserKeyPermissions::_internal_mutable_permissions() { + return &permissions_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +UserKeyPermissions::mutable_permissions() { + // @@protoc_insertion_point(field_mutable_list:crypto.UserKeyPermissions.permissions) + return _internal_mutable_permissions(); +} + +// ------------------------------------------------------------------- + +// BootSystemRequest + +// repeated .crypto.UserKeyPermissions usersIdsPermissions = 1; +inline int BootSystemRequest::_internal_usersidspermissions_size() const { + return usersidspermissions_.size(); +} +inline int BootSystemRequest::usersidspermissions_size() const { + return _internal_usersidspermissions_size(); +} +inline void BootSystemRequest::clear_usersidspermissions() { + usersidspermissions_.Clear(); +} +inline ::crypto::UserKeyPermissions* BootSystemRequest::mutable_usersidspermissions(int index) { + // @@protoc_insertion_point(field_mutable:crypto.BootSystemRequest.usersIdsPermissions) + return usersidspermissions_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::crypto::UserKeyPermissions >* +BootSystemRequest::mutable_usersidspermissions() { + // @@protoc_insertion_point(field_mutable_list:crypto.BootSystemRequest.usersIdsPermissions) + return &usersidspermissions_; +} +inline const ::crypto::UserKeyPermissions& BootSystemRequest::_internal_usersidspermissions(int index) const { + return usersidspermissions_.Get(index); +} +inline const ::crypto::UserKeyPermissions& BootSystemRequest::usersidspermissions(int index) const { + // @@protoc_insertion_point(field_get:crypto.BootSystemRequest.usersIdsPermissions) + return _internal_usersidspermissions(index); +} +inline ::crypto::UserKeyPermissions* BootSystemRequest::_internal_add_usersidspermissions() { + return usersidspermissions_.Add(); +} +inline ::crypto::UserKeyPermissions* BootSystemRequest::add_usersidspermissions() { + ::crypto::UserKeyPermissions* _add = _internal_add_usersidspermissions(); + // @@protoc_insertion_point(field_add:crypto.BootSystemRequest.usersIdsPermissions) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::crypto::UserKeyPermissions >& +BootSystemRequest::usersidspermissions() const { + // @@protoc_insertion_point(field_list:crypto.BootSystemRequest.usersIdsPermissions) + return usersidspermissions_; +} + +// ------------------------------------------------------------------- + +// Empty + +// ------------------------------------------------------------------- + +// CryptoConfig + +// .crypto.SHAAlgorithm hashFunction = 1; +inline void CryptoConfig::clear_hashfunction() { + hashfunction_ = 0; +} +inline ::crypto::SHAAlgorithm CryptoConfig::_internal_hashfunction() const { + return static_cast< ::crypto::SHAAlgorithm >(hashfunction_); +} +inline ::crypto::SHAAlgorithm CryptoConfig::hashfunction() const { + // @@protoc_insertion_point(field_get:crypto.CryptoConfig.hashFunction) + return _internal_hashfunction(); +} +inline void CryptoConfig::_internal_set_hashfunction(::crypto::SHAAlgorithm value) { + + hashfunction_ = value; +} +inline void CryptoConfig::set_hashfunction(::crypto::SHAAlgorithm value) { + _internal_set_hashfunction(value); + // @@protoc_insertion_point(field_set:crypto.CryptoConfig.hashFunction) +} + +// .crypto.AESKeyLength aesKeyLength = 2; +inline void CryptoConfig::clear_aeskeylength() { + aeskeylength_ = 0; +} +inline ::crypto::AESKeyLength CryptoConfig::_internal_aeskeylength() const { + return static_cast< ::crypto::AESKeyLength >(aeskeylength_); +} +inline ::crypto::AESKeyLength CryptoConfig::aeskeylength() const { + // @@protoc_insertion_point(field_get:crypto.CryptoConfig.aesKeyLength) + return _internal_aeskeylength(); +} +inline void CryptoConfig::_internal_set_aeskeylength(::crypto::AESKeyLength value) { + + aeskeylength_ = value; +} +inline void CryptoConfig::set_aeskeylength(::crypto::AESKeyLength value) { + _internal_set_aeskeylength(value); + // @@protoc_insertion_point(field_set:crypto.CryptoConfig.aesKeyLength) +} + +// .crypto.AESChainingMode aesChainingMode = 3; +inline void CryptoConfig::clear_aeschainingmode() { + aeschainingmode_ = 0; +} +inline ::crypto::AESChainingMode CryptoConfig::_internal_aeschainingmode() const { + return static_cast< ::crypto::AESChainingMode >(aeschainingmode_); +} +inline ::crypto::AESChainingMode CryptoConfig::aeschainingmode() const { + // @@protoc_insertion_point(field_get:crypto.CryptoConfig.aesChainingMode) + return _internal_aeschainingmode(); +} +inline void CryptoConfig::_internal_set_aeschainingmode(::crypto::AESChainingMode value) { + + aeschainingmode_ = value; +} +inline void CryptoConfig::set_aeschainingmode(::crypto::AESChainingMode value) { + _internal_set_aeschainingmode(value); + // @@protoc_insertion_point(field_set:crypto.CryptoConfig.aesChainingMode) +} + +// .crypto.AsymmetricFunction asymmetricFunction = 4; +inline void CryptoConfig::clear_asymmetricfunction() { + asymmetricfunction_ = 0; +} +inline ::crypto::AsymmetricFunction CryptoConfig::_internal_asymmetricfunction() const { + return static_cast< ::crypto::AsymmetricFunction >(asymmetricfunction_); +} +inline ::crypto::AsymmetricFunction CryptoConfig::asymmetricfunction() const { + // @@protoc_insertion_point(field_get:crypto.CryptoConfig.asymmetricFunction) + return _internal_asymmetricfunction(); +} +inline void CryptoConfig::_internal_set_asymmetricfunction(::crypto::AsymmetricFunction value) { + + asymmetricfunction_ = value; +} +inline void CryptoConfig::set_asymmetricfunction(::crypto::AsymmetricFunction value) { + _internal_set_asymmetricfunction(value); + // @@protoc_insertion_point(field_set:crypto.CryptoConfig.asymmetricFunction) +} + +// ------------------------------------------------------------------- + +// ConfigureRequest + +// int32 userId = 1; +inline void ConfigureRequest::clear_userid() { + userid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 ConfigureRequest::_internal_userid() const { + return userid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 ConfigureRequest::userid() const { + // @@protoc_insertion_point(field_get:crypto.ConfigureRequest.userId) + return _internal_userid(); +} +inline void ConfigureRequest::_internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + userid_ = value; +} +inline void ConfigureRequest::set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_userid(value); + // @@protoc_insertion_point(field_set:crypto.ConfigureRequest.userId) +} + +// .crypto.CryptoConfig config = 2; +inline bool ConfigureRequest::_internal_has_config() const { + return this != internal_default_instance() && config_ != nullptr; +} +inline bool ConfigureRequest::has_config() const { + return _internal_has_config(); +} +inline void ConfigureRequest::clear_config() { + if (GetArenaForAllocation() == nullptr && config_ != nullptr) { + delete config_; + } + config_ = nullptr; +} +inline const ::crypto::CryptoConfig& ConfigureRequest::_internal_config() const { + const ::crypto::CryptoConfig* p = config_; + return p != nullptr ? *p : reinterpret_cast( + ::crypto::_CryptoConfig_default_instance_); +} +inline const ::crypto::CryptoConfig& ConfigureRequest::config() const { + // @@protoc_insertion_point(field_get:crypto.ConfigureRequest.config) + return _internal_config(); +} +inline void ConfigureRequest::unsafe_arena_set_allocated_config( + ::crypto::CryptoConfig* config) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(config_); + } + config_ = config; + if (config) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:crypto.ConfigureRequest.config) +} +inline ::crypto::CryptoConfig* ConfigureRequest::release_config() { + + ::crypto::CryptoConfig* temp = config_; + config_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::crypto::CryptoConfig* ConfigureRequest::unsafe_arena_release_config() { + // @@protoc_insertion_point(field_release:crypto.ConfigureRequest.config) + + ::crypto::CryptoConfig* temp = config_; + config_ = nullptr; + return temp; +} +inline ::crypto::CryptoConfig* ConfigureRequest::_internal_mutable_config() { + + if (config_ == nullptr) { + auto* p = CreateMaybeMessage<::crypto::CryptoConfig>(GetArenaForAllocation()); + config_ = p; + } + return config_; +} +inline ::crypto::CryptoConfig* ConfigureRequest::mutable_config() { + ::crypto::CryptoConfig* _msg = _internal_mutable_config(); + // @@protoc_insertion_point(field_mutable:crypto.ConfigureRequest.config) + return _msg; +} +inline void ConfigureRequest::set_allocated_config(::crypto::CryptoConfig* config) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete config_; + } + if (config) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::crypto::CryptoConfig>::GetOwningArena(config); + if (message_arena != submessage_arena) { + config = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, config, submessage_arena); + } + + } else { + + } + config_ = config; + // @@protoc_insertion_point(field_set_allocated:crypto.ConfigureRequest.config) +} + +// ------------------------------------------------------------------- + +// AddProcessRequest + +// int32 userId = 1; +inline void AddProcessRequest::clear_userid() { + userid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AddProcessRequest::_internal_userid() const { + return userid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AddProcessRequest::userid() const { + // @@protoc_insertion_point(field_get:crypto.AddProcessRequest.userId) + return _internal_userid(); +} +inline void AddProcessRequest::_internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + userid_ = value; +} +inline void AddProcessRequest::set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_userid(value); + // @@protoc_insertion_point(field_set:crypto.AddProcessRequest.userId) +} + +// repeated .crypto.KeyPermission permissions = 2; +inline int AddProcessRequest::_internal_permissions_size() const { + return permissions_.size(); +} +inline int AddProcessRequest::permissions_size() const { + return _internal_permissions_size(); +} +inline void AddProcessRequest::clear_permissions() { + permissions_.Clear(); +} +inline ::crypto::KeyPermission AddProcessRequest::_internal_permissions(int index) const { + return static_cast< ::crypto::KeyPermission >(permissions_.Get(index)); +} +inline ::crypto::KeyPermission AddProcessRequest::permissions(int index) const { + // @@protoc_insertion_point(field_get:crypto.AddProcessRequest.permissions) + return _internal_permissions(index); +} +inline void AddProcessRequest::set_permissions(int index, ::crypto::KeyPermission value) { + permissions_.Set(index, value); + // @@protoc_insertion_point(field_set:crypto.AddProcessRequest.permissions) +} +inline void AddProcessRequest::_internal_add_permissions(::crypto::KeyPermission value) { + permissions_.Add(value); +} +inline void AddProcessRequest::add_permissions(::crypto::KeyPermission value) { + _internal_add_permissions(value); + // @@protoc_insertion_point(field_add:crypto.AddProcessRequest.permissions) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& +AddProcessRequest::permissions() const { + // @@protoc_insertion_point(field_list:crypto.AddProcessRequest.permissions) + return permissions_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +AddProcessRequest::_internal_mutable_permissions() { + return &permissions_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +AddProcessRequest::mutable_permissions() { + // @@protoc_insertion_point(field_mutable_list:crypto.AddProcessRequest.permissions) + return _internal_mutable_permissions(); +} + +// ------------------------------------------------------------------- + +// EncryptRequest + +// int32 sender_id = 1; +inline void EncryptRequest::clear_sender_id() { + sender_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 EncryptRequest::_internal_sender_id() const { + return sender_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 EncryptRequest::sender_id() const { + // @@protoc_insertion_point(field_get:crypto.EncryptRequest.sender_id) + return _internal_sender_id(); +} +inline void EncryptRequest::_internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + sender_id_ = value; +} +inline void EncryptRequest::set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_sender_id(value); + // @@protoc_insertion_point(field_set:crypto.EncryptRequest.sender_id) +} + +// int32 receiver_id = 2; +inline void EncryptRequest::clear_receiver_id() { + receiver_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 EncryptRequest::_internal_receiver_id() const { + return receiver_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 EncryptRequest::receiver_id() const { + // @@protoc_insertion_point(field_get:crypto.EncryptRequest.receiver_id) + return _internal_receiver_id(); +} +inline void EncryptRequest::_internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + receiver_id_ = value; +} +inline void EncryptRequest::set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_receiver_id(value); + // @@protoc_insertion_point(field_set:crypto.EncryptRequest.receiver_id) +} + +// bytes data = 3; +inline void EncryptRequest::clear_data() { + data_.ClearToEmpty(); +} +inline const std::string& EncryptRequest::data() const { + // @@protoc_insertion_point(field_get:crypto.EncryptRequest.data) + return _internal_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EncryptRequest::set_data(ArgT0&& arg0, ArgT... args) { + + data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.EncryptRequest.data) +} +inline std::string* EncryptRequest::mutable_data() { + std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:crypto.EncryptRequest.data) + return _s; +} +inline const std::string& EncryptRequest::_internal_data() const { + return data_.Get(); +} +inline void EncryptRequest::_internal_set_data(const std::string& value) { + + data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* EncryptRequest::_internal_mutable_data() { + + return data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* EncryptRequest::release_data() { + // @@protoc_insertion_point(field_release:crypto.EncryptRequest.data) + return data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void EncryptRequest::set_allocated_data(std::string* data) { + if (data != nullptr) { + + } else { + + } + data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.EncryptRequest.data) +} + +// int64 counter = 4; +inline void EncryptRequest::clear_counter() { + counter_ = int64_t{0}; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 EncryptRequest::_internal_counter() const { + return counter_; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 EncryptRequest::counter() const { + // @@protoc_insertion_point(field_get:crypto.EncryptRequest.counter) + return _internal_counter(); +} +inline void EncryptRequest::_internal_set_counter(::PROTOBUF_NAMESPACE_ID::int64 value) { + + counter_ = value; +} +inline void EncryptRequest::set_counter(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_counter(value); + // @@protoc_insertion_point(field_set:crypto.EncryptRequest.counter) +} + +// bool isFirst = 5; +inline void EncryptRequest::clear_isfirst() { + isfirst_ = false; +} +inline bool EncryptRequest::_internal_isfirst() const { + return isfirst_; +} +inline bool EncryptRequest::isfirst() const { + // @@protoc_insertion_point(field_get:crypto.EncryptRequest.isFirst) + return _internal_isfirst(); +} +inline void EncryptRequest::_internal_set_isfirst(bool value) { + + isfirst_ = value; +} +inline void EncryptRequest::set_isfirst(bool value) { + _internal_set_isfirst(value); + // @@protoc_insertion_point(field_set:crypto.EncryptRequest.isFirst) +} + +// ------------------------------------------------------------------- + +// EncryptResponse + +// bytes encrypted_data = 1; +inline void EncryptResponse::clear_encrypted_data() { + encrypted_data_.ClearToEmpty(); +} +inline const std::string& EncryptResponse::encrypted_data() const { + // @@protoc_insertion_point(field_get:crypto.EncryptResponse.encrypted_data) + return _internal_encrypted_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EncryptResponse::set_encrypted_data(ArgT0&& arg0, ArgT... args) { + + encrypted_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.EncryptResponse.encrypted_data) +} +inline std::string* EncryptResponse::mutable_encrypted_data() { + std::string* _s = _internal_mutable_encrypted_data(); + // @@protoc_insertion_point(field_mutable:crypto.EncryptResponse.encrypted_data) + return _s; +} +inline const std::string& EncryptResponse::_internal_encrypted_data() const { + return encrypted_data_.Get(); +} +inline void EncryptResponse::_internal_set_encrypted_data(const std::string& value) { + + encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* EncryptResponse::_internal_mutable_encrypted_data() { + + return encrypted_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* EncryptResponse::release_encrypted_data() { + // @@protoc_insertion_point(field_release:crypto.EncryptResponse.encrypted_data) + return encrypted_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void EncryptResponse::set_allocated_encrypted_data(std::string* encrypted_data) { + if (encrypted_data != nullptr) { + + } else { + + } + encrypted_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), encrypted_data, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.EncryptResponse.encrypted_data) +} + +// bytes signature = 2; +inline void EncryptResponse::clear_signature() { + signature_.ClearToEmpty(); +} +inline const std::string& EncryptResponse::signature() const { + // @@protoc_insertion_point(field_get:crypto.EncryptResponse.signature) + return _internal_signature(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EncryptResponse::set_signature(ArgT0&& arg0, ArgT... args) { + + signature_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.EncryptResponse.signature) +} +inline std::string* EncryptResponse::mutable_signature() { + std::string* _s = _internal_mutable_signature(); + // @@protoc_insertion_point(field_mutable:crypto.EncryptResponse.signature) + return _s; +} +inline const std::string& EncryptResponse::_internal_signature() const { + return signature_.Get(); +} +inline void EncryptResponse::_internal_set_signature(const std::string& value) { + + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* EncryptResponse::_internal_mutable_signature() { + + return signature_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* EncryptResponse::release_signature() { + // @@protoc_insertion_point(field_release:crypto.EncryptResponse.signature) + return signature_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void EncryptResponse::set_allocated_signature(std::string* signature) { + if (signature != nullptr) { + + } else { + + } + signature_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signature, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.EncryptResponse.signature) +} + +// ------------------------------------------------------------------- + +// DecryptRequest + +// int32 sender_id = 1; +inline void DecryptRequest::clear_sender_id() { + sender_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 DecryptRequest::_internal_sender_id() const { + return sender_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 DecryptRequest::sender_id() const { + // @@protoc_insertion_point(field_get:crypto.DecryptRequest.sender_id) + return _internal_sender_id(); +} +inline void DecryptRequest::_internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + sender_id_ = value; +} +inline void DecryptRequest::set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_sender_id(value); + // @@protoc_insertion_point(field_set:crypto.DecryptRequest.sender_id) +} + +// int32 receiver_id = 2; +inline void DecryptRequest::clear_receiver_id() { + receiver_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 DecryptRequest::_internal_receiver_id() const { + return receiver_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 DecryptRequest::receiver_id() const { + // @@protoc_insertion_point(field_get:crypto.DecryptRequest.receiver_id) + return _internal_receiver_id(); +} +inline void DecryptRequest::_internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + receiver_id_ = value; +} +inline void DecryptRequest::set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_receiver_id(value); + // @@protoc_insertion_point(field_set:crypto.DecryptRequest.receiver_id) +} + +// bytes encrypted_data = 3; +inline void DecryptRequest::clear_encrypted_data() { + encrypted_data_.ClearToEmpty(); +} +inline const std::string& DecryptRequest::encrypted_data() const { + // @@protoc_insertion_point(field_get:crypto.DecryptRequest.encrypted_data) + return _internal_encrypted_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DecryptRequest::set_encrypted_data(ArgT0&& arg0, ArgT... args) { + + encrypted_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.DecryptRequest.encrypted_data) +} +inline std::string* DecryptRequest::mutable_encrypted_data() { + std::string* _s = _internal_mutable_encrypted_data(); + // @@protoc_insertion_point(field_mutable:crypto.DecryptRequest.encrypted_data) + return _s; +} +inline const std::string& DecryptRequest::_internal_encrypted_data() const { + return encrypted_data_.Get(); +} +inline void DecryptRequest::_internal_set_encrypted_data(const std::string& value) { + + encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DecryptRequest::_internal_mutable_encrypted_data() { + + return encrypted_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DecryptRequest::release_encrypted_data() { + // @@protoc_insertion_point(field_release:crypto.DecryptRequest.encrypted_data) + return encrypted_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void DecryptRequest::set_allocated_encrypted_data(std::string* encrypted_data) { + if (encrypted_data != nullptr) { + + } else { + + } + encrypted_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), encrypted_data, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.DecryptRequest.encrypted_data) +} + +// int64 counter = 4; +inline void DecryptRequest::clear_counter() { + counter_ = int64_t{0}; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 DecryptRequest::_internal_counter() const { + return counter_; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 DecryptRequest::counter() const { + // @@protoc_insertion_point(field_get:crypto.DecryptRequest.counter) + return _internal_counter(); +} +inline void DecryptRequest::_internal_set_counter(::PROTOBUF_NAMESPACE_ID::int64 value) { + + counter_ = value; +} +inline void DecryptRequest::set_counter(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_counter(value); + // @@protoc_insertion_point(field_set:crypto.DecryptRequest.counter) +} + +// bytes signature = 5; +inline void DecryptRequest::clear_signature() { + signature_.ClearToEmpty(); +} +inline const std::string& DecryptRequest::signature() const { + // @@protoc_insertion_point(field_get:crypto.DecryptRequest.signature) + return _internal_signature(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DecryptRequest::set_signature(ArgT0&& arg0, ArgT... args) { + + signature_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.DecryptRequest.signature) +} +inline std::string* DecryptRequest::mutable_signature() { + std::string* _s = _internal_mutable_signature(); + // @@protoc_insertion_point(field_mutable:crypto.DecryptRequest.signature) + return _s; +} +inline const std::string& DecryptRequest::_internal_signature() const { + return signature_.Get(); +} +inline void DecryptRequest::_internal_set_signature(const std::string& value) { + + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DecryptRequest::_internal_mutable_signature() { + + return signature_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DecryptRequest::release_signature() { + // @@protoc_insertion_point(field_release:crypto.DecryptRequest.signature) + return signature_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void DecryptRequest::set_allocated_signature(std::string* signature) { + if (signature != nullptr) { + + } else { + + } + signature_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signature, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.DecryptRequest.signature) +} + +// bool isFirst = 6; +inline void DecryptRequest::clear_isfirst() { + isfirst_ = false; +} +inline bool DecryptRequest::_internal_isfirst() const { + return isfirst_; +} +inline bool DecryptRequest::isfirst() const { + // @@protoc_insertion_point(field_get:crypto.DecryptRequest.isFirst) + return _internal_isfirst(); +} +inline void DecryptRequest::_internal_set_isfirst(bool value) { + + isfirst_ = value; +} +inline void DecryptRequest::set_isfirst(bool value) { + _internal_set_isfirst(value); + // @@protoc_insertion_point(field_set:crypto.DecryptRequest.isFirst) +} + +// ------------------------------------------------------------------- + +// DecryptResponse + +// bytes decrypted_data = 1; +inline void DecryptResponse::clear_decrypted_data() { + decrypted_data_.ClearToEmpty(); +} +inline const std::string& DecryptResponse::decrypted_data() const { + // @@protoc_insertion_point(field_get:crypto.DecryptResponse.decrypted_data) + return _internal_decrypted_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DecryptResponse::set_decrypted_data(ArgT0&& arg0, ArgT... args) { + + decrypted_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.DecryptResponse.decrypted_data) +} +inline std::string* DecryptResponse::mutable_decrypted_data() { + std::string* _s = _internal_mutable_decrypted_data(); + // @@protoc_insertion_point(field_mutable:crypto.DecryptResponse.decrypted_data) + return _s; +} +inline const std::string& DecryptResponse::_internal_decrypted_data() const { + return decrypted_data_.Get(); +} +inline void DecryptResponse::_internal_set_decrypted_data(const std::string& value) { + + decrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DecryptResponse::_internal_mutable_decrypted_data() { + + return decrypted_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DecryptResponse::release_decrypted_data() { + // @@protoc_insertion_point(field_release:crypto.DecryptResponse.decrypted_data) + return decrypted_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void DecryptResponse::set_allocated_decrypted_data(std::string* decrypted_data) { + if (decrypted_data != nullptr) { + + } else { + + } + decrypted_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), decrypted_data, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.DecryptResponse.decrypted_data) +} + +// ------------------------------------------------------------------- + +// AESEncryptRequest + +// int32 sender_id = 1; +inline void AESEncryptRequest::clear_sender_id() { + sender_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AESEncryptRequest::_internal_sender_id() const { + return sender_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AESEncryptRequest::sender_id() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.sender_id) + return _internal_sender_id(); +} +inline void AESEncryptRequest::_internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + sender_id_ = value; +} +inline void AESEncryptRequest::set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_sender_id(value); + // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.sender_id) +} + +// int32 receiver_id = 2; +inline void AESEncryptRequest::clear_receiver_id() { + receiver_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AESEncryptRequest::_internal_receiver_id() const { + return receiver_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AESEncryptRequest::receiver_id() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.receiver_id) + return _internal_receiver_id(); +} +inline void AESEncryptRequest::_internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + receiver_id_ = value; +} +inline void AESEncryptRequest::set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_receiver_id(value); + // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.receiver_id) +} + +// bytes data = 3; +inline void AESEncryptRequest::clear_data() { + data_.ClearToEmpty(); +} +inline const std::string& AESEncryptRequest::data() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.data) + return _internal_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AESEncryptRequest::set_data(ArgT0&& arg0, ArgT... args) { + + data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.data) +} +inline std::string* AESEncryptRequest::mutable_data() { + std::string* _s = _internal_mutable_data(); + // @@protoc_insertion_point(field_mutable:crypto.AESEncryptRequest.data) + return _s; +} +inline const std::string& AESEncryptRequest::_internal_data() const { + return data_.Get(); +} +inline void AESEncryptRequest::_internal_set_data(const std::string& value) { + + data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AESEncryptRequest::_internal_mutable_data() { + + return data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AESEncryptRequest::release_data() { + // @@protoc_insertion_point(field_release:crypto.AESEncryptRequest.data) + return data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AESEncryptRequest::set_allocated_data(std::string* data) { + if (data != nullptr) { + + } else { + + } + data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AESEncryptRequest.data) +} + +// .crypto.AsymmetricFunction func = 4; +inline void AESEncryptRequest::clear_func() { + func_ = 0; +} +inline ::crypto::AsymmetricFunction AESEncryptRequest::_internal_func() const { + return static_cast< ::crypto::AsymmetricFunction >(func_); +} +inline ::crypto::AsymmetricFunction AESEncryptRequest::func() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.func) + return _internal_func(); +} +inline void AESEncryptRequest::_internal_set_func(::crypto::AsymmetricFunction value) { + + func_ = value; +} +inline void AESEncryptRequest::set_func(::crypto::AsymmetricFunction value) { + _internal_set_func(value); + // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.func) +} + +// int64 counter = 5; +inline void AESEncryptRequest::clear_counter() { + counter_ = int64_t{0}; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 AESEncryptRequest::_internal_counter() const { + return counter_; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 AESEncryptRequest::counter() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.counter) + return _internal_counter(); +} +inline void AESEncryptRequest::_internal_set_counter(::PROTOBUF_NAMESPACE_ID::int64 value) { + + counter_ = value; +} +inline void AESEncryptRequest::set_counter(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_counter(value); + // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.counter) +} + +// string key_id = 6; +inline void AESEncryptRequest::clear_key_id() { + key_id_.ClearToEmpty(); +} +inline const std::string& AESEncryptRequest::key_id() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.key_id) + return _internal_key_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AESEncryptRequest::set_key_id(ArgT0&& arg0, ArgT... args) { + + key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.key_id) +} +inline std::string* AESEncryptRequest::mutable_key_id() { + std::string* _s = _internal_mutable_key_id(); + // @@protoc_insertion_point(field_mutable:crypto.AESEncryptRequest.key_id) + return _s; +} +inline const std::string& AESEncryptRequest::_internal_key_id() const { + return key_id_.Get(); +} +inline void AESEncryptRequest::_internal_set_key_id(const std::string& value) { + + key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AESEncryptRequest::_internal_mutable_key_id() { + + return key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AESEncryptRequest::release_key_id() { + // @@protoc_insertion_point(field_release:crypto.AESEncryptRequest.key_id) + return key_id_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AESEncryptRequest::set_allocated_key_id(std::string* key_id) { + if (key_id != nullptr) { + + } else { + + } + key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key_id, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AESEncryptRequest.key_id) +} + +// .crypto.AESKeyLength key_length = 7; +inline void AESEncryptRequest::clear_key_length() { + key_length_ = 0; +} +inline ::crypto::AESKeyLength AESEncryptRequest::_internal_key_length() const { + return static_cast< ::crypto::AESKeyLength >(key_length_); +} +inline ::crypto::AESKeyLength AESEncryptRequest::key_length() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.key_length) + return _internal_key_length(); +} +inline void AESEncryptRequest::_internal_set_key_length(::crypto::AESKeyLength value) { + + key_length_ = value; +} +inline void AESEncryptRequest::set_key_length(::crypto::AESKeyLength value) { + _internal_set_key_length(value); + // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.key_length) +} + +// .crypto.AESChainingMode chainingMode = 8; +inline void AESEncryptRequest::clear_chainingmode() { + chainingmode_ = 0; +} +inline ::crypto::AESChainingMode AESEncryptRequest::_internal_chainingmode() const { + return static_cast< ::crypto::AESChainingMode >(chainingmode_); +} +inline ::crypto::AESChainingMode AESEncryptRequest::chainingmode() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.chainingMode) + return _internal_chainingmode(); +} +inline void AESEncryptRequest::_internal_set_chainingmode(::crypto::AESChainingMode value) { + + chainingmode_ = value; +} +inline void AESEncryptRequest::set_chainingmode(::crypto::AESChainingMode value) { + _internal_set_chainingmode(value); + // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.chainingMode) +} + +// ------------------------------------------------------------------- + +// AESEncryptResponse + +// bytes encrypted_data = 1; +inline void AESEncryptResponse::clear_encrypted_data() { + encrypted_data_.ClearToEmpty(); +} +inline const std::string& AESEncryptResponse::encrypted_data() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptResponse.encrypted_data) + return _internal_encrypted_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AESEncryptResponse::set_encrypted_data(ArgT0&& arg0, ArgT... args) { + + encrypted_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESEncryptResponse.encrypted_data) +} +inline std::string* AESEncryptResponse::mutable_encrypted_data() { + std::string* _s = _internal_mutable_encrypted_data(); + // @@protoc_insertion_point(field_mutable:crypto.AESEncryptResponse.encrypted_data) + return _s; +} +inline const std::string& AESEncryptResponse::_internal_encrypted_data() const { + return encrypted_data_.Get(); +} +inline void AESEncryptResponse::_internal_set_encrypted_data(const std::string& value) { + + encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AESEncryptResponse::_internal_mutable_encrypted_data() { + + return encrypted_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AESEncryptResponse::release_encrypted_data() { + // @@protoc_insertion_point(field_release:crypto.AESEncryptResponse.encrypted_data) + return encrypted_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AESEncryptResponse::set_allocated_encrypted_data(std::string* encrypted_data) { + if (encrypted_data != nullptr) { + + } else { + + } + encrypted_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), encrypted_data, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AESEncryptResponse.encrypted_data) +} + +// ------------------------------------------------------------------- + +// AESDecryptRequest + +// int32 sender_id = 1; +inline void AESDecryptRequest::clear_sender_id() { + sender_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::_internal_sender_id() const { + return sender_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::sender_id() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.sender_id) + return _internal_sender_id(); +} +inline void AESDecryptRequest::_internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + sender_id_ = value; +} +inline void AESDecryptRequest::set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_sender_id(value); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.sender_id) +} + +// int32 receiver_id = 2; +inline void AESDecryptRequest::clear_receiver_id() { + receiver_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::_internal_receiver_id() const { + return receiver_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::receiver_id() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.receiver_id) + return _internal_receiver_id(); +} +inline void AESDecryptRequest::_internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + receiver_id_ = value; +} +inline void AESDecryptRequest::set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_receiver_id(value); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.receiver_id) +} + +// bytes data_in = 3; +inline void AESDecryptRequest::clear_data_in() { + data_in_.ClearToEmpty(); +} +inline const std::string& AESDecryptRequest::data_in() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.data_in) + return _internal_data_in(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AESDecryptRequest::set_data_in(ArgT0&& arg0, ArgT... args) { + + data_in_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.data_in) +} +inline std::string* AESDecryptRequest::mutable_data_in() { + std::string* _s = _internal_mutable_data_in(); + // @@protoc_insertion_point(field_mutable:crypto.AESDecryptRequest.data_in) + return _s; +} +inline const std::string& AESDecryptRequest::_internal_data_in() const { + return data_in_.Get(); +} +inline void AESDecryptRequest::_internal_set_data_in(const std::string& value) { + + data_in_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AESDecryptRequest::_internal_mutable_data_in() { + + return data_in_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AESDecryptRequest::release_data_in() { + // @@protoc_insertion_point(field_release:crypto.AESDecryptRequest.data_in) + return data_in_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AESDecryptRequest::set_allocated_data_in(std::string* data_in) { + if (data_in != nullptr) { + + } else { + + } + data_in_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data_in, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptRequest.data_in) +} + +// int32 in_len = 4; +inline void AESDecryptRequest::clear_in_len() { + in_len_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::_internal_in_len() const { + return in_len_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::in_len() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.in_len) + return _internal_in_len(); +} +inline void AESDecryptRequest::_internal_set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value) { + + in_len_ = value; +} +inline void AESDecryptRequest::set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_in_len(value); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.in_len) +} + +// bytes data_out = 5; +inline void AESDecryptRequest::clear_data_out() { + data_out_.ClearToEmpty(); +} +inline const std::string& AESDecryptRequest::data_out() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.data_out) + return _internal_data_out(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AESDecryptRequest::set_data_out(ArgT0&& arg0, ArgT... args) { + + data_out_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.data_out) +} +inline std::string* AESDecryptRequest::mutable_data_out() { + std::string* _s = _internal_mutable_data_out(); + // @@protoc_insertion_point(field_mutable:crypto.AESDecryptRequest.data_out) + return _s; +} +inline const std::string& AESDecryptRequest::_internal_data_out() const { + return data_out_.Get(); +} +inline void AESDecryptRequest::_internal_set_data_out(const std::string& value) { + + data_out_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AESDecryptRequest::_internal_mutable_data_out() { + + return data_out_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AESDecryptRequest::release_data_out() { + // @@protoc_insertion_point(field_release:crypto.AESDecryptRequest.data_out) + return data_out_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AESDecryptRequest::set_allocated_data_out(std::string* data_out) { + if (data_out != nullptr) { + + } else { + + } + data_out_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data_out, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptRequest.data_out) +} + +// .crypto.AsymmetricFunction func = 6; +inline void AESDecryptRequest::clear_func() { + func_ = 0; +} +inline ::crypto::AsymmetricFunction AESDecryptRequest::_internal_func() const { + return static_cast< ::crypto::AsymmetricFunction >(func_); +} +inline ::crypto::AsymmetricFunction AESDecryptRequest::func() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.func) + return _internal_func(); +} +inline void AESDecryptRequest::_internal_set_func(::crypto::AsymmetricFunction value) { + + func_ = value; +} +inline void AESDecryptRequest::set_func(::crypto::AsymmetricFunction value) { + _internal_set_func(value); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.func) +} + +// .crypto.AESKeyLength key_length = 7; +inline void AESDecryptRequest::clear_key_length() { + key_length_ = 0; +} +inline ::crypto::AESKeyLength AESDecryptRequest::_internal_key_length() const { + return static_cast< ::crypto::AESKeyLength >(key_length_); +} +inline ::crypto::AESKeyLength AESDecryptRequest::key_length() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.key_length) + return _internal_key_length(); +} +inline void AESDecryptRequest::_internal_set_key_length(::crypto::AESKeyLength value) { + + key_length_ = value; +} +inline void AESDecryptRequest::set_key_length(::crypto::AESKeyLength value) { + _internal_set_key_length(value); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.key_length) +} + +// .crypto.AESChainingMode chainingMode = 8; +inline void AESDecryptRequest::clear_chainingmode() { + chainingmode_ = 0; +} +inline ::crypto::AESChainingMode AESDecryptRequest::_internal_chainingmode() const { + return static_cast< ::crypto::AESChainingMode >(chainingmode_); +} +inline ::crypto::AESChainingMode AESDecryptRequest::chainingmode() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.chainingMode) + return _internal_chainingmode(); +} +inline void AESDecryptRequest::_internal_set_chainingmode(::crypto::AESChainingMode value) { + + chainingmode_ = value; +} +inline void AESDecryptRequest::set_chainingmode(::crypto::AESChainingMode value) { + _internal_set_chainingmode(value); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.chainingMode) +} + +// int64 counter = 9; +inline void AESDecryptRequest::clear_counter() { + counter_ = int64_t{0}; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 AESDecryptRequest::_internal_counter() const { + return counter_; +} +inline ::PROTOBUF_NAMESPACE_ID::int64 AESDecryptRequest::counter() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.counter) + return _internal_counter(); +} +inline void AESDecryptRequest::_internal_set_counter(::PROTOBUF_NAMESPACE_ID::int64 value) { + + counter_ = value; +} +inline void AESDecryptRequest::set_counter(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_counter(value); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.counter) +} + +// string key_id = 10; +inline void AESDecryptRequest::clear_key_id() { + key_id_.ClearToEmpty(); +} +inline const std::string& AESDecryptRequest::key_id() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.key_id) + return _internal_key_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AESDecryptRequest::set_key_id(ArgT0&& arg0, ArgT... args) { + + key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.key_id) +} +inline std::string* AESDecryptRequest::mutable_key_id() { + std::string* _s = _internal_mutable_key_id(); + // @@protoc_insertion_point(field_mutable:crypto.AESDecryptRequest.key_id) + return _s; +} +inline const std::string& AESDecryptRequest::_internal_key_id() const { + return key_id_.Get(); +} +inline void AESDecryptRequest::_internal_set_key_id(const std::string& value) { + + key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AESDecryptRequest::_internal_mutable_key_id() { + + return key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AESDecryptRequest::release_key_id() { + // @@protoc_insertion_point(field_release:crypto.AESDecryptRequest.key_id) + return key_id_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AESDecryptRequest::set_allocated_key_id(std::string* key_id) { + if (key_id != nullptr) { + + } else { + + } + key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key_id, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptRequest.key_id) +} + +// ------------------------------------------------------------------- + +// AESDecryptResponse + +// bytes decrypted_data = 1; +inline void AESDecryptResponse::clear_decrypted_data() { + decrypted_data_.ClearToEmpty(); +} +inline const std::string& AESDecryptResponse::decrypted_data() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptResponse.decrypted_data) + return _internal_decrypted_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AESDecryptResponse::set_decrypted_data(ArgT0&& arg0, ArgT... args) { + + decrypted_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESDecryptResponse.decrypted_data) +} +inline std::string* AESDecryptResponse::mutable_decrypted_data() { + std::string* _s = _internal_mutable_decrypted_data(); + // @@protoc_insertion_point(field_mutable:crypto.AESDecryptResponse.decrypted_data) + return _s; +} +inline const std::string& AESDecryptResponse::_internal_decrypted_data() const { + return decrypted_data_.Get(); +} +inline void AESDecryptResponse::_internal_set_decrypted_data(const std::string& value) { + + decrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AESDecryptResponse::_internal_mutable_decrypted_data() { + + return decrypted_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AESDecryptResponse::release_decrypted_data() { + // @@protoc_insertion_point(field_release:crypto.AESDecryptResponse.decrypted_data) + return decrypted_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AESDecryptResponse::set_allocated_decrypted_data(std::string* decrypted_data) { + if (decrypted_data != nullptr) { + + } else { + + } + decrypted_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), decrypted_data, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptResponse.decrypted_data) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace crypto + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::crypto::KeyPermission> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::crypto::KeyPermission>() { + return ::crypto::KeyPermission_descriptor(); +} +template <> struct is_proto_enum< ::crypto::AESChainingMode> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::crypto::AESChainingMode>() { + return ::crypto::AESChainingMode_descriptor(); +} +template <> struct is_proto_enum< ::crypto::AsymmetricFunction> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::crypto::AsymmetricFunction>() { + return ::crypto::AsymmetricFunction_descriptor(); +} +template <> struct is_proto_enum< ::crypto::SHAAlgorithm> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::crypto::SHAAlgorithm>() { + return ::crypto::SHAAlgorithm_descriptor(); +} +template <> struct is_proto_enum< ::crypto::AESKeyLength> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::crypto::AESKeyLength>() { + return ::crypto::AESKeyLength_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fencryption_2eproto diff --git a/proto/encryption.proto b/proto/encryption.proto new file mode 100644 index 00000000..7c548500 --- /dev/null +++ b/proto/encryption.proto @@ -0,0 +1,216 @@ +syntax = "proto3"; +package crypto; +service CryptoService { + rpc bootSystem(BootSystemRequest) returns (Empty); + rpc addProccess(AddProcessRequest) returns (Empty); + rpc configure(ConfigureRequest) returns (Empty); + rpc generateAESKey(GenerateAESKeyRequest) returns (GenerateAESKeyResponse); + rpc generateRSAKeyPair(GenerateKeyPairRequest) returns (GenerateKeyPairResponse); + rpc generateECCKeyPair(GenerateKeyPairRequest) returns (GenerateKeyPairResponse); + rpc getSignedDataLength(GetHashLengthRequest) returns (GetLengthResponse); + rpc getECCencryptedLength(GetLengthRequest) returns (GetLengthResponse); + rpc getECCDecryptedLength(GetLengthRequest) returns (GetLengthResponse); + rpc getRSAencryptedLength(GetLengthRequest) returns (GetLengthResponse); + rpc getRSAdecryptedLength(GetLengthRequest) returns (GetLengthResponse); + rpc getAESencryptedLength(GetAESLengthRequest) returns (GetLengthResponse); + rpc getAESdecryptedLength(GetAESLengthRequest) returns (GetLengthResponse); + rpc getEncryptedLen(GetWholeLength) returns (GetLengthResponse); + rpc getDecryptedLen(GetWholeLength) returns (GetLengthResponse); + rpc sign(SignRequest) returns (SignResponse); + rpc verify(VerifyRequest) returns (VerifyResponse); + rpc getPublicECCKeyByUserId(KeyRequest) returns (KeyResponse); + rpc getPublicRSAKeyByUserId(KeyRequest) returns (KeyResponse); + rpc ECCencrypt(AsymetricEncryptRequest) returns (AsymetricEncryptResponse); + rpc ECCdecrypt(AsymetricDecryptRequest) returns (AsymetricDecryptResponse); + rpc RSAencrypt(AsymetricEncryptRequest) returns (AsymetricEncryptResponse); + rpc RSAdecrypt(AsymetricDecryptRequest) returns (AsymetricDecryptResponse); + rpc AESencrypt(AESEncryptRequest) returns (AESEncryptResponse); + rpc AESdecrypt(AESDecryptRequest) returns (AESDecryptResponse); + rpc encrypt(EncryptRequest) returns (EncryptResponse); + rpc decrypt(DecryptRequest) returns (DecryptResponse); + rpc signUpdate(SignRequest) returns (SignResponse); + rpc signFinalize(SignRequest) returns (SignResponse); + rpc verifyUpdate(VerifyRequest) returns (VerifyResponse); + rpc verifyFinalize(VerifyRequest) returns (VerifyResponse); +} +message AsymetricEncryptRequest{ + int32 senderId = 1; + string keyId = 2; + bytes data = 3; +} +message AsymetricEncryptResponse{ + bytes encrypted_data = 1; +} +message AsymetricDecryptRequest{ + int32 receiverId = 1; + string keyId = 2; + bytes data = 3; +} +message GetHashLengthRequest{ + SHAAlgorithm func = 1; + int32 dataLen = 2; +} +message GetAESLengthRequest{ + int32 dataLen = 1; + bool isFirst = 2; + AESChainingMode chainingMode = 3; +} +message AsymetricDecryptResponse{ + bytes decrypted_data = 1; +} +message GetLengthRequest { + int32 in_len = 1; +} +message GetLengthResponse { + int32 len = 1; +} +message GetWholeLength{ + int32 senderId = 1; + int32 inLen = 2; +} +message GenerateAESKeyRequest { + int32 user_id = 1; + repeated KeyPermission permissions = 2; + AESKeyLength keyLength = 3; + int32 destUserId = 4; +} +message GenerateAESKeyResponse { + string aes_key = 1; +} +message GenerateKeyPairRequest { + int32 user_id = 1; + repeated KeyPermission permissions = 2; +} +message GenerateKeyPairResponse { + string public_key = 1; + string private_key = 2; +} +message SignRequest { + int32 sender_id = 1; + bytes data = 2; + SHAAlgorithm hash_func = 3; + int64 counter = 5; + string key_id = 6; +} +message SignResponse { + bytes signature = 1; +} +message VerifyRequest { + int32 sender_id = 1; + int32 receiver_id = 2; + bytes data = 3; + bytes signature = 4; + SHAAlgorithm hash_func = 5; + string key_id = 6; + int32 counter = 7; +} +message VerifyResponse { + bool valid = 1; + bytes out = 2; +} +message KeyRequest { + int32 user_id = 1; +} +message KeyResponse { + string key = 1; +} +message UserKeyPermissions { + int32 userId = 1; + repeated KeyPermission permissions = 2; +} +message BootSystemRequest { + repeated UserKeyPermissions usersIdsPermissions = 1; +} +message Empty{ +} +message CryptoConfig { + SHAAlgorithm hashFunction = 1; + AESKeyLength aesKeyLength = 2; + AESChainingMode aesChainingMode = 3; + AsymmetricFunction asymmetricFunction = 4; +} +message ConfigureRequest { + int32 userId = 1; + CryptoConfig config = 2; +} +message AddProcessRequest{ + int32 userId = 1; + repeated KeyPermission permissions = 2; +} +message EncryptRequest { + int32 sender_id = 1; + int32 receiver_id = 2; + bytes data = 3; + int64 counter = 4; + bool isFirst = 5; +} +message EncryptResponse { + bytes encrypted_data = 1; + bytes signature = 2; +} +message DecryptRequest { + int32 sender_id = 1; + int32 receiver_id = 2; + bytes encrypted_data = 3; + int64 counter = 4; + bytes signature = 5; + bool isFirst = 6; +} +message DecryptResponse { + bytes decrypted_data = 1; +} +message AESEncryptRequest { + int32 sender_id = 1; + int32 receiver_id = 2; + bytes data = 3; + AsymmetricFunction func = 4; + int64 counter = 5; + string key_id = 6; + AESKeyLength key_length = 7; + AESChainingMode chainingMode = 8; +} +message AESEncryptResponse { + bytes encrypted_data = 1; +} +message AESDecryptRequest { + int32 sender_id=1; + int32 receiver_id = 2; + bytes data_in = 3; + int32 in_len=4; + bytes data_out = 5; + AsymmetricFunction func = 6; + AESKeyLength key_length = 7; + AESChainingMode chainingMode=8; + int64 counter = 9; + string key_id = 10; +} +message AESDecryptResponse { + bytes decrypted_data = 1; +} +enum KeyPermission { + VERIFY = 0; + SIGN = 1; + ENCRYPT = 2; + DECRYPT = 3; + EXPORTABLE = 4; +} +enum AESChainingMode { + ECB = 0; + CBC = 1; + CFB = 2; + OFB = 3; + CTR = 4; +} +enum AsymmetricFunction { + RSA = 0; + ECC = 1; +} +enum SHAAlgorithm { + SHA256 = 0; + SHA3_512 = 1; +} +enum AESKeyLength { + AES_128 = 0; + AES_192 = 1; + AES_256 = 2; +} diff --git a/shared_log_file_name.txt b/shared_log_file_name.txt new file mode 100644 index 00000000..cedb53a6 --- /dev/null +++ b/shared_log_file_name.txt @@ -0,0 +1 @@ +2024_09_18_14_00_24_hsm.log \ No newline at end of file diff --git a/src/SHA3-512.cpp b/src/SHA3-512.cpp index db791523..31c1f5bb 100644 --- a/src/SHA3-512.cpp +++ b/src/SHA3-512.cpp @@ -9,26 +9,24 @@ // Macro for circular left shift (rotation) of x by y bits #define ROT(x, y) (((x) << (y)) | ((x) >> ((64) - (y)))) -// constants representing the rotation values for the Keccak-f permutation based on the (x, y) position -const uint64_t r[5][5]={{ 0, 36, 3, 41, 18}, - { 1, 44, 10, 45, 2}, - { 62, 6, 43, 15, 61}, - { 28, 55, 25, 21, 56}, - { 27, 20, 39, 8, 14}}; +// constants representing the rotation values for the Keccak-f permutation based +// on the (x, y) position +const uint64_t r[5][5] = {{0, 36, 3, 41, 18}, + {1, 44, 10, 45, 2}, + {62, 6, 43, 15, 61}, + {28, 55, 25, 21, 56}, + {27, 20, 39, 8, 14}}; // Round constants used in the Keccak-f permutation -static const uint64_t RC[24] = {0x0000000000000001, 0x0000000000008082, - 0x800000000000808A, 0x8000000080008000, - 0x000000000000808B, 0x0000000080000001, - 0x8000000080008081, 0x8000000000008009, - 0x000000000000008A, 0x0000000000000088, - 0x0000000080008009, 0x000000008000000A, - 0x000000008000808B, 0x800000000000008B, - 0x8000000000008089, 0x8000000000008003, - 0x8000000000008002, 0x8000000000000080, - 0x000000000000800A, 0x800000008000000A, - 0x8000000080008081, 0x8000000000008080, - 0x0000000080000001, 0x8000000080008008}; +static const uint64_t RC[24] = { + 0x0000000000000001, 0x0000000000008082, 0x800000000000808A, + 0x8000000080008000, 0x000000000000808B, 0x0000000080000001, + 0x8000000080008081, 0x8000000000008009, 0x000000000000008A, + 0x0000000000000088, 0x0000000080008009, 0x000000008000000A, + 0x000000008000808B, 0x800000000000008B, 0x8000000000008089, + 0x8000000000008003, 0x8000000000008002, 0x8000000000000080, + 0x000000000000800A, 0x800000008000000A, 0x8000000080008081, + 0x8000000000008080, 0x0000000080000001, 0x8000000080008008}; /** * @brief Constructor to initialize the SHA3_512 object. @@ -36,14 +34,14 @@ static const uint64_t RC[24] = {0x0000000000000001, 0x0000000000008082, * This constructor initializes the internal state and buffer of the SHA3-512 * object to zero. It also logs the initialization process. * - * @note The logger is initialized to log messages related to the SHA3-512 algorithm. + * @note The logger is initialized to log messages related to the SHA3-512 + * algorithm. */ SHA3_512::SHA3_512() { - logger sha3_512logger("HSM"); - sha3_512logger.logMessage(logger::LogLevel::INFO, "Initializing sha3-512"); - std::memset(S, 0, sizeof(S)); // Clear state - std::memset(buffer, 0, sizeof(buffer)); // Clear buffer - buffer_length = 0; // Reset buffer length + log(logger::LogLevel::INFO, "SHA3-512: Initializing..."); + std::memset(S, 0, sizeof(S)); // Clear state + std::memset(buffer, 0, sizeof(buffer)); // Clear buffer + buffer_length = 0; // Reset buffer length } /** @@ -58,352 +56,330 @@ SHA3_512::SHA3_512() { * * @note This function logs the start and completion of the round operation. */ -void SHA3_512::round(uint64_t A[5][5], uint64_t RC) -{ - logger sha3_512logger("HSM"); - sha3_512logger.logMessage(logger::LogLevel::INFO, "Starting round operation."); - // θ step: Calculate C and D values for the state matrix - uint64_t C[5]; - for (int x = 0; x < 5; x++) - C[x] = A[x][0] ^ A[x][1] ^ A[x][2] ^ A[x][3] ^ A[x][4]; - - uint64_t D[5]; - for (int x = 0; x < 5; x++) - D[x] = C[(x + 4) % 5] ^ ROT(C[(x + 1) % 5], 1); - - // Update state matrix A with D values - for (int x = 0; x < 5; x++) - for (int y = 0; y < 5; y++) - A[x][y] = A[x][y] ^ D[x]; - - // ρ & π steps: Perform rotation and permutation - uint64_t B[5][5]; - for (int x = 0; x < 5; x++) - for (int y = 0; y < 5; y++) - B[y][(2 * x + 3 * y) % 5] = ROT(A[x][y], r[x][y]); - - // χ step: Apply the χ transformation - for (int x = 0; x < 5; x++) - for (int y = 0; y < 5; y++) - A[x][y] = B[x][y] ^ ((~(B[(x + 1) % 5][y])) & B[(x + 2) % 5][y]); - - // ι step: Apply the round constant - A[0][0] = A[0][0] ^ RC; - - sha3_512logger.logMessage(logger::LogLevel::INFO, "Done round operation."); +void SHA3_512::round(uint64_t A[5][5], uint64_t RC) { + uint64_t C[5]; + for (int x = 0; x < 5; x++) + C[x] = A[x][0] ^ A[x][1] ^ A[x][2] ^ A[x][3] ^ A[x][4]; + + uint64_t D[5]; + for (int x = 0; x < 5; x++) + D[x] = C[(x + 4) % 5] ^ ROT(C[(x + 1) % 5], 1); + + // Update state matrix A with D values + for (int x = 0; x < 5; x++) + for (int y = 0; y < 5; y++) + A[x][y] = A[x][y] ^ D[x]; + + // ρ & π steps: Perform rotation and permutation + uint64_t B[5][5]; + for (int x = 0; x < 5; x++) + for (int y = 0; y < 5; y++) + B[y][(2 * x + 3 * y) % 5] = ROT(A[x][y], r[x][y]); + + // χ step: Apply the χ transformation + for (int x = 0; x < 5; x++) + for (int y = 0; y < 5; y++) + A[x][y] = B[x][y] ^ ((~(B[(x + 1) % 5][y])) & B[(x + 2) % 5][y]); + + // ι step: Apply the round constant + A[0][0] = A[0][0] ^ RC; } /** * @brief Perform the Keccak-f permutation for 24 rounds. * - * This function applies the Keccak-f permutation to the state matrix `A` for a total of - * 24 rounds. It iteratively calls the `round` function with the appropriate round constant - * from the `RC` array. + * This function applies the Keccak-f permutation to the state matrix `A` for a + * total of 24 rounds. It iteratively calls the `round` function with the + * appropriate round constant from the `RC` array. * - * @param A The state matrix to be permuted. This 5x5 matrix undergoes multiple transformations - * as defined by the Keccak-f permutation. + * @param A The state matrix to be permuted. This 5x5 matrix undergoes multiple + * transformations as defined by the Keccak-f permutation. * * @note This function logs the start and completion of the permutation process. */ -void SHA3_512::f_function(uint64_t A[5][5]) -{ - logger sha3_512logger("HSM"); - sha3_512logger.logMessage(logger::LogLevel::INFO, "Starting f_function."); - - for (int i = 0; i < 24; i++) - round(A, RC[i]); - - sha3_512logger.logMessage(logger::LogLevel::INFO, "Done f_function."); +void SHA3_512::f_function(uint64_t A[5][5]) { + log(logger::LogLevel::DEBUG, "SHA3-512: Starting f_function."); + + for (int i = 0; i < 24; i++) + round(A, RC[i]); + + log(logger::LogLevel::DEBUG, "SHA3-512: Done f_function."); } /** * @brief Apply padding to the input data for the SHA3-512 algorithm. * - * This function pads the input data to ensure it aligns with the block size required by - * the SHA3-512 algorithm. Padding is done according to the SHA3-512 padding scheme, which - * involves appending specific bytes to the end of the data to make its length a multiple - * of the block size. + * This function pads the input data to ensure it aligns with the block size + * required by the SHA3-512 algorithm. Padding is done according to the SHA3-512 + * padding scheme, which involves appending specific bytes to the end of the + * data to make its length a multiple of the block size. * * @param input A pointer to the input data array that will be padded. - * @param in_len A reference to the size of the input data. This value will be updated to - * reflect the length of the padded data. - * @param absorb_times An integer reference that will be set to the number of full blocks - * (including the padded block) after padding is applied. + * @param in_len A reference to the size of the input data. This value will be + * updated to reflect the length of the padded data. + * @param absorb_times An integer reference that will be set to the number of + * full blocks (including the padded block) after padding is applied. * * @throws std::runtime_error If padding fails due to an unexpected error. * - * @note If the input data length modulo the block size is 1, a special padding byte (0x86) - * is used. Otherwise, the general padding scheme is applied, which involves adding a - * 0x06 byte followed by zeroes, and ending with a 0x80 byte. The function logs various - * stages of padding and any errors encountered. + * @note If the input data length modulo the block size is 1, a special padding + * byte (0x86) is used. Otherwise, the general padding scheme is applied, which + * involves adding a 0x06 byte followed by zeroes, and ending with a 0x80 byte. + * The function logs various stages of padding and any errors encountered. */ -void SHA3_512::padding(uint8_t input[], std::size_t &in_len, int &absorb_times) -{ - logger sha3_512logger("HSM"); - absorb_times = in_len / BLOCK_SIZE; // Number of full blocks - std::size_t add_last = in_len % BLOCK_SIZE; // Remaining bytes - sha3_512logger.logMessage(logger::LogLevel::INFO, "Remaining bytes: " + std::to_string(add_last)); - - if (BLOCK_SIZE - add_last == 1) { - sha3_512logger.logMessage(logger::LogLevel::INFO, "Padding byte for the case where only one byte is left"); - input[in_len] = 0x86; // Padding byte for the case where only one byte is left - } else if (BLOCK_SIZE - add_last > 1) { - sha3_512logger.logMessage(logger::LogLevel::INFO, "Applying general padding"); - input[in_len] = 0x06; // Padding byte for general case - for (int i = 1; i < (BLOCK_SIZE - 1 - add_last); i++) - input[in_len + i] = 0x00; // Fill with zeroes - input[in_len + (BLOCK_SIZE - 1 - add_last)] = 0x80; // Final padding byte - in_len += (BLOCK_SIZE - add_last); // Update length - } else { - sha3_512logger.logMessage(logger::LogLevel::ERROR, "Unexpected padding error"); - throw std::runtime_error("Padding failed due to unexpected error. Remaining bytes: " + std::to_string(add_last)); - } - - absorb_times += 1; // Include the final padding block +void SHA3_512::padding(uint8_t input[], std::size_t &in_len, + int &absorb_times) { + absorb_times = in_len / BLOCK_SIZE; // Number of full blocks + std::size_t add_last = in_len % BLOCK_SIZE; // Remaining bytes + log(logger::LogLevel::DEBUG, + "SHA3-512: Remaining bytes: " + std::to_string(add_last)); + + if (BLOCK_SIZE - add_last == 1) { + log( + logger::LogLevel::DEBUG, + "SHA3-512: Padding byte for the case where only one byte is left"); + input[in_len] = + 0x86; // Padding byte for the case where only one byte is left + } else if (BLOCK_SIZE - add_last > 1) { + log(logger::LogLevel::DEBUG, + "SHA3-512: Applying general padding"); + input[in_len] = 0x06; // Padding byte for general case + for (int i = 1; i < (BLOCK_SIZE - 1 - add_last); i++) + input[in_len + i] = 0x00; // Fill with zeroes + input[in_len + (BLOCK_SIZE - 1 - add_last)] = 0x80; // Final padding byte + in_len += (BLOCK_SIZE - add_last); // Update length + } else { + log(logger::LogLevel::ERROR, + "SHA3-512: Unexpected padding error"); + throw std::runtime_error( + "Padding failed due to unexpected error. Remaining bytes: " + + std::to_string(add_last)); + } + + absorb_times += 1; // Include the final padding block } /** * @brief XOR the state matrix S with the block p. * - * This function performs an XOR operation between the state matrix `S` and the given - * block `p`. It updates the state matrix in-place with the result of the XOR operation. - * Additionally, it logs the block data before and after the XOR operation for debugging purposes. + * This function performs an XOR operation between the state matrix `S` and the + * given block `p`. It updates the state matrix in-place with the result of the + * XOR operation. Additionally, it logs the block data before and after the XOR + * operation for debugging purposes. * - * @param S A 5x5 matrix of 64-bit integers representing the state matrix. This matrix - * will be updated with the XOR result. - * @param p A pointer to an array of 64-bit integers representing the block of data to - * XOR with the state matrix. The array is expected to have at least 25 elements. + * @param S A 5x5 matrix of 64-bit integers representing the state matrix. This + * matrix will be updated with the XOR result. + * @param p A pointer to an array of 64-bit integers representing the block of + * data to XOR with the state matrix. The array is expected to have at least 25 + * elements. * - * @note The function assumes that the size of the block `p` is 25 elements. It logs the - * block data and state matrix before and after the XOR operation. + * @note The function assumes that the size of the block `p` is 25 elements. It + * logs the block data and state matrix before and after the XOR operation. */ -void SHA3_512::assign_S_xor_p(uint64_t S[5][5], uint64_t *p) -{ - logger sha3_512logger("HSM"); - - // Log the block of data before XOR operation - sha3_512logger.logMessage(logger::LogLevel::INFO, "Block data before XOR:"); - for (int i = 0; i < 24; ++i) { - sha3_512logger.logMessage(logger::LogLevel::INFO, "Block[" + std::to_string(i) + "] = " + std::to_string(p[i])); - } - - // Perform XOR of the block with the state matrix - for (int x = 0; x < 5; x++) { - for (int y = 0; y < 5; y++) { - int index = x + 5 * y; - if (index < 25) { - S[x][y] ^= p[index]; - } - } - } - - // Log the state matrix after XOR operation - sha3_512logger.logMessage(logger::LogLevel::INFO, "State matrix after XOR:"); - for (int x = 0; x < 5; x++) { - for (int y = 0; y < 5; y++) { - sha3_512logger.logMessage(logger::LogLevel::INFO, "S[" + std::to_string(x) + "][" + std::to_string(y) + "] = " + std::to_string(S[x][y])); - } +void SHA3_512::assign_S_xor_p(uint64_t S[5][5], uint64_t *p) { + // Perform XOR of the block with the state matrix + for (int x = 0; x < 5; x++) { + for (int y = 0; y < 5; y++) { + int index = x + 5 * y; + if (index < 25) { + S[x][y] ^= p[index]; + } } + } } /** * @brief Swap byte order (endianess) for a 64-bit integer. * - * This function swaps the byte order of a 64-bit integer from little-endian to big-endian - * or vice versa. It modifies the integer in place and logs its value before and after - * the swap operation. + * This function swaps the byte order of a 64-bit integer from little-endian to + * big-endian or vice versa. It modifies the integer in place and logs its value + * before and after the swap operation. * - * @param x A reference to a 64-bit integer whose byte order is to be swapped. The value - * will be updated to its byte-swapped equivalent. + * @param x A reference to a 64-bit integer whose byte order is to be swapped. + * The value will be updated to its byte-swapped equivalent. * - * @note The function logs the value of `x` before and after performing the endian swap - * for debugging purposes. Ensure that the integer is appropriately sized (64-bit) - * for this operation. + * @note The function logs the value of `x` before and after performing the + * endian swap for debugging purposes. Ensure that the integer is appropriately + * sized (64-bit) for this operation. */ -void SHA3_512::endianSwap(uint64_t &x) -{ - logger sha3_512logger("HSM"); - // Log the value before the swap - sha3_512logger.logMessage(logger::LogLevel::INFO, "Value before endian swap: " + std::to_string(x)); - - // Perform endian swap - x = (x >> 56) | - ((x << 40) & 0x00FF000000000000) | - ((x << 24) & 0x0000FF0000000000) | - ((x << 8) & 0x000000FF00000000) | - ((x >> 8) & 0x00000000FF000000) | - ((x >> 24) & 0x0000000000FF0000) | - ((x >> 40) & 0x000000000000FF00) | - (x << 56); - - // Log the value after the swap - sha3_512logger.logMessage(logger::LogLevel::INFO, "Value after endian swap: " + std::to_string(x)); +void SHA3_512::endianSwap(uint64_t &x) { + // Perform endian swap + x = (x >> 56) | ((x << 40) & 0x00FF000000000000) | + ((x << 24) & 0x0000FF0000000000) | ((x << 8) & 0x000000FF00000000) | + ((x >> 8) & 0x00000000FF000000) | ((x >> 24) & 0x0000000000FF0000) | + ((x >> 40) & 0x000000000000FF00) | (x << 56); } /** * @brief Convert the state matrix to a hexadecimal string. * - * This function converts the state matrix `S` of the SHA3-512 algorithm into a - * hexadecimal string representation. It serializes the matrix values in a specific - * order, ensuring that each 64-bit integer is represented as a 16-digit hexadecimal - * number with leading zeros if necessary. + * This function converts the state matrix `S` of the SHA3-512 algorithm into a + * hexadecimal string representation. It serializes the matrix values in a + * specific order, ensuring that each 64-bit integer is represented as a + * 16-digit hexadecimal number with leading zeros if necessary. * - * @param S A 5x5 matrix of 64-bit integers representing the state of the SHA3-512 - * algorithm. - * - * @return A `std::string` containing the hexadecimal representation of the state - * matrix. The string concatenates the values in a specified order: the first - * column of each row, followed by the next rows. + * @param S A 5x5 matrix of 64-bit integers representing the state of the + * SHA3-512 algorithm. * - * @note The function uses `std::ostringstream` to format the output and `std::setw` - * to ensure each 64-bit integer is represented as a 16-character wide hexadecimal - * string. + * @return A `std::string` containing the hexadecimal representation of the + * state matrix. The string concatenates the values in a specified order: the + * first column of each row, followed by the next rows. + * + * @note The function uses `std::ostringstream` to format the output and + * `std::setw` to ensure each 64-bit integer is represented as a 16-character + * wide hexadecimal string. */ std::vector SHA3_512::hashPartToHexVector(uint64_t S[5][5]) { - std::ostringstream oss; - oss << std::hex << std::setfill('0'); - // Append values in the specified order - oss << std::setw(16) << S[0][0] - << std::setw(16) << S[1][0] - << std::setw(16) << S[2][0] - << std::setw(16) << S[3][0] - << std::setw(16) << S[4][0] - << std::setw(16) << S[0][1] - << std::setw(16) << S[1][1] - << std::setw(16) << S[2][1]; - std::string res = oss.str(); - std::vector vec; - vec.reserve(res.size()); // Optional: reserve space for performance - for (char c : res) - vec.push_back(static_cast(c)); - return vec; + std::ostringstream oss; + oss << std::hex << std::setfill('0'); + // Append values in the specified order + oss << std::setw(16) << S[0][0] << std::setw(16) << S[1][0] << std::setw(16) + << S[2][0] << std::setw(16) << S[3][0] << std::setw(16) << S[4][0] + << std::setw(16) << S[0][1] << std::setw(16) << S[1][1] << std::setw(16) + << S[2][1]; + std::string res = oss.str(); + std::vector vec; + vec.reserve(res.size()); // Optional: reserve space for performance + for (char c : res) + vec.push_back(static_cast(c)); + return vec; } /** * @brief Update the hash with additional data. * - * This function absorbs additional data into the SHA3-512 hash computation. It processes - * the input data in chunks and updates the internal state accordingly. The data is absorbed - * into a buffer and, once the buffer is full, the data is processed by XORing it with the - * current state and applying the Keccak-f permutation. + * This function absorbs additional data into the SHA3-512 hash computation. It + * processes the input data in chunks and updates the internal state + * accordingly. The data is absorbed into a buffer and, once the buffer is full, + * the data is processed by XORing it with the current state and applying the + * Keccak-f permutation. * * @param input A pointer to the data to be absorbed into the hash. * @param length The length of the data to be absorbed, in bytes. - * - * @return CK_RV Returns `CKR_OK` on success or `CKR_FUNCTION_FAILED` if an error occurs. - * - * @note The buffer size used for absorption is fixed at 72 bytes. If the buffer length - * exceeds its size, an error will be logged, and the function will return - * `CKR_FUNCTION_FAILED`. + * + * @return CK_RV Returns `CKR_OK` on success or `CKR_FUNCTION_FAILED` if an + * error occurs. + * + * @note The buffer size used for absorption is fixed at 72 bytes. If the buffer + * length exceeds its size, an error will be logged, and the function will + * return `CKR_FUNCTION_FAILED`. */ -CK_RV SHA3_512::update(const std::vector& data) -{ - logger sha3_512logger("HSM"); - sha3_512logger.logMessage(logger::LogLevel::INFO, "Starting update with length: " + std::to_string(data.size())); - - // Define the input size and starting pointer - std::size_t length = data.size(); - std::size_t data_index = 0; - - // Absorb input into the buffer and process in 72-byte chunks (576 bits) - while (length > 0) { - if(buffer_length > sizeof(buffer)){ - sha3_512logger.logMessage(logger::LogLevel::ERROR, "Buffer length is bigger then buffer size"); - return CKR_FUNCTION_FAILED; - } - // Calculate the number of bytes we can copy into the buffer - std::size_t to_copy = std::min(length, sizeof(buffer) - buffer_length); - - // Copy input data into the buffer - std::memcpy(buffer + buffer_length, data.data(), to_copy); - - // Update buffer length and input pointers - buffer_length += to_copy; - data_index += to_copy; - length -= to_copy; - - sha3_512logger.logMessage(logger::LogLevel::INFO, "Copied " + std::to_string(to_copy) - + " bytes, remaining: " + std::to_string(length)); - - // If the buffer is full, process the absorbed data - if (buffer_length == sizeof(buffer)) { - // Convert the buffer into a block and XOR with state - uint64_t* block = reinterpret_cast(buffer); - assign_S_xor_p(S, block); - - // Apply the Keccak-f function to update the state - f_function(S); - - // Reset buffer length for the next block of data - buffer_length = 0; - sha3_512logger.logMessage(logger::LogLevel::INFO, "Processed a full block."); - } +CK_RV SHA3_512::update(const std::vector &data) { + log(logger::LogLevel::INFO, + "SHA3-512: Starting update with length: " + + std::to_string(data.size())); + + // Define the input size and starting pointer + std::size_t length = data.size(); + std::size_t data_index = 0; + + // Absorb input into the buffer and process in 72-byte chunks (576 bits) + while (length > 0) { + if (buffer_length > sizeof(buffer)) { + log(logger::LogLevel::ERROR, + "SHA3-512: Buffer length is bigger then buffer size"); + return CKR_FUNCTION_FAILED; + } + // Calculate the number of bytes we can copy into the buffer + std::size_t to_copy = std::min(length, sizeof(buffer) - buffer_length); + + // Copy input data into the buffer + std::memcpy(buffer + buffer_length, data.data(), to_copy); + + // Update buffer length and input pointers + buffer_length += to_copy; + data_index += to_copy; + length -= to_copy; + + log( + logger::LogLevel::DEBUG, + "SHA3-512: Copied " + std::to_string(to_copy) + + " bytes, remaining: " + std::to_string(length)); + + // If the buffer is full, process the absorbed data + if (buffer_length == sizeof(buffer)) { + // Convert the buffer into a block and XOR with state + uint64_t *block = reinterpret_cast(buffer); + assign_S_xor_p(S, block); + + // Apply the Keccak-f function to update the state + f_function(S); + + // Reset buffer length for the next block of data + buffer_length = 0; + log(logger::LogLevel::DEBUG, + "SHA3-512: Processed a full block."); } + } - sha3_512logger.logMessage(logger::LogLevel::INFO, "Update complete."); + log(logger::LogLevel::INFO, "SHA3-512: Update completed successfully."); - return CKR_OK; + return CKR_OK; } /** * @brief Finalize the hash computation and produce the final hash value. * - * This function finalizes the SHA3-512 hashing process. It handles any remaining data in the - * buffer by applying padding, processes the data including the padding, and performs - * necessary transformations to produce the final hash value. The result is then converted - * to a hexadecimal string. + * This function finalizes the SHA3-512 hashing process. It handles any + * remaining data in the buffer by applying padding, processes the data + * including the padding, and performs necessary transformations to produce the + * final hash value. The result is then converted to a hexadecimal string. + * + * @param[out] output A reference to a `std::string` that will be set to the + * resulting hexadecimal representation of the hash value. * - * @param[out] output A reference to a `std::string` that will be set to the resulting - * hexadecimal representation of the hash value. - * - * @return CK_RV Returns `CKR_OK` on success or `CKR_FUNCTION_FAILED` if an error occurs. - * - * @note The buffer is padded and processed as necessary to ensure that all input data - * is correctly absorbed and hashed. The function also performs an endian swap - * on the state matrix elements before converting the hash value to a hexadecimal - * string. + * @return CK_RV Returns `CKR_OK` on success or `CKR_FUNCTION_FAILED` if an + * error occurs. + * + * @note The buffer is padded and processed as necessary to ensure that all + * input data is correctly absorbed and hashed. The function also performs an + * endian swap on the state matrix elements before converting the hash value to + * a hexadecimal string. */ -CK_RV SHA3_512::finalize(std::vector& output) -{ - logger sha3_512logger("HSM"); - sha3_512logger.logMessage(logger::LogLevel::INFO, "finalizing"); - - // Handle remaining data in the buffer with padding - std::size_t remaining_length = buffer_length; - sha3_512logger.logMessage(logger::LogLevel::INFO, " Length of remaining unprocessed data: " + std::to_string(remaining_length)); - - // Apply padding to the buffer - int absorb_times = 0; - - try { - padding(buffer, remaining_length, absorb_times); // Call padding in try block - sha3_512logger.logMessage(logger::LogLevel::INFO, "Number of blocks to be processed after padding: " + std::to_string(absorb_times)); - } - catch (const std::exception& e) { - // Log the exception error message - sha3_512logger.logMessage(logger::LogLevel::ERROR, "Padding error: " + std::string(e.what())); - return CKR_FUNCTION_FAILED; - } - - // Process any remaining data including padding - for (int i = 0; i < absorb_times; i++) { - // Convert the buffer into a block and XOR with state - uint64_t* block = reinterpret_cast(buffer + i * BLOCK_SIZE); - assign_S_xor_p(S, block); - - // Apply the Keccak-f function to update the state - f_function(S); - } - - // Perform endianess swap for each element of the state matrix - for (int i = 0; i < 5; i++) - for (int j = 0; j < 5; j++) - endianSwap(S[i][j]); - - // Convert the state to a hex string - output = hashPartToHexVector(S); - // sha3_512logger.logMessage(logger::LogLevel::INFO, "hashed data: " + output); - - return CKR_OK; +CK_RV SHA3_512::finalize(std::vector &output) { + log(logger::LogLevel::INFO, "SHA3-512: Finalizing"); + + // Handle remaining data in the buffer with padding + std::size_t remaining_length = buffer_length; + log(logger::LogLevel::DEBUG, + "SHA3-512: Length of remaining unprocessed data: " + + std::to_string(remaining_length)); + + // Apply padding to the buffer + int absorb_times = 0; + + try { + padding(buffer, remaining_length, + absorb_times); // Call padding in try block + log( + logger::LogLevel::DEBUG, + "SHA3-512: Number of blocks to be processed after padding: " + + std::to_string(absorb_times)); + } catch (const std::exception &e) { + // Log the exception error message + log(logger::LogLevel::ERROR, + "SHA3-512: Padding error: " + std::string(e.what())); + return CKR_FUNCTION_FAILED; + } + + // Process any remaining data including padding + for (int i = 0; i < absorb_times; i++) { + // Convert the buffer into a block and XOR with state + uint64_t *block = reinterpret_cast(buffer + i * BLOCK_SIZE); + assign_S_xor_p(S, block); + + // Apply the Keccak-f function to update the state + f_function(S); + } + + // Perform endianess swap for each element of the state matrix + for (int i = 0; i < 5; i++) + for (int j = 0; j < 5; j++) + endianSwap(S[i][j]); + + // Convert the state to a hex string + output = hashPartToHexVector(S); + log(logger::LogLevel::INFO, "SHA3-512: Finalize completed successfully."); + return CKR_OK; } \ No newline at end of file diff --git a/src/aes.cpp b/src/aes.cpp index a20e3866..0ff1d820 100644 --- a/src/aes.cpp +++ b/src/aes.cpp @@ -22,53 +22,64 @@ using namespace cl::sycl; @note The function uses the C++ standard library's random number generator to produce a uniformly distributed sequence of bytes. */ -void generateRandomIV(unsigned char* iv) +void generateRandomIV(unsigned char *iv) { std::random_device rd; std::mt19937 gen(rd()); std::uniform_int_distribution<> dis(0, 255); - for (unsigned int i = 0; i < BLOCK_BYTES_LEN; i++) + for (unsigned int i = 0; i < BLOCK_BYTES_LEN; i++) iv[i] = static_cast(dis(gen)); } -/** - @brief Pads the input message to ensure it is a multiple of the block size. - @param message The message to be padded. - @param length The original length of the message. - @param paddedLength The length of the padded message. +/** + * @brief Calculates the padded length for the given original data length. + * + * This function computes the length that the original data needs to be + * padded to, ensuring that it is a multiple of the block size (BLOCK_BYTES_LEN). + * If the original length is already a multiple of the block size, an additional + * block size is added to the padded length. + * + * @param originalLength The original length of the data. + * @return The padded length of the data, rounded up to the nearest block size. */ -void padMessage(unsigned char *&message, unsigned int &length, - unsigned int &paddedLength) +unsigned int getPaddedLength(unsigned int originalLength) { - size_t originalLength = length; - - paddedLength = - ((originalLength + BLOCK_BYTES_LEN - 1) / BLOCK_BYTES_LEN) * BLOCK_BYTES_LEN; - if(paddedLength == originalLength) + unsigned int paddedLength = + ((originalLength + BLOCK_BYTES_LEN - 1) / BLOCK_BYTES_LEN) * + BLOCK_BYTES_LEN; + if (paddedLength == originalLength) { paddedLength += BLOCK_BYTES_LEN; - unsigned char *paddedMessage = new unsigned char[paddedLength]; + } - memcpy(paddedMessage, message, originalLength); + return paddedLength; +} +/** + @brief Pads the input message to ensure it is a multiple of the block size. + @param message The message to be padded. + @param originalLength The original length of the message. + */ +void padMessage(unsigned char *originalMessage, unsigned int originalLength, + unsigned char *paddedMessage) +{ + size_t paddedLength = getPaddedLength(originalLength); unsigned char paddingValue = static_cast(paddedLength - originalLength); + memcpy(paddedMessage, originalMessage, originalLength); for (size_t i = originalLength; i < paddedLength; i++) paddedMessage[i] = paddingValue; - - message = paddedMessage; - length = paddedLength; } /** @brief Removes padding from the message. @param message The padded message. - @param length The length of the padded message, which will be updated to the unpadded length. + @param paddedLength The length of the padded message */ -void unpadMessage(unsigned char *message, unsigned int &length) +unsigned int getUnpadMessageLength(unsigned char *message, + unsigned int paddedLength) { - size_t originalLength = length; - unsigned char paddingValue = message[originalLength - 1]; - length = originalLength - paddingValue; + unsigned char paddingValue = message[paddedLength - 1]; + return paddedLength - paddingValue; } /** @@ -76,10 +87,8 @@ void unpadMessage(unsigned char *message, unsigned int &length) @param keyLength The length of the key (128, 192, or 256 bits). @return A pointer to the generated key. */ -void generateKey(unsigned char* key, AESKeyLength keyLength) +void generateKey(unsigned char *key, AESKeyLength keyLength) { - // Allocate memory for the key - // Initialize a random device and a random number generator std::random_device rd; std::mt19937 gen(rd()); @@ -88,6 +97,7 @@ void generateKey(unsigned char* key, AESKeyLength keyLength) // Fill the key with random bytes for (int i = 0; i < aesKeyLengthData[keyLength].keySize; i++) key[i] = dis(gen); + } /** @@ -112,38 +122,45 @@ void checkLength(unsigned int len) */ void encryptBlock(const unsigned char in[], unsigned char out[], unsigned char *roundKeys, AESKeyLength keyLength) -{ +{ queue queue; // State array initialization unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]; // Buffers for SYCL buffer in_buf(in, range<1>(AES_STATE_ROWS * NUM_BLOCKS)); - buffer state_buf( - reinterpret_cast(state), - range<1>(AES_STATE_ROWS * NUM_BLOCKS)); + buffer state_buf(reinterpret_cast(state), + range<1>(AES_STATE_ROWS * NUM_BLOCKS)); buffer roundKeys_buf( - roundKeys, range<1>(AES_STATE_ROWS * (aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS)); - buffer out_buf(out, range<1>(AES_STATE_ROWS * NUM_BLOCKS)); + roundKeys, + range<1>(AES_STATE_ROWS * (aesKeyLengthData[keyLength].numRound + 1) * + NUM_BLOCKS)); + buffer out_buf(out, + range<1>(AES_STATE_ROWS * NUM_BLOCKS)); // Initialize state array with input block - queue.submit([&](handler &handler) { - auto in_acc = in_buf.get_access(handler); - auto state_acc = state_buf.get_access(handler); - handler.parallel_for(range<1>(AES_STATE_ROWS * NUM_BLOCKS), [=](id<1> idx) { - // Row - unsigned int i = idx % AES_STATE_ROWS; - // Column - unsigned int j = idx / AES_STATE_ROWS; - state_acc[i * NUM_BLOCKS + j] = in_acc[i + AES_STATE_ROWS * j]; - }); - }).wait(); + queue + .submit([&](handler &handler) { + auto in_acc = in_buf.get_access(handler); + auto state_acc = state_buf.get_access(handler); + handler.parallel_for(range<1>(AES_STATE_ROWS * NUM_BLOCKS), + [=](id<1> idx) { + // Row + unsigned int i = idx % AES_STATE_ROWS; + // Column + unsigned int j = idx / AES_STATE_ROWS; + state_acc[i * NUM_BLOCKS + j] = + in_acc[i + AES_STATE_ROWS * j]; + }); + }) + .wait(); // Initial round key addition addRoundKey(state, roundKeys); // Main rounds - for (unsigned int round = 1; round < aesKeyLengthData[keyLength].numRound; round++) { + for (unsigned int round = 1; round < aesKeyLengthData[keyLength].numRound; + round++) { subBytes(state); shiftRows(state); mixColumns(state); @@ -153,18 +170,23 @@ void encryptBlock(const unsigned char in[], unsigned char out[], // Final round subBytes(state); shiftRows(state); - addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * AES_STATE_ROWS * NUM_BLOCKS); + addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * + AES_STATE_ROWS * NUM_BLOCKS); // Copy state array to output block - queue.submit([&](handler &handler) { - auto state_acc = state_buf.get_access(handler); - auto out_acc = out_buf.get_access(handler); - handler.parallel_for(range<1>(AES_STATE_ROWS * NUM_BLOCKS), [=](id<1> idx) { - unsigned int i = idx % AES_STATE_ROWS; // Row - unsigned int j = idx / AES_STATE_ROWS; // Column - out_acc[i + AES_STATE_ROWS * j] = state_acc[i * NUM_BLOCKS + j]; - }); - }).wait(); + queue + .submit([&](handler &handler) { + auto state_acc = state_buf.get_access(handler); + auto out_acc = out_buf.get_access(handler); + handler.parallel_for( + range<1>(AES_STATE_ROWS * NUM_BLOCKS), [=](id<1> idx) { + unsigned int i = idx % AES_STATE_ROWS; // Row + unsigned int j = idx / AES_STATE_ROWS; // Column + out_acc[i + AES_STATE_ROWS * j] = + state_acc[i * NUM_BLOCKS + j]; + }); + }) + .wait(); } /** @@ -186,10 +208,12 @@ void decryptBlock(const unsigned char in[], unsigned char out[], state[i][j] = in[i + AES_STATE_ROWS * j]; // Initial round key addition - addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * AES_STATE_ROWS * NUM_BLOCKS); + addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * + AES_STATE_ROWS * NUM_BLOCKS); // Main rounds - for (round = aesKeyLengthData[keyLength].numRound - 1; round >= 1; round--) { + for (round = aesKeyLengthData[keyLength].numRound - 1; round >= 1; + round--) { invSubBytes(state); invShiftRows(state); addRoundKey(state, roundKeys + round * AES_STATE_ROWS * NUM_BLOCKS); @@ -213,7 +237,7 @@ void decryptBlock(const unsigned char in[], unsigned char out[], @param b Input byte. @return Result of the multiplication. */ - unsigned char xtime(unsigned char b) +unsigned char xtime(unsigned char b) { return (b << 1) ^ (((b >> 7) & 1) * 0x1b); } @@ -225,7 +249,7 @@ void decryptBlock(const unsigned char in[], unsigned char out[], @param y Second byte. @return Result of the multiplication. */ - unsigned char multiply(unsigned char x, unsigned char y) +unsigned char multiply(unsigned char x, unsigned char y) { unsigned char result = 0; unsigned char temp = y; @@ -251,19 +275,23 @@ void subBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { queue queue; buffer stateBuffer(state[0], - range<2>(AES_STATE_ROWS, NUM_BLOCKS)); - buffer sBoxBuffer(sBox[0], range<2>(BLOCK_BYTES_LEN, BLOCK_BYTES_LEN)); - queue.submit([&](handler &handler) { - auto stateAcc = - stateBuffer.get_access(handler); - auto sBoxAcc = sBoxBuffer.get_access(handler); - handler.parallel_for( - range<2>(AES_STATE_ROWS, NUM_BLOCKS), [=](id<2> id) { - size_t i = id[0]; - size_t j = id[1]; - stateAcc[i][j] = sBoxAcc[state[i][j] / BLOCK_BYTES_LEN][state[i][j] % BLOCK_BYTES_LEN]; - }); - }).wait(); + range<2>(AES_STATE_ROWS, NUM_BLOCKS)); + buffer sBoxBuffer( + sBox[0], range<2>(BLOCK_BYTES_LEN, BLOCK_BYTES_LEN)); + queue + .submit([&](handler &handler) { + auto stateAcc = + stateBuffer.get_access(handler); + auto sBoxAcc = sBoxBuffer.get_access(handler); + handler.parallel_for( + range<2>(AES_STATE_ROWS, NUM_BLOCKS), [=](id<2> id) { + size_t i = id[0]; + size_t j = id[1]; + stateAcc[i][j] = sBoxAcc[state[i][j] / BLOCK_BYTES_LEN] + [state[i][j] % BLOCK_BYTES_LEN]; + }); + }) + .wait(); } /** @@ -274,15 +302,17 @@ void subBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) void shiftRows(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { queue queue; - queue.submit([&](handler &handler) { - handler.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> i) { - unsigned char tmp[NUM_BLOCKS]; - for (size_t k = 0; k < NUM_BLOCKS; k++) - tmp[k] = state[i][(k + i) % NUM_BLOCKS]; - for (size_t k = 0; k < NUM_BLOCKS; k++) - state[i][k] = tmp[k]; - }); - }).wait(); + queue + .submit([&](handler &handler) { + handler.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> i) { + unsigned char tmp[NUM_BLOCKS]; + for (size_t k = 0; k < NUM_BLOCKS; k++) + tmp[k] = state[i][(k + i) % NUM_BLOCKS]; + for (size_t k = 0; k < NUM_BLOCKS; k++) + state[i][k] = tmp[k]; + }); + }) + .wait(); } /** @@ -294,21 +324,24 @@ void mixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { queue queue; - queue.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> idx) { - size_t i = idx[0]; - unsigned char a[AES_STATE_ROWS]; - unsigned char b[AES_STATE_ROWS]; + queue + .parallel_for(range<1>(AES_STATE_ROWS), + [=](id<1> idx) { + size_t i = idx[0]; + unsigned char a[AES_STATE_ROWS]; + unsigned char b[AES_STATE_ROWS]; - for (size_t j = 0; j < AES_STATE_ROWS; j++) { - a[j] = state[j][i]; - b[j] = xtime(state[j][i]); - } + for (size_t j = 0; j < AES_STATE_ROWS; j++) { + a[j] = state[j][i]; + b[j] = xtime(state[j][i]); + } - state[0][i] = b[0] ^ a[1] ^ b[1] ^ a[2] ^ a[3]; - state[1][i] = a[0] ^ b[1] ^ a[2] ^ b[2] ^ a[3]; - state[2][i] = a[0] ^ a[1] ^ b[2] ^ a[3] ^ b[3]; - state[3][i] = b[0] ^ a[0] ^ a[1] ^ a[2] ^ b[3]; - }).wait(); + state[0][i] = b[0] ^ a[1] ^ b[1] ^ a[2] ^ a[3]; + state[1][i] = a[0] ^ b[1] ^ a[2] ^ b[2] ^ a[3]; + state[2][i] = a[0] ^ a[1] ^ b[2] ^ a[3] ^ b[3]; + state[3][i] = b[0] ^ a[0] ^ a[1] ^ a[2] ^ b[3]; + }) + .wait(); } /** @@ -317,27 +350,30 @@ void mixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) @param state 2D array representing the state of the AES block. @param roundKey Round key to be XORed with the state array. */ -void addRoundKey(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS], unsigned char *roundKey) +void addRoundKey(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS], + unsigned char *roundKey) { queue queue; buffer stateBuffer(state[0], - range<2>(AES_STATE_ROWS, NUM_BLOCKS)); + range<2>(AES_STATE_ROWS, NUM_BLOCKS)); buffer roundKeyBuffer( roundKey, range<1>(AES_STATE_ROWS * NUM_BLOCKS)); - queue.submit([&](handler &handler) { - auto stateAcc = - stateBuffer.get_access(handler); - auto roundKeyAcc = - roundKeyBuffer.get_access(handler); + queue + .submit([&](handler &handler) { + auto stateAcc = + stateBuffer.get_access(handler); + auto roundKeyAcc = + roundKeyBuffer.get_access(handler); - handler.parallel_for( - range<2>(AES_STATE_ROWS, NUM_BLOCKS), [=](id<2> id) { - size_t i = id[0]; - size_t j = id[1]; - stateAcc[i][j] ^= roundKeyAcc[i + AES_STATE_ROWS * j]; - }); - }).wait(); + handler.parallel_for( + range<2>(AES_STATE_ROWS, NUM_BLOCKS), [=](id<2> id) { + size_t i = id[0]; + size_t j = id[1]; + stateAcc[i][j] ^= roundKeyAcc[i + AES_STATE_ROWS * j]; + }); + }) + .wait(); } /** @@ -349,18 +385,22 @@ void subWord(unsigned char a[AES_STATE_ROWS]) { queue queue; buffer aBuffer(a, range<1>(AES_STATE_ROWS)); - buffer sBoxBuffer(sBox[0], range<2>(BLOCK_BYTES_LEN, BLOCK_BYTES_LEN)); + buffer sBoxBuffer( + sBox[0], range<2>(BLOCK_BYTES_LEN, BLOCK_BYTES_LEN)); - queue.submit([&](handler &handler) { - auto aAcc = aBuffer.get_access(handler); - auto sBoxAcc = sBoxBuffer.get_access(handler); + queue + .submit([&](handler &handler) { + auto aAcc = aBuffer.get_access(handler); + auto sBoxAcc = sBoxBuffer.get_access(handler); - handler.parallel_for( - range<1>(AES_STATE_ROWS), [=](id<1> id) { - size_t i = id[0]; - aAcc[i] = sBoxAcc[aAcc[i] / BLOCK_BYTES_LEN][aAcc[i] % BLOCK_BYTES_LEN]; - }); - }).wait(); + handler.parallel_for( + range<1>(AES_STATE_ROWS), [=](id<1> id) { + size_t i = id[0]; + aAcc[i] = sBoxAcc[aAcc[i] / BLOCK_BYTES_LEN] + [aAcc[i] % BLOCK_BYTES_LEN]; + }); + }) + .wait(); } /** @@ -373,18 +413,20 @@ void rotWord(unsigned char *word) queue queue; buffer wordBuffer(word, range<1>(AES_STATE_ROWS)); - queue.submit([&](handler &handler) { - auto wordAcc = - wordBuffer.get_access(handler); - - handler.single_task([=]() { - unsigned char temp = wordAcc[0]; - wordAcc[0] = wordAcc[1]; - wordAcc[1] = wordAcc[2]; - wordAcc[2] = wordAcc[3]; - wordAcc[3] = temp; - }); - }).wait(); + queue + .submit([&](handler &handler) { + auto wordAcc = + wordBuffer.get_access(handler); + + handler.single_task([=]() { + unsigned char temp = wordAcc[0]; + wordAcc[0] = wordAcc[1]; + wordAcc[1] = wordAcc[2]; + wordAcc[2] = wordAcc[3]; + wordAcc[3] = temp; + }); + }) + .wait(); } /** @@ -400,15 +442,18 @@ void rconWord(unsigned char a[AES_STATE_ROWS], unsigned int n) for (size_t i = 0; i < n - 1; i++) strong = xtime(strong); - queue.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> idx) { - size_t i = idx[0]; - if (i == 0) { - a[i] = strong; - } - else { - a[i] = 0; - } - }).wait(); + queue + .parallel_for(range<1>(AES_STATE_ROWS), + [=](id<1> idx) { + size_t i = idx[0]; + if (i == 0) { + a[i] = strong; + } + else { + a[i] = 0; + } + }) + .wait(); } /** @@ -417,7 +462,8 @@ void rconWord(unsigned char a[AES_STATE_ROWS], unsigned int n) @param key Original AES key. @param w Output array to store the expanded key. */ -void keyExpansion(const unsigned char *key, unsigned char w[], AESKeyLength keyLength) +void keyExpansion(const unsigned char *key, unsigned char w[], + AESKeyLength keyLength) { queue queue; unsigned int numWordLocal = aesKeyLengthData[keyLength].numWord; @@ -425,10 +471,12 @@ void keyExpansion(const unsigned char *key, unsigned char w[], AESKeyLength keyL unsigned int NUM_BLOCKSLocal = NUM_BLOCKS; unsigned int numRoundLocal = aesKeyLengthData[keyLength].numRound; // Copy the initial key to the output array - queue.submit([&](handler &handler) { - handler.parallel_for(range<1>(AES_STATE_ROWS * numWordLocal), - [=](id<1> idx) { w[idx] = key[idx]; }); - }).wait(); + queue + .submit([&](handler &handler) { + handler.parallel_for(range<1>(AES_STATE_ROWS * numWordLocal), + [=](id<1> idx) { w[idx] = key[idx]; }); + }) + .wait(); unsigned int i = AES_STATE_ROWS * numWordLocal; @@ -436,34 +484,39 @@ void keyExpansion(const unsigned char *key, unsigned char w[], AESKeyLength keyL unsigned char temp[AES_STATE_ROWS]; buffer temp_buf(temp, range<1>(AES_STATE_ROWS)); - queue.submit([&](handler &handler) { - auto temp_acc = - temp_buf.get_access(handler); - handler.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> idx) { - temp_acc[idx] = w[i - AES_STATE_ROWS + idx]; - }); - }).wait(); + queue + .submit([&](handler &handler) { + auto temp_acc = + temp_buf.get_access(handler); + handler.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> idx) { + temp_acc[idx] = w[i - AES_STATE_ROWS + idx]; + }); + }) + .wait(); if (i / AES_STATE_ROWS % numWordLocal == 0) { - // Use SYCL to execute rotWord and subWord + // Use SYCL to execute rotWord and subWord rotWord(temp); subWord(temp); unsigned char rcon[AES_STATE_ROWS]; rconWord(rcon, i / (numWordLocal * AES_STATE_ROWS)); - - for (int k = 0; k < AES_STATE_ROWS; k++) + + for (int k = 0; k < AES_STATE_ROWS; k++) temp[k] ^= rcon[k]; } - else if (numWordLocal > 6 && i / AES_STATE_ROWS % numWordLocal == 4) + else if (numWordLocal > 6 && i / AES_STATE_ROWS % numWordLocal == 4) subWord(temp); - queue.submit([&](handler &handler) { - auto temp_acc = - temp_buf.get_access(handler); - handler.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> idx) { - w[i + idx] = w[i + idx - AES_STATE_ROWS * numWordLocal] ^ temp_acc[idx]; - }); - }).wait(); + queue + .submit([&](handler &handler) { + auto temp_acc = + temp_buf.get_access(handler); + handler.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> idx) { + w[i + idx] = w[i + idx - AES_STATE_ROWS * numWordLocal] ^ + temp_acc[idx]; + }); + }) + .wait(); i += 4; } @@ -479,49 +532,55 @@ void invSubBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { queue queue; buffer stateBuffer(state[0], - range<2>(AES_STATE_ROWS, NUM_BLOCKS)); - buffer invSBoxBuffer(invSBox[0], - range<2>(BLOCK_BYTES_LEN, BLOCK_BYTES_LEN)); - - queue.submit([&](handler &handler) { - auto stateAcc = - stateBuffer.get_access(handler); - auto invSBoxAcc = - invSBoxBuffer.get_access(handler); - - handler.parallel_for( - range<2>(AES_STATE_ROWS, NUM_BLOCKS), [=](id<2> id) { - size_t i = id[0]; - size_t j = id[1]; - stateAcc[i][j] = - invSBoxAcc[state[i][j] / BLOCK_BYTES_LEN][state[i][j] % BLOCK_BYTES_LEN]; - }); - }).wait(); + range<2>(AES_STATE_ROWS, NUM_BLOCKS)); + buffer invSBoxBuffer( + invSBox[0], range<2>(BLOCK_BYTES_LEN, BLOCK_BYTES_LEN)); + + queue + .submit([&](handler &handler) { + auto stateAcc = + stateBuffer.get_access(handler); + auto invSBoxAcc = + invSBoxBuffer.get_access(handler); + + handler.parallel_for( + range<2>(AES_STATE_ROWS, NUM_BLOCKS), [=](id<2> id) { + size_t i = id[0]; + size_t j = id[1]; + stateAcc[i][j] = invSBoxAcc[state[i][j] / BLOCK_BYTES_LEN] + [state[i][j] % BLOCK_BYTES_LEN]; + }); + }) + .wait(); } /*Applies the InvMixColumns transformation*/ void invMixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { queue queue; - queue.parallel_for(range<1>(NUM_BLOCKS), [=](id<1> idx) { - size_t i = idx[0]; - unsigned char a[AES_STATE_ROWS]; - unsigned char b[AES_STATE_ROWS]; - - for (size_t j = 0; j < AES_STATE_ROWS; j++) { - a[j] = state[j][i]; - b[j] = xtime(a[j]); - } - - state[0][i] = multiply(0x0e, a[0]) ^ multiply(0x0b, a[1]) ^ - multiply(0x0d, a[2]) ^ multiply(0x09, a[3]); - state[1][i] = multiply(0x09, a[0]) ^ multiply(0x0e, a[1]) ^ - multiply(0x0b, a[2]) ^ multiply(0x0d, a[3]); - state[2][i] = multiply(0x0d, a[0]) ^ multiply(0x09, a[1]) ^ - multiply(0x0e, a[2]) ^ multiply(0x0b, a[3]); - state[3][i] = multiply(0x0b, a[0]) ^ multiply(0x0d, a[1]) ^ - multiply(0x09, a[2]) ^ multiply(0x0e, a[3]); - }).wait(); + queue + .parallel_for( + range<1>(NUM_BLOCKS), + [=](id<1> idx) { + size_t i = idx[0]; + unsigned char a[AES_STATE_ROWS]; + unsigned char b[AES_STATE_ROWS]; + + for (size_t j = 0; j < AES_STATE_ROWS; j++) { + a[j] = state[j][i]; + b[j] = xtime(a[j]); + } + + state[0][i] = multiply(0x0e, a[0]) ^ multiply(0x0b, a[1]) ^ + multiply(0x0d, a[2]) ^ multiply(0x09, a[3]); + state[1][i] = multiply(0x09, a[0]) ^ multiply(0x0e, a[1]) ^ + multiply(0x0b, a[2]) ^ multiply(0x0d, a[3]); + state[2][i] = multiply(0x0d, a[0]) ^ multiply(0x09, a[1]) ^ + multiply(0x0e, a[2]) ^ multiply(0x0b, a[3]); + state[3][i] = multiply(0x0b, a[0]) ^ multiply(0x0d, a[1]) ^ + multiply(0x09, a[2]) ^ multiply(0x0e, a[3]); + }) + .wait(); } /** @@ -533,15 +592,17 @@ void invMixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) void invShiftRows(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { queue queue; - queue.submit([&](handler &handler) { - handler.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> i) { - unsigned char tmp[NUM_BLOCKS]; - for (size_t k = 0; k < NUM_BLOCKS; k++) - tmp[k] = state[i][(k - i + NUM_BLOCKS) % NUM_BLOCKS]; - for (size_t k = 0; k < NUM_BLOCKS; k++) - state[i][k] = tmp[k]; - }); - }).wait(); + queue + .submit([&](handler &handler) { + handler.parallel_for(range<1>(AES_STATE_ROWS), [=](id<1> i) { + unsigned char tmp[NUM_BLOCKS]; + for (size_t k = 0; k < NUM_BLOCKS; k++) + tmp[k] = state[i][(k - i + NUM_BLOCKS) % NUM_BLOCKS]; + for (size_t k = 0; k < NUM_BLOCKS; k++) + state[i][k] = tmp[k]; + }); + }) + .wait(); } /** XORs two blocks of bytes a and b of length len, storing the result in c. */ @@ -554,14 +615,17 @@ void xorBlocks(const unsigned char *a, const unsigned char *b, unsigned char *c, buffer bufB(b, range<1>(len)); buffer bufC(c, range<1>(len)); - queue.submit([&](handler &handler) { - auto accA = bufA.get_access(handler); - auto accB = bufB.get_access(handler); - auto accC = bufC.get_access(handler); + queue + .submit([&](handler &handler) { + auto accA = bufA.get_access(handler); + auto accB = bufB.get_access(handler); + auto accC = bufC.get_access(handler); - handler.parallel_for(range<1>(len), - [=](id<1> idx) { accC[idx] = accA[idx] ^ accB[idx]; }); - }).wait(); + handler.parallel_for(range<1>(len), [=](id<1> idx) { + accC[idx] = accA[idx] ^ accB[idx]; + }); + }) + .wait(); } #else @@ -597,7 +661,8 @@ void encryptBlock(const unsigned char in[], unsigned char out[], // Final round subBytes(state); shiftRows(state); - addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * AES_STATE_ROWS * NUM_BLOCKS); + addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * + AES_STATE_ROWS * NUM_BLOCKS); // Copy state array to output block for (i = 0; i < AES_STATE_ROWS; i++) @@ -623,10 +688,12 @@ void decryptBlock(const unsigned char in[], unsigned char out[], state[i][j] = in[i + AES_STATE_ROWS * j]; // Initial round key addition - addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * AES_STATE_ROWS * NUM_BLOCKS); + addRoundKey(state, roundKeys + aesKeyLengthData[keyLength].numRound * + AES_STATE_ROWS * NUM_BLOCKS); // Main rounds - for (round = aesKeyLengthData[keyLength].numRound - 1; round >= 1; round--) { + for (round = aesKeyLengthData[keyLength].numRound - 1; round >= 1; + round--) { invSubBytes(state); invShiftRows(state); addRoundKey(state, roundKeys + round * AES_STATE_ROWS * NUM_BLOCKS); @@ -673,7 +740,8 @@ void subBytes(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) { for (size_t i = 0; i < AES_STATE_ROWS; i++) for (size_t j = 0; j < NUM_BLOCKS; j++) - state[i][j] = sBox[state[i][j] / BLOCK_BYTES_LEN][state[i][j] % BLOCK_BYTES_LEN]; + state[i][j] = sBox[state[i][j] / BLOCK_BYTES_LEN] + [state[i][j] % BLOCK_BYTES_LEN]; } /*ShiftRows transformation*/ @@ -705,7 +773,8 @@ void mixColumns(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS]) } /*AddRoundKey transformation*/ -void addRoundKey(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS], unsigned char *key) +void addRoundKey(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS], + unsigned char *key) { unsigned int i, j; for (i = 0; i < AES_STATE_ROWS; i++) @@ -741,7 +810,8 @@ void rconWord(unsigned char a[AES_STATE_ROWS], unsigned int n) } /*Expands the key for AES encryption/decryption*/ -void keyExpansion(const unsigned char *key, unsigned char w[], AESKeyLength keyLength) +void keyExpansion(const unsigned char *key, unsigned char w[], + AESKeyLength keyLength) { unsigned char temp[AES_STATE_ROWS], rcon[AES_STATE_ROWS]; unsigned int i = 0; @@ -755,22 +825,27 @@ void keyExpansion(const unsigned char *key, unsigned char w[], AESKeyLength keyL i = AES_STATE_ROWS * aesKeyLengthData[keyLength].numWord; //main expansion loop - while (i < AES_STATE_ROWS * NUM_BLOCKS * (aesKeyLengthData[keyLength].numRound + 1)) { + while (i < AES_STATE_ROWS * NUM_BLOCKS * + (aesKeyLengthData[keyLength].numRound + 1)) { for (size_t k = AES_STATE_ROWS, j = 0; k > 0; --k, ++j) temp[j] = w[i - k]; if (i / AES_STATE_ROWS % aesKeyLengthData[keyLength].numWord == 0) { rotWord(temp); subWord(temp); - rconWord(rcon, i / (aesKeyLengthData[keyLength].numWord * AES_STATE_ROWS)); + rconWord(rcon, i / (aesKeyLengthData[keyLength].numWord * + AES_STATE_ROWS)); for (int i = 0; i < AES_STATE_ROWS; i++) temp[i] = temp[i] ^ rcon[i]; } - else if (aesKeyLengthData[keyLength].numWord > 6 && i / AES_STATE_ROWS % aesKeyLengthData[keyLength].numWord == 4) + else if (aesKeyLengthData[keyLength].numWord > 6 && + i / AES_STATE_ROWS % aesKeyLengthData[keyLength].numWord == 4) subWord(temp); for (int k = 0; k < AES_STATE_ROWS; k++) - w[i + k] = w[i + k - AES_STATE_ROWS * aesKeyLengthData[keyLength].numWord] ^ temp[k]; + w[i + k] = w[i + k - + AES_STATE_ROWS * aesKeyLengthData[keyLength].numWord] ^ + temp[k]; i += 4; } @@ -829,20 +904,48 @@ void xorBlocks(const unsigned char *a, const unsigned char *b, unsigned char *c, } } -size_t calculatEncryptedLenAES(size_t inLen, bool isFirst) +/** + * @brief Calculates the total length of the encrypted data, including padding and IV if applicable. + * + * This function determines the final size of the encrypted output based on the input length, + * whether it's the first block (which may require an IV), and the AES chaining mode being used. + * If the input length is a multiple of the block size, padding is added. In non-ECB modes, + * an IV (Initialization Vector) is added if this is the first block. + * + * @param inLen The length of the input data to be encrypted. + * @param isFirst Indicates if this is the first block of data. + * @param chainingMode The AES chaining mode (e.g., ECB, CBC). + * @return The total length of the encrypted output, including padding and IV. + */ +size_t calculatEncryptedLenAES(size_t inLen, bool isFirst, + AESChainingMode chainingMode) { - if(isFirst || inLen % BLOCK_BYTES_LEN == 0) + if (inLen % BLOCK_BYTES_LEN == 0) //padding inLen += BLOCK_BYTES_LEN; - - return (inLen + 15) & ~15; + if (isFirst && chainingMode != ECB) //iv + inLen += BLOCK_BYTES_LEN; + return (inLen + 15) & ~15; } -size_t calculatDecryptedLenAES(size_t inLen, bool isFirst) +/** + * @brief Calculates the decrypted data length, adjusting for the IV if applicable. + * + * This function determines the length of the decrypted output based on the input length + * (which includes padding and potentially an IV). If this is the first block and a non-ECB + * mode is used, the function subtracts the IV size from the input length. + * + * @param inLen The length of the encrypted input data. + * @param isFirst Indicates if this is the first block of data. + * @param chainingMode The AES chaining mode (e.g., ECB, CBC). + * @return The length of the decrypted output, adjusted for IV. + */ +size_t calculatDecryptedLenAES(size_t inLen, bool isFirst, + AESChainingMode chainingMode) { - // if(isFirst) - // inLen -= BLOCK_BYTES_LEN; - - return (inLen + 15) & ~15; + if (isFirst && chainingMode != ECB) //iv + inLen -= BLOCK_BYTES_LEN; + return inLen; } -#endif + +#endif \ No newline at end of file diff --git a/src/aes_cbc.cpp b/src/aes_cbc.cpp index b8f0e020..44809cd5 100644 --- a/src/aes_cbc.cpp +++ b/src/aes_cbc.cpp @@ -1,91 +1,161 @@ #include "../include/aes_stream.h" #include + +/** + * @brief Initializes the AES CBC encryption process. + * + * This function generates a random IV, performs AES encryption on the input block, + * and stores the last encrypted block to be used in the continuation of the encryption process. + * + * @param block The input data block to be encrypted. + * @param inLen The length of the input block. + * @param out The output buffer to store the encrypted data. + * @param outLen The length of the output buffer. + * @param key The AES key used for encryption. + * @param keyLength The length of the AES key (128, 192, or 256 bits). + */ void AESCbc::encryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, unsigned char *key, AESKeyLength keyLength) { generateRandomIV(iv); - encrypt(block, inLen, key, out, outLen, iv, nullptr, keyLength); - unsigned char *newOut = new unsigned char[outLen + BLOCK_BYTES_LEN]; - memcpy(newOut, out, outLen); - memcpy(newOut + outLen, iv, BLOCK_BYTES_LEN); - memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); - out = newOut; - this->key = new unsigned char[aesKeyLengthData[keyLength].keySize]; - // Copy the data from the provided key - memcpy(this->key, key, aesKeyLengthData[keyLength].keySize); - - // Set the key length + encrypt(block, inLen, key, out, outLen - BLOCK_BYTES_LEN, iv, nullptr, + keyLength); + memcpy(out + outLen - BLOCK_BYTES_LEN, iv, BLOCK_BYTES_LEN); + memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN * 2, BLOCK_BYTES_LEN); + this->key = new unsigned char[keyLength]; + memcpy(this->key, key, keyLength); this->keyLength = keyLength; - - outLen += BLOCK_BYTES_LEN; } +/** + * @brief Continues the AES CBC encryption process. + * + * This function encrypts additional data blocks, using the last encrypted block as IV for the next block. + * + * @param block The input data block to be encrypted. + * @param inLen The length of the input block. + * @param out The output buffer to store the encrypted data. + * @param outLen The length of the output buffer. + */ void AESCbc::encryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen) + unsigned char *out, unsigned int outLen) { encrypt(block, inLen, key, out, outLen, lastBlock, nullptr, keyLength); memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } +/** + * @brief Initializes the AES CBC decryption process. + * + * This function retrieves the IV from the input block, performs AES decryption, + * and stores the last block to be used in the continuation of the decryption process. + * + * @param block The input data block to be decrypted. + * @param inLen The length of the input block. + * @param out The output buffer to store the decrypted data. + * @param outLen The length of the output buffer (output parameter). + * @param key The AES key used for decryption. + * @param keyLength The length of the AES key (128, 192, or 256 bits). + */ void AESCbc::decryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int &outLen, unsigned char *key, AESKeyLength keyLength) { - this->iv = block + inLen - BLOCK_BYTES_LEN; + memcpy(this->iv, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, nullptr, keyLength); - memcpy(lastBlock, block + inLen - 2*BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); + memcpy(lastBlock, block + inLen - 2 * BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } +/** + * @brief Continues the AES CBC decryption process. + * + * This function decrypts additional data blocks, using the last encrypted block as IV for the next block. + * + * @param block The input data block to be decrypted. + * @param inLen The length of the input block. + * @param out The output buffer to store the decrypted data. + * @param outLen The length of the output buffer (output parameter). + */ void AESCbc::decryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen) + unsigned char *out, unsigned int &outLen) { decrypt(block, inLen, key, out, outLen, lastBlock, nullptr, keyLength); memcpy(lastBlock, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); - } +/** + * @brief Encrypts a padded message using AES in CBC mode. + * + * This function performs AES encryption on padded input data in CBC mode. + * It generates the round keys and applies XOR between the current block and the previous ciphertext block. + * + * @param in The input data to be encrypted (padded). + * @param inLen The length of the input data. + * @param key The AES key used for encryption. + * @param out The output buffer to store the encrypted data. + * @param outLen The length of the output buffer. + * @param iv The initialization vector used for the first encryption block. + * @param lastData Optional parameter for chaining blocks (not used in this implementation). + * @param keyLength The length of the AES key (128, 192, or 256 bits). + */ void AESCbc::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) { - padMessage(in, inLen, outLen); + size_t paddedLength = getPaddedLength(inLen); + unsigned char *paddedIn = new unsigned char[paddedLength]; + padMessage(in, inLen, paddedIn); unsigned char block[BLOCK_BYTES_LEN]; - out = new unsigned char[outLen]; unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); memcpy(block, iv, BLOCK_BYTES_LEN); for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { - xorBlocks(block, in + i, block, BLOCK_BYTES_LEN); + xorBlocks(block, paddedIn + i, block, BLOCK_BYTES_LEN); encryptBlock(block, out + i, roundKeys, keyLength); memcpy(block, out + i, BLOCK_BYTES_LEN); } + delete[] paddedIn; delete[] roundKeys; } +/** + * @brief Decrypts an AES-encrypted message using CBC mode. + * + * This function performs AES decryption on the input data in CBC mode. + * It generates the round keys, decrypts the input, and applies XOR between the current ciphertext block and the previous block. + * + * @param in The input data to be decrypted. + * @param inLen The length of the input data. + * @param key The AES key used for decryption. + * @param out The output buffer to store the decrypted data. + * @param outLen The length of the output buffer (output parameter). + * @param iv The initialization vector used for the first decryption block. + * @param lastData Optional parameter for chaining blocks (not used in this implementation). + * @param keyLength The length of the AES key (128, 192, or 256 bits). + */ void AESCbc::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) { checkLength(inLen); unsigned char block[BLOCK_BYTES_LEN]; outLen = inLen; - out = new unsigned char[outLen]; unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); memcpy(block, iv, BLOCK_BYTES_LEN); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + for (unsigned int i = 0; i < inLen; i += BLOCK_BYTES_LEN) { decryptBlock(in + i, out + i, roundKeys, keyLength); xorBlocks(block, out + i, out + i, BLOCK_BYTES_LEN); memcpy(block, in + i, BLOCK_BYTES_LEN); } - unpadMessage(out, outLen); + outLen = getUnpadMessageLength(out, inLen); delete[] roundKeys; -} \ No newline at end of file +} diff --git a/src/aes_cfb.cpp b/src/aes_cfb.cpp index c8516a3b..9da2f495 100644 --- a/src/aes_cfb.cpp +++ b/src/aes_cfb.cpp @@ -1,57 +1,111 @@ #include "../include/aes_stream.h" -#include + +/** + * @brief Initializes the AES CFB encryption process. + * + * This function generates a random IV, encrypts the input block, + * and stores the last encrypted block for continuation of the encryption process. + * + * @param block The input data block to be encrypted. + * @param inLen The length of the input block. + * @param out The output buffer to store the encrypted data. + * @param outLen The length of the output buffer. + * @param key The AES key used for encryption. + * @param keyLength The length of the AES key (128, 192, or 256 bits). + */ void AESCfb::encryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, unsigned char *key, AESKeyLength keyLength) { generateRandomIV(iv); - encrypt(block, inLen, key, out, outLen, iv, nullptr, keyLength); - unsigned char *newOut = new unsigned char[outLen + BLOCK_BYTES_LEN]; - memcpy(newOut, out, outLen); - memcpy(newOut + outLen, iv, BLOCK_BYTES_LEN); - memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); - out = newOut; - this->key = new unsigned char[aesKeyLengthData[keyLength].keySize]; - // Copy the data from the provided key - memcpy(this->key, key, aesKeyLengthData[keyLength].keySize); - - // Set the key length + encrypt(block, inLen, key, out, outLen - BLOCK_BYTES_LEN, iv, nullptr, keyLength); + memcpy(out + outLen - BLOCK_BYTES_LEN, iv, BLOCK_BYTES_LEN); + memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN * 2, BLOCK_BYTES_LEN); + this->key = new unsigned char[keyLength]; + memcpy(this->key, key, keyLength); this->keyLength = keyLength; - - outLen += BLOCK_BYTES_LEN; } +/** + * @brief Continues the AES CFB encryption process. + * + * This function encrypts additional data blocks, using the last encrypted block as IV for the next block. + * + * @param block The input data block to be encrypted. + * @param inLen The length of the input block. + * @param out The output buffer to store the encrypted data. + * @param outLen The length of the output buffer. + */ void AESCfb::encryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen) + unsigned char *out, unsigned int outLen) { encrypt(block, inLen, key, out, outLen, lastBlock, nullptr, keyLength); memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } +/** + * @brief Initializes the AES CFB decryption process. + * + * This function retrieves the IV from the input block, performs AES decryption, + * and stores the last block to be used in the continuation of the decryption process. + * + * @param block The input data block to be decrypted. + * @param inLen The length of the input block. + * @param out The output buffer to store the decrypted data. + * @param outLen The length of the output buffer (output parameter). + * @param key The AES key used for decryption. + * @param keyLength The length of the AES key (128, 192, or 256 bits). + */ void AESCfb::decryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int &outLen, unsigned char *key, AESKeyLength keyLength) { - this->iv = block + inLen - BLOCK_BYTES_LEN; + memcpy(this->iv, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, nullptr, keyLength); - memcpy(lastBlock, block + inLen - 2*BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); + memcpy(lastBlock, block + inLen - 2 * BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } +/** + * @brief Continues the AES CFB decryption process. + * + * This function decrypts additional data blocks, using the last encrypted block as IV for the next block. + * + * @param block The input data block to be decrypted. + * @param inLen The length of the input block. + * @param out The output buffer to store the decrypted data. + * @param outLen The length of the output buffer (output parameter). + */ void AESCfb::decryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen) + unsigned char *out, unsigned int &outLen) { decrypt(block, inLen, key, out, outLen, lastBlock, nullptr, keyLength); memcpy(lastBlock, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); - } + +/** + * @brief Encrypts a padded message using AES in CFB mode. + * + * This function performs AES encryption on padded input data in CFB mode. + * It generates the round keys and applies XOR between the input data and the encrypted feedback block. + * + * @param in The input data to be encrypted (padded). + * @param inLen The length of the input data. + * @param key The AES key used for encryption. + * @param out The output buffer to store the encrypted data. + * @param outLen The length of the output buffer. + * @param iv The initialization vector used for the first encryption block. + * @param lastData Optional parameter for chaining blocks (not used in this implementation). + * @param keyLength The length of the AES key (128, 192, or 256 bits). + */ void AESCfb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) { - padMessage(in, inLen, outLen); - out = new unsigned char[outLen]; + size_t paddedLength = getPaddedLength(inLen); + unsigned char *paddedIn = new unsigned char[paddedLength]; + padMessage(in, inLen, paddedIn); unsigned char block[BLOCK_BYTES_LEN]; unsigned char feedback[BLOCK_BYTES_LEN]; unsigned char *roundKeys = @@ -61,31 +115,36 @@ void AESCfb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, memcpy(feedback, iv, BLOCK_BYTES_LEN); for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { encryptBlock(feedback, block, roundKeys, keyLength); - xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); + xorBlocks(paddedIn + i, block, out + i, BLOCK_BYTES_LEN); memcpy(feedback, out + i, BLOCK_BYTES_LEN); } delete[] roundKeys; + delete[] paddedIn; } /** - Decrypts data using AES in CFB mode. - @param in Encrypted input data. - @param inLen Length of input data. - @param key Decryption key. - @param[out] out Decrypted output data. - @param[out] outLen Length of decrypted data. - @param iv Initialization vector. - @param keyLength AES key length (128, 192, 256 bits). + * @brief Decrypts an AES-encrypted message using CFB mode. + * + * This function performs AES decryption on the input data in CFB mode. + * It generates the round keys, decrypts the input, and applies XOR between the input data and the encrypted feedback block. + * + * @param in The input data to be decrypted. + * @param inLen The length of the input data. + * @param key The AES key used for decryption. + * @param out The output buffer to store the decrypted data. + * @param outLen The length of the output buffer (output parameter). + * @param iv The initialization vector used for the first decryption block. + * @param lastData Optional parameter for chaining blocks (not used in this implementation). + * @param keyLength The length of the AES key (128, 192, or 256 bits). */ void AESCfb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) { checkLength(inLen); unsigned char block[BLOCK_BYTES_LEN]; outLen = inLen; - out = new unsigned char[outLen]; unsigned char feedback[BLOCK_BYTES_LEN]; unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * @@ -97,6 +156,6 @@ void AESCfb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); memcpy(feedback, in + i, BLOCK_BYTES_LEN); } - unpadMessage(out, outLen); + outLen = getUnpadMessageLength(out, inLen); delete[] roundKeys; -} \ No newline at end of file +} diff --git a/src/aes_ctr.cpp b/src/aes_ctr.cpp index 14708f41..699e3280 100644 --- a/src/aes_ctr.cpp +++ b/src/aes_ctr.cpp @@ -1,214 +1,25 @@ -// #include "../include/aes_stream.h" -// #include -// #include -// #include - -// /** -// Encrypts a single block of data using AES in CTR mode. -// This function handles the encryption of a single block in CTR (Counter) mode. -// It computes the counter value based on the given initialization vector (IV) and -// block index, encrypts the counter, and then XORs the encrypted counter with the -// input block to produce the output block. -// @param input Pointer to the input block of plaintext data (BLOCK_BYTES_LEN bytes). -// @param output Pointer to the output block where the encrypted ciphertext will be stored (BLOCK_BYTES_LEN bytes). -// @param roundKeys Pointer to the array of round keys used for AES encryption. -// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). -// @param iv Pointer to the initialization vector (IV) used for the counter. -// @param blockIndex The index of the current block to be encrypted, used to compute the counter value. -// */ -// void encryptBlockThreadedCTR(const unsigned char* input, unsigned char* output, unsigned char* roundKeys, -// AESKeyLength keyLength, const unsigned char* lastData, unsigned int blockIndex) -// { -// unsigned char block[BLOCK_BYTES_LEN]; -// unsigned char counter[BLOCK_BYTES_LEN]; - -// memcpy(counter, lastData, BLOCK_BYTES_LEN); - -// for (int j = BLOCK_BYTES_LEN - 1, k = blockIndex; j >= 0; --j) { -// counter[j] += (k % 256); -// if (counter[j] != 0) break; -// k /= 256; -// } - -// encryptBlock(counter, block, roundKeys, keyLength); - -// xorBlocks(block, input, output, BLOCK_BYTES_LEN); -// } - -// /** -// Encrypts multiple blocks of data using AES in CTR mode with multithreading. -// This function divides the input plaintext into blocks and encrypts each block -// in parallel using multiple threads in CTR (Counter) mode. The function ensures -// that each block is encrypted using AES with a counter value derived from the -// initialization vector (IV) and block index, and all threads are joined before completing. -// @param plaintext Pointer to the input plaintext data to be encrypted. -// @param ciphertext Pointer to the buffer where the encrypted ciphertext will be stored. -// @param length The total length of the plaintext data (must be a multiple of BLOCK_BYTES_LEN). -// @param roundKeys Pointer to the array of round keys used for AES encryption. -// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). -// @param iv Pointer to the initialization vector (IV) used for the counter. -// */ -// void encryptCTRMultithreaded(const unsigned char* plaintext, unsigned char* ciphertext, unsigned int length, -// unsigned char* roundKeys, AESKeyLength keyLength, const unsigned char* lastData) -// { -// unsigned int numBlocks = length / BLOCK_BYTES_LEN; -// std::vector threads; - -// for (unsigned int i = 0; i < numBlocks; ++i) { -// threads.push_back(std::thread(encryptBlockThreadedCTR, &plaintext[i * BLOCK_BYTES_LEN], -// &ciphertext[i * BLOCK_BYTES_LEN], roundKeys, keyLength, lastData, i)); -// } - -// for (auto& th : threads) { -// th.join(); -// } -// } - -// /** -// Decrypts a single block of data using AES in CTR mode. -// This function handles the decryption of a single block in CTR (Counter) mode. -// It computes the counter value based on the given initialization vector (IV) and -// block index, encrypts the counter, and then XORs the encrypted counter with the -// input block to produce the output block. -// @param input Pointer to the input block of ciphertext data (BLOCK_BYTES_LEN bytes). -// @param output Pointer to the output block where the decrypted plaintext will be stored (BLOCK_BYTES_LEN bytes). -// @param roundKeys Pointer to the array of round keys used for AES encryption. -// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). -// @param iv Pointer to the initialization vector (IV) used for the counter. -// @param blockIndex The index of the current block to be decrypted, used to compute the counter value. -// */ -// void decryptBlockThreadedCTR(const unsigned char* input, unsigned char* output, unsigned char* roundKeys, -// AESKeyLength keyLength, const unsigned char* lastData, unsigned int blockIndex) -// { -// unsigned char block[BLOCK_BYTES_LEN]; -// unsigned char counter[BLOCK_BYTES_LEN]; - -// memcpy(counter, lastData, BLOCK_BYTES_LEN); - -// for (int j = BLOCK_BYTES_LEN - 1, k = blockIndex; j >= 0; --j) { -// counter[j] += (k % 256); -// if (counter[j] != 0) break; -// k /= 256; -// } - -// encryptBlock(counter, block, roundKeys, keyLength); - -// xorBlocks(block, input, output, BLOCK_BYTES_LEN); -// } - -// /** -// Decrypts multiple blocks of data using AES in CTR mode with multithreading. -// This function divides the input ciphertext into blocks and decrypts each block -// in parallel using multiple threads in CTR (Counter) mode. The function ensures -// that each block is decrypted using AES with a counter value derived from the -// initialization vector (IV) and block index, and all threads are joined before completing. -// @param ciphertext Pointer to the input ciphertext data to be decrypted. -// @param plaintext Pointer to the buffer where the decrypted plaintext will be stored. -// @param length The total length of the ciphertext data (must be a multiple of BLOCK_BYTES_LEN). -// @param roundKeys Pointer to the array of round keys used for AES encryption. -// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). -// @param iv Pointer to the initialization vector (IV) used for the counter. -// */ -// void decryptCTRMultithreaded(const unsigned char* ciphertext, unsigned char* plaintext, unsigned int length, -// unsigned char* roundKeys, AESKeyLength keyLength, const unsigned char* lastData) -// { -// unsigned int numBlocks = length / BLOCK_BYTES_LEN; -// std::vector threads; - -// for (unsigned int i = 0; i < numBlocks; ++i) -// threads.push_back(std::thread(decryptBlockThreadedCTR, &ciphertext[i * BLOCK_BYTES_LEN], -// &plaintext[i * BLOCK_BYTES_LEN], roundKeys, keyLength, lastData, i)); - -// for (auto& th : threads) -// th.join(); -// } - -// void AESCtr::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) -// { -// unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; -// generateRandomIV(iv); -// memcpy(lastData, iv, BLOCK_BYTES_LEN); -// encrypt(block, inLen, key, out, outLen, iv, lastData, keyLength); -// unsigned char *newOut = new unsigned char[outLen + BLOCK_BYTES_LEN]; -// memcpy(newOut, out, outLen); -// memcpy(newOut + outLen, iv, BLOCK_BYTES_LEN); -// out = newOut; -// this -> lastBlock = out; -// this -> key = key; -// this -> keyLength = keyLength; -// this-> lastData = lastData; -// outLen += BLOCK_BYTES_LEN; -// } - -// void AESCtr::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) -// { -// encrypt(block, inLen, key,out, outLen, lastData, lastData, keyLength); -// } - -// void AESCtr::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) -// { -// unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; -// memcpy(lastData, iv, BLOCK_BYTES_LEN); -// this-> iv = block + inLen - BLOCK_BYTES_LEN; -// decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, lastData, keyLength); -// this-> lastBlock = out; -// this->lastData = lastData; -// } - -// void AESCtr::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) -// { -// decrypt(block, inLen , key, out, outLen, lastData, lastData, keyLength); -// } - -// void AESCtr::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) -// { - -// padMessage(in, inLen, outLen); -// out = new unsigned char[outLen]; - -// unsigned char* roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; -// keyExpansion(key, roundKeys, keyLength); - -// encryptCTRMultithreaded(in, out, outLen, roundKeys, keyLength, iv); - -// delete[] roundKeys; -// } - -// void AESCtr::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) -// { -// checkLength(inLen); -// outLen = inLen; -// out = new unsigned char[outLen]; - -// unsigned char* roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; -// keyExpansion(key, roundKeys, keyLength); - -// decryptCTRMultithreaded(in, out, outLen, roundKeys, keyLength, iv); - -// delete[] roundKeys; -// } #include "../include/aes_stream.h" #include #include #include /** - Encrypts a single block of data using AES in CTR mode. - This function handles the encryption of a single block in CTR (Counter) mode. - It computes the counter value based on the given initialization vector (IV) and - block index, encrypts the counter, and then XORs the encrypted counter with the - input block to produce the output block. - @param input Pointer to the input block of plaintext data (BLOCK_BYTES_LEN bytes). - @param output Pointer to the output block where the encrypted ciphertext will be stored (BLOCK_BYTES_LEN bytes). - @param roundKeys Pointer to the array of round keys used for AES encryption. - @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). - @param iv Pointer to the initialization vector (IV) used for the counter. - @param blockIndex The index of the current block to be encrypted, used to compute the counter value. + * Encrypts a single block of data using AES in CTR mode. + * This function handles the encryption of a single block in CTR (Counter) mode. + * It computes the counter value based on the given initialization vector (IV) and + * block index, encrypts the counter, and then XORs the encrypted counter with the + * input block to produce the output block. + * @param input Pointer to the input block of plaintext data (BLOCK_BYTES_LEN bytes). + * @param output Pointer to the output block where the encrypted ciphertext will be stored (BLOCK_BYTES_LEN bytes). + * @param roundKeys Pointer to the array of round keys used for AES encryption. + * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + * @param iv Pointer to the initialization vector (IV) used for the counter. + * @param blockIndex The index of the current block to be encrypted, used to compute the counter value. */ -void encryptBlockThreadedCTR(const unsigned char* input, unsigned char* output, unsigned char* roundKeys, - AESKeyLength keyLength, const unsigned char* lastData, unsigned int blockIndex) +void encryptBlockThreadedCTR(const unsigned char *input, unsigned char *output, + unsigned char *roundKeys, AESKeyLength keyLength, + const unsigned char *lastData, + unsigned int blockIndex) { unsigned char block[BLOCK_BYTES_LEN]; unsigned char counter[BLOCK_BYTES_LEN]; @@ -216,60 +27,64 @@ void encryptBlockThreadedCTR(const unsigned char* input, unsigned char* output, memcpy(counter, lastData, BLOCK_BYTES_LEN); for (int j = BLOCK_BYTES_LEN - 1, k = blockIndex; j >= 0; --j) { - counter[j] += (k % 256); - if (counter[j] != 0) break; - k /= 256; + counter[j] += (k % 256); + if (counter[j] != 0) + break; + k /= 256; } encryptBlock(counter, block, roundKeys, keyLength); - xorBlocks(block, input, output, BLOCK_BYTES_LEN); } /** - Encrypts multiple blocks of data using AES in CTR mode with multithreading. - This function divides the input plaintext into blocks and encrypts each block - in parallel using multiple threads in CTR (Counter) mode. The function ensures - that each block is encrypted using AES with a counter value derived from the - initialization vector (IV) and block index, and all threads are joined before completing. - @param plaintext Pointer to the input plaintext data to be encrypted. - @param ciphertext Pointer to the buffer where the encrypted ciphertext will be stored. - @param length The total length of the plaintext data (must be a multiple of BLOCK_BYTES_LEN). - @param roundKeys Pointer to the array of round keys used for AES encryption. - @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). - @param iv Pointer to the initialization vector (IV) used for the counter. + * Encrypts multiple blocks of data using AES in CTR mode with multithreading. + * This function divides the input plaintext into blocks and encrypts each block + * in parallel using multiple threads in CTR (Counter) mode. Each thread is responsible + * for encrypting a separate block. + * @param plaintext Pointer to the input plaintext data to be encrypted. + * @param ciphertext Pointer to the buffer where the encrypted ciphertext will be stored. + * @param length The total length of the plaintext data (must be a multiple of BLOCK_BYTES_LEN). + * @param roundKeys Pointer to the array of round keys used for AES encryption. + * @param keyLength The length of the AES key being used. + * @param lastData Pointer to the initialization vector (IV) used for the counter. */ -void encryptCTRMultithreaded(const unsigned char* plaintext, unsigned char* ciphertext, unsigned int length, - unsigned char* roundKeys, AESKeyLength keyLength, const unsigned char* lastData) +void encryptCTRMultithreaded(const unsigned char *plaintext, + unsigned char *ciphertext, unsigned int length, + unsigned char *roundKeys, AESKeyLength keyLength, + const unsigned char *lastData) { unsigned int numBlocks = length / BLOCK_BYTES_LEN; - std::vector threads; + std::vector threads; for (unsigned int i = 0; i < numBlocks; ++i) { - threads.push_back(std::thread(encryptBlockThreadedCTR, &plaintext[i * BLOCK_BYTES_LEN], - &ciphertext[i * BLOCK_BYTES_LEN], roundKeys, keyLength, lastData, i)); + threads.push_back(std::thread(encryptBlockThreadedCTR, + &plaintext[i * BLOCK_BYTES_LEN], + &ciphertext[i * BLOCK_BYTES_LEN], + roundKeys, keyLength, lastData, i)); } - for (auto& th : threads) { + for (auto &th : threads) { th.join(); } } /** - Decrypts a single block of data using AES in CTR mode. - This function handles the decryption of a single block in CTR (Counter) mode. - It computes the counter value based on the given initialization vector (IV) and - block index, encrypts the counter, and then XORs the encrypted counter with the - input block to produce the output block. - @param input Pointer to the input block of ciphertext data (BLOCK_BYTES_LEN bytes). - @param output Pointer to the output block where the decrypted plaintext will be stored (BLOCK_BYTES_LEN bytes). - @param roundKeys Pointer to the array of round keys used for AES encryption. - @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). - @param iv Pointer to the initialization vector (IV) used for the counter. - @param blockIndex The index of the current block to be decrypted, used to compute the counter value. + * Decrypts a single block of data using AES in CTR mode. + * The decryption in CTR mode is similar to encryption. This function handles + * the decryption of a single block by computing the counter value and applying + * XOR between the encrypted counter and the ciphertext. + * @param input Pointer to the input block of ciphertext data (BLOCK_BYTES_LEN bytes). + * @param output Pointer to the output block where the decrypted plaintext will be stored. + * @param roundKeys Pointer to the array of round keys used for AES encryption. + * @param keyLength The length of the AES key being used. + * @param iv Pointer to the initialization vector (IV) used for the counter. + * @param blockIndex The index of the current block to be decrypted. */ -void decryptBlockThreadedCTR(const unsigned char* input, unsigned char* output, unsigned char* roundKeys, - AESKeyLength keyLength, const unsigned char* lastData, unsigned int blockIndex) +void decryptBlockThreadedCTR(const unsigned char *input, unsigned char *output, + unsigned char *roundKeys, AESKeyLength keyLength, + const unsigned char *lastData, + unsigned int blockIndex) { unsigned char block[BLOCK_BYTES_LEN]; unsigned char counter[BLOCK_BYTES_LEN]; @@ -277,109 +92,152 @@ void decryptBlockThreadedCTR(const unsigned char* input, unsigned char* output, memcpy(counter, lastData, BLOCK_BYTES_LEN); for (int j = BLOCK_BYTES_LEN - 1, k = blockIndex; j >= 0; --j) { - counter[j] += (k % 256); - if (counter[j] != 0) break; - k /= 256; + counter[j] += (k % 256); + if (counter[j] != 0) + break; + k /= 256; } encryptBlock(counter, block, roundKeys, keyLength); - xorBlocks(block, input, output, BLOCK_BYTES_LEN); } /** - Decrypts multiple blocks of data using AES in CTR mode with multithreading. - This function divides the input ciphertext into blocks and decrypts each block - in parallel using multiple threads in CTR (Counter) mode. The function ensures - that each block is decrypted using AES with a counter value derived from the - initialization vector (IV) and block index, and all threads are joined before completing. - @param ciphertext Pointer to the input ciphertext data to be decrypted. - @param plaintext Pointer to the buffer where the decrypted plaintext will be stored. - @param length The total length of the ciphertext data (must be a multiple of BLOCK_BYTES_LEN). - @param roundKeys Pointer to the array of round keys used for AES encryption. - @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). - @param iv Pointer to the initialization vector (IV) used for the counter. + * Decrypts multiple blocks of data using AES in CTR mode with multithreading. + * This function divides the input ciphertext into blocks and decrypts each block + * in parallel using multiple threads. Each thread is responsible for decrypting a separate block. + * @param ciphertext Pointer to the input ciphertext data to be decrypted. + * @param plaintext Pointer to the buffer where the decrypted plaintext will be stored. + * @param length The total length of the ciphertext data (must be a multiple of BLOCK_BYTES_LEN). + * @param roundKeys Pointer to the array of round keys used for AES encryption. + * @param keyLength The length of the AES key being used. + * @param iv Pointer to the initialization vector (IV) used for the counter. */ -void decryptCTRMultithreaded(const unsigned char* ciphertext, unsigned char* plaintext, unsigned int length, - unsigned char* roundKeys, AESKeyLength keyLength, const unsigned char* lastData) +void decryptCTRMultithreaded(const unsigned char *ciphertext, + unsigned char *plaintext, unsigned int length, + unsigned char *roundKeys, AESKeyLength keyLength, + const unsigned char *lastData) { unsigned int numBlocks = length / BLOCK_BYTES_LEN; - std::vector threads; + std::vector threads; - for (unsigned int i = 0; i < numBlocks; ++i) - threads.push_back(std::thread(decryptBlockThreadedCTR, &ciphertext[i * BLOCK_BYTES_LEN], - &plaintext[i * BLOCK_BYTES_LEN], roundKeys, keyLength, lastData, i)); + for (unsigned int i = 0; i < numBlocks; ++i) + threads.push_back(std::thread(decryptBlockThreadedCTR, + &ciphertext[i * BLOCK_BYTES_LEN], + &plaintext[i * BLOCK_BYTES_LEN], + roundKeys, keyLength, lastData, i)); - for (auto& th : threads) + for (auto &th : threads) th.join(); } -void AESCtr::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) +/** + * Initializes the encryption process using AES in CTR mode. + * It generates a random IV, encrypts the provided data, and stores the encrypted output. + * @param block Pointer to the input block of plaintext data. + * @param inLen Length of the input data. + * @param out Pointer to the output buffer where the encrypted data will be stored. + * @param outLen Length of the output buffer. + * @param key Pointer to the AES key. + * @param keyLength The length of the AES key being used. + */ +void AESCtr::encryptStart(unsigned char block[], unsigned int inLen, + unsigned char *out, unsigned int outLen, + unsigned char *key, AESKeyLength keyLength) { - unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; generateRandomIV(iv); memcpy(lastData, iv, BLOCK_BYTES_LEN); - encrypt(block, inLen, key, out, outLen, iv, lastData, keyLength); - unsigned char *newOut = new unsigned char[outLen + BLOCK_BYTES_LEN]; - memcpy(newOut, out, outLen); - memcpy(newOut + outLen, iv, BLOCK_BYTES_LEN); - out = newOut; - memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); - this -> key = key; - this -> keyLength = keyLength; - this-> lastData = lastData; - outLen += BLOCK_BYTES_LEN; + encrypt(block, inLen, key, out, outLen - BLOCK_BYTES_LEN, iv, lastData, + keyLength); + memcpy(out + outLen - BLOCK_BYTES_LEN, iv, BLOCK_BYTES_LEN); + memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN * 2, BLOCK_BYTES_LEN); + this->key = new unsigned char[keyLength]; + memcpy(this->key, key, keyLength); + this->keyLength = keyLength; } -void AESCtr::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) +/** + * Continues the encryption process for subsequent blocks of data using AES in CTR mode. + * @param block Pointer to the input block of plaintext data. + * @param inLen Length of the input data. + * @param out Pointer to the output buffer where the encrypted data will be stored. + * @param outLen Length of the output buffer. + */ +void AESCtr::encryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *out, unsigned int outLen) { - encrypt(block, inLen, key,out, outLen, lastData, lastData, keyLength); + encrypt(block, inLen, key, out, outLen, lastData, lastData, keyLength); memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } -void AESCtr::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) +/** + * Initializes the decryption process using AES in CTR mode. + * It extracts the IV from the input, decrypts the data, and stores the plaintext output. + * @param block Pointer to the input block of ciphertext data. + * @param inLen Length of the input data. + * @param out Pointer to the output buffer where the decrypted data will be stored. + * @param outLen Reference to store the length of the decrypted data. + * @param key Pointer to the AES key. + * @param keyLength The length of the AES key being used. + */ +void AESCtr::decryptStart(unsigned char block[], unsigned int inLen, + unsigned char *out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength) { - unsigned char* lastData = new unsigned char[BLOCK_BYTES_LEN]; - memcpy(lastData, iv, BLOCK_BYTES_LEN); - this-> iv = block + inLen - BLOCK_BYTES_LEN; - decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, lastData, keyLength); -memcpy(lastBlock, block + inLen - 2*BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); - this->lastData = lastData; + memcpy(lastData, iv, BLOCK_BYTES_LEN); + memcpy(iv, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); + decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, + block + inLen - BLOCK_BYTES_LEN, lastData, keyLength); + memcpy(lastBlock, block + inLen - 2 * BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } -void AESCtr::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) +/** + * Continues the decryption process for subsequent blocks of data using AES in CTR mode. + * @param block Pointer to the input block of ciphertext data. + * @param inLen Length of the input data. + * @param out Pointer to the output buffer where the decrypted data will be stored. + * @param outLen Reference to store the length of the decrypted data. + */ +void AESCtr::decryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *out, unsigned int &outLen) { - decrypt(block, inLen , key, out, outLen, lastData, lastData, keyLength); - memcpy(lastBlock, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); - + decrypt(block, inLen, key, out, outLen, lastBlock, lastData, keyLength); + memcpy(lastBlock, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } void AESCtr::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) + unsigned char *out, unsigned int outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength) { + size_t paddedLength = getPaddedLength(inLen); + unsigned char *paddedIn = new unsigned char[paddedLength]; + padMessage(in, inLen, paddedIn); - padMessage(in, inLen, outLen); - out = new unsigned char[outLen]; - - unsigned char* roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * + NUM_BLOCKS * AES_STATE_ROWS]; keyExpansion(key, roundKeys, keyLength); - encryptCTRMultithreaded(in, out, outLen, roundKeys, keyLength, iv); - - delete[] roundKeys; + encryptCTRMultithreaded(paddedIn, out, outLen, roundKeys, keyLength, iv); + delete[] paddedIn; + delete[] roundKeys; } void AESCtr::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) + unsigned char *out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength) { - checkLength(inLen); + checkLength(inLen); outLen = inLen; - out = new unsigned char[outLen]; - unsigned char* roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * AES_STATE_ROWS]; + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * + NUM_BLOCKS * AES_STATE_ROWS]; keyExpansion(key, roundKeys, keyLength); decryptCTRMultithreaded(in, out, outLen, roundKeys, keyLength, iv); - - delete[] roundKeys; + outLen = getUnpadMessageLength(out, inLen); + delete[] roundKeys; } \ No newline at end of file diff --git a/src/aes_ecb.cpp b/src/aes_ecb.cpp index 49118238..986f904b 100644 --- a/src/aes_ecb.cpp +++ b/src/aes_ecb.cpp @@ -1,153 +1,20 @@ -// #include "../include/aes_stream.h" -// #include -// #include -// #include - -// /** -// Encrypts a single block of data using AES in ECB mode. -// This function wraps the `encryptBlock` function to allow it to be used -// in a threaded context. It performs AES encryption on a single block of -// plaintext using the provided round keys and key length. -// @param in Pointer to the input block of plaintext data (BLOCK_BYTES_LEN bytes). -// @param out Pointer to the output block where the encrypted ciphertext will be stored (BLOCK_BYTES_LEN bytes). -// @param roundKeys Pointer to the array of round keys used for AES encryption. -// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). -// */ -// void encryptBlockThreadedECB(const unsigned char in[], unsigned char out[], unsigned char* roundKeys, AESKeyLength keyLength) -// { -// encryptBlock(in, out, roundKeys, keyLength); -// } - -// /** -// Encrypts multiple blocks of data using AES in ECB mode with multithreading. -// This function divides the input plaintext into blocks and encrypts each block -// in parallel using multiple threads. The function ensures that each block is -// encrypted using AES in ECB mode, and all threads are joined before completing. -// @param plaintext Pointer to the input plaintext data to be encrypted. -// @param ciphertext Pointer to the buffer where the encrypted ciphertext will be stored. -// @param length The total length of the plaintext data (must be a multiple of BLOCK_BYTES_LEN). -// @param roundKeys Pointer to the array of round keys used for AES encryption. -// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). -// */ -// void encryptECBMultithreaded(const unsigned char* plaintext, unsigned char* ciphertext, unsigned int length, unsigned char* roundKeys, AESKeyLength keyLength) -// { -// unsigned int numBlocks = length / BLOCK_BYTES_LEN; -// std::vector threads; - -// for (unsigned int i = 0; i < numBlocks; ++i) { -// threads.push_back(std::thread(encryptBlockThreadedECB, &plaintext[i * BLOCK_BYTES_LEN], &ciphertext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); -// } - -// for (auto& th : threads) { -// th.join(); -// } -// } - -// /** -// Decrypts a single block of data using AES in ECB mode. -// This function wraps the `decryptBlock` function to allow it to be used -// in a threaded context. It performs AES decryption on a single block of -// ciphertext using the provided round keys and key length. -// @param input Pointer to the input block of ciphertext data (BLOCK_BYTES_LEN bytes). -// @param output Pointer to the output block where the decrypted plaintext will be stored (BLOCK_BYTES_LEN bytes). -// @param roundKeys Pointer to the array of round keys used for AES decryption. -// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). -// */ -// void decryptBlockThreadedECB(const unsigned char* input, unsigned char* output, unsigned char* roundKeys, -// AESKeyLength keyLength) -// { -// decryptBlock(input, output, roundKeys, keyLength); -// } - -// /** -// Decrypts multiple blocks of data using AES in ECB mode with multithreading. -// This function divides the input ciphertext into blocks and decrypts each block -// in parallel using multiple threads in ECB (Electronic Codebook) mode. The function -// ensures that each block is decrypted using AES with the provided round keys, and -// all threads are joined before completing. -// @param ciphertext Pointer to the input ciphertext data to be decrypted. -// @param plaintext Pointer to the buffer where the decrypted plaintext will be stored. -// @param length The total length of the ciphertext data (must be a multiple of BLOCK_BYTES_LEN). -// @param roundKeys Pointer to the array of round keys used for AES decryption. -// @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). -// */ -// void decryptECBMultithreaded(const unsigned char* ciphertext, unsigned char* plaintext, unsigned int length, -// unsigned char* roundKeys, AESKeyLength keyLength) -// { -// unsigned int numBlocks = length / BLOCK_BYTES_LEN; -// std::vector threads; - -// for (unsigned int i = 0; i < numBlocks; i++) -// threads.push_back(std::thread(decryptBlockThreadedECB, &ciphertext[i * BLOCK_BYTES_LEN], -// &plaintext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); - -// for (auto& th : threads) -// th.join(); -// } - -// void AESEcb::encryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen,unsigned char* key, AESKeyLength keyLength) -// { -// encrypt(block, inLen, key, out, outLen, nullptr,nullptr, keyLength); -// this -> key = key; -// this -> keyLength = keyLength; -// } - -// void AESEcb::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen) -// { -// encrypt(block, inLen, key,out, outLen, nullptr, nullptr, keyLength); -// } - -// void AESEcb::decryptStart(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int &outLen,unsigned char* key, AESKeyLength keyLength) -// { -// decrypt(block, inLen , key, out, outLen, nullptr, nullptr, keyLength); -// } - -// void AESEcb::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) -// { -// decrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); -// } - -// void AESEcb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen,const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) -// { -// padMessage(in, inLen, outLen); -// unsigned char block[BLOCK_BYTES_LEN]; -// out = new unsigned char[outLen]; -// unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; -// keyExpansion(key, roundKeys, keyLength); -// for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { -// memcpy(block, in + i, BLOCK_BYTES_LEN); -// encryptECBMultithreaded(block, out + i, BLOCK_BYTES_LEN, roundKeys, keyLength); -// } -// delete[] roundKeys; -// } - -// void AESEcb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, -// unsigned char *&out, unsigned int &outLen,const unsigned char *iv, unsigned char *lastData,AESKeyLength keyLength) -// { -// checkLength(inLen); -// outLen = inLen; -// out = new unsigned char[outLen]; -// unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; -// keyExpansion(key, roundKeys, keyLength); -// for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) -// decryptECBMultithreaded(in, out, outLen, roundKeys, keyLength); -// unpadMessage(out, outLen); -// delete[] roundKeys; -// } #include "../include/aes_stream.h" #include #include #include +#include "../include/aes_stream.h" + /** - Encrypts a single block of data using AES in ECB mode. - This function wraps the `encryptBlock` function to allow it to be used - in a threaded context. It performs AES encryption on a single block of - plaintext using the provided round keys and key length. - @param in Pointer to the input block of plaintext data (BLOCK_BYTES_LEN bytes). - @param out Pointer to the output block where the encrypted ciphertext will be stored (BLOCK_BYTES_LEN bytes). - @param roundKeys Pointer to the array of round keys used for AES encryption. - @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + * @brief Encrypts a single block of data using AES in ECB mode. + * + * This function wraps the `encryptBlock` function to allow it to be used + * in a threaded context. It performs AES encryption on a single block of + * plaintext using the provided round keys and key length. + * + * @param in Pointer to the input block of plaintext data (BLOCK_BYTES_LEN bytes). + * @param out Pointer to the output block where the encrypted ciphertext will be stored (BLOCK_BYTES_LEN bytes). + * @param roundKeys Pointer to the array of round keys used for AES encryption. + * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). */ void encryptBlockThreadedECB(const unsigned char in[], unsigned char out[], unsigned char *roundKeys, AESKeyLength keyLength) @@ -156,15 +23,17 @@ void encryptBlockThreadedECB(const unsigned char in[], unsigned char out[], } /** - Encrypts multiple blocks of data using AES in ECB mode with multithreading. - This function divides the input plaintext into blocks and encrypts each block - in parallel using multiple threads. The function ensures that each block is - encrypted using AES in ECB mode, and all threads are joined before completing. - @param plaintext Pointer to the input plaintext data to be encrypted. - @param ciphertext Pointer to the buffer where the encrypted ciphertext will be stored. - @param length The total length of the plaintext data (must be a multiple of BLOCK_BYTES_LEN). - @param roundKeys Pointer to the array of round keys used for AES encryption. - @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + * @brief Encrypts multiple blocks of data using AES in ECB mode with multithreading. + * + * This function divides the input plaintext into blocks and encrypts each block + * in parallel using multiple threads. The function ensures that each block is + * encrypted using AES in ECB mode, and all threads are joined before completing. + * + * @param plaintext Pointer to the input plaintext data to be encrypted. + * @param ciphertext Pointer to the buffer where the encrypted ciphertext will be stored. + * @param length The total length of the plaintext data (must be a multiple of BLOCK_BYTES_LEN). + * @param roundKeys Pointer to the array of round keys used for AES encryption. + * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). */ void encryptECBMultithreaded(const unsigned char *plaintext, unsigned char *ciphertext, unsigned int length, @@ -172,7 +41,6 @@ void encryptECBMultithreaded(const unsigned char *plaintext, { unsigned int numBlocks = length / BLOCK_BYTES_LEN; std::vector threads; - for (unsigned int i = 0; i < numBlocks; ++i) { threads.push_back(std::thread( encryptBlockThreadedECB, &plaintext[i * BLOCK_BYTES_LEN], @@ -185,14 +53,16 @@ void encryptECBMultithreaded(const unsigned char *plaintext, } /** - Decrypts a single block of data using AES in ECB mode. - This function wraps the `decryptBlock` function to allow it to be used - in a threaded context. It performs AES decryption on a single block of - ciphertext using the provided round keys and key length. - @param input Pointer to the input block of ciphertext data (BLOCK_BYTES_LEN bytes). - @param output Pointer to the output block where the decrypted plaintext will be stored (BLOCK_BYTES_LEN bytes). - @param roundKeys Pointer to the array of round keys used for AES decryption. - @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + * @brief Decrypts a single block of data using AES in ECB mode. + * + * This function wraps the `decryptBlock` function to allow it to be used + * in a threaded context. It performs AES decryption on a single block of + * ciphertext using the provided round keys and key length. + * + * @param input Pointer to the input block of ciphertext data (BLOCK_BYTES_LEN bytes). + * @param output Pointer to the output block where the decrypted plaintext will be stored (BLOCK_BYTES_LEN bytes). + * @param roundKeys Pointer to the array of round keys used for AES decryption. + * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). */ void decryptBlockThreadedECB(const unsigned char *input, unsigned char *output, unsigned char *roundKeys, AESKeyLength keyLength) @@ -201,16 +71,18 @@ void decryptBlockThreadedECB(const unsigned char *input, unsigned char *output, } /** - Decrypts multiple blocks of data using AES in ECB mode with multithreading. - This function divides the input ciphertext into blocks and decrypts each block - in parallel using multiple threads in ECB (Electronic Codebook) mode. The function - ensures that each block is decrypted using AES with the provided round keys, and - all threads are joined before completing. - @param ciphertext Pointer to the input ciphertext data to be decrypted. - @param plaintext Pointer to the buffer where the decrypted plaintext will be stored. - @param length The total length of the ciphertext data (must be a multiple of BLOCK_BYTES_LEN). - @param roundKeys Pointer to the array of round keys used for AES decryption. - @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + * @brief Decrypts multiple blocks of data using AES in ECB mode with multithreading. + * + * This function divides the input ciphertext into blocks and decrypts each block + * in parallel using multiple threads in ECB (Electronic Codebook) mode. The function + * ensures that each block is decrypted using AES with the provided round keys, and + * all threads are joined before completing. + * + * @param ciphertext Pointer to the input ciphertext data to be decrypted. + * @param plaintext Pointer to the buffer where the decrypted plaintext will be stored. + * @param length The total length of the ciphertext data (must be a multiple of BLOCK_BYTES_LEN). + * @param roundKeys Pointer to the array of round keys used for AES decryption. + * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). */ void decryptECBMultithreaded(const unsigned char *ciphertext, unsigned char *plaintext, unsigned int length, @@ -218,7 +90,6 @@ void decryptECBMultithreaded(const unsigned char *ciphertext, { unsigned int numBlocks = length / BLOCK_BYTES_LEN; std::vector threads; - for (unsigned int i = 0; i < numBlocks; i++) threads.push_back(std::thread( decryptBlockThreadedECB, &ciphertext[i * BLOCK_BYTES_LEN], @@ -228,72 +99,124 @@ void decryptECBMultithreaded(const unsigned char *ciphertext, th.join(); } +/** + * @brief Starts AES encryption in ECB mode. + * + * This function initializes the encryption process by encrypting the first block of data + * and storing the encryption key for further use. + * + * @param block The input plaintext block to encrypt. + * @param inLen The length of the input data. + * @param out The buffer to store the encrypted output. + * @param outLen The length of the encrypted output. + * @param key The encryption key. + * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + */ void AESEcb::encryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, unsigned char *key, AESKeyLength keyLength) { encrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); - this->key = new unsigned char[aesKeyLengthData[keyLength].keySize]; - - // Copy the data from the provided key - memcpy(this->key, key, aesKeyLengthData[keyLength].keySize); - - // Set the key length + this->key = new unsigned char[keyLength]; + memcpy(this->key, key, keyLength); this->keyLength = keyLength; } +/** + * @brief Continues AES encryption in ECB mode. + * + * This function continues the encryption process for additional blocks + * after the encryption has been started with `encryptStart`. + * + * @param block The input plaintext block to encrypt. + * @param inLen The length of the input data. + * @param out The buffer to store the encrypted output. + * @param outLen The length of the encrypted output. + */ void AESEcb::encryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen) + unsigned char *out, unsigned int outLen) { encrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); } +/** + * @brief Starts AES decryption in ECB mode. + * + * This function initializes the decryption process by decrypting the first block of data + * and storing the decryption key for further use. + * + * @param block The input ciphertext block to decrypt. + * @param inLen The length of the input data. + * @param out The buffer to store the decrypted output. + * @param outLen The length of the decrypted output. + * @param key The decryption key. + * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + */ void AESEcb::decryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int &outLen, unsigned char *key, AESKeyLength keyLength) { decrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); } +/** + * @brief Continues AES decryption in ECB mode. + * + * This function continues the decryption process for additional blocks + * after the decryption has been started with `decryptStart`. + * + * @param block The input ciphertext block to decrypt. + * @param inLen The length of the input data. + * @param out The buffer to store the decrypted output. + * @param outLen The length of the decrypted output. + */ void AESEcb::decryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen) + unsigned char *out, unsigned int &outLen) { decrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); } +/** + * @brief Encrypts data using AES in ECB mode. + * + * This function performs AES encryption on the input data, applying necessary padding. + * It uses multithreading to encrypt each block of data in parallel. + * + * @param in The input plaintext data. + * @param inLen The length of the input data. + * @param key The encryption key. + * @param out The buffer to store the encrypted output. + * @param outLen The length of the encrypted output. + * @param iv Unused in ECB mode. + * @param lastData Unused in ECB mode. + * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + */ void AESEcb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) { - padMessage(in, inLen, outLen); + size_t paddedLength = getPaddedLength(inLen); + unsigned char *paddedIn = new unsigned char[paddedLength]; + padMessage(in, inLen, paddedIn); unsigned char block[BLOCK_BYTES_LEN]; - unsigned char *roundKeys = - new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * - NUM_BLOCKS * 4]; - keyExpansion(key, roundKeys, keyLength); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { - memcpy(block, in + i, BLOCK_BYTES_LEN); - encryptECBMultithreaded(block, out + i, BLOCK_BYTES_LEN, roundKeys, - keyLength); - } - delete[] roundKeys; + memcpy(block, paddedIn, BLOCK_BYTES_LEN); + encryptECBMultithreaded(paddedIn, out, paddedLength, key, keyLength); } void AESEcb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) { checkLength(inLen); outLen = inLen; - out = new unsigned char[outLen]; unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * NUM_BLOCKS * 4]; keyExpansion(key, roundKeys, keyLength); for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) decryptECBMultithreaded(in, out, outLen, roundKeys, keyLength); - unpadMessage(out, outLen); + outLen = getUnpadMessageLength(out, inLen); delete[] roundKeys; } \ No newline at end of file diff --git a/src/aes_ofb.cpp b/src/aes_ofb.cpp index 2949df95..5620919d 100644 --- a/src/aes_ofb.cpp +++ b/src/aes_ofb.cpp @@ -2,64 +2,53 @@ #include "../include/aes_stream.h" void AESOfb::encryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, unsigned char *key, AESKeyLength keyLength) { - unsigned char *lastData = new unsigned char[BLOCK_BYTES_LEN]; generateRandomIV(iv); memcpy(lastData, iv, BLOCK_BYTES_LEN); - encrypt(block, inLen, key, out, outLen, iv, lastData, keyLength); - unsigned char *newOut = new unsigned char[outLen + BLOCK_BYTES_LEN]; - memcpy(newOut, out, outLen); - memcpy(newOut + outLen, iv, BLOCK_BYTES_LEN); - memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); - out = newOut; - this->key = new unsigned char[aesKeyLengthData[keyLength].keySize]; - - // Copy the data from the provided key - memcpy(this->key, key, aesKeyLengthData[keyLength].keySize); - - // Set the key length + encrypt(block, inLen, key, out, outLen - BLOCK_BYTES_LEN, iv, lastData, + keyLength); + memcpy(out + outLen - BLOCK_BYTES_LEN, iv, BLOCK_BYTES_LEN); + memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN * 2, BLOCK_BYTES_LEN); + this->key = new unsigned char[keyLength]; + memcpy(this->key, key, keyLength); this->keyLength = keyLength; - this->lastData = lastData; - outLen += BLOCK_BYTES_LEN; } void AESOfb::encryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen) + unsigned char *out, unsigned int outLen) { encrypt(block, inLen, key, out, outLen, lastBlock, lastData, keyLength); memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } void AESOfb::decryptStart(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int &outLen, unsigned char *key, AESKeyLength keyLength) { - unsigned char *lastData = new unsigned char[BLOCK_BYTES_LEN]; memcpy(lastData, iv, BLOCK_BYTES_LEN); - this->iv = block + inLen - BLOCK_BYTES_LEN; + memcpy(iv, block + inLen - BLOCK_BYTES_LEN,BLOCK_BYTES_LEN); decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, lastData, keyLength); - memcpy(lastBlock, block + inLen - 2*BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); - this->lastData = lastData; + memcpy(lastBlock, block + inLen - 2 * BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } void AESOfb::decryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *&out, unsigned int &outLen) + unsigned char *out, unsigned int &outLen) { decrypt(block, inLen, key, out, outLen, lastBlock, lastData, keyLength); memcpy(lastBlock, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); - } void AESOfb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) { - padMessage(in, inLen, outLen); - out = new unsigned char[outLen]; + size_t paddedLength = getPaddedLength(inLen); + unsigned char *paddedIn = new unsigned char[paddedLength]; + padMessage(in, inLen, paddedIn); unsigned char block[BLOCK_BYTES_LEN]; unsigned char feedback[BLOCK_BYTES_LEN]; unsigned char *roundKeys = @@ -69,24 +58,24 @@ void AESOfb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, memcpy(feedback, lastData, BLOCK_BYTES_LEN); for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { encryptBlock(feedback, block, roundKeys, keyLength); - xorBlocks(in + i, block, out + i, BLOCK_BYTES_LEN); + xorBlocks(paddedIn + i, block, out + i, BLOCK_BYTES_LEN); for (unsigned int j = 0; j < BLOCK_BYTES_LEN; ++j) - out[i + j] = in[i + j] ^ block[j]; + out[i + j] = paddedIn[i + j] ^ block[j]; memcpy(feedback, block, BLOCK_BYTES_LEN); memcpy(lastData, feedback, BLOCK_BYTES_LEN); } + delete[] paddedIn; delete[] roundKeys; } void AESOfb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *&out, unsigned int &outLen, + unsigned char *out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, AESKeyLength keyLength) { checkLength(inLen); unsigned char block[BLOCK_BYTES_LEN]; outLen = inLen; - out = new unsigned char[outLen]; unsigned char feedback[BLOCK_BYTES_LEN]; unsigned char *roundKeys = new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * @@ -99,6 +88,6 @@ void AESOfb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, memcpy(feedback, block, BLOCK_BYTES_LEN); memcpy(lastData, feedback, BLOCK_BYTES_LEN); } - unpadMessage(out, outLen); + outLen = getUnpadMessageLength(out, inLen); delete[] roundKeys; } \ No newline at end of file diff --git a/src/aes_stream_factory.cpp b/src/aes_stream_factory.cpp deleted file mode 100644 index ed1a3d67..00000000 --- a/src/aes_stream_factory.cpp +++ /dev/null @@ -1,16 +0,0 @@ - #include "../include/aes_stream_factory.h" - FactoryManager FactoryManager::instance; - - FactoryManager& FactoryManager::getInstance() - { - return instance; - } - - StreamAES* FactoryManager::create(const AESChainingMode& type) const - { - auto it = factories.find(type); - if (it != factories.end()) - return it->second; - - return nullptr; - } \ No newline at end of file diff --git a/src/threads-version/big_int64.cpp b/src/big_int64.cpp similarity index 51% rename from src/threads-version/big_int64.cpp rename to src/big_int64.cpp index 3457c13b..267a078e 100644 --- a/src/threads-version/big_int64.cpp +++ b/src/big_int64.cpp @@ -1,11 +1,839 @@ +#include +#include #include #include -#include -#include -#include "big_int64.h" -#include "big_int_utils.h" +#include +#include "../include/big_int64.h" + using namespace std; +#ifdef USE_SYCL +BigInt64::BigInt64(const string &str) +{ + initFromString(str.c_str(), str.size()); +} + +BigInt64::BigInt64(const char *str) +{ + initFromString(str, std::strlen(str)); +} + +BigInt64::BigInt64(const uint8_t *str, size_t strLen, CreateModes mode) + : isNegative(false) +{ + if (strLen == 0) { + size = 1; + limbs[0] = 0; + return; + } + int fullLimbs = strLen / BYTES_IN_LIMB; + int msbParts = strLen % BYTES_IN_LIMB; + int limbsCnt = fullLimbs + (msbParts + BYTES_IN_LIMB - 1) / BYTES_IN_LIMB; + size = limbsCnt; + if (mode == CreateModes::LITTLE_ENDIANESS) { + for (int i = 0; i < fullLimbs; i++) { + int index = strLen - 1 - i * BYTES_IN_LIMB; + // little endian-> {0,1,2,3,4,5,6,7} becones 0x 07 06 05 04 03 02 01 00 + limbs[i] = ((static_cast(str[index]) << 56) | + (static_cast(str[index - 1]) << 48) | + (static_cast(str[index - 2]) << 40) | + (static_cast(str[index - 3]) << 32) | + (static_cast(str[index - 4]) << 24) | + (static_cast(str[index - 5]) << 16) | + (static_cast(str[index - 6]) << 8) | + static_cast(str[index - 7])); + } + if (msbParts != 0) { + uint64_t msb = 0; + for (int i = 0; i < msbParts; i++) { + msb |= static_cast(str[i]) << (i * BITS_IN_BYTE); + } + limbs[size++] = msb; + } + } + else { + // big endian-> {0,1,2,3,4,5,6,7} becones 0x 00 01 02 03 04 05 06 07 + for (int i = 0; i < fullLimbs; i++) { + int index = strLen - 1 - i * BYTES_IN_LIMB; + limbs[i] = (static_cast(str[index]) | + (static_cast(str[index - 1]) << 8) | + (static_cast(str[index - 2]) << 16) | + (static_cast(str[index - 3]) << 24) | + (static_cast(str[index - 4]) << 32) | + (static_cast(str[index - 5]) << 40) | + (static_cast(str[index - 6]) << 48) | + (static_cast(str[index - 7]) << 56)); + } + if (msbParts != 0) { + uint64_t msb = 0; + for (int i = 0; i < msbParts; i++) { + msb |= static_cast(str[msbParts - 1 - i]) + << (i * BITS_IN_BYTE); + } + limbs[size++] = msb; + } + } + removeLeadingZeros(); +} + +BigInt64::BigInt64(CreateModes mode, int bits) : isNegative(false) +{ + if (bits >= BITS_IN_LIMB) + generateNLimbsRandom(bits / BITS_IN_LIMB); + bits = bits % BITS_IN_LIMB; // 0-63 + if (bits != 0) { + uint64_t one = static_cast(1); + limbs[size++] = randomLimb(0, (one << bits) - 1) | (one << (bits - 1)); + } + else + limbs[size - 1] |= 0x8000000000000000ULL; +} + +BigInt64::BigInt64(CreateModes mode, uint64_t min, const BigInt64 &max) + : size(0), isNegative(false) +{ + if (max.isSmallerThanUnsigned(min)) + throw invalid_argument("min must be <= max"); + + if (max.limbsCount() == 1) { + uint64_t number = randomLimb(min, max.limbs[max.size - 1]); + limbs[size++] = number; + } + else { + generateNLimbsRandom(max.limbsCount() - 1); + uint64_t number = randomLimb(0, max.limbs[max.size - 1]); + limbs[size++] = number; + removeLeadingZeros(); + } +} + +BigInt64::BigInt64(bool isNegative) : BigInt64(0) +{ + this->isNegative = isNegative; +} + +BigInt64::BigInt64(uint64_t uval) : size(0) +{ + isNegative = false; + limbs[size++] = uval; +} + +bool BigInt64::operator==(const BigInt64 &b) const +{ + if (isNegative != b.isNegative || size != b.size) + return false; + + for (int i = 0; i < size; i++) + if (limbs[i] != b.limbs[i]) + return false; + + return true; +} + +bool BigInt64::operator!=(const BigInt64 &b) const +{ + return !(*this == b); +} + +bool BigInt64::operator<(const BigInt64 &b) const +{ + if (isNegative && !b.isNegative) + return true; + + if (!isNegative && b.isNegative) + return false; + + // same sign + if (isNegative) + return b.isSmallerThanUnsigned(*this); + + else + return isSmallerThanUnsigned(b); +} + +bool BigInt64::operator>(const BigInt64 &b) const +{ + return b < *this; +} + +bool BigInt64::operator<=(const BigInt64 &b) const +{ + return !(b < *this); +} + +bool BigInt64::operator>=(const BigInt64 &b) const +{ + return !(*this < b); +} + +BigInt64 &BigInt64::operator++() +{ + if (!isNegative) + prefixPlusPlusUnsigned(); + else { + prefixMinusMinusUnsigned(); + if (isZero()) + //-1 -> 0 + isNegative = false; + } + + return *this; +} + +BigInt64 BigInt64::operator++(int) +{ + BigInt64 temp = *this; + ++*this; + return temp; +} + +BigInt64 &BigInt64::operator--() +{ + if (isNegative) + prefixPlusPlusUnsigned(); + else { + if (isZero()) { + // 0 -> -1 + limbs[0] = 1; + isNegative = true; + } + else + prefixMinusMinusUnsigned(); + } + return *this; +} + +BigInt64 BigInt64::operator--(int) +{ + BigInt64 temp = *this; + --*this; + return temp; +} + +BigInt64 &BigInt64::operator+=(const BigInt64 &b) +{ + if (isNegative == b.isNegative) // same sign + addUnsigned(b); + else { + if ((isNegative && !b.isSmallerThanUnsigned(*this)) || + (!isNegative && isSmallerThanUnsigned(b))) { + // -3 + +4/-3 + +3 || +3 + -4 + thisEqualsbBSubthis(b); + isNegative = b.isNegative; + } + else // -4 + +3 || +3 + -3 / +4 + -3 + subtractUnsigned(b); // this-=b + } + return *this; +} + +BigInt64 BigInt64::operator+(const BigInt64 &b) const +{ + BigInt64 c(*this); + c += b; + return c; +} + +BigInt64 &BigInt64::operator-=(const BigInt64 &b) +{ + if (isNegative != b.isNegative) // -this - +b / +a - -b + addUnsigned(b); + else { + if ((isNegative && !b.isSmallerThanUnsigned(*this)) || + (!isNegative && (isSmallerThanUnsigned(b)))) { + // -3 - -4/ -4 - -4 || +3 - +7 + thisEqualsbBSubthis(b); + isNegative = !b.isNegative; + } + else // -4 - -3 ||+4 - +3/ +3 - +3 + subtractUnsigned(b); // this-=b + } + + return *this; +} + +BigInt64 BigInt64::operator-(const BigInt64 &b) const +{ + BigInt64 c(*this); + c -= b; + return c; +} + +BigInt64 &BigInt64::operator*=(const BigInt64 &b) +{ + longMultiplication(b); + return *this; +} + +BigInt64 BigInt64::operator*(const BigInt64 &b) const +{ + BigInt64 c(*this); + c *= b; + return c; +} + +BigInt64 &BigInt64::operator/=(const BigInt64 &b) +{ + BigInt64 remainder, quotient; + longDivision(b, remainder, quotient); + *this = quotient; + return *this; +} + +BigInt64 BigInt64::operator/(const BigInt64 &b) const +{ + BigInt64 c(*this); + c /= b; + return c; +} + +BigInt64 &BigInt64::operator%=(const BigInt64 &b) +{ + BigInt64 remainder, quotient; + longDivision(b, remainder, quotient); + if (isNegative != b.isNegative) + *this = b - remainder; + else + *this = remainder; + return *this; +} + +BigInt64 BigInt64::operator%(const BigInt64 &b) const +{ + BigInt64 c(*this); + c %= b; + return c; +} + +BigInt64 &BigInt64::operator^=(const BigInt64 &b) +{ + *this = power(*this, b); + return *this; +} + +BigInt64 BigInt64::operator^(const BigInt64 &b) const +{ + BigInt64 c(*this); + c ^= b; + return c; +} + +BigInt64 &BigInt64::operator>>=(uint64_t n) +{ + rightShift(n); + return *this; +} + +BigInt64 BigInt64::operator>>(uint64_t n) const +{ + BigInt64 c(*this); + c >>= n; + return c; +} + +BigInt64 &BigInt64::operator<<=(uint64_t n) +{ + leftShift(n); + return *this; +} + +BigInt64 BigInt64::operator<<(uint64_t n) const +{ + BigInt64 c(*this); + c <<= n; + return c; +} + +std::ostream &operator<<(std::ostream &out, const BigInt64 &a) +{ + if (a.limbsCount() == 1) { + if (a.isNegative) + out << "-"; + out << a.limbs[0]; + } + + else { + BigInt10 decimal = a.toDecimal(); + out << decimal; + } + + return out; +} + +bool BigInt64::isSmallerThanUnsigned(const BigInt64 &b) const +{ + if (limbsCount() > b.limbsCount()) + // a is longer + return false; + + if (limbsCount() < b.limbsCount()) + // b is longer + return true; + + // same length + for (int i = limbsCount() - 1; i >= 0; i--) + if (limbs[i] != b.limbs[i]) + return limbs[i] < b.limbs[i]; + + // they are equal + return false; +} + +void BigInt64::prefixPlusPlusUnsigned() +{ + int i, n = limbsCount(); + // zero alll the MAX_VAL_64 lsb's + for (i = 0; i < n && limbs[i] == MAX_VAL_64; i++) { + limbs[i] = 0; + } + if (i == n) + // it was all MAX_VAL_64 + limbs[size++] = 1; + else + limbs[i]++; +} + +void BigInt64::prefixMinusMinusUnsigned() +{ + if (isZero()) + return; + + int i = 0, n = limbsCount(); + // starting zeros case 0 0 0 X + while (i < n && limbs[i] == 0) { + limbs[i] = MAX_VAL_64; + i++; + } + limbs[i]--; // subtruct the first valid limb + // remove leading zero if exists + if (limbs[i] == 0 && i != 0) + size--; +} + +void BigInt64::addUnsigned(const BigInt64 &b) +{ + int n = limbsCount(), m = b.limbsCount(); + uint64_t carry = 0; //(1/0) + uint64_t bLimb; + if (n < m) { + setLimbs(0, m - n, 1, m); + n = m; + } + for (int i = 0; i < n; i++) { + bLimb = i < m ? b.limbs[i] : 0; + adder3_64(limbs[i], bLimb, carry, limbs[i], carry); + } + if (carry == 1) + limbs[size++] = carry; +} + +void BigInt64::subtractUnsigned(const BigInt64 &b) +{ + if (this->isSmallerThanUnsigned(b)) + // make sure this>=b; + return; + + int n = limbsCount(), m = b.limbsCount(); + int borrow = 0; //(1/0) + uint64_t bLimb; + + for (int i = 0; i < n; i++) { + bLimb = i < m ? b.limbs[i] : 0; + if ((borrow == 1 && limbs[i] == 0) || (limbs[i] - borrow < bLimb)) { + // need to borrow from next limb + limbs[i] = limbs[i] + toBase64(bLimb) - borrow; + borrow = 1; + } + else { + limbs[i] = limbs[i] - bLimb - borrow; + borrow = 0; + } + } + removeLeadingZeros(); +} + +void BigInt64::longMultiplication(const BigInt64 &b) +{ + if (isZero() || b.isZero()) { + zero(); + return; + } + int n = limbsCount(), m = b.limbsCount(); + uint64_t result[200] = {0}; + uint64_t high, low, carry; + + for (int i = 0; i < n; i++) { + carry = 0; + for (int j = 0; j < m; j++) { + mul2Limbs64(limbs[i], b.limbs[j], high, low); + adder3_64(low, result[i + j], carry, result[i + j], carry); + carry += high; + } + result[i + m] = carry; + } + size = m + n; + copyLimbsFrom(result, 0, size, 0, size); + removeLeadingZeros(); + isNegative = isNegative != b.isNegative; +} + +std::string BigInt64::toString() const +{ + std::ostringstream oss; + oss << *this; + return oss.str(); +} + +void BigInt64::exportTo(uint8_t *out, size_t outLen, CreateModes mode) const +{ + if (outLen < bytesCount()) + throw std::runtime_error("Not enough space in output buffer"); + + if (mode == CreateModes::LITTLE_ENDIANESS) + for (int i = 0; i < limbsCount(); i++) + for (int j = 0; j < BYTES_IN_LIMB; j++) + out[outLen - 1 - i * BYTES_IN_LIMB - (7 - j)] = + static_cast(limbs[i] >> (j * BITS_IN_BYTE)); + else + for (int i = 0; i < limbsCount(); i++) + for (int j = 0; j < BYTES_IN_LIMB; j++) + out[outLen - 1 - i * BYTES_IN_LIMB - j] = + static_cast(limbs[i] >> (j * BITS_IN_BYTE)); +} + +int BigInt64::bitsCount() const +{ + if (isZero()) + return 0; + + uint64_t mostSignificantLimb = limbs[size - 1]; + int inMsb = ::bitsCount(mostSignificantLimb); + return inMsb + (limbsCount() - 1) * BITS_IN_LIMB; +} + +void BigInt64::thisEqualsbBSubthis(const BigInt64 &b) +{ + BigInt64 copyB(b); + copyB.subtractUnsigned(*this); + *this = std::move(copyB); +} + +void BigInt64::removeLeadingZeros() +{ + while (size > 1 && limbs[size - 1] == 0) + size--; +} + +void BigInt64::insert(int n, uint64_t limb) +{ + for (int i = size - 1; i >= 0; i--) + limbs[i + n] = limbs[i]; + for (int i = 0; i < n; i++) + limbs[i] = limb; + size += n; +} + +void BigInt64::erase(int n) +{ + for (int i = 0; i < n; i++) + limbs[i] = limbs[i + n]; + size -= n; +} + +void BigInt64::generateNLimbsRandom(int limbsCnt) +{ + if (limbsCnt < 1) + throw std::invalid_argument("limbsCnt less than 1"); + + std::random_device rd; + std::mt19937_64 gen(rd()); + std::uniform_int_distribution distrib(0, UINT64_MAX); + size = limbsCnt; + + for (int i = 0; i < limbsCnt; i++) { + uint64_t number = distrib(gen); + limbs[i] = number; + } +} + +uint64_t BigInt64::randomLimb(uint64_t min, uint64_t max) +{ + if (min > max) + throw std::invalid_argument("cant random limb"); + + std::random_device rd; + std::mt19937_64 gen(rd()); + std::uniform_int_distribution distrib(min, max); + return distrib(gen); +} + +void BigInt64::zero() +{ + size = 1; + limbs[0] = 0; + isNegative = false; +} + +bool BigInt64::hasLeadingZero() +{ + return limbs[size - 1] == 0 && limbsCount() > 1; +} + +void BigInt64::copyLimbsFrom(const uint64_t *other, size_t otherStart, + size_t count, size_t meStart, size_t newSize) +{ + for (int i = 0; i < count; i++) + limbs[meStart + i] = other[otherStart + i]; + size = newSize; +} + +void BigInt64::reverse() +{ + int start = 0; + int end = size - 1; + + while (start < end) { + uint64_t temp = limbs[start]; + limbs[start] = limbs[end]; + limbs[end] = temp; + start++; + end--; + } +} + +void BigInt64::setLimbs(uint64_t val, size_t count, size_t meStart, + size_t newSize) +{ + for (int i = 0; i < count; i++) + limbs[meStart + i] = val; + size = newSize; +} + +void BigInt64::longDivision(const BigInt64 &b, BigInt64 &remainder, + BigInt64 "ient) const +{ + if (b.isZero()) + return; + + remainder.isNegative = b.isNegative; + if (isSmallerThanUnsigned(b)) { + remainder.copyLimbsFrom(limbs, 0, size, 0, size); + quotient.zero(); + return; + } + + remainder.size = 0; + quotient.size = 0; + + for (int i = limbsCount() - 1; i >= 0; i--) { // msb-lsb + remainder.insert(1, limbs[i]); // insert msb as lsb + if (remainder.hasLeadingZero()) + remainder.size--; // remove leading zero + uint64_t times = 0; + if (!remainder.isSmallerThanUnsigned(b)) { + uint64_t left = 1, right = MAX_VAL_64; + // after inserting next limb, most times t contains b is max value + // of singe limb, find in range of [0...max] + while (left <= right) { + uint64_t mid = left + (right - left) / 2; + if (!remainder.isSmallerThanUnsigned( + b * mid)) { // b*mid<=remainder + times = mid; + if (left == right) + break; + left = mid + 1; + } + else + right = mid - 1; + } + + remainder.subtractUnsigned(b * times); + } + + if (quotient.size > 0 || times > 0) + quotient.limbs[quotient.size++] = times; + } + + quotient.reverse(); + quotient.isNegative = isNegative != b.isNegative; +} +BigInt64 power(BigInt64 base, BigInt64 exponent) +{ + if (exponent.isNegative) + throw std::invalid_argument("Invalid input: negative exponent"); + + BigInt64 result(1); + + while (!exponent.isZero()) { + if (!exponent.isEven()) + result *= base; + base *= base; + exponent >>= 1; + } + + return result; +} + +BigInt10 BigInt64::toDecimal() const +{ + BigInt10 decimal; + BigInt10 base(MAX_VAL_64); + base++; + for (int i = limbsCount() - 1; i >= 0; i--) { + BigInt10 limb = limbs[i]; + decimal *= base; + decimal += limb; + } + + decimal.isNegative = isNegative; + return decimal; +} + +void BigInt64::initFromString(const char *str, int n) +{ + BigInt10 decimal = str; + size = 0; + isNegative = decimal.isNegative; + BigInt10 base = MAX_VAL_64; + base++; + if (decimal.isZero()) + limbs[size++] = 0; + else + while (!decimal.isZero()) { + limbs[size++] = (decimal % base).toU64(); + decimal /= base; + } +} + +BigInt64 gcd(BigInt64 a, BigInt64 b) +{ + a.isNegative = false; + b.isNegative = false; + while (!b.isZero()) { + BigInt64 copyB = b; + b = a % b; + a = copyB; + } + + return a; +} + +void BigInt64::rightShift(uint64_t n) +{ + if (n >= bitsCount()) { + zero(); + return; + } + uint64_t shiftEachLimb = n % BITS_IN_LIMB; + uint64_t dropLimbs = n / BITS_IN_LIMB; + if (shiftEachLimb != 0) { + for (int i = 0; i < limbsCount() - 1 - dropLimbs; i++) // lsb...msb + limbs[i] = limbs[i + dropLimbs] >> shiftEachLimb | + limbs[i + dropLimbs + 1] + << (BITS_IN_LIMB - shiftEachLimb); + limbs[limbsCount() - 1 - dropLimbs] >>= shiftEachLimb; + size -= dropLimbs; + if (hasLeadingZero() && !isZero()) + size--; + } + else + erase(dropLimbs); +} + +void BigInt64::leftShift(uint64_t n) +{ + if (n >= bitsCount()) { + zero(); + return; + } + + uint64_t shiftEachLimb = n % BITS_IN_LIMB; + uint64_t dropLimbs = n / BITS_IN_LIMB; + if (shiftEachLimb != 0) { + for (int i = limbsCount() - 1; i > dropLimbs; i--) { // msb-lst + limbs[i] = + limbs[i - dropLimbs] << shiftEachLimb | + limbs[i - dropLimbs - 1] >> (BITS_IN_LIMB - shiftEachLimb); + } + + limbs[0] <<= shiftEachLimb; + } + else { + for (int i = limbsCount() - 1; i >= dropLimbs; i--) + limbs[i] = limbs[i - dropLimbs]; + for (int i = dropLimbs - 1; i >= 0; i--) + limbs[i] = 0; + } + + removeLeadingZeros(); +} + +BigInt64 extendedGcd(BigInt64 a, BigInt64 b, BigInt64 &x, BigInt64 &y) +{ + x = 1; + y = 0; + BigInt64 x1 = 0, y1 = 1; + BigInt64 q, temp; + + while (b != 0) { + q = a / b; + temp = b; + b = a % b; + a = temp; + + temp = x1; + + x1 = x - q * x1; + x = temp; + + temp = y1; + y1 = y - q * y1; + y = temp; + } + + return a; +} + +BigInt64 modularInverse(BigInt64 a, BigInt64 b) +{ + BigInt64 x, y; + BigInt64 gcdResult = extendedGcd(a, b, x, y); + if (gcdResult != 1) + throw std::invalid_argument("Modular inverse does not exist."); + + return x % b; // Ensure result is positive +} + +size_t BigInt64::bytesCount() const +{ + return limbsCount() * BYTES_IN_LIMB; +} + +bool BigInt64::isZero() const +{ + return limbsCount() == 1 && limbs[0] == 0; +} + +int BigInt64::limbsCount() const +{ + return size; +} + +std::uint64_t BigInt64::getMsb() const +{ + return limbs[size - 1]; +} + +std::uint64_t BigInt64::getLsb() const +{ + return limbs[0]; +} + +bool BigInt64::isEven() const +{ + return (limbs[0] & 1) == 0; +} +#else BigInt64::BigInt64(const string &str) { initFromString(str.c_str(), str.size()); @@ -863,4 +1691,5 @@ int BigInt64::limbsCount() const bool BigInt64::isEven() const { return (limbs[0] & 1) == 0; -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/crypto_api.cpp b/src/crypto_api.cpp new file mode 100644 index 00000000..4aae542f --- /dev/null +++ b/src/crypto_api.cpp @@ -0,0 +1,1272 @@ +#include +#include +#include +#include +#include "../include/crypto_api.h" +#include "../include/hash_factory.h" +#include "../include/rsa.h" +#include "../include/temp_hsm.h" +#include "../logger/logger.h" +#include "../include/debug_utils.h" + +std::map> mapToInMiddleEncryptions; +std::map> mapToInMiddleDecryptions; +std::map, size_t>> mapToInMiddleHashing; + +constexpr size_t BITS_IN_BYTE = 8; +constexpr size_t ECC_CIPHER_LENGTH = 512; +constexpr size_t ECC_MAX_DECRYPTED_LENGTH = 256; + +/** + * Converts a KeyPermission enumeration value to its corresponding string representation. + * + * @param permission The KeyPermission value to convert. + * @return A string representation of the KeyPermission. + */ +std::string keyPermissionToString(KeyPermission permission) +{ + switch (permission) { + case VERIFY: + return "VERIFY"; + case SIGN: + return "SIGN"; + case ENCRYPT: + return "ENCRYPT"; + case DECRYPT: + return "DECRYPT"; + case EXPORTABLE: + return "EXPORTABLE"; + default: + return "UNKNOWN"; + } +} + +/** + * Converts a vector of KeyPermission values to a comma-separated string representation. + * + * @param permissions A vector of KeyPermission values to convert. + * @return A string representation of the KeyPermissions, separated by commas. + */ +std::string permissionsToString(const std::vector &permissions) +{ + std::ostringstream oss; + for (size_t i = 0; i < permissions.size(); ++i) { + oss << keyPermissionToString(permissions[i]); + if (i != permissions.size() - 1) { + oss << ", "; + } + } + return oss.str(); +} + + +/** + * @brief Boot the system by generating asymmetric keys for users. + * + * This function logs the start of the boot process, iterates over a map of user IDs and + * their associated key permissions, and generates ECC and RSA key pairs for each user. + * + * @param usersIdspermissions A map where each key is a user ID (int), and the value is a + * vector of KeyPermission objects representing the user's permissions. + * + * @return CKR_OK on successful completion of the key generation process. + */ +CK_RV bootSystem( + const std::map> &usersIdspermissions) +{ + log(logger::LogLevel::INFO, + "CryptoApi Boot System: Booting system started...\n Generating " + "assymetric keys for users: "); + for (const auto &[userId, permissions] : usersIdspermissions) { + log(logger::LogLevel::INFO, + "User ID: " + std::to_string(userId) + + ", Permissions: " + permissionsToString(permissions)); + TempHsm::getInstance().generateECCKeyPair(userId, permissions); + TempHsm::getInstance().generateRSAKeyPair(userId, permissions); + } + return CKR_OK; +} + +/** + * @brief Adds a user to the HSM by generating asymmetric keys for a user. + * + * This function adds a user to the HSM, it generates ECC and RSA + * key pairs for the specified user based on their permissions. + * + * @param userId The ID of the user that is being added. + * @param permissions A vector of KeyPermission objects representing the + * permissions associated with the user. + * + * @return CKR_OK on successful completion of the process. + */ +CK_RV addProccess(int userId, std::vector &permissions) +{ + log(logger::LogLevel::INFO, + "AddProccess: adding proccess...\n Generating " + "assymetric keys for user: "); + log(logger::LogLevel::INFO, + "User ID: " + std::to_string(userId) + + ", Permissions: " + permissionsToString(permissions)); + TempHsm::getInstance().generateECCKeyPair(userId, permissions); + TempHsm::getInstance().generateRSAKeyPair(userId, permissions); + + return CKR_OK; +} + +/** + * Configures the user with the provided CryptoConfig settings. + * + * @param userId The ID of the user to configure. + * @param config The CryptoConfig settings to apply to the user. + * @return CKR_OK on successful configuration. + */ +CK_RV configure(int userId, CryptoConfig config) +{ + log(logger::LogLevel::INFO, + "Configure: configuring user: " + std::to_string(userId)); + TempHsm::getInstance().configure(userId, config); + return CKR_OK; +} + +#pragma region RSA and ECC + +/** + * Returns the encrypted length based on the specified asymmetric function. + * + * @param func The asymmetric function (RSA or ECC) to use for length calculation. + * @return The encrypted length in bytes for the specified function. + */ +size_t getEncryptedLengthByAssymFunc(AsymmetricFunction func) +{ + if (func == RSA) + return getRSAencryptedLength(); + else + return getECCencryptedLength(); +} + +/** + * Returns the encrypted length for RSA encryption. + * + * @return The RSA encrypted length in bytes. + */ +size_t getRSAencryptedLength() +{ + return rsaGetEncryptedLen(RSA_KEY_SIZE); +} + +/** + * Returns the decrypted length for RSA encryption. + * + * @return The RSA decrypted length in bytes. + */ +size_t getRSAdecryptedLength() +{ + return rsaGetDecryptedLen(RSA_KEY_SIZE); +} + +/** + * Returns the encrypted length for ECC encryption. + * + * @return The ECC encrypted length in bytes. + */ +size_t getECCencryptedLength() +{ + return 2 * (sizeof(uint8_t) + sizeof(bool)) + + ECC_CIPHER_LENGTH / BITS_IN_BYTE; +} + +/** + * Returns the decrypted length for ECC encryption. + * + * @return The ECC decrypted length in bytes. + */ +size_t getECCdecryptedLength() +{ + return ECC_MAX_DECRYPTED_LENGTH / BITS_IN_BYTE; +} + +/** + * Retrieves the public ECC key for the specified user ID. + * + * @param userId The ID of the user whose public ECC key is to be retrieved. + * @return The public ECC key as a string. + */ +std::string getPublicECCKeyByUserId(int userId) +{ + return TempHsm::getInstance().getPublicKeyIdByUserId( + userId, AsymmetricFunction::ECC); +} + +/** + * Retrieves the public RSA key for the specified user ID. + * + * @param userId The ID of the user whose public RSA key is to be retrieved. + * @return The public RSA key as a string. + */ +std::string getPublicRSAKeyByUserId(int userId) +{ + return TempHsm::getInstance().getPublicKeyIdByUserId( + userId, AsymmetricFunction::RSA); +} + + +// Serialize the EncryptedMessage to a void* buffer +void serializeToBuffer(const EncryptedMessage &message, uint8_t *out) +{ + size_t count1, count2; + std::vector buffer1, buffer2; + size_t offset = 0; + + buffer1.resize((mpz_sizeinbase(message.c1X.get_mpz_t(), 2) + 7) / + 8); // size in bytes + mpz_export(buffer1.data(), &count1, 1, 1, 0, 0, message.c1X.get_mpz_t()); + buffer1.resize(count1); // resize buffer to actual size after export + + buffer2.resize((mpz_sizeinbase(message.c2X.get_mpz_t(), 2) + 7) / + 8); // size in bytes + mpz_export(buffer2.data(), &count2, 1, 1, 0, 0, message.c2X.get_mpz_t()); + buffer2.resize(count2); // resize buffer to actual size after export + + // Store c1X (length followed by data) + std::memcpy(out + offset, &count1, sizeof(uint8_t)); + offset += sizeof(uint8_t); + std::memcpy(out + offset, buffer1.data(), count1); + offset += count1; + + // Store c1Y + std::memcpy(out + offset, &message.c1Y, sizeof(message.c1Y)); + offset += sizeof(message.c1Y); + + // Store c2X (length followed by data) + std::memcpy(out + offset, &count2, sizeof(uint8_t)); + offset += sizeof(uint8_t); + std::memcpy(out + offset, buffer2.data(), count2); + offset += count2; + + // Store c2Y + std::memcpy(out + offset, &message.c2Y, sizeof(message.c2Y)); +} + +// Deserialize the buffer back to EncryptedMessage +EncryptedMessage deserializeFromBuffer(const void *buffer, size_t bufferSize) +{ + size_t offset = 0; + const uint8_t *byteBuffer = static_cast(buffer); + + // Deserialize c1X + mpz_class c1X; + size_t count1 = byteBuffer[offset]; + offset += sizeof(uint8_t); + mpz_import(c1X.get_mpz_t(), count1, 1, 1, 0, 0, byteBuffer + offset); + offset += count1; + + // Deserialize c1Y + bool c1Y; + std::memcpy(&c1Y, byteBuffer + offset, sizeof(c1Y)); + offset += sizeof(c1Y); + + // Deserialize c2X + mpz_class c2X; + size_t count2 = byteBuffer[offset]; + offset += sizeof(uint8_t); + mpz_import(c2X.get_mpz_t(), count2, 1, 1, 0, 0, byteBuffer + offset); + offset += count2; + + // Deserialize c2Y + bool c2Y; + std::memcpy(&c2Y, byteBuffer + offset, sizeof(c2Y)); + + return EncryptedMessage(c1X, c1Y, c2X, c2Y); +} + +/** + * @brief Encrypts data using Elliptic Curve Cryptography (ECC). + * + * This function performs ECC encryption on the input data using the specified sender ID and key ID. + * It retrieves the corresponding ECC public key from the HSM and encrypts the input data using the public key. + * The encrypted data is then serialized and stored in the output buffer. + * + * @param senderId The ID of the sender. + * @param keyId The ID of the ECC public key to be used for encryption. + * @param in The input data to be encrypted. + * @param inLen The length of the input data. + * @param out The buffer where the encrypted output will be stored. + * @param outLen The length of the encrypted output. + * @return CKR_OK on success or an appropriate error code on failure. + */ +CK_RV ECCencrypt(int senderId, std::string keyId, void *in, size_t inLen, + void *out, size_t &outLen) +{ + log(logger::LogLevel::INFO, + "Starting ECC encryption for user id: " + std::to_string(senderId) + + " with keyId: " + keyId); + std::vector inVec(static_cast(in), + static_cast(in) + inLen); + Point eccPublicKey; + try { + eccPublicKey = TempHsm::getInstance().getECCPublicKey( + senderId, keyId, KeyPermission::ENCRYPT); + } + catch (std::exception &e) { + log(logger::LogLevel::ERROR, + "Failed to retrieve ECC public key for user id: " + + std::to_string(senderId) + ", keyId: " + keyId + + ". Error: " + e.what()); + return CKR_USER_NOT_AUTHORIZED; + } + //perform ecc encryption + EncryptedMessage cipher = encryptECC(inVec, eccPublicKey); + + //cast cipher from EncryptedMessage to out buffer + serializeToBuffer(cipher, static_cast(out)); + + log(logger::LogLevel::INFO, + "Successfully completed ECC encryption for user id: " + + std::to_string(senderId)); + + return CKR_OK; +} + +/** + * @brief Decrypts data using Elliptic Curve Cryptography (ECC). + * + * This function decrypts the input data using the ECC decryption algorithm and the provided key. + * It retrieves the private ecc key from the HSM for the specified user and key ID, then decrypts the input data. + * + * @param receiverId The ID of the reciever. + * @param keyId The ID of the key to be used for decryption. + * @param in A pointer to the input data to be decrypted. + * @param inLen The length of the input data. + * @param out A pointer to the buffer where the decrypted output will be stored. + * @param[out] outLen The length of the decrypted output. + * + * @return CKR_OK if the decryption is successful, or an appropriate error code if the decryption fails. + * + * @note This function logs the start and end of the decryption process for debugging purposes. + * @note If the decryption fails due to an unauthorized key, it returns CKR_USER_NOT_AUTHORIZED. + */ +CK_RV ECCdecrypt(int receiverId, std::string keyId, void *in, size_t inLen, + void *out, size_t &outLen) +{ + log(logger::LogLevel::INFO, + "Starting ECC decryption for user id: " + std::to_string(receiverId) + + " with keyId: " + keyId); + mpz_class key; + try { + key = TempHsm::getInstance().getECCPrivateKey(receiverId, keyId, + KeyPermission::DECRYPT); + } + catch (std::exception &e) { + log(logger::LogLevel::ERROR, + "Failed to retrieve ECC private key for user id: " + + std::to_string(receiverId) + ", keyId: " + keyId + + ". Error: " + e.what()); + return CKR_USER_NOT_AUTHORIZED; + } + + //cast the cipher from in buffer to EncryptedMessage + EncryptedMessage cipher = deserializeFromBuffer(in, inLen); + + //perform decryption + std::vector decryptedMessage = decryptECC(cipher, key); + outLen = decryptedMessage.size(); + std::memcpy(out, decryptedMessage.data(), outLen); + + log(logger::LogLevel::INFO, + "Successfully completed ECC decryption for user id: " + + std::to_string(receiverId)); + + return CKR_OK; +} + +/** + * @brief Encrypts data using RSA. + * + * This function performs RSA encryption on the input data using the specified sender ID and key ID. + * It retrieves the corresponding RSA key from the HSM and encrypts the input data. + * The encrypted data is then stored in the output buffer. + * + * @param userId The ID of the user. + * @param keyId The ID of the RSA encryption key to be used. + * @param in The input data to be encrypted. + * @param inLen The length of the input data. + * @param out The buffer where the encrypted output will be stored. + * @param outLen The length of the buffer for the encrypted output. + * + * @return CKR_OK on successful encryption, or CKR_USER_NOT_AUTHORIZED if the key retrieval fails. + */ +CK_RV RSAencrypt(int userId, std::string keyId, void *in, size_t inLen, + void *out, size_t outLen) +{ + log(logger::LogLevel::INFO, + "Starting RSA encryption for user id: " + std::to_string(userId) + + " with keyId: " + keyId); + std::pair key; + try { + key = TempHsm::getInstance().getRSAKey(userId, keyId, + KeyPermission::ENCRYPT); + } + catch (std::exception &e) { + log(logger::LogLevel::ERROR, + "Failed to retrieve RSA key for user id: " + + std::to_string(userId) + ", keyId: " + keyId + + ". Error: " + e.what()); + return CKR_USER_NOT_AUTHORIZED; + } + CK_RV returnCode = rsaEncrypt( + reinterpret_cast(in), inLen, key.first, key.second, + reinterpret_cast(out), outLen, RSA_KEY_SIZE); + log(logger::LogLevel::INFO, + "Successfully completed RSA encryption for user id: " + + std::to_string(userId)); + return returnCode; +} + +/** + * @brief Decrypts data using RSA. + * + * This function decrypts the input data using the RSA decryption algorithm and the provided key. + * It retrieves the corresponding RSA key from the HSM for the specified user and key ID, then decrypts the input data. + * The decrypted data is then stored in the output buffer. + * + * @param userId The ID of the user. + * @param keyId The ID of the RSA decryption key to be used. + * @param in The input data to be decrypted. + * @param inLen The length of the input data. + * @param out The buffer where the decrypted output will be stored. + * @param outLen The length of the buffer for the decrypted output. + * + * @return CKR_OK on successful decryption, or CKR_USER_NOT_AUTHORIZED if the + * key retrieval fails, or the return code fron rsa decryption. + */ +CK_RV RSAdecrypt(int userId, std::string keyId, void *in, size_t inLen, + void *out, size_t *outLen) +{ + log(logger::LogLevel::INFO, + "Starting RSA decryption for user id: " + std::to_string(userId) + + " with keyId: " + keyId); + std::pair key; + try { + key = TempHsm::getInstance().getRSAKey(userId, keyId, + KeyPermission::DECRYPT); + } + catch (std::exception &e) { + log(logger::LogLevel::ERROR, + "Failed to retrieve RSA key for user id: " + + std::to_string(userId) + ", keyId: " + keyId + + ". Error: " + e.what()); + return CKR_USER_NOT_AUTHORIZED; + } + CK_RV returnCode = rsaDecrypt( + reinterpret_cast(in), inLen, key.first, key.second, + reinterpret_cast(out), outLen, RSA_KEY_SIZE); + + log(logger::LogLevel::INFO, + "Successfully completed RSA decryption for user id: " + + std::to_string(userId)); + return returnCode; +} + +// Generates a pair of asymmetric ECC keys and returns their keyIds +std::pair generateECCKeyPair( + int userId, std::vector permissions) +{ + return TempHsm::getInstance().generateECCKeyPair(userId, permissions); +} + +// Generates a pair of asymmetric RSA keys and returns their keyIds +std::pair generateRSAKeyPair( + int userId, std::vector permissions) +{ + return TempHsm::getInstance().generateRSAKeyPair(userId, permissions); +} + +#pragma endregion RSA and ECC + + +#pragma region AES +//////////////AES////////////////////////////////////////////////////////////// + +// //Generates a symmetric AES key,write it to file and returns its keyId +std::string generateAESKey(int userId, AESKeyLength aesKeyLength, + std::vector permissions, + int destUserId) +{ + return TempHsm::getInstance().generateAESKey(userId, aesKeyLength, + permissions, destUserId); +} + +// Function to calculate length of encrypted data by AES when using a keyId. +size_t getAESencryptedLength(size_t dataLen, bool isFirst, + AESChainingMode chainingMode) +{ + return calculatEncryptedLenAES(dataLen, isFirst, chainingMode); +} + +// Function to calculate length of decrypted data by AES when using a keyId. +size_t getAESdecryptedLength(size_t dataLen, bool isFirst, + AESChainingMode chainingMode) +{ + return calculatDecryptedLenAES(dataLen, isFirst, chainingMode); +} + +/** + * @brief Retrieves an AES key from the HSM by key ID. + * + * This function retrieves the AES key from the HSM using the provided sender ID + * and key ID, allocating memory for the key and setting its length. + * + * @param senderId The ID of the sender requesting the key. + * @param aesKeyId The ID of the AES key to be retrieved. + * @param[out] symmetricKey A pointer to the retrieved AES key. + * @param[out] symmetricKeyLen The length of the retrieved AES key in bytes. + */ +void retrieveAESKeyByKeyId(int userId, std::string aesKeyId, + std::shared_ptr symmetricKey, + size_t symmetricKeyLen, KeyPermission permission) +{ + std::pair, int> keyAndLength = + TempHsm::getInstance().getAESKey(userId, aesKeyId, permission); + symmetricKey = keyAndLength.first; +} + +//function to encrypt symmetric key with RSA or ECC +CK_RV decryptAESkey(int senderId, int recieverId, void *in, size_t inLen, + uint8_t *symmetricKey, size_t &symmetricKeyLen, + AsymmetricFunction func) +{ + std::string recieverrsPrivateKeyId = + TempHsm::getInstance().getPrivateKeyIdByUserId(recieverId, func); + CK_RV returnCode; + // decrypt with RSA symmetric key with recievers private key + if (func == RSA) { + returnCode = RSAdecrypt(recieverId, recieverrsPrivateKeyId, in, inLen, + symmetricKey, &symmetricKeyLen); + } + else + // decrypt with ECC symmetric key with recievers private key + returnCode = ECCdecrypt(recieverId, recieverrsPrivateKeyId, in, inLen, + symmetricKey, symmetricKeyLen); + + return returnCode; +} + +/** + * @brief Performs AES decryption on the first data block. + * + * This function performs AES decryption on the provided input data using the + * specified chaining mode and symmetric key. The result is written to the output + * buffer, and a chunk counter is initialized for multi-part decryption. + * + * @param senderId The ID of the sender. + * @param in The input data to be decrypted. + * @param inLen The length of the input data. + * @param[out] out The buffer where the decrypted output will be stored. + * @param[out] outLen The length of the decrypted output. + * @param chainingMode The AES chaining mode (e.g., CBC, CTR). + * @param symmetricKey The symmetric AES key used for encryption. + * @param symmetricKeyLen The length of the symmetric AES key. + * @param counter The counter for the chunked decryption process. + * @return CKR_OK on success or an appropriate error code on failure. + */ +CK_RV performAESDecryption(int recieverId, void *in, size_t inLen, void *out, + size_t &outLen, AESChainingMode chainingMode, + std::shared_ptr symmetricKey, + AESKeyLength keyLength, size_t counter, + bool generateKeyFlag) +{ + StreamAES *streamAES = FactoryManager::getInstance().create(chainingMode); + mapToInMiddleDecryptions[recieverId] = std::make_pair(streamAES, counter); + unsigned int outLen2 = outLen; + + mapToInMiddleDecryptions[recieverId].first->decryptStart( + reinterpret_cast(in), inLen, + reinterpret_cast(out), outLen2, symmetricKey.get(), + keyLength); + + outLen = outLen2; +} + +/** + * @brief Handles the AES decryption of subsequent chunks of data. + * + * This function continues AES decryption on a subsequent chunk of data using the + * pre-existing decryption context. It also updates the chunk counter and removes + * the receiver from the decryption map once all chunks are processed. + * + * @param recieverId The ID of the receiver. + * @param in The input data chunk to be decrypted. + * @param inLen The length of the input data chunk. + * @param[out] out The buffer where the decrypted output will be stored. + * @param[out] outLen The length of the decrypted output. + */ +void AEShandleDataChunksDecryption(int recieverId, void *in, size_t inLen, + void *out, size_t &outLen, + AESChainingMode chainingMode) +{ + unsigned int outLen2=outLen; + mapToInMiddleDecryptions[recieverId].first->decryptContinue( + reinterpret_cast(in), inLen, + reinterpret_cast(out), outLen2); + outLen=outLen2; +} + +/** + * @brief Decrypts data using AES decryption with optional key generation or retrieval. + * + * This function performs AES decryption, either by generating a temporary AES key or + * retrieving one by key ID. It also handles the continuation of chunked data decryption. + * + * @param senderId The ID of the sender. + * @param receiverId The ID of the receiver. + * @param in The input data to be decrypted. + * @param inLen The length of the input data. + * @param[out] out The buffer where the decrypted output will be stored. + * @param[out] outLen The length of the decrypted output. + * @param func The asymmetric decryption function used (e.g., RSA, ECC). + * @param keyLength The AES key length (128, 192, or 256 bits). + * @param chainingMode The AES chaining mode (e.g., CBC, CTR). + * @param counter The counter for the chunked encryption process. + * @param keyId The ID of the key (used when retrieving an existing key). + * @param generateKeyFlag Indicates whether to generate a new AES key (true) or retrieve an existing one (false). + * @return CKR_OK on success or an appropriate error code on failure. + */ +CK_RV AESdecrypt(int senderId, int receiverId, void *in, size_t inLen, + void *out, size_t &outLen, AsymmetricFunction func, + AESKeyLength keyLength, AESChainingMode chainingMode, + size_t counter, bool generateKeyFlag, std::string keyId = "") +{ + CK_RV returnCode = CKR_OK; + if (mapToInMiddleDecryptions.count(receiverId) == 0) { + std::shared_ptr symmetricKey; + size_t offset = 0; + // Handle key generation or retrieval + if (generateKeyFlag) { + symmetricKey =std::shared_ptr(new unsigned char[keyLength]); + size_t encryptedKeyLength = + getEncryptedLengthByAssymFunc(func); + size_t symmetricKeyLength = keyLength; + returnCode = + decryptAESkey(senderId, receiverId, in, encryptedKeyLength, + symmetricKey.get(), symmetricKeyLength, func); + // memset(symmetricKey.get(), 0, keyLength); + offset = encryptedKeyLength; + if (returnCode != CKR_OK) { + return returnCode; + } + } + else { + symmetricKey = TempHsm::getInstance() + .getAESKey(receiverId, keyId, DECRYPT) + .first; + } + + returnCode=performAESDecryption( + receiverId, static_cast(in) + offset, + inLen - offset, out, outLen, chainingMode, symmetricKey, keyLength, + counter, generateKeyFlag); + + if (returnCode != CKR_OK) + return returnCode; + } + else { + // Handle chunk continuation + AEShandleDataChunksDecryption(receiverId, in, inLen, out, outLen, + chainingMode); + } + // reduce a chunck from the chuncks counter + mapToInMiddleDecryptions[receiverId].second--; + + if (mapToInMiddleDecryptions[receiverId].second == 0) { + auto it = mapToInMiddleDecryptions.find(receiverId); + + mapToInMiddleDecryptions.erase(receiverId); + } + + return CKR_OK; +} + +/** + * @brief User-facing function to handle AES decryption using an existing AES key. + * + * This function is the primary function that the user calls to perform AES decryption. + * It performs decryption using the provided sender and receiver IDs, input data, and key ID. + * Unlike the inner `AESdecrypt` function, this version does not generate a new AES key + * but instead retrieves an existing key. + * + * @param senderId The ID of the sender. + * @param receiverId The ID of the receiver. + * @param in The input data to be decrypted. + * @param inLen The length of the input data. + * @param[out] out The buffer where the decrypted output will be stored. + * @param[out] outLen The length of the decrypted output. + * @param func The asymmetric decryption function used (e.g., RSA, ECC). + * @param keyLength The AES key length (128, 192, or 256 bits). + * @param chainingMode The AES chaining mode (e.g., CBC, CTR). + * @param counter The counter for the chunked decryption process. + * @param keyId The ID of the key to be retrieved. + * @return CKR_OK on success or an appropriate error code on failure. + */ +CK_RV AESdecrypt(int senderId, int receiverId, void *in, size_t inLen, + void *out, size_t &outLen, AESKeyLength keyLength, + AESChainingMode chainingMode, size_t counter, + std::string keyId) +{ + return AESdecrypt(senderId, receiverId, in, inLen, out, outLen, RSA, + keyLength, chainingMode, counter, false, keyId); +} + +//function to encrypt symmetric key with RSA or ECC,the encrypted is in out +CK_RV encryptAESkey(int senderId, int recieverId, uint8_t *symmetricKey, + size_t symmetricKeyLen, void *encryptedKey, + size_t encryptedKeyLen, AsymmetricFunction func) +{ + std::string recieverrsPublicKeyId = + TempHsm::getInstance().getPublicKeyIdByUserId(recieverId, func); + CK_RV returnCode; + // encrypt wuth RSA symmetric key with recievers public key + if (func == RSA) + returnCode = RSAencrypt(senderId, recieverrsPublicKeyId, symmetricKey, + symmetricKeyLen, encryptedKey, encryptedKeyLen); + else + { + // encrypt wuth ECC symmetric key with recievers public key + returnCode = ECCencrypt(senderId, recieverrsPublicKeyId, symmetricKey, + symmetricKeyLen, encryptedKey, encryptedKeyLen); +} + + return returnCode; +} + +/** + * @brief Performs AES encryption on the first data block. + * + * This function performs AES encryption on the provided input data using the + * specified chaining mode and symmetric key. The result is written to the output + * buffer, and a chunk counter is initialized for multi-part encryption. + * + * @param senderId The ID of the sender. + * @param in The input data to be encrypted. + * @param inLen The length of the input data. + * @param[out] out The buffer where the encrypted output will be stored. + * @param[out] outLen The length of the encrypted output. + * @param chainingMode The AES chaining mode (e.g., CBC, CTR). + * @param symmetricKey The symmetric AES key used for encryption. + * @param symmetricKeyLen The length of the symmetric AES key. + * @param counter The counter for the chunked encryption process. + * @return CKR_OK on success or an appropriate error code on failure. + */ +CK_RV performAESEncryption(int senderId, void *in, size_t inLen, void *out, + size_t outLen, AESChainingMode chainingMode, + std::shared_ptr symmetricKey, + AESKeyLength keyLength, size_t counter) +{ + StreamAES *streamAES = FactoryManager::getInstance().create(chainingMode); + mapToInMiddleEncryptions[senderId] = std::make_pair(streamAES, counter); + mapToInMiddleEncryptions[senderId].first->encryptStart( + reinterpret_cast(in), inLen, + reinterpret_cast(out), reinterpret_cast(outLen), symmetricKey.get(), + keyLength); + + return CKR_OK; +} + +/** + * @brief Handles the AES encryption of subsequent chunks of data. + * + * This function continues AES encryption on a subsequent chunk of data using the + * pre-existing encryption context. It also updates the chunk counter and removes + * the sender from the encryption map once all chunks are processed. + * + * @param senderId The ID of the sender. + * @param in The input data chunk to be encrypted. + * @param inLen The length of the input data chunk. + * @param[out] out The buffer where the encrypted output will be stored. + * @param[out] outLen The length of the encrypted output. + */ +void AEShandleDataChunksEncryption(int senderId, void *in, size_t inLen, + void *out, size_t outLen, + AESChainingMode mode) +{ + mapToInMiddleEncryptions[senderId].first->encryptContinue( + reinterpret_cast(in), inLen, + reinterpret_cast(out), reinterpret_cast(outLen)); +} + +/** + * @brief Encrypts data using AES encryption with optional key generation or retrieval. + * + * This function performs AES encryption, either by generating a temporary AES key or + * retrieving one by key ID. It also handles the continuation of chunked data encryption. + * + * @param senderId The ID of the sender. + * @param receiverId The ID of the receiver. + * @param in The input data to be encrypted. + * @param inLen The length of the input data. + * @param[out] out The buffer where the encrypted output will be stored. + * @param[out] outLen The length of the encrypted output. + * @param func The asymmetric encryption function used (e.g., RSA, ECC). + * @param keyLength The AES key length (128, 192, or 256 bits). + * @param chainingMode The AES chaining mode (e.g., CBC, CTR). + * @param counter The counter for the chunked encryption process. + * @param keyId The ID of the key (used when retrieving an existing key). + * @param generateKeyFlag Indicates whether to generate a new AES key (true) or retrieve an existing one (false). + * @return CKR_OK on success or an appropriate error code on failure. + */ +CK_RV AESencrypt(int senderId, int receiverId, void *in, size_t inLen, + void *out, size_t outLen, AESKeyLength keyLength, + AESChainingMode chainingMode, size_t counter, + std::string keyId, bool generateKeyFlag, + AsymmetricFunction func) +{ + CK_RV returnCode; + size_t encryptedKeyLength = 0; + if (mapToInMiddleEncryptions.count(senderId) == 0) { + size_t symmetricKeyLen = keyLength; + std::shared_ptr key; + // Handle key generation or retrieval + if (generateKeyFlag) { + key =std::shared_ptr(new unsigned char[keyLength]); + generateKey(key.get(), keyLength); + encryptedKeyLength = getEncryptedLengthByAssymFunc(func); + returnCode = encryptAESkey( + senderId, receiverId, key.get(), symmetricKeyLen, out, + getEncryptedLengthByAssymFunc(func),func); + if (returnCode != CKR_OK) { + return returnCode; + } + } + else { + key = TempHsm::getInstance() + .getAESKey(senderId, keyId, ENCRYPT) + .first; + } + // Perform AES encryption + returnCode = performAESEncryption( + senderId, in, inLen, + static_cast(out) + encryptedKeyLength, + outLen - encryptedKeyLength, chainingMode, key, keyLength, counter); + + if (returnCode != CKR_OK) + return returnCode; + } + else { + // Handle chunk continuation + AEShandleDataChunksEncryption(senderId, in, inLen, out, outLen, + chainingMode); + } + //reduce a chunck from the chuncks counter + mapToInMiddleEncryptions[senderId].second--; + + // if the last chunck of data delete from map + if (mapToInMiddleEncryptions[senderId].second == 0) { + auto it = mapToInMiddleEncryptions.find(senderId); + mapToInMiddleEncryptions.erase(senderId); + } + + return CKR_OK; +} + +/** + * @brief User-facing function to handle AES encryption using an existing AES key. + * + * This function is the primary function that the user calls to perform AES encryption. + * It performs encryption using the provided sender and receiver IDs, input data, and key ID. + * Unlike the inner `AESencrypt` function, this version does not generate a new AES key + * but instead retrieves an existing key. + * + * @param senderId The ID of the sender. + * @param receiverId The ID of the receiver. + * @param in The input data to be encrypted. + * @param inLen The length of the input data. + * @param[out] out The buffer where the encrypted output will be stored. + * @param[out] outLen The length of the encrypted output. + * @param func The asymmetric encryption function used (e.g., RSA, ECC). + * @param keyLength The AES key length (128, 192, or 256 bits). + * @param chainingMode The AES chaining mode (e.g., CBC, CTR). + * @param counter The counter for the chunked encryption process. + * @param keyId The ID of the key to be retrieved. + * @return CKR_OK on success or an appropriate error code on failure. + */ +CK_RV AESencrypt(int senderId, int receiverId, void *in, size_t inLen, + void *out, size_t outLen, AESKeyLength keyLength, + AESChainingMode chainingMode, size_t counter, + std::string keyId) +{ + return AESencrypt(senderId, receiverId, in, inLen, out, outLen, keyLength, + chainingMode, counter, keyId, false, RSA); +} + +#pragma endregion RSA and ECC + +#pragma region SIGN VERIFY +//////////SIGN VERIFY////////////////////////////////////////////////////////// +#pragma region SIGN VERIFY + +/** + * Returns the size of the hashed message based on the specified hash algorithm. + * + * @param hashFunc The hash algorithm for which to get the message size. + * @return Size of the hashed message in bytes. + * @throws std::invalid_argument if the provided hash function is not supported. + */ +size_t getHashedMessageSize(SHAAlgorithm hashFunc) +{ + switch (hashFunc) { + case SHAAlgorithm::SHA_256: + return 256 / BITS_IN_BYTE; + case SHAAlgorithm::SHA_3_512: + return 512 / BITS_IN_BYTE; + default: + throw std::invalid_argument("Invalid hash function"); + } +} + +/** + * @brief Retrieves the length of the digital signature. + * + * This function calls the function to get the RSA encrypted length, + * which corresponds to the size of the digital signature. + * + * @return The length of the digital signature. + */ +size_t getSignatureLength() +{ + return getRSAencryptedLength(); +} + +/** + * @brief Checks if the hashing process is complete for the given user ID. + * + * This function verifies if the user ID exists in the mapping and + * whether the counter for in-progress hashing has reached zero. + * + * @param userId The ID of the user. + * @return True if the hashing process is complete, false otherwise. + */ +bool isDoneHashing(int userId) +{ + return mapToInMiddleHashing.count(userId) != 0 && + mapToInMiddleHashing[userId].second == 0; +} + +/** + * @brief Checks if this is the first time hashing for the given user ID. + * + * This function checks if the user ID is not present in the mapping, + * indicating that it's the first hashing attempt. + * + * @param userId The ID of the user. + * @return True if it's the first time hashing, false otherwise. + */ +bool isFirstTimeHash(int userId) +{ + return mapToInMiddleHashing.count(userId) == 0; +} + +/** + * @brief Updates the hash data for the specified user ID. + * + * This function processes a chunk of data, creating a hash instance if it's the first update + * and appending the data to the ongoing hash calculation. It decrements the counter for remaining data. + * + * @param userId The ID of the user. + * @param data Pointer to the data to hash. + * @param dataLen Length of the data. + * @param hashfunc The hashing algorithm to use. + * @param counter A counter indicating remaining data chunks. + * @return CK_RV Return code indicating success or failure of the operation. + */ +CK_RV hashDataUpdate(int userId, void *data, size_t dataLen, + SHAAlgorithm hashfunc, int counter) +{ + CK_RV returnCode = CKR_OK; + if (isFirstTimeHash(userId)) { // first time + HashFactory *factoryManager = &HashFactory::getInstance(); + mapToInMiddleHashing[userId] = + std::make_pair(std::unique_ptr(), counter); + returnCode = factoryManager->create(hashfunc, + mapToInMiddleHashing[userId].first); + } + std::vector(static_cast(data), + static_cast(data) + dataLen); + mapToInMiddleHashing[userId].first->update(std::vector( + static_cast(data), static_cast(data) + dataLen)); + mapToInMiddleHashing[userId].second--; + return returnCode; +} + +/** + * @brief Finalizes the hash computation and retrieves the result for the specified user ID. + * + * This function finalizes the ongoing hash calculation for the user ID, copies the result + * to the output buffer, and removes the user ID from the mapping. + * + * @param userId The ID of the user. + * @param out Pointer to the output buffer for the final hash. + * @param outLen Length of the output buffer. + * @return CK_RV Return code indicating success or failure of the operation. + */ +CK_RV hashDataFinalize(int userId, void *out, size_t outLen) +{ + std::vector result; + CK_RV returnCode = mapToInMiddleHashing[userId].first->finalize(result); + auto it = mapToInMiddleHashing.find(userId); + mapToInMiddleHashing.erase(userId); + memcpy(out, result.data(), outLen); + return returnCode; +} + +/** + * @brief Updates the signature process with the given data for the specified sender ID. + * + * This function logs the signing action and calls the hash data update function. + * + * @param senderId The ID of the sender. + * @param data Pointer to the data to sign. + * @param dataLen Length of the data. + * @param hashfunc The hashing algorithm to use. + * @param counter A counter indicating remaining data chunks. + * @return CK_RV Return code indicating success or failure of the operation. + */ +CK_RV signUpdate(int senderId, void *data, size_t dataLen, + SHAAlgorithm hashfunc, int counter) +{ + log(logger::LogLevel::INFO, + "Signing for user id: " + std::to_string(senderId) + + " chunk of data."); + return hashDataUpdate(senderId, data, dataLen, hashfunc, counter); +} + +/** + * @brief Finalizes the signing process for the specified sender ID. + * + * This function finalizes the hashing, encrypts the hash using RSA, + * and produces the digital signature. + * + * @param senderId The ID of the sender. + * @param signature Pointer to the output buffer for the signature. + * @param signatureLen Length of the signature buffer. + * @param hashfunc The hashing algorithm to use. + * @param keyId The ID of the key to use for signing. + * @return CK_RV Return code indicating success or failure of the operation. + */ +CK_RV signFinalize(int senderId, void *signature, size_t signatureLen, + SHAAlgorithm hashfunc, std::string keyId) +{ + log(logger::LogLevel::INFO, + "Signing for user id: " + std::to_string(senderId) + + " for last chunk of data."); + size_t hashLen = getHashedMessageSize(hashfunc); + std::vector hash(hashLen); + CK_RV returnCode = hashDataFinalize(senderId, hash.data(), hashLen); + if (returnCode != CKR_OK) + return returnCode; + returnCode = RSAencrypt(senderId, keyId, hash.data(), hashLen, signature, + signatureLen); + return returnCode; +} + +/** + * @brief Updates the verification process with the given data for the specified receiver ID. + * + * This function logs the verification action and calls the hash data update function. + * + * @param recieverId The ID of the receiver. + * @param data Pointer to the data to verify. + * @param dataLen Length of the data. + * @param hashFunc The hashing algorithm to use. + * @param counter A counter indicating remaining data chunks. + * @return CK_RV Return code indicating success or failure of the operation. + */ +CK_RV verifyUpdate(int recieverId, void *data, size_t dataLen, + SHAAlgorithm hashFunc, size_t counter) +{ + log(logger::LogLevel::INFO, + "Verifying for user id: " + std::to_string(recieverId) + + " chunk of data."); + return hashDataUpdate(recieverId, data, dataLen, hashFunc, counter); +} + +/** + * @brief Finalizes the verification process for the specified receiver ID. + * + * This function finalizes the hashing, decrypts the signature using RSA, + * and checks if the signature matches the computed hash. + * + * @param recieverId The ID of the receiver. + * @param signature Pointer to the digital signature to verify. + * @param signatureLen Length of the signature buffer. + * @param hashFunc The hashing algorithm to use. + * @param keyId The ID of the key to use for verification. + * @return CK_RV Return code indicating success or failure of the operation. + */ +CK_RV verifyFinalize(int recieverId, void *signature, size_t signatureLen, + SHAAlgorithm hashFunc, std::string keyId) +{ + log(logger::LogLevel::INFO, + "Verifying for user id: " + std::to_string(recieverId) + + " for last chunk of data."); + size_t hashLen = getHashedMessageSize(hashFunc); + std::vector hash(hashLen); + CK_RV returnCode = hashDataFinalize(recieverId, hash.data(), hashLen); + if (returnCode != CKR_OK) + return returnCode; + size_t decryptSignatureLen = rsaGetDecryptedLen(RSA_KEY_SIZE); + std::vector decryptSignature(decryptSignatureLen); + returnCode = RSAdecrypt(recieverId, keyId, signature, signatureLen, + decryptSignature.data(), &decryptSignatureLen); + if (returnCode != CKR_OK) + return returnCode; + if (decryptSignatureLen != hashLen || + memcmp(decryptSignature.data(), hash.data(), decryptSignatureLen) != + 0) { + returnCode = CKR_SIGNATURE_INVALID; + log(logger::LogLevel::ERROR, + "Verifying signature failed for user id: " + + std::to_string(recieverId) + "."); + } + + return returnCode; +} + +#pragma endregion SIGN VERIFY + +#pragma region ENCRYPT DECRYPT + +/** + * @brief Calculates the length of the encrypted data based on the input length. + * + * This function retrieves the encryption configuration for the given sender ID + * and calculates the total encrypted length, which includes the length of the + * digital signature, padded encrypted data, and potentially the encrypted symmetric key. + * + * @param senderId The ID of the sender. + * @param inLen The length of the input data. + * @param isFirst Indicates if this is the first chunk of data. + * @return The total length of the encrypted data. + */ +size_t getEncryptedLen(int senderId, size_t inLen, bool isFirst) +{ + // Retrieve the encryption function type for the given sender ID + CryptoConfig config = TempHsm::getInstance().getUserConfig(senderId); + // digital signature + encrypted padded data (+ if first chunk: encrypted symmetric key) + return getAESencryptedLength(inLen, isFirst, config.aesChainingMode) + + (isFirst ? getEncryptedLengthByAssymFunc(config.asymmetricFunction) : 0); +} + +/** + * @brief Calculates the length of the decrypted data based on the input length. + * + * This function retrieves the encryption configuration for the given sender ID + * and calculates the length of the decrypted data by accounting for the encrypted + * length and potential asymmetric function overhead. + * + * @param senderId The ID of the sender. + * @param inLen The length of the input encrypted data. + * @param isFirst Indicates if this is the first chunk of data. + * @return The total length of the decrypted data. + */ +size_t getDecryptedLen(int senderId, size_t inLen, bool isFirst) +{ + // Retrieve the encryption function type for the given sender ID + CryptoConfig config = TempHsm::getInstance().getUserConfig(senderId); + size_t encryptedLength = + (inLen - (isFirst ? getEncryptedLengthByAssymFunc(config.asymmetricFunction) + : 0)); + return calculatDecryptedLenAES(encryptedLength, isFirst, + config.aesChainingMode); +} + +/** + * @brief Encrypts the input data, signs it with a digital signature, according to the user's configuration, and outputs the result. + * + * This function first signs the hashed input data using RSA, then encrypts the data using AES. + * The encryption and signing are performed based on the settings defined in the sender's user configuration. + * The resulting signature and encrypted data are concatenated and stored in the output buffer. + * + * @param senderId The ID of the sender, used for retrieving the appropriate encryption keys and user configuration. + * @param receiverId The ID of the receiver, used for retrieving the public key for encryption. + * @param in The input data to be signed and encrypted. + * @param inLen The length of the input data. + * @param out The buffer to store the concatenated signature and encrypted data. + * @param[out] outLen The length of the output data (signature + encrypted data). + * @param counter The counter value used for streaming. + * + * @return CKR_OK on success, or an appropriate error code on failure. + */ + +CK_RV encrypt(int senderId, int receiverId, void *in, size_t inLen, void *out, + size_t outLen, void *signature, size_t signatureLen, + size_t counter) +{ + CK_RV returnCode; + CryptoConfig config = TempHsm::getInstance().getUserConfig(senderId); + std::string recieversPublicKeyId = + TempHsm::getInstance().getPublicKeyIdByUserId( + receiverId, config.asymmetricFunction); + returnCode = + AESencrypt(senderId, receiverId, in, inLen, out, outLen, + config.aesKeyLength, config.aesChainingMode, counter, + recieversPublicKeyId, true, config.asymmetricFunction); + if (returnCode != CKR_OK) + return returnCode; + returnCode = signUpdate(senderId, in, inLen, config.hashFunction, counter); + if (returnCode != CKR_OK) + return returnCode; + if (isDoneHashing(senderId)) { + std::string senderPrivateKeyId = + TempHsm::getInstance().getPrivateKeyIdByUserId(senderId, RSA); + returnCode = signFinalize(senderId, signature, signatureLen, + config.hashFunction, senderPrivateKeyId); + } + if (returnCode != CKR_OK) + return returnCode; + return CKR_OK; +} + +/** + * @brief Decrypts the input data, verifies its signature, and outputs the result. + * + * This function extracts the digital signature and encrypted data from the input buffer, + * decrypts the data using AES, and verifies the digital signature using RSA. The decryption + * and signature verification are based on the settings defined in the sender's user configuration. + * + * @param senderId The ID of the sender, used for retrieving the signature verification settings. + * @param receiverId The ID of the receiver, used for retrieving the private key for decryption. + * @param in The input buffer containing the concatenated signature and encrypted data. + * @param inLen The length of the input buffer. + * @param out The buffer to store the decrypted data. + * @param[out] outLen The length of the decrypted data. + * @param counter The counter value used for streaming. + * + * @return CKR_OK on success, or an appropriate error code on failure. + */ +CK_RV decrypt(int senderId, int receiverId, void *in, size_t inLen, + void *signature, size_t signatureLen, void *out, size_t &outLen, + size_t counter) +{ + CK_RV returnCode; + CryptoConfig config = TempHsm::getInstance().getUserConfig(senderId); + returnCode = AESdecrypt(senderId, receiverId, in, inLen, out, outLen, + config.asymmetricFunction, config.aesKeyLength, + config.aesChainingMode, counter, true); + if (returnCode != CKR_OK) + return returnCode; + returnCode = + verifyUpdate(receiverId, out, outLen, config.hashFunction, counter); + if (returnCode != CKR_OK) + return returnCode; + if (isDoneHashing(receiverId)) { + std::string senderPublicKeyId = + TempHsm::getInstance().getPublicKeyIdByUserId(senderId, RSA); + returnCode = verifyFinalize(receiverId, signature, signatureLen, + config.hashFunction, senderPublicKeyId); + } + if (returnCode != CKR_OK) + return returnCode; + + return CKR_OK; +} + +#pragma endregion ENCRYPT DECRYPT diff --git a/src/crypto_service.cpp b/src/crypto_service.cpp new file mode 100644 index 00000000..88644ee2 --- /dev/null +++ b/src/crypto_service.cpp @@ -0,0 +1,431 @@ +#include "../include/crypto_service.h" +#include "../include/general.h" +#include "../include/crypto_api.h" +#include +#include +#include +#include +#include "../include/debug_utils.h" + +/** + * Encrypts the provided data and returns the encrypted result and signature. + * + * @param context The gRPC server context. + * @param request The request containing the data to encrypt. + * @param response The response containing the encrypted data and signature. + * @return The gRPC status indicating success or failure. + */ +grpc::Status CryptoServiceServer::encrypt(grpc::ServerContext* context, const crypto::EncryptRequest* request, crypto::EncryptResponse* response) +{ + std::string data = request->data(); + size_t outLen = ::getEncryptedLen(request->sender_id(), request->data().length(), request->isfirst()); + void *out = new uint8_t[outLen]; + size_t signatureLen = ::getSignatureLength(); + void* signature = new uint8_t[signatureLen]; + ::encrypt(request->sender_id(), request->receiver_id(), static_cast(const_cast(request->data().data())), request->data().length(), out, outLen, signature, signatureLen, request->counter()); + char *charPtr = static_cast(out); + response->set_encrypted_data(out, outLen); + response->set_signature(signature, signatureLen); + return grpc::Status::OK; +} + +/** + * Decrypts the provided encrypted data and returns the decrypted result. + * + * @param context The gRPC server context. + * @param request The request containing the encrypted data and signature. + * @param response The response containing the decrypted data. + * @return The gRPC status indicating success or failure. + */ +grpc::Status CryptoServiceServer::decrypt(grpc::ServerContext* context, const crypto::DecryptRequest* request, crypto::DecryptResponse* response) +{ + size_t outLen = ::getEncryptedLen(request->sender_id(), request->encrypted_data().length(), request->isfirst()); + void* out = new uint8_t[outLen]; + ::decrypt(request->sender_id(), request->receiver_id(), static_cast(const_cast(request->encrypted_data().data())), request->encrypted_data().length(), static_cast(const_cast(request->signature().data())), request->signature().length(), out, outLen, request->counter()); + response->set_decrypted_data(out, outLen); + return grpc::Status::OK; +} + +/** + * Generates an AES key with the specified permissions and user ID. + * + * @param context The gRPC server context. + * @param request The request containing the user ID and key length. + * @param response The response containing the generated AES key. + * @return The gRPC status indicating success or failure. + */ +grpc::Status CryptoServiceServer::generateAESKey(grpc::ServerContext *context, const crypto::GenerateAESKeyRequest *request, crypto::GenerateAESKeyResponse *response) +{ + std::vector permissions; + for (auto permission : request->permissions()) + permissions.push_back(static_cast(permission)); + response->set_aes_key(::generateAESKey(request->user_id(), static_cast(request->keylength()), permissions, request->destuserid())); + return grpc::Status::OK; +} + +/** + * Generates an RSA key pair with the specified permissions and user ID. + * + * @param context The gRPC server context. + * @param request The request containing the user ID and permissions. + * @param response The response containing the generated RSA key pair. + * @return The gRPC status indicating success or failure. + */ +grpc::Status CryptoServiceServer::generateRSAKeyPair(grpc::ServerContext* context, const crypto::GenerateKeyPairRequest* request, crypto::GenerateKeyPairResponse* response) +{ + std::vector permissions; + for(auto permission: request->permissions()) + permissions.push_back(static_cast(permission)); + std::pair pair = ::generateRSAKeyPair(request->user_id(), permissions); + response->set_private_key(pair.second); + response->set_public_key(pair.first); + return grpc::Status::OK; +} + +/** + * Generates an ECC key pair with the specified permissions and user ID. + * + * @param context The gRPC server context. + * @param request The request containing the user ID and permissions. + * @param response The response containing the generated ECC key pair. + * @return The gRPC status indicating success or failure. + */ +grpc::Status CryptoServiceServer::generateECCKeyPair(grpc::ServerContext* context, const crypto::GenerateKeyPairRequest* request, crypto::GenerateKeyPairResponse* response) +{ + std::vector permissions; + for(auto permission: request->permissions()) + permissions.push_back(static_cast(permission)); + std::pair pair = ::generateECCKeyPair(request->user_id(), permissions); + response->set_private_key(pair.second); + response->set_public_key(pair.first); + return grpc::Status::OK; +} + +/** + * Retrieves the length of signed data (signature length). + * + * @param context The gRPC server context. + * @param request The request for getting the hash length. + * @param response The response containing the length of the signed data. + * @return The gRPC status indicating success or failure. + */ +grpc::Status CryptoServiceServer::getSignedDataLength(grpc::ServerContext* context, const crypto::GetHashLengthRequest* request, crypto::GetLengthResponse* response) +{ + response->set_len(::getSignatureLength()); + return grpc::Status::OK; +} + +// gRPC server methods for cryptographic operations + +// Retrieves the public ECC key associated with a given user ID. +grpc::Status CryptoServiceServer::getPublicECCKeyByUserId(grpc::ServerContext* context, const crypto::KeyRequest* request, crypto::KeyResponse* response) +{ + response->set_key(::getPublicECCKeyByUserId(request->user_id())); + return grpc::Status::OK; +} + +// Retrieves the public RSA key associated with a given user ID. +grpc::Status CryptoServiceServer::getPublicRSAKeyByUserId(grpc::ServerContext* context, const crypto::KeyRequest* request, crypto::KeyResponse* response) +{ + response->set_key(::getPublicRSAKeyByUserId(request->user_id())); + return grpc::Status::OK; +} + +// Gets the length of the encrypted ECC data. +grpc::Status CryptoServiceServer::getECCencryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) +{ + response->set_len(::getECCencryptedLength()); + return grpc::Status::OK; +} + +// Gets the length of the decrypted ECC data. +grpc::Status CryptoServiceServer::getECCDecryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) +{ + response->set_len(::getECCdecryptedLength()); + return grpc::Status::OK; +} + +// Encrypts data using ECC with the specified sender ID and key ID. +grpc::Status CryptoServiceServer::ECCencrypt(grpc::ServerContext* context, const crypto::AsymetricEncryptRequest* request, crypto::AsymetricEncryptResponse* response) +{ + size_t outLen = ::getECCencryptedLength(); + void* out = new uint8_t[outLen]; + + ::ECCencrypt(request->senderid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, outLen); + response->set_encrypted_data(out, outLen); + + return grpc::Status::OK; +} + +// Decrypts ECC-encrypted data using the specified receiver ID and key ID. +grpc::Status CryptoServiceServer::ECCdecrypt(grpc::ServerContext* context, const crypto::AsymetricDecryptRequest* request, crypto::AsymetricDecryptResponse* response) +{ + size_t outLen = ::getECCdecryptedLength(); + void* out = new uint8_t[outLen]; + ::ECCdecrypt(request->receiverid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, outLen); + response->set_decrypted_data(out, outLen); + + return grpc::Status::OK; +} + +// Gets the length of the encrypted RSA data. +grpc::Status CryptoServiceServer::getRSAencryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) +{ + response->set_len(::getRSAencryptedLength()); + return grpc::Status::OK; +} + +// Gets the length of the decrypted RSA data. +grpc::Status CryptoServiceServer::getRSAdecryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) +{ + response->set_len(::getRSAdecryptedLength()); + return grpc::Status::OK; +} + +// Encrypts data using RSA with the specified sender ID and key ID. +grpc::Status CryptoServiceServer::RSAencrypt(grpc::ServerContext* context, const crypto::AsymetricEncryptRequest* request, crypto::AsymetricEncryptResponse* response) +{ + size_t outLen = ::getRSAencryptedLength(); + void* out = new uint8_t[outLen]; + + ::RSAencrypt(request->senderid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, outLen); + response->set_encrypted_data(out, outLen); + + return grpc::Status::OK; +} + +// Decrypts RSA-encrypted data using the specified receiver ID and key ID. +grpc::Status CryptoServiceServer::RSAdecrypt(grpc::ServerContext* context, const crypto::AsymetricDecryptRequest* request, crypto::AsymetricDecryptResponse* response) +{ + size_t outLen = ::getRSAdecryptedLength(); + void* out = new uint8_t[outLen]; + ::RSAdecrypt(request->receiverid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, &outLen); + response->set_decrypted_data(out, outLen); + + return grpc::Status::OK; +} + + +// aes +/** + * Retrieves the length of encrypted data using AES. + * + * @param context The gRPC server context. + * @param request The request containing data length and chaining mode. + * @param response The response object to send back the length. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::getAESencryptedLength( + grpc::ServerContext *context, const crypto::GetAESLengthRequest *request, + crypto::GetLengthResponse *response) +{ + response->set_len(::getAESencryptedLength( + request->datalen(), request->isfirst(), + static_cast(request->chainingmode()))); + + return grpc::Status::OK; +} + +/** + * Retrieves the length of decrypted data using AES. + * + * @param context The gRPC server context. + * @param request The request containing data length and chaining mode. + * @param response The response object to send back the length. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::getAESdecryptedLength( + grpc::ServerContext *context, const crypto::GetAESLengthRequest *request, + crypto::GetLengthResponse *response) +{ + response->set_len( + ::getAESdecryptedLength(request->datalen(), request->isfirst(), static_cast(request->chainingmode()))); + + return grpc::Status::OK; +} + +/** + * Encrypts data using AES encryption. + * + * @param context The gRPC server context. + * @param request The request containing sender and receiver IDs and data. + * @param response The response object to send back the encrypted data. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::AESencrypt(grpc::ServerContext *context, + const crypto::AESEncryptRequest *request, + crypto::AESEncryptResponse *response) +{ + size_t outLen = ::getAESencryptedLength( + request->data().length(), true, + static_cast(request->chainingmode())); + uint8_t out[outLen]; + ::AESencrypt(request->sender_id(), request->receiver_id(), + (void *)request->data().data(), request->data().length(), + out, outLen, + static_cast(request->key_length()), + static_cast(request->chainingmode()), + request->counter(), request->key_id()); + + std::cout << std::dec << std::endl; + + response->set_encrypted_data(reinterpret_cast(out), outLen); + return grpc::Status::OK; +} + +/** + * Decrypts data using AES decryption. + * + * @param context The gRPC server context. + * @param request The request containing sender and receiver IDs and encrypted data. + * @param response The response object to send back the decrypted data. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status +CryptoServiceServer::AESdecrypt(grpc::ServerContext *context, + const crypto::AESDecryptRequest *request, + crypto::AESDecryptResponse *response) +{ + size_t outLen = ::getAESdecryptedLength(request->data_in().length(), false, static_cast(request->chainingmode())); + uint8_t *out = new uint8_t[outLen]; + ::AESdecrypt(request->sender_id(), request->receiver_id(), + (void *)request->data_in().data(), request->data_in().length(), + out, outLen, static_cast(request->key_length()), + static_cast(request->chainingmode()), + request->counter(), request->key_id()); + response->set_decrypted_data(out, outLen); + return grpc::Status::OK; +} + +/** + * Retrieves the length of encrypted data for a specific sender. + * + * @param context The gRPC server context. + * @param request The request containing sender ID and input length. + * @param response The response object to send back the length. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::getEncryptedLen(grpc::ServerContext* context, const crypto::GetWholeLength* request, crypto::GetLengthResponse* response) +{ + response->set_len(::getEncryptedLen(request->senderid(), request->inlen(), true)); + + return grpc::Status::OK; +} + +/** + * Retrieves the length of decrypted data for a specific sender. + * + * @param context The gRPC server context. + * @param request The request containing sender ID and input length. + * @param response The response object to send back the length. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::getDecryptedLen(grpc::ServerContext* context, const crypto::GetWholeLength* request, crypto::GetLengthResponse* response) +{ + response->set_len(::getDecryptedLen(request->senderid(), request->inlen(), true)); + + return grpc::Status::OK; +} + +/** + * Updates the signing process with new data. + * + * @param context The gRPC server context. + * @param request The request containing sender ID and data to sign. + * @param response The response object to send back the status of the operation. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::signUpdate(grpc::ServerContext* context, const crypto::SignRequest* request, crypto::SignResponse* response) +{ + CK_RV status = ::signUpdate(request->sender_id(), (void*)request->data().data(), request->data().length(), static_cast(request->hash_func()), request->counter()); + return status == CKR_OK ? grpc::Status::OK : grpc::Status::CANCELLED; +} + +/** + * Finalizes the signing process and returns the signature. + * + * @param context The gRPC server context. + * @param request The request containing sender ID and key ID. + * @param response The response object to send back the generated signature. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::signFinalize(grpc::ServerContext* context, const crypto::SignRequest* request, crypto::SignResponse* response) +{ + size_t signatureLen = ::getSignatureLength(); + void * signature = new uint8_t[signatureLen]; + if(CK_RV status = ::signFinalize(request->sender_id(), signature, signatureLen, static_cast(request->hash_func()), request->key_id()) != CKR_OK) + return grpc::Status::CANCELLED; + response->set_signature(signature, getSignatureLength()); + + return grpc::Status::OK; +} + +/** + * Updates the verification process with new data. + * + * @param context The gRPC server context. + * @param request The request containing receiver ID and data to verify. + * @param response The response object to send back the status of the verification. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::verifyUpdate(grpc::ServerContext* context, const crypto::VerifyRequest* request, crypto::VerifyResponse* response) +{ + if (::verifyUpdate(request->receiver_id(), (void*)request->data().data(), request->data().length(), static_cast(request->hash_func()), request->counter()) == CKR_OK) + return grpc::Status::OK; + + return grpc::Status::CANCELLED; +} + +// Finalizes the verification process of a signature. +// Checks if the provided signature is valid by comparing it against the expected value. +// If the verification is successful, sets the validity of the signature in the response to true. +// +// Parameters: +// - context: A pointer to the server context. +// - request: A pointer to the VerifyRequest containing the necessary information for verification, +// including receiver ID, signature data, hash function, and key ID. +// - response: A pointer to the VerifyResponse where the result of the verification will be stored. +// +// Returns: +// - grpc::Status::OK if the signature is valid. +// - grpc::Status::CANCELLED if the verification fails. +grpc::Status CryptoServiceServer::verifyFinalize(grpc::ServerContext* context, const crypto::VerifyRequest* request, crypto::VerifyResponse* response) +{ + if(::verifyFinalize(request->receiver_id(), (void*)request->signature().data(),request->signature().length(), static_cast(request->hash_func()), request->key_id())!=CKR_OK) + return grpc::Status::CANCELLED; + response->set_valid(true); + + return grpc::Status::OK; +} + +void RunServer() { + std::string serverAddress("0.0.0.0:50051"); + CryptoServiceServer service; + + grpc::ServerBuilder builder; + builder.AddListeningPort(serverAddress, grpc::InsecureServerCredentials()); + builder.RegisterService(&service); + std::unique_ptr server(builder.BuildAndStart()); + std::cout << "Server listening on " << serverAddress << std::endl; + + server->Wait(); + +} + +int main(int argc, char** argv) { + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_128, + AESChainingMode::CFB, AsymmetricFunction::RSA); + ::configure(1, config); + ::configure(2, config); + ::bootSystem({{1, { KeyPermission::VERIFY, + KeyPermission::SIGN, + KeyPermission::ENCRYPT, + KeyPermission::DECRYPT, + KeyPermission::EXPORTABLE}},{2, {KeyPermission::VERIFY, + KeyPermission::SIGN, + KeyPermission::ENCRYPT, + KeyPermission::DECRYPT, + KeyPermission::EXPORTABLE}}}); + RunServer(); + return 0; +} diff --git a/src/debug_utils.cpp b/src/debug_utils.cpp new file mode 100644 index 00000000..42526949 --- /dev/null +++ b/src/debug_utils.cpp @@ -0,0 +1,51 @@ +#include +#include + +#include +#include "../include/debug_utils.h" +using namespace std; + +#define DEBUG + +void printBufferHexa(const uint8_t *buffer, size_t len, std::string message) +{ +#ifdef DEBUG + std::cout << message << std::endl; + for (size_t i = 0; i < len; ++i) + { + std::cout << std::hex << std::setw(2) << std::setfill('0') + << static_cast(buffer[i]) << " "; + // Print a new line every 16 bytes for better readability + if ((i + 1) % 16 == 0) + std::cout << std::endl; + } + std::cout << std::endl; + // Reset the stream format back to decimal + std::cout << std::dec; +#endif +} + +void encryptStartPrintParams(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen, unsigned char* key, AESKeyLength keyLength) +{ + printBufferHexa(block, inLen, "Block: "); + printBufferHexa(key, 128, "Key: "); + std::cout << "inLen: " << inLen << ", outLen(before): " << outLen << std::endl; +} + +void encryptContinuePrintParams(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) +{ + printBufferHexa(block, inLen, "Block: "); + std::cout << "inLen: " << inLen << ", outLen(before): " << outLen << std::endl; +} + +void printStreamAES(const StreamAES& obj, size_t blockSize, std::string message) { + + printBufferHexa(obj.iv, blockSize, "IV: "); + + printBufferHexa(obj.lastBlock, blockSize, "Last Block: "); + + printBufferHexa(obj.key, obj.keyLength, "Key: "); + + std::cout << "Key Length: " << obj.keyLength << " bytes" << std::endl; +} + diff --git a/src/ecc.cpp b/src/ecc.cpp index f2d7ab6d..443d413d 100644 --- a/src/ecc.cpp +++ b/src/ecc.cpp @@ -6,8 +6,6 @@ #include #include - - unsigned int added = 0; // Define static constants @@ -178,7 +176,6 @@ bool modularSqrt(mpz_t result, const mpz_t a, const mpz_t p) // Check if a is sqrt of 1 (x^2 ≡ a (mod p)) if (mpz_legendre(a, p) != 1) { - std::cout << "No solution exists." << std::endl; mpz_clears(q, s, z, m, c, t, r, b, temp, NULL); return false; } diff --git a/src/general.cpp b/src/general.cpp new file mode 100644 index 00000000..0072c372 --- /dev/null +++ b/src/general.cpp @@ -0,0 +1,6 @@ +#include "../include/general.h" + +void log(logger::LogLevel level, const std::string &message) { + static logger logInstance("HSM"); + logInstance.logMessage(level, message); +} diff --git a/src/hash_factory.cpp b/src/hash_factory.cpp index f44e9a8c..ee07ab99 100644 --- a/src/hash_factory.cpp +++ b/src/hash_factory.cpp @@ -1,8 +1,6 @@ #include "../include/hash_factory.h" #include -logger factory_logger("hsm"); - /** * @brief Gets the singleton instance of HashFactory. * @@ -13,7 +11,7 @@ logger factory_logger("hsm"); */ HashFactory& HashFactory::getInstance() { - factory_logger.logMessage(logger::LogLevel::INFO, "HashFactory::getInstance() called"); + log(logger::LogLevel::DEBUG, "HashFactory::getInstance() called"); static HashFactory instance; return instance; } @@ -28,9 +26,9 @@ HashFactory& HashFactory::getInstance() * @param hashPtr A reference to a unique_ptr where the newly created IHash object will be stored. * @return CK_RV The return code indicating success or failure. */ -CK_RV HashFactory::create(const IHash::SHAAlgorithm& type, std::unique_ptr& hashPtr) const +CK_RV HashFactory::create(const SHAAlgorithm& type, std::unique_ptr& hashPtr) const { - factory_logger.logMessage(logger::LogLevel::INFO, "HashFactory::create() called with SHAAlgorithm: " + std::to_string(static_cast(type))); + log(logger::LogLevel::INFO, "HashFactory::create() called with SHAAlgorithm: " + std::to_string(static_cast(type))); try { const auto it = factories.find(type); @@ -38,12 +36,12 @@ CK_RV HashFactory::create(const IHash::SHAAlgorithm& type, std::unique_ptrsecond(); return CKR_OK; // Success } else { - factory_logger.logMessage(logger::LogLevel::ERROR, "Error: Algorithm type not found in HashFactory."); + log(logger::LogLevel::ERROR, "Error: Algorithm type not found in HashFactory."); return CKR_FUNCTION_FAILED; // Error: Algorithm type not found } } catch (const std::exception& e) { - factory_logger.logMessage(logger::LogLevel::ERROR, std::string("Exception caught in HashFactory::create: ") + e.what()); + log(logger::LogLevel::ERROR, std::string("Exception caught in HashFactory::create: ") + e.what()); return CKR_FUNCTION_FAILED; // Error: Exception occurred } } @@ -56,9 +54,9 @@ CK_RV HashFactory::create(const IHash::SHAAlgorithm& type, std::unique_ptr std::unique_ptr { return std::make_unique(); }}, - {IHash::SHAAlgorithm::SHA3_512, []() -> std::unique_ptr { return std::make_unique(); }} + {SHAAlgorithm::SHA_256, []() -> std::unique_ptr { return std::make_unique(); }}, + {SHAAlgorithm::SHA_3_512, []() -> std::unique_ptr { return std::make_unique(); }} }) { - factory_logger.logMessage(logger::LogLevel::INFO, "HashFactory constructor called, initializing hash algorithm factories."); + log(logger::LogLevel::INFO, "HashFactory constructor called, initializing hash algorithm factories."); } \ No newline at end of file diff --git a/src/prime_tests.cpp b/src/prime_tests.cpp index 38df9461..22dba3b1 100644 --- a/src/prime_tests.cpp +++ b/src/prime_tests.cpp @@ -1,805 +1,798 @@ -// #include -// #include "../include/big_int_utils.h" -// #include "../include/prime_tests.h" -// #include "logger.h" -// using namespace std; - -// constexpr size_t smallPrimesSize = 2000; -// constexpr int smallPrimes[2000] = { -// 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, -// 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, -// 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, -// 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, -// 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, -// 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, -// 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, -// 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, -// 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, -// 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, -// 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, -// 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, -// 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, -// 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, -// 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, -// 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, -// 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, -// 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, -// 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, -// 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, -// 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, -// 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, -// 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, -// 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, -// 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, -// 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, -// 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, -// 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, -// 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, -// 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, -// 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, -// 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, -// 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, -// 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, -// 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, -// 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, -// 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, -// 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, -// 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, -// 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, -// 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, -// 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, -// 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, -// 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, -// 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, -// 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, -// 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, -// 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, -// 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, -// 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, -// 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, -// 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, -// 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, -// 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, -// 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, -// 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, -// 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, -// 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, -// 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, -// 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, -// 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, -// 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, -// 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, -// 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, -// 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, -// 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, -// 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, -// 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, -// 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, -// 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, -// 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, -// 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, -// 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, -// 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, -// 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, -// 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, -// 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, -// 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, -// 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, -// 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, -// 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, -// 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, -// 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, -// 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, -// 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, -// 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, -// 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, -// 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, -// 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, -// 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, -// 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, -// 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, -// 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, -// 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, -// 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, -// 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, -// 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, -// 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, -// 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, -// 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, -// 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, -// 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, -// 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, -// 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, -// 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, -// 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, -// 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, -// 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, -// 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, -// 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, -// 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, -// 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, -// 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, -// 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, -// 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, -// 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, -// 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, -// 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, -// 10651, 10657, 10663, 10667, 10687, 10691, 10709, 10711, 10723, 10729, 10733, -// 10739, 10753, 10771, 10781, 10789, 10799, 10831, 10837, 10847, 10853, 10859, -// 10861, 10867, 10883, 10889, 10891, 10903, 10909, 10937, 10939, 10949, 10957, -// 10973, 10979, 10987, 10993, 11003, 11027, 11047, 11057, 11059, 11069, 11071, -// 11083, 11087, 11093, 11113, 11117, 11119, 11131, 11149, 11159, 11161, 11171, -// 11173, 11177, 11197, 11213, 11239, 11243, 11251, 11257, 11261, 11273, 11279, -// 11287, 11299, 11311, 11317, 11321, 11329, 11351, 11353, 11369, 11383, 11393, -// 11399, 11411, 11423, 11437, 11443, 11447, 11467, 11471, 11483, 11489, 11491, -// 11497, 11503, 11519, 11527, 11549, 11551, 11579, 11587, 11593, 11597, 11617, -// 11621, 11633, 11657, 11677, 11681, 11689, 11699, 11701, 11717, 11719, 11731, -// 11743, 11777, 11779, 11783, 11789, 11801, 11807, 11813, 11821, 11827, 11831, -// 11833, 11839, 11863, 11867, 11887, 11897, 11903, 11909, 11923, 11927, 11933, -// 11939, 11941, 11953, 11959, 11969, 11971, 11981, 11987, 12007, 12011, 12037, -// 12041, 12043, 12049, 12071, 12073, 12097, 12101, 12107, 12109, 12113, 12119, -// 12143, 12149, 12157, 12161, 12163, 12197, 12203, 12211, 12227, 12239, 12241, -// 12251, 12253, 12263, 12269, 12277, 12281, 12289, 12301, 12323, 12329, 12343, -// 12347, 12373, 12377, 12379, 12391, 12401, 12409, 12413, 12421, 12433, 12437, -// 12451, 12457, 12473, 12479, 12487, 12491, 12497, 12503, 12511, 12517, 12527, -// 12539, 12541, 12547, 12553, 12569, 12577, 12583, 12589, 12601, 12611, 12613, -// 12619, 12637, 12641, 12647, 12653, 12659, 12671, 12689, 12697, 12703, 12713, -// 12721, 12739, 12743, 12757, 12763, 12781, 12791, 12799, 12809, 12821, 12823, -// 12829, 12841, 12853, 12889, 12893, 12899, 12907, 12911, 12917, 12919, 12923, -// 12941, 12953, 12959, 12967, 12973, 12979, 12983, 13001, 13003, 13007, 13009, -// 13033, 13037, 13043, 13049, 13063, 13093, 13099, 13103, 13109, 13121, 13127, -// 13147, 13151, 13159, 13163, 13171, 13177, 13183, 13187, 13217, 13219, 13229, -// 13241, 13249, 13259, 13267, 13291, 13297, 13309, 13313, 13327, 13331, 13337, -// 13339, 13367, 13381, 13397, 13399, 13411, 13417, 13421, 13441, 13451, 13457, -// 13463, 13469, 13477, 13487, 13499, 13513, 13523, 13537, 13553, 13567, 13577, -// 13591, 13597, 13613, 13619, 13627, 13633, 13649, 13669, 13679, 13681, 13687, -// 13691, 13693, 13697, 13709, 13711, 13721, 13723, 13729, 13751, 13757, 13759, -// 13763, 13781, 13789, 13799, 13807, 13829, 13831, 13841, 13859, 13873, 13877, -// 13879, 13883, 13901, 13903, 13907, 13913, 13921, 13931, 13933, 13963, 13967, -// 13997, 13999, 14009, 14011, 14029, 14033, 14051, 14057, 14071, 14081, 14083, -// 14087, 14107, 14143, 14149, 14153, 14159, 14173, 14177, 14197, 14207, 14221, -// 14243, 14249, 14251, 14281, 14293, 14303, 14321, 14323, 14327, 14341, 14347, -// 14369, 14387, 14389, 14401, 14407, 14411, 14419, 14423, 14431, 14437, 14447, -// 14449, 14461, 14479, 14489, 14503, 14519, 14533, 14537, 14543, 14549, 14551, -// 14557, 14561, 14563, 14591, 14593, 14621, 14627, 14629, 14633, 14639, 14653, -// 14657, 14669, 14683, 14699, 14713, 14717, 14723, 14731, 14737, 14741, 14747, -// 14753, 14759, 14767, 14771, 14779, 14783, 14797, 14813, 14821, 14827, 14831, -// 14843, 14851, 14867, 14869, 14879, 14887, 14891, 14897, 14923, 14929, 14939, -// 14947, 14951, 14957, 14969, 14983, 15013, 15017, 15031, 15053, 15061, 15073, -// 15077, 15083, 15091, 15101, 15107, 15121, 15131, 15137, 15139, 15149, 15161, -// 15173, 15187, 15193, 15199, 15217, 15227, 15233, 15241, 15259, 15263, 15269, -// 15271, 15277, 15287, 15289, 15299, 15307, 15313, 15319, 15329, 15331, 15349, -// 15359, 15361, 15373, 15377, 15383, 15391, 15401, 15413, 15427, 15439, 15443, -// 15451, 15461, 15467, 15473, 15493, 15497, 15511, 15527, 15541, 15551, 15559, -// 15569, 15581, 15583, 15601, 15607, 15619, 15629, 15641, 15643, 15647, 15649, -// 15661, 15667, 15671, 15679, 15683, 15727, 15731, 15733, 15737, 15739, 15749, -// 15761, 15767, 15773, 15787, 15791, 15797, 15803, 15809, 15817, 15823, 15859, -// 15877, 15881, 15887, 15889, 15901, 15907, 15913, 15919, 15923, 15937, 15959, -// 15971, 15973, 15991, 16001, 16007, 16033, 16057, 16061, 16063, 16067, 16069, -// 16073, 16087, 16091, 16097, 16103, 16111, 16127, 16139, 16141, 16183, 16187, -// 16189, 16193, 16217, 16223, 16229, 16231, 16249, 16253, 16267, 16273, 16301, -// 16319, 16333, 16339, 16349, 16361, 16363, 16369, 16381, 16411, 16417, 16421, -// 16427, 16433, 16447, 16451, 16453, 16477, 16481, 16487, 16493, 16519, 16529, -// 16547, 16553, 16561, 16567, 16573, 16603, 16607, 16619, 16631, 16633, 16649, -// 16651, 16657, 16661, 16673, 16691, 16693, 16699, 16703, 16729, 16741, 16747, -// 16759, 16763, 16787, 16811, 16823, 16829, 16831, 16843, 16871, 16879, 16883, -// 16889, 16901, 16903, 16921, 16927, 16931, 16937, 16943, 16963, 16979, 16981, -// 16987, 16993, 17011, 17021, 17027, 17029, 17033, 17041, 17047, 17053, 17077, -// 17093, 17099, 17107, 17117, 17123, 17137, 17159, 17167, 17183, 17189, 17191, -// 17203, 17207, 17209, 17231, 17239, 17257, 17291, 17293, 17299, 17317, 17321, -// 17327, 17333, 17341, 17351, 17359, 17377, 17383, 17387, 17389}; - -// bool isDivisibleBySmallPrimes(const BigInt64 &n) -// { -// for (int i = 0; i < smallPrimesSize && n > smallPrimes[i]; i++) -// if (n % smallPrimes[i] == 0) -// return true; - -// return false; -// } - -// bool fermatPrimalityTest(const BigInt64 &number, size_t k) -// { -// if (number == 2 || number == 3) -// return true; - -// if (number <= 1 || number.isEven()) -// return false; - -// if (isDivisibleBySmallPrimes(number)) -// return false; - -// while (k-- > 0) { -// // assume n is a prime number -// // pick randon integer a, such that 1 its not prime -// if (modExpo != 1) -// return false; -// } - -// return true; -// } - -// bool millerRabinPrimalityTest(const BigInt64 &number, size_t k) -// { -// if (number == 2 || number == 3) -// return true; - -// if (number <= 1 || number.isEven()) -// return false; - -// // Write n-1 as 2^s * d where d is odd -// BigInt64 s = 0; -// BigInt64 d = number - 1; -// while (d.isEven()) { -// d >>= 1; -// s++; -// } -// while (k-- > 0) { -// // pick randon integer a, such that 1 -// bool isDivisibleBySmallPrimesBuffers(sycl::queue &q, const BigInt64 &n) -// { -// const std::vector nVec(smallPrimesSize, n); -// int sumResult = 0; -// sycl::range<1> sizeRange{smallPrimesSize}; -// sycl::buffer sumBuff{&sumResult, 1}; -// sycl::buffer primesBuff{smallPrimes, sizeRange}; -// sycl::buffer nBuff{nVec.data(), sizeRange}; - -// q.submit([&](sycl::handler &h) { -// auto sumResult = sycl::reduction(sumBuff, h, sycl::plus<>()); -// sycl::accessor primesAcc(primesBuff, h, sycl::read_only); -// sycl::accessor nAcc(nBuff, h, sycl::read_only); - -// h.parallel_for(sizeRange, sumResult, [=](sycl::id<1> idx, auto &sum) { -// if (nAcc[idx] % primesAcc[idx] == 0 && nAcc[idx] != primesAcc[idx]) -// sum += true; -// sum += false; -// }); -// }); -// q.wait(); -// return sumResult > 0; -// } - -// bool isDivisibleBySmallPrimesUSM(sycl::queue &q, const BigInt64 &n) -// { -// const std::vector nVec(smallPrimesSize, n); -// int sumResult = 0; -// sycl::range<1> sizeRange{smallPrimesSize}; -// sycl::buffer sumBuff{&sumResult, 1}; - -// int *primesShared = sycl::malloc_shared(smallPrimesSize, q); -// BigInt64 *nShared = sycl::malloc_shared(smallPrimesSize, q); -// for (int i = 0; i < smallPrimesSize; i++) { -// primesShared[i] = smallPrimes[i]; -// nShared[i] = nVec[i]; -// } - -// q.submit([&](sycl::handler &h) { -// auto sumResult = sycl::reduction(sumBuff, h, sycl::plus<>()); - -// h.parallel_for(sizeRange, sumResult, [=](sycl::id<1> idx, auto &sum) { -// if (nShared[idx] % primesShared[idx] == 0 && -// nShared[idx] != primesShared[idx]) -// sum += true; -// sum += false; -// }); -// }); -// q.wait(); -// sycl::free(primesShared, q); -// sycl::free(nShared, q); -// return sumResult > 0; -// } - -// bool millerRabinPrimalityTestBuffers(sycl::queue &q, const BigInt64 &number, -// size_t k) -// { -// if (number == 2 || number == 3) -// return true; - -// if (number <= 1 || number.isEven()) -// return false; - -// // Write n-1 as 2^s * d where d is odd -// BigInt64 s = 0; -// BigInt64 d = number - 1; -// while (d.isEven()) { -// d >>= 1; -// s++; -// } -// vector randoms(k, BigInt64(BigInt64::RANDOM, 2, number - 2)); -// vector dVec(k, d); -// vector numberVec(k, number); -// vector sVec(k, s); - -// sycl::range<1> kRange{k}; -// int sumResult = 0; -// sycl::buffer sumBuf{&sumResult, 1}; -// sycl::buffer randomsBuff{randoms.data(), kRange}; -// sycl::buffer dBuff{dVec.data(), kRange}; -// sycl::buffer numberBuff{numberVec.data(), kRange}; -// sycl::buffer sBuff{sVec.data(), kRange}; - -// q.submit([&](sycl::handler &cgh) { -// auto sumReduction = reduction(sumBuf, cgh, sycl::plus<>()); -// sycl::accessor randomsAcc(randomsBuff, cgh, -// sycl::read_write); -// sycl::accessor dAcc(dBuff, cgh, sycl::read_write); -// sycl::accessor numberAcc(numberBuff, cgh, -// sycl::read_write); -// sycl::accessor sAcc(sBuff, cgh, sycl::read_write); - -// cgh.parallel_for(kRange, sumReduction, [=](sycl::id<1> idx, auto &sum) { -// BigInt64 aIn = randomsAcc[idx]; -// BigInt64 dIn = dAcc[idx]; -// BigInt64 numberIn = numberAcc[idx]; -// BigInt64 sIn = sAcc[idx]; -// // pick randon integer a, such that 1>= 1; -// s++; -// } - -// std::uint64_t offset = number.getLsb(); -// oneapi::dpl::minstd_rand engine(seed, offset); -// oneapi::dpl::uniform_real_distribution distr; -// BigInt64 a(2, number - 2, distr, engine); - -// BigInt64 x = modularExponentiation(a, d, number); -// if (x == 1 || x == number - 1) -// return true; - -// for (BigInt64 i = 0; i < s - 1; i++) { -// x = modularExponentiation(x, 2, number); -// if (x == number - 1) // x^2 mod n=n-1 -// return true; -// } - -// return false; -// } - -// bool millerRabinPrimalityTestUSM(sycl::queue &q, const BigInt64 &number, -// size_t k) -// { -// if (number == 2 || number == 3) -// return true; - -// if (number <= 1 || number.isEven()) -// return false; - -// // Write n-1 as 2^s * d where d is odd -// BigInt64 s = 0; -// BigInt64 d = number - 1; -// while (d.isEven()) { -// d >>= 1; -// s++; -// } - -// sycl::range<1> kRange{k}; -// int sumResult = 0; -// sycl::buffer sumBuf{&sumResult, 1}; - -// BigInt64 *randomsShared = sycl::malloc_shared(k, q); -// BigInt64 *dShared = sycl::malloc_shared(k, q); -// BigInt64 *numberShared = sycl::malloc_shared(k, q); -// BigInt64 *sShared = sycl::malloc_shared(k, q); - -// for (int i = 0; i < k; i++) { -// randomsShared[i] = BigInt64(BigInt64::RANDOM, 2, number - 2); -// dShared[i] = d; -// numberShared[i] = number; -// sShared[i] = s; -// } -// q.submit([&](sycl::handler &cgh) { -// auto sumReduction = reduction(sumBuf, cgh, sycl::plus<>()); - -// cgh.parallel_for(kRange, sumReduction, [=](sycl::id<1> idx, auto &sum) { -// BigInt64 aIn = randomsShared[idx]; -// BigInt64 dIn = dShared[idx]; -// BigInt64 numberIn = numberShared[idx]; -// BigInt64 sIn = sShared[idx]; -// // pick randon integer a, such that 1 distr; -// BigInt64 a(2, number - 2, distr, engine); -// // check if n is divisible by a -// if (gcd(number, a) != 1) -// return false; - -// BigInt64 modExpo = modularExponentiation(a, number - 1, number); -// // Fermat's little theorem- a^(prime-1)%prime ==1, else-> its not prime -// if (modExpo != 1) -// return false; - -// return true; -// } - -// bool fermatPrimalityTest(sycl::queue &q, const BigInt64 &number, size_t k) -// { -// if (number == 2 || number == 3) -// return true; - -// if (number <= 1 || number.isEven()) -// return false; - -// if (isDivisibleBySmallPrimes(number)) -// return false; - -// while (k-- > 0) { -// // assume n is a prime number -// // pick randon integer a, such that 1 its not prime -// if (modExpo != 1) -// return false; -// } - -// return true; -// } - -// bool nextPrimeChunk(BigInt64 &number, const BigInt64 &max, std::uint32_t seed) -// { -// if (number < 2) -// return 2; - -// if (number.isEven()) -// number++; - -// while (!fermatPrimalityTestInKernel(number, seed)) { -// number += 2; -// if (number > max) -// return false; -// } -// // candidate passed fermats test -// return true; -// } - -// BigInt64 nextPrimeSequential(const BigInt64 &number, size_t k) -// { -// if (number < 2) -// return 2; - -// BigInt64 res = number; -// if (res.isEven()) -// res++; -// sycl::queue q; -// do { -// while (!fermatPrimalityTest(q, res, 1)) { -// res += 2; -// } -// // candidate passed fermats test -// } while (!millerRabinPrimalityTestUSM(q, res, k)); -// return res; -// } - -// BigInt64 nextPrimeDivideToChunks(const BigInt64 &number, size_t k) -// { -// logger rsaLogger("RSA encryption"); -// rsaLogger.logMessage( -// logger::LogLevel::DEBUG, -// "RSA next prime: finding next prime after random number " + -// number.toString()); -// size_t numChunks; -// size_t chunkSize; -// size_t bits = number.bitsCount(); -// if (bits <= 513) { // 500 -// numChunks = 10; -// chunkSize = 50; -// } -// else { // 1000 -// numChunks = 10; -// chunkSize = 100; -// } -// sycl::queue q; -// BigInt64 *numberShared = sycl::malloc_shared(numChunks, q); -// BigInt64 *maxShared = sycl::malloc_shared(numChunks, q); -// bool *resultsShared = sycl::malloc_shared(numChunks, q); -// BigInt64 currentStart = number; -// while (true) { -// for (int i = 0; i < numChunks; i++) { -// resultsShared[i] = false; -// numberShared[i] = currentStart + i * chunkSize; -// maxShared[i] = currentStart + (i + 1) * chunkSize - 1; -// } - -// currentStart += chunkSize * numChunks; -// int sumResult = 0; -// sycl::buffer sumBuff{&sumResult, 1}; - -// q.submit([&](sycl::handler &cgh) { -// auto sumReduction = reduction(sumBuff, cgh, sycl::plus<>()); -// cgh.parallel_for(sycl::range<1>{numChunks}, sumReduction, -// [=](sycl::id<1> idx, auto &sum) { -// resultsShared[idx] = -// nextPrimeChunk(numberShared[idx], -// maxShared[idx], idx.get(0)); -// sum += resultsShared[idx]; -// }); -// }); -// q.wait(); -// for (int i = 0; i < numChunks; i++) { -// if (resultsShared[i] == true) { -// BigInt64 candidate = numberShared[i]; -// bool passed = millerRabinPrimalityTestUSM(q, candidate, k); -// if (passed) { -// sycl::free(numberShared, q); -// sycl::free(maxShared, q); -// sycl::free(resultsShared, q); -// rsaLogger.logMessage(logger::LogLevel::DEBUG, -// "RSA next prime: found prime number " + -// candidate.toString() + "\nat gap " + -// (candidate - number).toString()); -// return candidate; -// } -// } -// } - -// rsaLogger.logMessage(logger::LogLevel::DEBUG, -// "RSA next prime: didnt find primes in range of " + -// (currentStart - number).toString() + -// " numbers, continue searching..."); -// } -// } - -// #else -// #include -// #include -// #include - -// bool millerRabinPrimalityTestRound(const BigInt64 &number, const BigInt64 &d, -// const BigInt64 &s, std::atomic &passed) -// { -// BigInt64 a(BigInt64::CreateModes::RANDOM, 2, number - 2); -// BigInt64 x = modularExponentiation(a, d, number); -// if (x == 1 || x == number - 1) -// return true; - -// for (BigInt64 i = 0; passed.load() == true && i < s - 1; i++) { -// x = modularExponentiation(x, 2, number); -// if (x == number - 1) // x^2 mod n=n-1 -// return true; -// } - -// return false; -// } - -// void parallelRound(const BigInt64 &number, const BigInt64 &d, const BigInt64 &s, -// std::atomic &passed) -// { -// if (!passed.load()) -// return; - -// bool res = millerRabinPrimalityTestRound(number, d, s, passed); -// if (!res && passed.exchange(false)) -// return; -// } - -// bool millerRabinPrimalityTestThreads(const BigInt64 &number, size_t k) -// { -// if (number == 2 || number == 3) -// return true; - -// if (number <= 1 || number.isEven()) -// return false; - -// // Write n-1 as 2^s * d where d is odd -// BigInt64 s = 0; -// BigInt64 d = number - 1; -// while (d.isEven()) { -// d >>= 1; -// s++; -// } - -// std::atomic passed(true); -// std::vector threads; -// for (int i = 0; i < k; i++) { -// threads.emplace_back(parallelRound, std::ref(number), std::ref(d), -// std::ref(s), std::ref(passed)); -// } - -// for (auto &t : threads) -// t.join(); -// return passed.load(); -// } - -// bool nextPrimeChunk(BigInt64 &number, const BigInt64 &end, -// std::atomic &found) -// { -// if (found.load()) -// return false; - -// if (number < 2) -// return 2; - -// if (number.isEven()) -// number++; -// while (!fermatPrimalityTest(number, 1)) { -// number += 2; -// if (found.load() || number > end) -// return false; -// } - -// if (!found.exchange(true)) -// return true; - -// return true; -// } - -// BigInt64 nextPrimeDivideToChunks(const BigInt64 &number, size_t k) -// { -// logger rsaLogger("RSA encryption"); -// rsaLogger.logMessage( -// logger::LogLevel::DEBUG, -// "RSA next prime: finding next prime after random number " + -// number.toString()); -// size_t numChunks; -// size_t chunkSize; -// size_t bits = number.bitsCount(); -// if (bits <= 513) { // 500 -// numChunks = 10; -// chunkSize = 50; -// } -// else { // 1000 -// numChunks = 10; -// chunkSize = 100; -// } - -// std::vector numbers(numChunks); -// std::vector ends(numChunks); -// BigInt64 currentStart = number; -// std::vector > futures; -// std::atomic found(false); -// while (true) { -// for (int i = 0; i < numChunks; i++) { -// numbers[i] = currentStart + i * chunkSize; -// ends[i] = currentStart + (i + 1) * chunkSize - 1; -// futures.push_back(std::async(std::launch::async, nextPrimeChunk, -// std::ref(numbers[i]), -// std::ref(ends[i]), std::ref(found))); -// } - -// currentStart += numChunks * chunkSize; -// for (int i = 0; i < numChunks; i++) -// if (futures[i].get() && -// millerRabinPrimalityTestThreads(numbers[i], k)) { -// rsaLogger.logMessage(logger::LogLevel::DEBUG, -// "RSA next prime: found prime number " + -// numbers[i].toString() + "\nat gap " + -// (numbers[i] - number).toString()); -// return numbers[i]; -// } - -// rsaLogger.logMessage(logger::LogLevel::DEBUG, -// "RSA next prime: didnt find primes in range of " + -// (currentStart - number).toString() + -// " numbers, continue searching..."); -// futures.clear(); -// } -// } - -// BigInt64 nextPrimeSequential(const BigInt64 &number, size_t k) -// { -// if (number < 2) -// return 2; - -// BigInt64 res = number; -// if (res.isEven()) -// res++; -// do { -// while (!fermatPrimalityTest(res, 1)) { -// res += 2; -// } - -// // candidate passed fermats test -// } while (!millerRabinPrimalityTestThreads(res, k)); -// return res; -// } - -// #endif \ No newline at end of file +#include +#include "../include/big_int_utils.h" +#include "../include/prime_tests.h" +#include "../logger/logger.h" +#include "../include/general.h" +using namespace std; + +constexpr size_t smallPrimesSize = 2000; +constexpr int smallPrimes[2000] = { + 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, + 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, + 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, + 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, + 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, + 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, + 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, + 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, + 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, + 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, + 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, + 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, + 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, + 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, + 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, + 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, + 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, + 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, + 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, + 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, + 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, + 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, + 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, + 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, + 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, + 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, + 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, + 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, + 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, + 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, + 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, + 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, + 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, + 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, + 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, + 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, + 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, + 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, + 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, + 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, + 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, + 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, + 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, + 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, + 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, + 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, + 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, + 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, + 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, + 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, + 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, + 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, + 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, + 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, + 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, + 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, + 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, + 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, + 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, + 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, + 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, + 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, + 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, + 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, + 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, + 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, + 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, + 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, + 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, + 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, + 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, + 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, + 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, + 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, + 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, + 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, + 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, + 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, + 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, + 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, + 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, + 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, + 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, + 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, + 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, + 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, + 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, + 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, + 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, + 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, + 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, + 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, + 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, + 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, + 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, + 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, + 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, + 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, + 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, + 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, + 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, + 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, + 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, + 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, + 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, + 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, + 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, + 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, + 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, + 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, + 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, + 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, + 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, + 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, + 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, + 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, + 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, + 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, + 10651, 10657, 10663, 10667, 10687, 10691, 10709, 10711, 10723, 10729, 10733, + 10739, 10753, 10771, 10781, 10789, 10799, 10831, 10837, 10847, 10853, 10859, + 10861, 10867, 10883, 10889, 10891, 10903, 10909, 10937, 10939, 10949, 10957, + 10973, 10979, 10987, 10993, 11003, 11027, 11047, 11057, 11059, 11069, 11071, + 11083, 11087, 11093, 11113, 11117, 11119, 11131, 11149, 11159, 11161, 11171, + 11173, 11177, 11197, 11213, 11239, 11243, 11251, 11257, 11261, 11273, 11279, + 11287, 11299, 11311, 11317, 11321, 11329, 11351, 11353, 11369, 11383, 11393, + 11399, 11411, 11423, 11437, 11443, 11447, 11467, 11471, 11483, 11489, 11491, + 11497, 11503, 11519, 11527, 11549, 11551, 11579, 11587, 11593, 11597, 11617, + 11621, 11633, 11657, 11677, 11681, 11689, 11699, 11701, 11717, 11719, 11731, + 11743, 11777, 11779, 11783, 11789, 11801, 11807, 11813, 11821, 11827, 11831, + 11833, 11839, 11863, 11867, 11887, 11897, 11903, 11909, 11923, 11927, 11933, + 11939, 11941, 11953, 11959, 11969, 11971, 11981, 11987, 12007, 12011, 12037, + 12041, 12043, 12049, 12071, 12073, 12097, 12101, 12107, 12109, 12113, 12119, + 12143, 12149, 12157, 12161, 12163, 12197, 12203, 12211, 12227, 12239, 12241, + 12251, 12253, 12263, 12269, 12277, 12281, 12289, 12301, 12323, 12329, 12343, + 12347, 12373, 12377, 12379, 12391, 12401, 12409, 12413, 12421, 12433, 12437, + 12451, 12457, 12473, 12479, 12487, 12491, 12497, 12503, 12511, 12517, 12527, + 12539, 12541, 12547, 12553, 12569, 12577, 12583, 12589, 12601, 12611, 12613, + 12619, 12637, 12641, 12647, 12653, 12659, 12671, 12689, 12697, 12703, 12713, + 12721, 12739, 12743, 12757, 12763, 12781, 12791, 12799, 12809, 12821, 12823, + 12829, 12841, 12853, 12889, 12893, 12899, 12907, 12911, 12917, 12919, 12923, + 12941, 12953, 12959, 12967, 12973, 12979, 12983, 13001, 13003, 13007, 13009, + 13033, 13037, 13043, 13049, 13063, 13093, 13099, 13103, 13109, 13121, 13127, + 13147, 13151, 13159, 13163, 13171, 13177, 13183, 13187, 13217, 13219, 13229, + 13241, 13249, 13259, 13267, 13291, 13297, 13309, 13313, 13327, 13331, 13337, + 13339, 13367, 13381, 13397, 13399, 13411, 13417, 13421, 13441, 13451, 13457, + 13463, 13469, 13477, 13487, 13499, 13513, 13523, 13537, 13553, 13567, 13577, + 13591, 13597, 13613, 13619, 13627, 13633, 13649, 13669, 13679, 13681, 13687, + 13691, 13693, 13697, 13709, 13711, 13721, 13723, 13729, 13751, 13757, 13759, + 13763, 13781, 13789, 13799, 13807, 13829, 13831, 13841, 13859, 13873, 13877, + 13879, 13883, 13901, 13903, 13907, 13913, 13921, 13931, 13933, 13963, 13967, + 13997, 13999, 14009, 14011, 14029, 14033, 14051, 14057, 14071, 14081, 14083, + 14087, 14107, 14143, 14149, 14153, 14159, 14173, 14177, 14197, 14207, 14221, + 14243, 14249, 14251, 14281, 14293, 14303, 14321, 14323, 14327, 14341, 14347, + 14369, 14387, 14389, 14401, 14407, 14411, 14419, 14423, 14431, 14437, 14447, + 14449, 14461, 14479, 14489, 14503, 14519, 14533, 14537, 14543, 14549, 14551, + 14557, 14561, 14563, 14591, 14593, 14621, 14627, 14629, 14633, 14639, 14653, + 14657, 14669, 14683, 14699, 14713, 14717, 14723, 14731, 14737, 14741, 14747, + 14753, 14759, 14767, 14771, 14779, 14783, 14797, 14813, 14821, 14827, 14831, + 14843, 14851, 14867, 14869, 14879, 14887, 14891, 14897, 14923, 14929, 14939, + 14947, 14951, 14957, 14969, 14983, 15013, 15017, 15031, 15053, 15061, 15073, + 15077, 15083, 15091, 15101, 15107, 15121, 15131, 15137, 15139, 15149, 15161, + 15173, 15187, 15193, 15199, 15217, 15227, 15233, 15241, 15259, 15263, 15269, + 15271, 15277, 15287, 15289, 15299, 15307, 15313, 15319, 15329, 15331, 15349, + 15359, 15361, 15373, 15377, 15383, 15391, 15401, 15413, 15427, 15439, 15443, + 15451, 15461, 15467, 15473, 15493, 15497, 15511, 15527, 15541, 15551, 15559, + 15569, 15581, 15583, 15601, 15607, 15619, 15629, 15641, 15643, 15647, 15649, + 15661, 15667, 15671, 15679, 15683, 15727, 15731, 15733, 15737, 15739, 15749, + 15761, 15767, 15773, 15787, 15791, 15797, 15803, 15809, 15817, 15823, 15859, + 15877, 15881, 15887, 15889, 15901, 15907, 15913, 15919, 15923, 15937, 15959, + 15971, 15973, 15991, 16001, 16007, 16033, 16057, 16061, 16063, 16067, 16069, + 16073, 16087, 16091, 16097, 16103, 16111, 16127, 16139, 16141, 16183, 16187, + 16189, 16193, 16217, 16223, 16229, 16231, 16249, 16253, 16267, 16273, 16301, + 16319, 16333, 16339, 16349, 16361, 16363, 16369, 16381, 16411, 16417, 16421, + 16427, 16433, 16447, 16451, 16453, 16477, 16481, 16487, 16493, 16519, 16529, + 16547, 16553, 16561, 16567, 16573, 16603, 16607, 16619, 16631, 16633, 16649, + 16651, 16657, 16661, 16673, 16691, 16693, 16699, 16703, 16729, 16741, 16747, + 16759, 16763, 16787, 16811, 16823, 16829, 16831, 16843, 16871, 16879, 16883, + 16889, 16901, 16903, 16921, 16927, 16931, 16937, 16943, 16963, 16979, 16981, + 16987, 16993, 17011, 17021, 17027, 17029, 17033, 17041, 17047, 17053, 17077, + 17093, 17099, 17107, 17117, 17123, 17137, 17159, 17167, 17183, 17189, 17191, + 17203, 17207, 17209, 17231, 17239, 17257, 17291, 17293, 17299, 17317, 17321, + 17327, 17333, 17341, 17351, 17359, 17377, 17383, 17387, 17389}; + +bool isDivisibleBySmallPrimes(const BigInt64 &n) +{ + for (int i = 0; i < smallPrimesSize && n > smallPrimes[i]; i++) + if (n % smallPrimes[i] == 0) + return true; + + return false; +} + +bool fermatPrimalityTest(const BigInt64 &number, size_t k) +{ + if (number == 2 || number == 3) + return true; + + if (number <= 1 || number.isEven()) + return false; + + if (isDivisibleBySmallPrimes(number)) + return false; + + while (k-- > 0) { + // assume n is a prime number + // pick randon integer a, such that 1 its not prime + if (modExpo != 1) + return false; + } + + return true; +} + +bool millerRabinPrimalityTest(const BigInt64 &number, size_t k) +{ + if (number == 2 || number == 3) + return true; + + if (number <= 1 || number.isEven()) + return false; + + // Write n-1 as 2^s * d where d is odd + BigInt64 s = 0; + BigInt64 d = number - 1; + while (d.isEven()) { + d >>= 1; + s++; + } + while (k-- > 0) { + // pick randon integer a, such that 1 +bool isDivisibleBySmallPrimesBuffers(sycl::queue &q, const BigInt64 &n) +{ + const std::vector nVec(smallPrimesSize, n); + int sumResult = 0; + sycl::range<1> sizeRange{smallPrimesSize}; + sycl::buffer sumBuff{&sumResult, 1}; + sycl::buffer primesBuff{smallPrimes, sizeRange}; + sycl::buffer nBuff{nVec.data(), sizeRange}; + + q.submit([&](sycl::handler &h) { + auto sumResult = sycl::reduction(sumBuff, h, sycl::plus<>()); + sycl::accessor primesAcc(primesBuff, h, sycl::read_only); + sycl::accessor nAcc(nBuff, h, sycl::read_only); + + h.parallel_for(sizeRange, sumResult, [=](sycl::id<1> idx, auto &sum) { + if (nAcc[idx] % primesAcc[idx] == 0 && nAcc[idx] != primesAcc[idx]) + sum += true; + sum += false; + }); + }); + q.wait(); + return sumResult > 0; +} + +bool isDivisibleBySmallPrimesUSM(sycl::queue &q, const BigInt64 &n) +{ + const std::vector nVec(smallPrimesSize, n); + int sumResult = 0; + sycl::range<1> sizeRange{smallPrimesSize}; + sycl::buffer sumBuff{&sumResult, 1}; + + int *primesShared = sycl::malloc_shared(smallPrimesSize, q); + BigInt64 *nShared = sycl::malloc_shared(smallPrimesSize, q); + for (int i = 0; i < smallPrimesSize; i++) { + primesShared[i] = smallPrimes[i]; + nShared[i] = nVec[i]; + } + + q.submit([&](sycl::handler &h) { + auto sumResult = sycl::reduction(sumBuff, h, sycl::plus<>()); + + h.parallel_for(sizeRange, sumResult, [=](sycl::id<1> idx, auto &sum) { + if (nShared[idx] % primesShared[idx] == 0 && + nShared[idx] != primesShared[idx]) + sum += true; + sum += false; + }); + }); + q.wait(); + sycl::free(primesShared, q); + sycl::free(nShared, q); + return sumResult > 0; +} + +bool millerRabinPrimalityTestBuffers(sycl::queue &q, const BigInt64 &number, + size_t k) +{ + if (number == 2 || number == 3) + return true; + + if (number <= 1 || number.isEven()) + return false; + + // Write n-1 as 2^s * d where d is odd + BigInt64 s = 0; + BigInt64 d = number - 1; + while (d.isEven()) { + d >>= 1; + s++; + } + vector randoms(k, BigInt64(BigInt64::RANDOM, 2, number - 2)); + vector dVec(k, d); + vector numberVec(k, number); + vector sVec(k, s); + + sycl::range<1> kRange{k}; + int sumResult = 0; + sycl::buffer sumBuf{&sumResult, 1}; + sycl::buffer randomsBuff{randoms.data(), kRange}; + sycl::buffer dBuff{dVec.data(), kRange}; + sycl::buffer numberBuff{numberVec.data(), kRange}; + sycl::buffer sBuff{sVec.data(), kRange}; + + q.submit([&](sycl::handler &cgh) { + auto sumReduction = reduction(sumBuf, cgh, sycl::plus<>()); + sycl::accessor randomsAcc(randomsBuff, cgh, + sycl::read_write); + sycl::accessor dAcc(dBuff, cgh, sycl::read_write); + sycl::accessor numberAcc(numberBuff, cgh, + sycl::read_write); + sycl::accessor sAcc(sBuff, cgh, sycl::read_write); + + cgh.parallel_for(kRange, sumReduction, [=](sycl::id<1> idx, auto &sum) { + BigInt64 aIn = randomsAcc[idx]; + BigInt64 dIn = dAcc[idx]; + BigInt64 numberIn = numberAcc[idx]; + BigInt64 sIn = sAcc[idx]; + // pick randon integer a, such that 1>= 1; + s++; + } + + std::uint64_t offset = number.getLsb(); + oneapi::dpl::minstd_rand engine(seed, offset); + oneapi::dpl::uniform_real_distribution distr; + BigInt64 a(2, number - 2, distr, engine); + + BigInt64 x = modularExponentiation(a, d, number); + if (x == 1 || x == number - 1) + return true; + + for (BigInt64 i = 0; i < s - 1; i++) { + x = modularExponentiation(x, 2, number); + if (x == number - 1) // x^2 mod n=n-1 + return true; + } + + return false; +} + +bool millerRabinPrimalityTestUSM(sycl::queue &q, const BigInt64 &number, + size_t k) +{ + if (number == 2 || number == 3) + return true; + + if (number <= 1 || number.isEven()) + return false; + + // Write n-1 as 2^s * d where d is odd + BigInt64 s = 0; + BigInt64 d = number - 1; + while (d.isEven()) { + d >>= 1; + s++; + } + + sycl::range<1> kRange{k}; + int sumResult = 0; + sycl::buffer sumBuf{&sumResult, 1}; + + BigInt64 *randomsShared = sycl::malloc_shared(k, q); + BigInt64 *dShared = sycl::malloc_shared(k, q); + BigInt64 *numberShared = sycl::malloc_shared(k, q); + BigInt64 *sShared = sycl::malloc_shared(k, q); + + for (int i = 0; i < k; i++) { + randomsShared[i] = BigInt64(BigInt64::RANDOM, 2, number - 2); + dShared[i] = d; + numberShared[i] = number; + sShared[i] = s; + } + q.submit([&](sycl::handler &cgh) { + auto sumReduction = reduction(sumBuf, cgh, sycl::plus<>()); + + cgh.parallel_for(kRange, sumReduction, [=](sycl::id<1> idx, auto &sum) { + BigInt64 aIn = randomsShared[idx]; + BigInt64 dIn = dShared[idx]; + BigInt64 numberIn = numberShared[idx]; + BigInt64 sIn = sShared[idx]; + // pick randon integer a, such that 1 distr; + BigInt64 a(2, number - 2, distr, engine); + // check if n is divisible by a + if (gcd(number, a) != 1) + return false; + + BigInt64 modExpo = modularExponentiation(a, number - 1, number); + // Fermat's little theorem- a^(prime-1)%prime ==1, else-> its not prime + if (modExpo != 1) + return false; + + return true; +} + +bool fermatPrimalityTest(sycl::queue &q, const BigInt64 &number, size_t k) +{ + if (number == 2 || number == 3) + return true; + + if (number <= 1 || number.isEven()) + return false; + + if (isDivisibleBySmallPrimes(number)) + return false; + + while (k-- > 0) { + // assume n is a prime number + // pick randon integer a, such that 1 its not prime + if (modExpo != 1) + return false; + } + + return true; +} + +bool nextPrimeChunk(BigInt64 &number, const BigInt64 &max, std::uint32_t seed) +{ + if (number < 2) + return 2; + + if (number.isEven()) + number++; + + while (!fermatPrimalityTestInKernel(number, seed)) { + number += 2; + if (number > max) + return false; + } + // candidate passed fermats test + return true; +} + +BigInt64 nextPrimeSequential(const BigInt64 &number, size_t k) +{ + if (number < 2) + return 2; + + BigInt64 res = number; + if (res.isEven()) + res++; + sycl::queue q; + do { + while (!fermatPrimalityTest(q, res, 1)) { + res += 2; + } + // candidate passed fermats test + } while (!millerRabinPrimalityTestUSM(q, res, k)); + return res; +} + +BigInt64 nextPrimeDivideToChunks(const BigInt64 &number, size_t k) +{ + log(logger::LogLevel::DEBUG, + "RSA next prime: finding next prime after random number "); + size_t numChunks; + size_t chunkSize; + size_t bits = number.bitsCount(); + if (bits <= 513) { // 500 + numChunks = 10; + chunkSize = 50; + } + else { // 1000 + numChunks = 10; + chunkSize = 100; + } + sycl::queue q; + BigInt64 *numberShared = sycl::malloc_shared(numChunks, q); + BigInt64 *maxShared = sycl::malloc_shared(numChunks, q); + bool *resultsShared = sycl::malloc_shared(numChunks, q); + BigInt64 currentStart = number; + while (true) { + for (int i = 0; i < numChunks; i++) { + resultsShared[i] = false; + numberShared[i] = currentStart + i * chunkSize; + maxShared[i] = currentStart + (i + 1) * chunkSize - 1; + } + + currentStart += chunkSize * numChunks; + int sumResult = 0; + sycl::buffer sumBuff{&sumResult, 1}; + + q.submit([&](sycl::handler &cgh) { + auto sumReduction = reduction(sumBuff, cgh, sycl::plus<>()); + cgh.parallel_for(sycl::range<1>{numChunks}, sumReduction, + [=](sycl::id<1> idx, auto &sum) { + resultsShared[idx] = + nextPrimeChunk(numberShared[idx], + maxShared[idx], idx.get(0)); + sum += resultsShared[idx]; + }); + }); + q.wait(); + for (int i = 0; i < numChunks; i++) { + if (resultsShared[i] == true) { + BigInt64 candidate = numberShared[i]; + bool passed = millerRabinPrimalityTestUSM(q, candidate, k); + if (passed) { + sycl::free(numberShared, q); + sycl::free(maxShared, q); + sycl::free(resultsShared, q); + log(logger::LogLevel::DEBUG, + "RSA next prime: found prime number at gap " + + (candidate - number).toString()); + return candidate; + } + } + } + + log(logger::LogLevel::DEBUG, + "RSA next prime: didnt find primes in range of " + + (currentStart - number).toString() + + " numbers, continue searching..."); + } +} + +#else +#include +#include +#include + +bool millerRabinPrimalityTestRound(const BigInt64 &number, const BigInt64 &d, + const BigInt64 &s, std::atomic &passed) +{ + BigInt64 a(BigInt64::CreateModes::RANDOM, 2, number - 2); + BigInt64 x = modularExponentiation(a, d, number); + if (x == 1 || x == number - 1) + return true; + + for (BigInt64 i = 0; passed.load() == true && i < s - 1; i++) { + x = modularExponentiation(x, 2, number); + if (x == number - 1) // x^2 mod n=n-1 + return true; + } + + return false; +} + +void parallelRound(const BigInt64 &number, const BigInt64 &d, const BigInt64 &s, + std::atomic &passed) +{ + if (!passed.load()) + return; + + bool res = millerRabinPrimalityTestRound(number, d, s, passed); + if (!res && passed.exchange(false)) + return; +} + +bool millerRabinPrimalityTestThreads(const BigInt64 &number, size_t k) +{ + if (number == 2 || number == 3) + return true; + + if (number <= 1 || number.isEven()) + return false; + + // Write n-1 as 2^s * d where d is odd + BigInt64 s = 0; + BigInt64 d = number - 1; + while (d.isEven()) { + d >>= 1; + s++; + } + + std::atomic passed(true); + std::vector threads; + for (int i = 0; i < k; i++) { + threads.emplace_back(parallelRound, std::ref(number), std::ref(d), + std::ref(s), std::ref(passed)); + } + + for (auto &t : threads) + t.join(); + return passed.load(); +} + +bool nextPrimeChunk(BigInt64 &number, const BigInt64 &end, + std::atomic &found) +{ + if (found.load()) + return false; + + if (number < 2) + return 2; + + if (number.isEven()) + number++; + while (!fermatPrimalityTest(number, 1)) { + number += 2; + if (found.load() || number > end) + return false; + } + + if (!found.exchange(true)) + return true; + + return true; +} + +BigInt64 nextPrimeDivideToChunks(const BigInt64 &number, size_t k) +{ + log(logger::LogLevel::DEBUG, + "RSA next prime: finding next prime after random number"); + size_t numChunks; + size_t chunkSize; + size_t bits = number.bitsCount(); + if (bits <= 513) { // 500 + numChunks = 10; + chunkSize = 50; + } + else { // 1000 + numChunks = 10; + chunkSize = 100; + } + + std::vector numbers(numChunks); + std::vector ends(numChunks); + BigInt64 currentStart = number; + std::vector > futures; + std::atomic found(false); + while (true) { + for (int i = 0; i < numChunks; i++) { + numbers[i] = currentStart + i * chunkSize; + ends[i] = currentStart + (i + 1) * chunkSize - 1; + futures.push_back(std::async(std::launch::async, nextPrimeChunk, + std::ref(numbers[i]), + std::ref(ends[i]), std::ref(found))); + } + + currentStart += numChunks * chunkSize; + for (int i = 0; i < numChunks; i++) + if (futures[i].get() && + millerRabinPrimalityTestThreads(numbers[i], k)) { + log(logger::LogLevel::DEBUG, + "RSA next prime: found prime number at gap " + + (numbers[i] - number).toString()); + return numbers[i]; + } + + log(logger::LogLevel::DEBUG, + "RSA next prime: didnt find primes in range of " + + (currentStart - number).toString() + + " numbers, continue searching..."); + futures.clear(); + } +} + +BigInt64 nextPrimeSequential(const BigInt64 &number, size_t k) +{ + if (number < 2) + return 2; + + BigInt64 res = number; + if (res.isEven()) + res++; + do { + while (!fermatPrimalityTest(res, 1)) { + res += 2; + } + + // candidate passed fermats test + } while (!millerRabinPrimalityTestThreads(res, k)); + return res; +} + +#endif \ No newline at end of file diff --git a/src/rsa.cpp b/src/rsa.cpp index 0244bc35..406644e3 100644 --- a/src/rsa.cpp +++ b/src/rsa.cpp @@ -1,364 +1,368 @@ -// #include -// #include -// #include -// #include -// #include "rsa.h" -// #include "logger.h" -// #include "prime_tests.h" -// using namespace std; -// constexpr int PADDING_MIN_LEN = 11; -// constexpr int PRIME_TEST_ROUNDS = 40; -// constexpr int DEFAULT_E = 65537; -// constexpr int FALLBACK_E = 17; - -// bool allowedKeySizes(size_t keySize) -// { -// return keySize == 1024 || keySize == 2048 || keySize == 4096; -// } - -// void rsaGeneratePrime(size_t bits, BigInt64 &prime) -// { -// BigInt64 random = BigInt64(BigInt64::CreateModes::RANDOM, bits); -// prime = nextPrimeDivideToChunks(random, PRIME_TEST_ROUNDS); -// } - -// void rsaKeysGeneration(const BigInt64 &p, const BigInt64 &q, size_t keySize, -// BigInt64 &e, BigInt64 &d) -// { -// BigInt64 phi; -// BigInt64 gcdVal; -// // phi(n) = (p-1) * (q-1) -// BigInt64 pMinus1 = p - 1; -// BigInt64 qMinus1 = q - 1; -// phi = pMinus1 * qMinus1; -// // Choose e such that 1 < e < phi and gcd(e, phi) = 1 (coprime) -// // A common choice for e is 65537 -// e = DEFAULT_E; -// gcdVal = gcd(e, phi); -// while (gcdVal != 1) { -// e += 2; -// if (e > phi) -// e = FALLBACK_E; -// } - -// // d is the modular inverse of e modulo ϕ(n) or e^-1 mod phi -// // 0 dis(1, 255); -// // Start with 0x00 0x02 -// padded[0] = 0x00; -// padded[1] = 0x02; - -// // Add non-zero random padding -// for (size_t i = 2; i < paddingLen + 2; i++) { -// padded[i] = static_cast(dis(gen)); -// } - -// // Add 0x00 separator -// padded[paddingLen + 2] = 0x00; -// std::memcpy(padded + paddingLen + 3, plaintext, plaintextLen); -// } - -// void rsaPkcs1v15Unpad(const uint8_t *padded, size_t paddedLen, -// uint8_t *plaintext, size_t *plaintextLen) -// { -// if (paddedLen < PADDING_MIN_LEN || padded[0] != 0x00 || padded[1] != 0x02) -// throw std::runtime_error("Invalid padding"); - -// // Find 0x00 separator -// size_t i = 2; -// while (i < paddedLen && padded[i] != 0x00) -// ++i; -// if (i == paddedLen) -// throw std::runtime_error("Invalid padding: No separator found"); - -// *plaintextLen = paddedLen - i - 1; -// std::memcpy(plaintext, padded + i + 1, *plaintextLen); -// } - -// /** -// * @brief Encrypts data using RSA public or private key. -// * @param plaintext Pointer to the plaintext data. -// * @param plaintextLen The length of the plaintext in bytes. -// * @param modulus Pointer to the modulus (n). -// * @param modulusLen The length of the modulus in bytes. -// * @param exponent Pointer to the exponent (either public or private). -// * @param exponentLen The length of the exponent in bytes. -// * @param ciphertext Pointer to the buffer where the encrypted data (ciphertext) will be stored. -// * @param ciphertextLen The length of the ciphertext buffer. -// * @param keySize The size of the RSA key in bits. -// * @return CKR_OK on success, CKR_KEY_SIZE_RANGE if the key size is invalid, or CKR_BUFFER_TOO_SMALL if buffers are insufficient. -// */ -// CK_RV rsaEncrypt(const uint8_t *plaintext, size_t plaintextLen, -// const uint8_t *key, size_t keyLen, uint8_t *ciphertext, -// size_t ciphertextLen, size_t keySize) -// { -// logger rsaLogger("RSA encryption"); -// if (!allowedKeySizes(keySize)) { -// rsaLogger.logMessage(logger::LogLevel::ERROR, -// "RSA encryption: invalid key size"); -// return CKR_KEY_SIZE_RANGE; -// } - -// if ((!(keyLen == rsaGetPublicKeyLen(keySize)) && -// !(keyLen == rsaGetPrivateKeyLen(keySize)))) { -// rsaLogger.logMessage(logger::LogLevel::ERROR, -// "RSA encryption: buffer sizes are insufficient"); -// return CKR_BUFFER_TOO_SMALL; -// } - -// size_t keySizeBytes = keySize / BITS_IN_BYTE; -// if (plaintextLen > rsaGetPlainMaxLen(keySize)) { -// rsaLogger.logMessage(logger::LogLevel::ERROR, -// "RSA encryption: plaintext is too long"); -// return CKR_DATA_TOO_LARGE; -// } - -// if (ciphertextLen != keySizeBytes) { -// rsaLogger.logMessage(logger::LogLevel::ERROR, -// "RSA encryption: ciphertext buffer is too small"); -// return CKR_BUFFER_TOO_SMALL; -// } - -// rsaLogger.logMessage(logger::LogLevel::INFO, -// "RSA encryption: executing..."); -// size_t paddedLen = keySizeBytes; -// // Padding plaintext to keySizeBytes -// uint8_t *padded = new uint8_t[keySizeBytes]; -// rsaPkcs1v15Pad(plaintext, plaintextLen, padded, keySizeBytes); -// // Convert padded plaintext to BigInt64 -// BigInt64 plainNumber(padded, paddedLen, -// BigInt64::CreateModes::BIG_ENDIANESS); -// BigInt64 modulus(key, rsaGetModulusLen(keySize), -// BigInt64::CreateModes::BIG_ENDIANESS); -// BigInt64 exponent(key + rsaGetModulusLen(keySize), -// keyLen - rsaGetModulusLen(keySize), -// BigInt64::CreateModes::BIG_ENDIANESS); -// // Encrypt message: plain = plain^key % n -// BigInt64 cipherNumber; -// try { -// cipherNumber = modularExponentiation(plainNumber, exponent, modulus); -// } -// catch (std::exception &e) { -// rsaLogger.logMessage( -// logger::LogLevel::ERROR, -// "RSA encryption: error performing modular exponentiation " + -// string(e.what())); -// return CKR_DECRYPTED_DATA_INVALID; -// } - -// memset(ciphertext, 0, keySizeBytes); -// cipherNumber.exportTo(ciphertext, ciphertextLen, -// BigInt64::CreateModes::BIG_ENDIANESS); -// delete[] padded; -// return CKR_OK; -// } - -// /** -// * @brief Decrypts data using RSA public or private key. -// * @param ciphertext Pointer to the encrypted data (ciphertext). -// * @param ciphertextLen The length of the ciphertext in bytes. -// * @param modulus Pointer to the modulus (n). -// * @param modulusLen The length of the modulus in bytes. -// * @param exponent Pointer to the exponent (either public or private). -// * @param exponentLen The length of the exponent in bytes. -// * @param plaintext Pointer to the buffer where the decrypted data (plaintext) will be stored. -// * @param plaintextLen Pointer to a variable that will store the length of the decrypted data. -// * @param keySize The size of the RSA key in bits. -// * @return CKR_OK on success, CKR_KEY_SIZE_RANGE if the key size is invalid, or CKR_BUFFER_TOO_SMALL if buffers are insufficient. -// */ -// CK_RV rsaDecrypt(const uint8_t *ciphertext, size_t ciphertextLen, -// const uint8_t *key, size_t keyLen, uint8_t *plaintext, -// size_t *plaintextLen, size_t keySize) -// { -// logger rsaLogger("RSA encryption"); -// if (!allowedKeySizes(keySize)) { -// rsaLogger.logMessage(logger::LogLevel::ERROR, -// "RSA decryption: invalid key size"); -// return CKR_KEY_SIZE_RANGE; -// } - -// if ((!(keyLen == rsaGetPublicKeyLen(keySize)) && -// !(keyLen == rsaGetPrivateKeyLen(keySize)))) { -// rsaLogger.logMessage(logger::LogLevel::ERROR, -// "RSA encryption: buffer sizes are insufficient"); -// return CKR_BUFFER_TOO_SMALL; -// } - -// size_t keySizeBytes = keySize / BITS_IN_BYTE; -// if (ciphertextLen != keySizeBytes) { -// rsaLogger.logMessage(logger::LogLevel::ERROR, -// "RSA decryption: ciphertext buffer is too small"); -// return CKR_BUFFER_TOO_SMALL; -// } - -// rsaLogger.logMessage(logger::LogLevel::INFO, -// "RSA decryption: executing..."); -// // Convert ciphertext to BigInt64 -// BigInt64 cipherNumber(ciphertext, ciphertextLen, -// BigInt64::CreateModes::BIG_ENDIANESS); -// BigInt64 modulus(key, rsaGetModulusLen(keySize), -// BigInt64::CreateModes::BIG_ENDIANESS); -// BigInt64 exponent(key + rsaGetModulusLen(keySize), -// keyLen - rsaGetModulusLen(keySize), -// BigInt64::CreateModes::BIG_ENDIANESS); -// // Decrypt message: plain = cipher^key % n -// BigInt64 plainNumber; -// try { -// plainNumber = modularExponentiation(cipherNumber, exponent, modulus); -// } -// catch (std::exception &e) { -// rsaLogger.logMessage( -// logger::LogLevel::ERROR, -// "RSA decryption: error performing modular exponentiation " + -// string(e.what())); -// return CKR_ENCRYPTED_DATA_INVALID; -// } - -// uint8_t *padded = new uint8_t[keySizeBytes]; -// size_t paddedLen = keySizeBytes; -// plainNumber.exportTo(padded, paddedLen, -// BigInt64::CreateModes::BIG_ENDIANESS); -// // Remove padding -// try { -// rsaPkcs1v15Unpad(padded, paddedLen, plaintext, plaintextLen); -// } -// catch (std::exception &e) { -// rsaLogger.logMessage( -// logger::LogLevel::ERROR, -// "RSA decryption: error unpadding plaintext " + string(e.what())); -// delete[] padded; -// return CKR_DECRYPTED_DATA_INVALID; -// } - -// delete[] padded; -// return CKR_OK; -// } - -// size_t rsaGetEncryptedLen(size_t keySize) -// { -// return keySize / BITS_IN_BYTE; -// } - -// /** -// * @brief Gets the maximum length of plaintext that can be encrypted with a given RSA key size. -// * @param keySize The size of the RSA key in bits. -// * @return The maximum length of plaintext in bytes. -// */ -// size_t rsaGetPlainMaxLen(size_t keySize) -// { -// return keySize / BITS_IN_BYTE - PADDING_MIN_LEN; -// } - -// /** -// * @brief Gets the length of decrypted data for a given RSA key size. -// * @param keySize The size of the RSA key in bits. -// * @return The length of the decrypted data in bytes. -// */ -// size_t rsaGetDecryptedLen(size_t keySize) -// { -// // Minimum padding length for PKCS#1 v1.5 is 11 bytes -// // Remove the padding: The maximum length of the plaintext is keySize - -// // minPaddingLength -// return keySize / BITS_IN_BYTE - PADDING_MIN_LEN; -// } - -// /** -// * @brief Gets the total length of the public key (including the modulus and public exponent) for RSA. -// * @param keySize The size of the RSA key in bits. -// * @return The length of the public key in bytes, which includes the modulus and the public exponent. -// */ -// size_t rsaGetPublicKeyLen(size_t keySize) -// { -// return rsaGetModulusLen(keySize) + BYTES_IN_LIMB; -// } - -// /** -// * @brief Gets the total length of the private key (including the modulus and private exponent) for RSA. -// * @param keySize The size of the RSA key in bits. -// * @return The length of the private key in bytes, which includes the modulus and the private exponent. -// */ -// size_t rsaGetPrivateKeyLen(size_t keySize) -// { -// return rsaGetModulusLen(keySize) + keySize / BITS_IN_BYTE; -// } \ No newline at end of file +#include +#include +#include +#include +#include "../include/rsa.h" +#include "../logger/logger.h" +#include "../include/prime_tests.h" +#include "../include/big_int64.h" + +using namespace std; + +constexpr int PADDING_MIN_LEN = 11; +constexpr int PRIME_TEST_ROUNDS = 40; +constexpr int DEFAULT_E = 65537; +constexpr int FALLBACK_E = 17; + +bool allowedKeySizes(size_t keySize) +{ + return keySize == 1024 || keySize == 2048 || keySize == 4096; +} + +void rsaGeneratePrime(size_t bits, BigInt64 &prime) +{ + BigInt64 random = BigInt64(BigInt64::CreateModes::RANDOM, bits); + prime = nextPrimeDivideToChunks(random, PRIME_TEST_ROUNDS); +} + +void rsaKeysGeneration(const BigInt64 &p, const BigInt64 &q, size_t keySize, + BigInt64 &e, BigInt64 &d) +{ + BigInt64 phi; + BigInt64 gcdVal; + // phi(n) = (p-1) * (q-1) + BigInt64 pMinus1 = p - 1; + BigInt64 qMinus1 = q - 1; + phi = pMinus1 * qMinus1; + // Choose e such that 1 < e < phi and gcd(e, phi) = 1 (coprime) + // A common choice for e is 65537 + e = DEFAULT_E; + gcdVal = gcd(e, phi); + while (gcdVal != 1) { + e += 2; + if (e > phi) + e = FALLBACK_E; + } + + // d is the modular inverse of e modulo ϕ(n) or e^-1 mod phi + // 0 dis(1, 255); + // Start with 0x00 0x02 + padded[0] = 0x00; + padded[1] = 0x02; + + // Add non-zero random padding + for (size_t i = 2; i < paddingLen + 2; i++) { + padded[i] = static_cast(dis(gen)); + } + + // Add 0x00 separator + padded[paddingLen + 2] = 0x00; + std::memcpy(padded + paddingLen + 3, plaintext, plaintextLen); +} + +void rsaPkcs1v15Unpad(const uint8_t *padded, size_t paddedLen, + uint8_t *plaintext, size_t *plaintextLen) +{ + if (paddedLen < PADDING_MIN_LEN || padded[0] != 0x00 || padded[1] != 0x02) + throw std::runtime_error("Invalid padding"); + + // Find 0x00 separator + size_t i = 2; + while (i < paddedLen && padded[i] != 0x00) + ++i; + if (i == paddedLen) + throw std::runtime_error("Invalid padding: No separator found"); + + *plaintextLen = paddedLen - i - 1; + std::memcpy(plaintext, padded + i + 1, *plaintextLen); +} + +/** + * @brief Encrypts data using RSA public or private key. + * @param plaintext Pointer to the plaintext data. + * @param plaintextLen The length of the plaintext in bytes. + * @param modulus Pointer to the modulus (n). + * @param modulusLen The length of the modulus in bytes. + * @param exponent Pointer to the exponent (either public or private). + * @param exponentLen The length of the exponent in bytes. + * @param ciphertext Pointer to the buffer where the encrypted data (ciphertext) will be stored. + * @param ciphertextLen The length of the ciphertext buffer. + * @param keySize The size of the RSA key in bits. + * @return CKR_OK on success, CKR_KEY_SIZE_RANGE if the key size is invalid, or CKR_BUFFER_TOO_SMALL if buffers are insufficient. + */ +CK_RV rsaEncrypt(const uint8_t *plaintext, size_t plaintextLen, + const uint8_t *key, size_t keyLen, uint8_t *ciphertext, + size_t ciphertextLen, size_t keySize) +{ + + if (!allowedKeySizes(keySize)) { + log(logger::LogLevel::ERROR, + "RSA encryption: invalid key size"); + return CKR_KEY_SIZE_RANGE; + } + + if ((!(keyLen == rsaGetPublicKeyLen(keySize)) && + !(keyLen == rsaGetPrivateKeyLen(keySize)))) { + log(logger::LogLevel::ERROR, + "RSA encryption: buffer sizes are insufficient"); + return CKR_BUFFER_TOO_SMALL; + } + + size_t keySizeBytes = keySize / BITS_IN_BYTE; + if (plaintextLen > rsaGetPlainMaxLen(keySize)) { + log(logger::LogLevel::ERROR, + "RSA encryption: plaintext is too long"); + return CKR_DATA_TOO_LARGE; + } + + if (ciphertextLen != keySizeBytes) { + log(logger::LogLevel::ERROR, + "RSA encryption: ciphertext buffer is too small"); + return CKR_BUFFER_TOO_SMALL; + } + + size_t paddedLen = keySizeBytes; + // Padding plaintext to keySizeBytes + uint8_t *padded = new uint8_t[keySizeBytes]; + rsaPkcs1v15Pad(plaintext, plaintextLen, padded, keySizeBytes); + // Convert padded plaintext to BigInt64 + BigInt64 plainNumber(padded, paddedLen, + BigInt64::CreateModes::BIG_ENDIANESS); + BigInt64 modulus(key, rsaGetModulusLen(keySize), + BigInt64::CreateModes::BIG_ENDIANESS); + BigInt64 exponent(key + rsaGetModulusLen(keySize), + keyLen - rsaGetModulusLen(keySize), + BigInt64::CreateModes::BIG_ENDIANESS); + // Encrypt message: plain = plain^key % n + BigInt64 cipherNumber; + try { + cipherNumber = modularExponentiation(plainNumber, exponent, modulus); + } + catch (std::exception &e) { + log( + logger::LogLevel::ERROR, + "RSA encryption: error performing modular exponentiation " + + string(e.what())); + return CKR_DECRYPTED_DATA_INVALID; + } + + memset(ciphertext, 0, keySizeBytes); + cipherNumber.exportTo(ciphertext, ciphertextLen, + BigInt64::CreateModes::BIG_ENDIANESS); + delete[] padded; + return CKR_OK; +} + +/** + * @brief Decrypts data using RSA public or private key. + * @param ciphertext Pointer to the encrypted data (ciphertext). + * @param ciphertextLen The length of the ciphertext in bytes. + * @param modulus Pointer to the modulus (n). + * @param modulusLen The length of the modulus in bytes. + * @param exponent Pointer to the exponent (either public or private). + * @param exponentLen The length of the exponent in bytes. + * @param plaintext Pointer to the buffer where the decrypted data (plaintext) will be stored. + * @param plaintextLen Pointer to a variable that will store the length of the decrypted data. + * @param keySize The size of the RSA key in bits. + * @return CKR_OK on success, CKR_KEY_SIZE_RANGE if the key size is invalid, or CKR_BUFFER_TOO_SMALL if buffers are insufficient. + */ +CK_RV rsaDecrypt(const uint8_t *ciphertext, size_t ciphertextLen, + const uint8_t *key, size_t keyLen, uint8_t *plaintext, + size_t *plaintextLen, size_t keySize) +{ + + if (!allowedKeySizes(keySize)) { + log(logger::LogLevel::ERROR, + "RSA decryption: invalid key size"); + return CKR_KEY_SIZE_RANGE; + } + + if ((!(keyLen == rsaGetPublicKeyLen(keySize)) && + !(keyLen == rsaGetPrivateKeyLen(keySize)))) { + log(logger::LogLevel::ERROR, + "RSA encryption: buffer sizes are insufficient"); + return CKR_BUFFER_TOO_SMALL; + } + + size_t keySizeBytes = keySize / BITS_IN_BYTE; + if (ciphertextLen != keySizeBytes) { + log(logger::LogLevel::ERROR, + "RSA decryption: ciphertext buffer is too small"); + return CKR_BUFFER_TOO_SMALL; + } + + // Convert ciphertext to BigInt64 + BigInt64 cipherNumber(ciphertext, ciphertextLen, + BigInt64::CreateModes::BIG_ENDIANESS); + BigInt64 modulus(key, rsaGetModulusLen(keySize), + BigInt64::CreateModes::BIG_ENDIANESS); + BigInt64 exponent(key + rsaGetModulusLen(keySize), + keyLen - rsaGetModulusLen(keySize), + BigInt64::CreateModes::BIG_ENDIANESS); + // Decrypt message: plain = cipher^key % n + BigInt64 plainNumber; + try { + plainNumber = modularExponentiation(cipherNumber, exponent, modulus); + } + catch (std::exception &e) { + log( + logger::LogLevel::ERROR, + "RSA decryption: error performing modular exponentiation " + + string(e.what())); + return CKR_ENCRYPTED_DATA_INVALID; + } + + uint8_t *padded = new uint8_t[keySizeBytes]; + size_t paddedLen = keySizeBytes; + plainNumber.exportTo(padded, paddedLen, + BigInt64::CreateModes::BIG_ENDIANESS); + // Remove padding + try { + rsaPkcs1v15Unpad(padded, paddedLen, plaintext, plaintextLen); + } + catch (std::exception &e) { + log( + logger::LogLevel::ERROR, + "RSA decryption: error unpadding plaintext " + string(e.what())); + delete[] padded; + return CKR_DECRYPTED_DATA_INVALID; + } + + delete[] padded; + return CKR_OK; +} + +size_t rsaGetEncryptedLen(size_t keySize) +{ + return keySize / BITS_IN_BYTE; +} + +/** + * @brief Gets the maximum length of plaintext that can be encrypted with a given RSA key size. + * @param keySize The size of the RSA key in bits. + * @return The maximum length of plaintext in bytes. + */ +size_t rsaGetPlainMaxLen(size_t keySize) +{ + return keySize / BITS_IN_BYTE - PADDING_MIN_LEN; +} + +/** + * @brief Gets the length of decrypted data for a given RSA key size. + * @param keySize The size of the RSA key in bits. + * @return The length of the decrypted data in bytes. + */ +size_t rsaGetDecryptedLen(size_t keySize) +{ + // Minimum padding length for PKCS#1 v1.5 is 11 bytes + // Remove the padding: The maximum length of the plaintext is keySize - + // minPaddingLength + return keySize / BITS_IN_BYTE - PADDING_MIN_LEN; +} + +/** + * @brief Gets the total length of the public key (including the modulus and public exponent) for RSA. + * @param keySize The size of the RSA key in bits. + * @return The length of the public key in bytes, which includes the modulus and the public exponent. + */ +size_t rsaGetPublicKeyLen(size_t keySize) +{ + return rsaGetModulusLen(keySize) + BYTES_IN_LIMB; +} + +/** + * @brief Gets the total length of the private key (including the modulus and private exponent) for RSA. + * @param keySize The size of the RSA key in bits. + * @return The length of the private key in bytes, which includes the modulus and the private exponent. + */ +size_t rsaGetPrivateKeyLen(size_t keySize) +{ + return rsaGetModulusLen(keySize) + keySize / BITS_IN_BYTE; +} \ No newline at end of file diff --git a/src/sha256.cpp b/src/sha256.cpp index 5a472d25..13020233 100644 --- a/src/sha256.cpp +++ b/src/sha256.cpp @@ -6,7 +6,6 @@ using namespace sycl; #endif //USE_SYCL using namespace std; -logger logger("hsm"); // Constants used in SHA-256 processing #define CHOOSE(x, y, z) (((x) & (y)) ^ (~(x) & (z))) @@ -40,7 +39,7 @@ SHA256::SHA256(){ */ CK_RV SHA256::update(const std::vector& data) { - logger.logMessage(logger::LogLevel::DEBUG, "Updating SHA-256 with data."); + log(logger::LogLevel::DEBUG, "Updating SHA-256 with data."); // Get the size of the input data size_t length = data.size(); @@ -53,7 +52,7 @@ CK_RV SHA256::update(const std::vector& data) if (messageSize == 64) { CK_RV transform_status = transform(); if (transform_status != CKR_OK) { - logger.logMessage(logger::LogLevel::ERROR, "Transform failed during SHA-256 update."); + log(logger::LogLevel::ERROR, "Transform failed during SHA-256 update."); return transform_status; // Return the error code from the transform function } @@ -71,7 +70,7 @@ CK_RV SHA256::update(const std::vector& data) */ void SHA256::padding() { - logger.logMessage(logger::LogLevel::DEBUG, "Padding the message and appending its length to make it congruent to 56 mod 64."); + log(logger::LogLevel::DEBUG, "Padding the message and appending its length to make it congruent to 56 mod 64."); uint64_t currentLength = messageSize; uint8_t paddingEnd = currentLength < 56 ? 56 : 64; @@ -97,7 +96,9 @@ void SHA256::padding() } transform(); } + #ifdef USE_SYCL + /** * Transforms the message block by applying SHA-256 compression. * This function runs in parallel using SYCL if the USE_SYCL flag is enabled. @@ -107,13 +108,13 @@ void SHA256::padding() */ CK_RV SHA256::transform() { - logger.logMessage(logger::LogLevel::DEBUG, "Transforming message block and updating hash state using 64 rounds of SHA-256 compression."); + log(logger::LogLevel::DEBUG, "Transforming message block and updating hash state using 64 rounds of SHA-256 compression."); uint32_t temp[64]; queue q; // Check if message size is correct if (messageSize != 64) { - logger.logMessage(logger::LogLevel::ERROR, "Message size is not 64 bytes."); + log(logger::LogLevel::ERROR, "Message size is not 64 bytes."); return CKR_FUNCTION_FAILED; // Return an error code if the message size is incorrect } @@ -175,7 +176,7 @@ CK_RV SHA256::transform() */ CK_RV SHA256::finalize(std::vector& output) { - logger.logMessage(logger::LogLevel::DEBUG, "Finalizing SHA-256 hash computation and returning the hash value."); + log(logger::LogLevel::DEBUG, "Finalizing SHA-256 hash computation and returning the hash value."); try { // Perform padding @@ -209,24 +210,25 @@ CK_RV SHA256::finalize(std::vector& output) } catch (const sycl::exception& e) { // Handle SYCL exceptions - logger.logMessage(logger::LogLevel::ERROR, "SYCL error: " + std::string(e.what())); + log(logger::LogLevel::ERROR, "SYCL error: " + std::string(e.what())); return CKR_FUNCTION_FAILED; } catch (const std::exception& e) { // Handle other exceptions - logger.logMessage(logger::LogLevel::ERROR, "Standard error: " + std::string(e.what())); + log(logger::LogLevel::ERROR, "Standard error: " + std::string(e.what())); return CKR_FUNCTION_FAILED; } } #else + /** * Processes a 64-byte block of the message and updates the hash state. * Applies the SHA-256 compression function to the current block. */ CK_RV SHA256::transform() { - logger.logMessage(logger::LogLevel::DEBUG, "Transforming message block and updating hash state using 64 rounds of SHA-256 compression."); + log(logger::LogLevel::DEBUG, "Transforming message block and updating hash state using 64 rounds of SHA-256 compression."); uint32_t temp[64]; @@ -285,11 +287,11 @@ CK_RV SHA256::transform() */ CK_RV SHA256::finalize(std::vector& output) { - logger.logMessage(logger::LogLevel::DEBUG, "Finalizing SHA-256 hash computation."); + log(logger::LogLevel::DEBUG, "Finalizing SHA-256 hash computation."); // Check if the internal state is valid if (result == nullptr) { - logger.logMessage(logger::LogLevel::ERROR, "SHA-256 computation has not been initialized or has failed."); + log(logger::LogLevel::ERROR, "SHA-256 computation has not been initialized or has failed."); return CKR_FUNCTION_FAILED; } @@ -297,7 +299,7 @@ CK_RV SHA256::finalize(std::vector& output) // Apply padding to the data padding(); } catch (const std::exception& e) { - logger.logMessage(logger::LogLevel::ERROR, std::string("Padding failed: ") + e.what()); + log(logger::LogLevel::ERROR, std::string("Padding failed: ") + e.what()); return CKR_FUNCTION_FAILED; } diff --git a/src/shared_log_file_name.txt b/src/shared_log_file_name.txt new file mode 100644 index 00000000..bdb54929 --- /dev/null +++ b/src/shared_log_file_name.txt @@ -0,0 +1 @@ +2024_09_15_14_23_37_HSM.log \ No newline at end of file diff --git a/src/sycl-version/big_int64.cpp b/src/sycl-version/big_int64.cpp deleted file mode 100644 index 7e6a9128..00000000 --- a/src/sycl-version/big_int64.cpp +++ /dev/null @@ -1,834 +0,0 @@ -#include -#include -#include -#include -#include -#include "big_int64.h" -#include "big_int_utils.h" -using namespace std; - -BigInt64::BigInt64(const string &str) -{ - initFromString(str.c_str(), str.size()); -} - -BigInt64::BigInt64(const char *str) -{ - initFromString(str, std::strlen(str)); -} - -BigInt64::BigInt64(const uint8_t *str, size_t strLen, CreateModes mode) - : isNegative(false) -{ - if (strLen == 0) { - size = 1; - limbs[0] = 0; - return; - } - int fullLimbs = strLen / BYTES_IN_LIMB; - int msbParts = strLen % BYTES_IN_LIMB; - int limbsCnt = fullLimbs + (msbParts + BYTES_IN_LIMB - 1) / BYTES_IN_LIMB; - size = limbsCnt; - if (mode == CreateModes::LITTLE_ENDIANESS) { - for (int i = 0; i < fullLimbs; i++) { - int index = strLen - 1 - i * BYTES_IN_LIMB; - // little endian-> {0,1,2,3,4,5,6,7} becones 0x 07 06 05 04 03 02 01 00 - limbs[i] = ((static_cast(str[index]) << 56) | - (static_cast(str[index - 1]) << 48) | - (static_cast(str[index - 2]) << 40) | - (static_cast(str[index - 3]) << 32) | - (static_cast(str[index - 4]) << 24) | - (static_cast(str[index - 5]) << 16) | - (static_cast(str[index - 6]) << 8) | - static_cast(str[index - 7])); - } - if (msbParts != 0) { - uint64_t msb = 0; - for (int i = 0; i < msbParts; i++) { - msb |= static_cast(str[i]) << (i * BITS_IN_BYTE); - } - limbs[size++] = msb; - } - } - else { - // big endian-> {0,1,2,3,4,5,6,7} becones 0x 00 01 02 03 04 05 06 07 - for (int i = 0; i < fullLimbs; i++) { - int index = strLen - 1 - i * BYTES_IN_LIMB; - limbs[i] = (static_cast(str[index]) | - (static_cast(str[index - 1]) << 8) | - (static_cast(str[index - 2]) << 16) | - (static_cast(str[index - 3]) << 24) | - (static_cast(str[index - 4]) << 32) | - (static_cast(str[index - 5]) << 40) | - (static_cast(str[index - 6]) << 48) | - (static_cast(str[index - 7]) << 56)); - } - if (msbParts != 0) { - uint64_t msb = 0; - for (int i = 0; i < msbParts; i++) { - msb |= static_cast(str[msbParts - 1 - i]) - << (i * BITS_IN_BYTE); - } - limbs[size++] = msb; - } - } - removeLeadingZeros(); -} - -BigInt64::BigInt64(CreateModes mode, int bits) : isNegative(false) -{ - if (bits >= BITS_IN_LIMB) - generateNLimbsRandom(bits / BITS_IN_LIMB); - bits = bits % BITS_IN_LIMB; // 0-63 - if (bits != 0) { - uint64_t one = static_cast(1); - limbs[size++] = randomLimb(0, (one << bits) - 1) | (one << (bits - 1)); - } - else - limbs[size - 1] |= 0x8000000000000000ULL; -} - -BigInt64::BigInt64(CreateModes mode, uint64_t min, const BigInt64 &max) - : size(0), isNegative(false) -{ - if (max.isSmallerThanUnsigned(min)) - throw invalid_argument("min must be <= max"); - - if (max.limbsCount() == 1) { - uint64_t number = randomLimb(min, max.limbs[max.size - 1]); - limbs[size++] = number; - } - else { - generateNLimbsRandom(max.limbsCount() - 1); - uint64_t number = randomLimb(0, max.limbs[max.size - 1]); - limbs[size++] = number; - removeLeadingZeros(); - } -} - -BigInt64::BigInt64(bool isNegative) : BigInt64(0) -{ - this->isNegative = isNegative; -} - -BigInt64::BigInt64(uint64_t uval) : size(0) -{ - isNegative = false; - limbs[size++] = uval; -} - -bool BigInt64::operator==(const BigInt64 &b) const -{ - if (isNegative != b.isNegative || size != b.size) - return false; - - for (int i = 0; i < size; i++) - if (limbs[i] != b.limbs[i]) - return false; - - return true; -} - -bool BigInt64::operator!=(const BigInt64 &b) const -{ - return !(*this == b); -} - -bool BigInt64::operator<(const BigInt64 &b) const -{ - if (isNegative && !b.isNegative) - return true; - - if (!isNegative && b.isNegative) - return false; - - // same sign - if (isNegative) - return b.isSmallerThanUnsigned(*this); - - else - return isSmallerThanUnsigned(b); -} - -bool BigInt64::operator>(const BigInt64 &b) const -{ - return b < *this; -} - -bool BigInt64::operator<=(const BigInt64 &b) const -{ - return !(b < *this); -} - -bool BigInt64::operator>=(const BigInt64 &b) const -{ - return !(*this < b); -} - -BigInt64 &BigInt64::operator++() -{ - if (!isNegative) - prefixPlusPlusUnsigned(); - else { - prefixMinusMinusUnsigned(); - if (isZero()) - //-1 -> 0 - isNegative = false; - } - - return *this; -} - -BigInt64 BigInt64::operator++(int) -{ - BigInt64 temp = *this; - ++*this; - return temp; -} - -BigInt64 &BigInt64::operator--() -{ - if (isNegative) - prefixPlusPlusUnsigned(); - else { - if (isZero()) { - // 0 -> -1 - limbs[0] = 1; - isNegative = true; - } - else - prefixMinusMinusUnsigned(); - } - return *this; -} - -BigInt64 BigInt64::operator--(int) -{ - BigInt64 temp = *this; - --*this; - return temp; -} - -BigInt64 &BigInt64::operator+=(const BigInt64 &b) -{ - if (isNegative == b.isNegative) // same sign - addUnsigned(b); - else { - if ((isNegative && !b.isSmallerThanUnsigned(*this)) || - (!isNegative && isSmallerThanUnsigned(b))) { - // -3 + +4/-3 + +3 || +3 + -4 - thisEqualsbBSubthis(b); - isNegative = b.isNegative; - } - else // -4 + +3 || +3 + -3 / +4 + -3 - subtractUnsigned(b); // this-=b - } - return *this; -} - -BigInt64 BigInt64::operator+(const BigInt64 &b) const -{ - BigInt64 c(*this); - c += b; - return c; -} - -BigInt64 &BigInt64::operator-=(const BigInt64 &b) -{ - if (isNegative != b.isNegative) // -this - +b / +a - -b - addUnsigned(b); - else { - if ((isNegative && !b.isSmallerThanUnsigned(*this)) || - (!isNegative && (isSmallerThanUnsigned(b)))) { - // -3 - -4/ -4 - -4 || +3 - +7 - thisEqualsbBSubthis(b); - isNegative = !b.isNegative; - } - else // -4 - -3 ||+4 - +3/ +3 - +3 - subtractUnsigned(b); // this-=b - } - - return *this; -} - -BigInt64 BigInt64::operator-(const BigInt64 &b) const -{ - BigInt64 c(*this); - c -= b; - return c; -} - -BigInt64 &BigInt64::operator*=(const BigInt64 &b) -{ - longMultiplication(b); - return *this; -} - -BigInt64 BigInt64::operator*(const BigInt64 &b) const -{ - BigInt64 c(*this); - c *= b; - return c; -} - -BigInt64 &BigInt64::operator/=(const BigInt64 &b) -{ - BigInt64 remainder, quotient; - longDivision(b, remainder, quotient); - *this = quotient; - return *this; -} - -BigInt64 BigInt64::operator/(const BigInt64 &b) const -{ - BigInt64 c(*this); - c /= b; - return c; -} - -BigInt64 &BigInt64::operator%=(const BigInt64 &b) -{ - BigInt64 remainder, quotient; - longDivision(b, remainder, quotient); - if (isNegative != b.isNegative) - *this = b - remainder; - else - *this = remainder; - return *this; -} - -BigInt64 BigInt64::operator%(const BigInt64 &b) const -{ - BigInt64 c(*this); - c %= b; - return c; -} - -BigInt64 &BigInt64::operator^=(const BigInt64 &b) -{ - *this = power(*this, b); - return *this; -} - -BigInt64 BigInt64::operator^(const BigInt64 &b) const -{ - BigInt64 c(*this); - c ^= b; - return c; -} - -BigInt64 &BigInt64::operator>>=(uint64_t n) -{ - rightShift(n); - return *this; -} - -BigInt64 BigInt64::operator>>(uint64_t n) const -{ - BigInt64 c(*this); - c >>= n; - return c; -} - -BigInt64 &BigInt64::operator<<=(uint64_t n) -{ - leftShift(n); - return *this; -} - -BigInt64 BigInt64::operator<<(uint64_t n) const -{ - BigInt64 c(*this); - c <<= n; - return c; -} - -std::ostream &operator<<(std::ostream &out, const BigInt64 &a) -{ - if (a.limbsCount() == 1) { - if (a.isNegative) - out << "-"; - out << a.limbs[0]; - } - - else { - BigInt10 decimal = a.toDecimal(); - out << decimal; - } - - return out; -} - -bool BigInt64::isSmallerThanUnsigned(const BigInt64 &b) const -{ - if (limbsCount() > b.limbsCount()) - // a is longer - return false; - - if (limbsCount() < b.limbsCount()) - // b is longer - return true; - - // same length - for (int i = limbsCount() - 1; i >= 0; i--) - if (limbs[i] != b.limbs[i]) - return limbs[i] < b.limbs[i]; - - // they are equal - return false; -} - -void BigInt64::prefixPlusPlusUnsigned() -{ - int i, n = limbsCount(); - // zero alll the MAX_VAL_64 lsb's - for (i = 0; i < n && limbs[i] == MAX_VAL_64; i++) { - limbs[i] = 0; - } - if (i == n) - // it was all MAX_VAL_64 - limbs[size++] = 1; - else - limbs[i]++; -} - -void BigInt64::prefixMinusMinusUnsigned() -{ - if (isZero()) - return; - - int i = 0, n = limbsCount(); - // starting zeros case 0 0 0 X - while (i < n && limbs[i] == 0) { - limbs[i] = MAX_VAL_64; - i++; - } - limbs[i]--; // subtruct the first valid limb - // remove leading zero if exists - if (limbs[i] == 0 && i != 0) - size--; -} - -void BigInt64::addUnsigned(const BigInt64 &b) -{ - int n = limbsCount(), m = b.limbsCount(); - uint64_t carry = 0; //(1/0) - uint64_t bLimb; - if (n < m) { - setLimbs(0, m - n, 1, m); - n = m; - } - for (int i = 0; i < n; i++) { - bLimb = i < m ? b.limbs[i] : 0; - adder3_64(limbs[i], bLimb, carry, limbs[i], carry); - } - if (carry == 1) - limbs[size++] = carry; -} - -void BigInt64::subtractUnsigned(const BigInt64 &b) -{ - if (this->isSmallerThanUnsigned(b)) - // make sure this>=b; - return; - - int n = limbsCount(), m = b.limbsCount(); - int borrow = 0; //(1/0) - uint64_t bLimb; - - for (int i = 0; i < n; i++) { - bLimb = i < m ? b.limbs[i] : 0; - if ((borrow == 1 && limbs[i] == 0) || (limbs[i] - borrow < bLimb)) { - // need to borrow from next limb - limbs[i] = limbs[i] + toBase64(bLimb) - borrow; - borrow = 1; - } - else { - limbs[i] = limbs[i] - bLimb - borrow; - borrow = 0; - } - } - removeLeadingZeros(); -} - -void BigInt64::longMultiplication(const BigInt64 &b) -{ - if (isZero() || b.isZero()) { - zero(); - return; - } - int n = limbsCount(), m = b.limbsCount(); - uint64_t result[200] = {0}; - uint64_t high, low, carry; - - for (int i = 0; i < n; i++) { - carry = 0; - for (int j = 0; j < m; j++) { - mul2Limbs64(limbs[i], b.limbs[j], high, low); - adder3_64(low, result[i + j], carry, result[i + j], carry); - carry += high; - } - result[i + m] = carry; - } - size = m + n; - copyLimbsFrom(result, 0, size, 0, size); - removeLeadingZeros(); - isNegative = isNegative != b.isNegative; -} - -std::string BigInt64::toString() const -{ - std::ostringstream oss; - oss << *this; - return oss.str(); -} - -void BigInt64::exportTo(uint8_t *out, size_t outLen, CreateModes mode) const -{ - if (outLen < bytesCount()) - throw std::runtime_error("Not enough space in output buffer"); - - if (mode == CreateModes::LITTLE_ENDIANESS) - for (int i = 0; i < limbsCount(); i++) - for (int j = 0; j < BYTES_IN_LIMB; j++) - out[outLen - 1 - i * BYTES_IN_LIMB - (7 - j)] = - static_cast(limbs[i] >> (j * BITS_IN_BYTE)); - else - for (int i = 0; i < limbsCount(); i++) - for (int j = 0; j < BYTES_IN_LIMB; j++) - out[outLen - 1 - i * BYTES_IN_LIMB - j] = - static_cast(limbs[i] >> (j * BITS_IN_BYTE)); -} - -int BigInt64::bitsCount() const -{ - if (isZero()) - return 0; - - uint64_t mostSignificantLimb = limbs[size - 1]; - int inMsb = ::bitsCount(mostSignificantLimb); - return inMsb + (limbsCount() - 1) * BITS_IN_LIMB; -} - -void BigInt64::thisEqualsbBSubthis(const BigInt64 &b) -{ - BigInt64 copyB(b); - copyB.subtractUnsigned(*this); - *this = std::move(copyB); -} - -void BigInt64::removeLeadingZeros() -{ - while (size > 1 && limbs[size - 1] == 0) - size--; -} - -void BigInt64::insert(int n, uint64_t limb) -{ - for (int i = size - 1; i >= 0; i--) - limbs[i + n] = limbs[i]; - for (int i = 0; i < n; i++) - limbs[i] = limb; - size += n; -} - -void BigInt64::erase(int n) -{ - for (int i = 0; i < n; i++) - limbs[i] = limbs[i + n]; - size -= n; -} - -void BigInt64::generateNLimbsRandom(int limbsCnt) -{ - if (limbsCnt < 1) - throw std::invalid_argument("limbsCnt less than 1"); - - std::random_device rd; - std::mt19937_64 gen(rd()); - std::uniform_int_distribution distrib(0, UINT64_MAX); - size = limbsCnt; - - for (int i = 0; i < limbsCnt; i++) { - uint64_t number = distrib(gen); - limbs[i] = number; - } -} - -uint64_t BigInt64::randomLimb(uint64_t min, uint64_t max) -{ - if (min > max) - throw std::invalid_argument("cant random limb"); - - std::random_device rd; - std::mt19937_64 gen(rd()); - std::uniform_int_distribution distrib(min, max); - return distrib(gen); -} - -void BigInt64::zero() -{ - size = 1; - limbs[0] = 0; - isNegative = false; -} - -bool BigInt64::hasLeadingZero() -{ - return limbs[size - 1] == 0 && limbsCount() > 1; -} - -void BigInt64::copyLimbsFrom(const uint64_t *other, size_t otherStart, - size_t count, size_t meStart, size_t newSize) -{ - for (int i = 0; i < count; i++) - limbs[meStart + i] = other[otherStart + i]; - size = newSize; -} - -void BigInt64::reverse() -{ - int start = 0; - int end = size - 1; - - while (start < end) { - uint64_t temp = limbs[start]; - limbs[start] = limbs[end]; - limbs[end] = temp; - start++; - end--; - } -} - -void BigInt64::setLimbs(uint64_t val, size_t count, size_t meStart, - size_t newSize) -{ - for (int i = 0; i < count; i++) - limbs[meStart + i] = val; - size = newSize; -} - -void BigInt64::longDivision(const BigInt64 &b, BigInt64 &remainder, - BigInt64 "ient) const -{ - if (b.isZero()) - return; - - remainder.isNegative = b.isNegative; - if (isSmallerThanUnsigned(b)) { - remainder.copyLimbsFrom(limbs, 0, size, 0, size); - quotient.zero(); - return; - } - - remainder.size = 0; - quotient.size = 0; - - for (int i = limbsCount() - 1; i >= 0; i--) { // msb-lsb - remainder.insert(1, limbs[i]); // insert msb as lsb - if (remainder.hasLeadingZero()) - remainder.size--; // remove leading zero - uint64_t times = 0; - if (!remainder.isSmallerThanUnsigned(b)) { - uint64_t left = 1, right = MAX_VAL_64; - // after inserting next limb, most times t contains b is max value - // of singe limb, find in range of [0...max] - while (left <= right) { - uint64_t mid = left + (right - left) / 2; - if (!remainder.isSmallerThanUnsigned( - b * mid)) { // b*mid<=remainder - times = mid; - if (left == right) - break; - left = mid + 1; - } - else - right = mid - 1; - } - - remainder.subtractUnsigned(b * times); - } - - if (quotient.size > 0 || times > 0) - quotient.limbs[quotient.size++] = times; - } - - quotient.reverse(); - quotient.isNegative = isNegative != b.isNegative; -} -BigInt64 power(BigInt64 base, BigInt64 exponent) -{ - if (exponent.isNegative) - throw std::invalid_argument("Invalid input: negative exponent"); - - BigInt64 result(1); - - while (!exponent.isZero()) { - if (!exponent.isEven()) - result *= base; - base *= base; - exponent >>= 1; - } - - return result; -} - -BigInt10 BigInt64::toDecimal() const -{ - BigInt10 decimal; - BigInt10 base(MAX_VAL_64); - base++; - for (int i = limbsCount() - 1; i >= 0; i--) { - BigInt10 limb = limbs[i]; - decimal *= base; - decimal += limb; - } - - decimal.isNegative = isNegative; - return decimal; -} - -void BigInt64::initFromString(const char *str, int n) -{ - BigInt10 decimal = str; - size = 0; - isNegative = decimal.isNegative; - BigInt10 base = MAX_VAL_64; - base++; - if (decimal.isZero()) - limbs[size++] = 0; - else - while (!decimal.isZero()) { - limbs[size++] = (decimal % base).toU64(); - decimal /= base; - } -} - -BigInt64 gcd(BigInt64 a, BigInt64 b) -{ - a.isNegative = false; - b.isNegative = false; - while (!b.isZero()) { - BigInt64 copyB = b; - b = a % b; - a = copyB; - } - - return a; -} - -void BigInt64::rightShift(uint64_t n) -{ - if (n >= bitsCount()) { - zero(); - return; - } - uint64_t shiftEachLimb = n % BITS_IN_LIMB; - uint64_t dropLimbs = n / BITS_IN_LIMB; - if (shiftEachLimb != 0) { - for (int i = 0; i < limbsCount() - 1 - dropLimbs; i++) // lsb...msb - limbs[i] = limbs[i + dropLimbs] >> shiftEachLimb | - limbs[i + dropLimbs + 1] - << (BITS_IN_LIMB - shiftEachLimb); - limbs[limbsCount() - 1 - dropLimbs] >>= shiftEachLimb; - size -= dropLimbs; - if (hasLeadingZero() && !isZero()) - size--; - } - else - erase(dropLimbs); -} - -void BigInt64::leftShift(uint64_t n) -{ - if (n >= bitsCount()) { - zero(); - return; - } - - uint64_t shiftEachLimb = n % BITS_IN_LIMB; - uint64_t dropLimbs = n / BITS_IN_LIMB; - if (shiftEachLimb != 0) { - for (int i = limbsCount() - 1; i > dropLimbs; i--) { // msb-lst - limbs[i] = - limbs[i - dropLimbs] << shiftEachLimb | - limbs[i - dropLimbs - 1] >> (BITS_IN_LIMB - shiftEachLimb); - } - - limbs[0] <<= shiftEachLimb; - } - else { - for (int i = limbsCount() - 1; i >= dropLimbs; i--) - limbs[i] = limbs[i - dropLimbs]; - for (int i = dropLimbs - 1; i >= 0; i--) - limbs[i] = 0; - } - - removeLeadingZeros(); -} - -BigInt64 extendedGcd(BigInt64 a, BigInt64 b, BigInt64 &x, BigInt64 &y) -{ - x = 1; - y = 0; - BigInt64 x1 = 0, y1 = 1; - BigInt64 q, temp; - - while (b != 0) { - q = a / b; - temp = b; - b = a % b; - a = temp; - - temp = x1; - - x1 = x - q * x1; - x = temp; - - temp = y1; - y1 = y - q * y1; - y = temp; - } - - return a; -} - -BigInt64 modularInverse(BigInt64 a, BigInt64 b) -{ - BigInt64 x, y; - BigInt64 gcdResult = extendedGcd(a, b, x, y); - if (gcdResult != 1) - throw std::invalid_argument("Modular inverse does not exist."); - - return x % b; // Ensure result is positive -} - -size_t BigInt64::bytesCount() const -{ - return limbsCount() * BYTES_IN_LIMB; -} - -bool BigInt64::isZero() const -{ - return limbsCount() == 1 && limbs[0] == 0; -} - -int BigInt64::limbsCount() const -{ - return size; -} - -std::uint64_t BigInt64::getMsb() const -{ - return limbs[size - 1]; -} - -std::uint64_t BigInt64::getLsb() const -{ - return limbs[0]; -} - -bool BigInt64::isEven() const -{ - return (limbs[0] & 1) == 0; -} \ No newline at end of file diff --git a/tests/aes_tests.cpp b/tests/aes_tests.cpp index 6932fe18..8d2ab17a 100644 --- a/tests/aes_tests.cpp +++ b/tests/aes_tests.cpp @@ -1,170 +1,197 @@ #include #include "gtest/gtest.h" #include "../include/aes.h" +#include "debug_utils.h" #include "../include/aes_stream_factory.h" // Assuming this is where your FactoryManager is defined -void printBufferHexa(const uint8_t *buffer, size_t len, std::string message) -{ - std::cout << message << std::endl; - for (size_t i = 0; i < len; ++i) - { - std::cout << std::hex << std::setw(2) << std::setfill('0') - << static_cast(buffer[i]) << " "; - // Print a new line every 16 bytes for better readability - if ((i + 1) % 16 == 0) - std::cout << std::endl; - } - std::cout << std::endl; - // Reset the stream format back to decimal - std::cout << std::dec; -} + /* Helper function to setup encryption and decryption */ -void testEncryptionDecryption(AESChainingMode mode, AESKeyLength keyLength) { - unsigned char plain[64] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, - 0x00, 0x10, 0x21, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x78, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, - 0x00, 0x10, 0x21, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x78, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, - }; - - unsigned char plain2[32] = { - 0x00, 0x10, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x78, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, - 0x00, 0x10, 0x21, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x78, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff - }; - - unsigned char plain3[13] = { - 0x48, 0x65, 0x6c ,0x6c ,0x6f ,0x2c ,0x20 ,0x57 ,0x6f ,0x72 ,0x6c ,0x64 ,0x21 - }; - +void testEncryptionDecryption(AESChainingMode mode, AESKeyLength keyLength) +{ + // Same data as used in testEncryptionDecryptionAPI + size_t inputLength1 = 16; + unsigned char inputData1[inputLength1]; + memset(inputData1, 0x01, inputLength1); + size_t inputLength2 = 16; + unsigned char inputData2[inputLength2]; + memset(inputData2, 0x02, inputLength2); + size_t inputLength3 = 16; + unsigned char inputData3[inputLength3]; + memset(inputData3, 0x03, inputLength3); // Create a factory instance - StreamAES* streamAES = FactoryManager::getInstance().create(mode); - ASSERT_NE(streamAES, nullptr); - - unsigned char *key = new unsigned char[aesKeyLengthData[keyLength].keySize]; - generateKey(key, keyLength); - unsigned char* encrypted = new unsigned char[calculatEncryptedLenAES(64, true)]; - unsigned char* encrypted2 = new unsigned char[calculatEncryptedLenAES(32, false)]; - unsigned char* encrypted3 = new unsigned char[calculatEncryptedLenAES(32, false)]; - printBufferHexa(encrypted3, 13, "OFB hello world"); + StreamAES *streamAES = FactoryManager::getInstance().create(mode); + ASSERT_NE(streamAES, nullptr); + + // Allocate memory for the key + std::unique_ptr key( + new unsigned char[aesKeyLengthData[keyLength].keySize]); + generateKey(key.get(), keyLength); + + // Calculate encrypted lengths + unsigned int encryptedLen1 = + calculatEncryptedLenAES(inputLength1, true, mode); + unsigned int encryptedLen2 = + calculatEncryptedLenAES(inputLength2, false, mode); + unsigned int encryptedLen3 = + calculatEncryptedLenAES(inputLength3, false, mode); + + // Allocate memory for encrypted data based on the calculated lengths + std::unique_ptr encrypted( + new unsigned char[encryptedLen1]); + std::unique_ptr encrypted2( + new unsigned char[encryptedLen2]); + std::unique_ptr encrypted3( + new unsigned char[encryptedLen3]); + unsigned int outLenEncrypted = 0; unsigned int outLenEncrypted2 = 0; unsigned int outLenEncrypted3 = 0; - streamAES->encryptStart(plain, 64, encrypted, outLenEncrypted, key, keyLength); - streamAES->encryptContinue(plain2, 32, encrypted2, outLenEncrypted2); - streamAES->encryptContinue(plain3, 32, encrypted3, outLenEncrypted3); - - unsigned char* decrypted; - // new unsigned char[calculatDecryptedLenAES(BLOCK_BYTES_LEN, true)]; - unsigned char* decrypted2; - // new unsigned char[calculatDecryptedLenAES(BLOCK_BYTES_LEN, false)]; - unsigned char* decrypted3; - // new unsigned char[calculatDecryptedLenAES(BLOCK_BYTES_LEN, false)]; + // Use the raw pointers from unique_ptr + unsigned char *encryptedPtr = encrypted.get(); + unsigned char *encrypted2Ptr = encrypted2.get(); + unsigned char *encrypted3Ptr = encrypted3.get(); + + // Encrypt the data + streamAES->encryptStart(inputData1, inputLength1, encryptedPtr, + outLenEncrypted, key.get(), keyLength); + streamAES->encryptContinue(inputData2, inputLength2, encrypted2Ptr, + outLenEncrypted2); + streamAES->encryptContinue(inputData3, inputLength3, encrypted3Ptr, + outLenEncrypted3); + + // Print encrypted data + printBufferHexa(encryptedPtr, outLenEncrypted, + "Encrypted data1 aes through streamAES"); + printBufferHexa(encrypted2Ptr, outLenEncrypted2, + "Encrypted data2 aes through streamAES"); + printBufferHexa(encrypted3Ptr, outLenEncrypted3, + "Encrypted data3 aes through streamAES"); + + // Calculate decrypted lengths + unsigned int decryptedLen1 = + calculatDecryptedLenAES(outLenEncrypted, true, mode); + unsigned int decryptedLen2 = + calculatDecryptedLenAES(outLenEncrypted2, false, mode); + unsigned int decryptedLen3 = + calculatDecryptedLenAES(outLenEncrypted3, false, mode); + + // Allocate memory for decrypted data + std::unique_ptr decrypted( + new unsigned char[decryptedLen1]); + std::unique_ptr decrypted2( + new unsigned char[decryptedLen2]); + std::unique_ptr decrypted3( + new unsigned char[decryptedLen3]); + unsigned int outLenDecrypted = 0; unsigned int outLenDecrypted2 = 0; unsigned int outLenDecrypted3 = 0; - streamAES->decryptStart(encrypted, outLenEncrypted, decrypted, outLenDecrypted, key, keyLength); - streamAES->decryptContinue(encrypted2, outLenEncrypted2, decrypted2, outLenDecrypted2); - streamAES->decryptContinue(encrypted3, outLenEncrypted3, decrypted3, outLenDecrypted3); + // Use the raw pointers from unique_ptr + unsigned char *decryptedPtr = decrypted.get(); + unsigned char *decrypted2Ptr = decrypted2.get(); + unsigned char *decrypted3Ptr = decrypted3.get(); + // Decrypt the data + streamAES->decryptStart(encryptedPtr, outLenEncrypted, decryptedPtr, + outLenDecrypted, key.get(), keyLength); + streamAES->decryptContinue(encrypted2Ptr, outLenEncrypted2, decrypted2Ptr, + outLenDecrypted2); + streamAES->decryptContinue(encrypted3Ptr, outLenEncrypted3, decrypted3Ptr, + outLenDecrypted3); - ASSERT_FALSE(memcmp(plain, decrypted, 64)); - ASSERT_FALSE(memcmp(plain2, decrypted2, 32)); - ASSERT_FALSE(memcmp(plain3, decrypted3, 32)); + // Print original and decrypted data for comparison + printBufferHexa(inputData1, inputLength1, "Original Data1: "); + printBufferHexa(decryptedPtr, outLenDecrypted, "Decrypted Data1: "); + printBufferHexa(inputData2, inputLength2, "Original Data2: "); + printBufferHexa(decrypted2Ptr, outLenDecrypted2, "Decrypted Data2: "); + printBufferHexa(inputData3, inputLength3, "Original Data3: "); + printBufferHexa(decrypted3Ptr, outLenDecrypted3, "Decrypted Data3: "); - delete [] encrypted; - delete [] encrypted2; - delete [] encrypted3; - delete [] decrypted; - delete [] decrypted2; - delete [] decrypted3; - delete [] key; + // Assertions to verify correctness + ASSERT_EQ(memcmp(inputData1, decryptedPtr, inputLength1), 0); + ASSERT_EQ(memcmp(inputData2, decrypted2Ptr, inputLength2), 0); + ASSERT_EQ(memcmp(inputData3, decrypted3Ptr, inputLength3), 0); } -TEST(KeyLengths, KeyLength128_ECB) +TEST(KeyLengths, KeyLength128_ECB) { testEncryptionDecryption(AESChainingMode::ECB, AESKeyLength::AES_128); } -TEST(KeyLengths, KeyLength128_CBC) +TEST(KeyLengths, KeyLength128_CBC) { testEncryptionDecryption(AESChainingMode::CBC, AESKeyLength::AES_128); } -TEST(KeyLengths, KeyLength128_CFB) +TEST(KeyLengths, KeyLength128_CFB) { testEncryptionDecryption(AESChainingMode::CFB, AESKeyLength::AES_128); } -TEST(KeyLengths, KeyLength128_OFB) +TEST(KeyLengths, KeyLength128_OFB) { testEncryptionDecryption(AESChainingMode::OFB, AESKeyLength::AES_128); } -TEST(KeyLengths, KeyLength128_CTR) +TEST(KeyLengths, KeyLength128_CTR) { testEncryptionDecryption(AESChainingMode::CTR, AESKeyLength::AES_128); } -TEST(KeyLengths, KeyLength192_ECB) +TEST(KeyLengths, KeyLength192_ECB) { testEncryptionDecryption(AESChainingMode::ECB, AESKeyLength::AES_192); } -TEST(KeyLengths, KeyLength192_CBC) +TEST(KeyLengths, KeyLength192_CBC) { testEncryptionDecryption(AESChainingMode::CBC, AESKeyLength::AES_192); } -TEST(KeyLengths, KeyLength192_CFB) +TEST(KeyLengths, KeyLength192_CFB) { testEncryptionDecryption(AESChainingMode::CFB, AESKeyLength::AES_192); } -TEST(KeyLengths, KeyLength192_OFB) +TEST(KeyLengths, KeyLength192_OFB) { testEncryptionDecryption(AESChainingMode::OFB, AESKeyLength::AES_192); } -TEST(KeyLengths, KeyLength192_CTR) +TEST(KeyLengths, KeyLength192_CTR) { testEncryptionDecryption(AESChainingMode::CTR, AESKeyLength::AES_192); } -TEST(KeyLengths, KeyLength256_ECB) +TEST(KeyLengths, KeyLength256_ECB) { testEncryptionDecryption(AESChainingMode::ECB, AESKeyLength::AES_256); } -TEST(KeyLengths, KeyLength256_CBC) +TEST(KeyLengths, KeyLength256_CBC) { testEncryptionDecryption(AESChainingMode::CBC, AESKeyLength::AES_256); } -TEST(KeyLengths, KeyLength256_CFB) +TEST(KeyLengths, KeyLength256_CFB) { testEncryptionDecryption(AESChainingMode::CFB, AESKeyLength::AES_256); } -TEST(KeyLengths, KeyLength256_OFB) +TEST(KeyLengths, KeyLength256_OFB) { testEncryptionDecryption(AESChainingMode::OFB, AESKeyLength::AES_256); } -TEST(KeyLengths, KeyLength256_CTR) +TEST(KeyLengths, KeyLength256_CTR) { testEncryptionDecryption(AESChainingMode::CTR, AESKeyLength::AES_256); } -int main() +int main() { ::testing::InitGoogleTest(); return RUN_ALL_TESTS(); -} +} \ No newline at end of file diff --git a/tests/crypto_api_tests.cpp b/tests/crypto_api_tests.cpp new file mode 100644 index 00000000..31eed991 --- /dev/null +++ b/tests/crypto_api_tests.cpp @@ -0,0 +1,1032 @@ +#include "crypto_api.h" +#include "debug_utils.h" +#include "temp_hsm.h" +#include + +class CryptoAPIFixture : public ::testing::Test { + protected: + int user1 = 1; + int user2 = 2; + size_t counter = 1; + std::pair rsaKeyIds; + std::pair eccKeyIds; + std::vector permissions = { + KeyPermission::DECRYPT, KeyPermission::ENCRYPT, KeyPermission::SIGN, + KeyPermission::VERIFY, KeyPermission::EXPORTABLE}; + AESChainingMode chainingMode = AESChainingMode::CBC; // Change as needed + AESKeyLength keyLength = AESKeyLength::AES_128; // Change as needed + + void SetUp() override + { + rsaKeyIds = generateRSAKeyPair(1, permissions); + eccKeyIds = generateECCKeyPair(1, permissions); + } + + void TearDown() override {} +}; + + //#define RSA_TEST +// #define ECC_TEST +// #define SIGN_VERIFY_TEST + +#ifdef RSA_TEST +TEST_F(CryptoAPIFixture, rsa) +{ + // Generate RSA key pair for user1 + + uint8_t data[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; + size_t dataLen = 6; + printBufferHexa(data, dataLen, "rsa plain data"); + + size_t encryptedLen = getRSAencryptedLength(); + uint8_t *encrypted = new uint8_t[encryptedLen]; + + // RSA encryption: user2 -> user1 + CK_RV rv2 = RSAencrypt(user2, rsaKeyIds.first, data, dataLen, encrypted, + encryptedLen); + EXPECT_EQ(CKR_OK, rv2); + + size_t decryptedLen = getRSAdecryptedLength(); + uint8_t *decrypted = new uint8_t[decryptedLen]; + + // RSA decryption: user1 + CK_RV rv3 = RSAdecrypt(user1, rsaKeyIds.second, encrypted, encryptedLen, + decrypted, &decryptedLen); + EXPECT_EQ(CKR_OK, rv3); + + printBufferHexa(decrypted, decryptedLen, "rsa decrypted"); + + EXPECT_EQ(0, memcmp(data, decrypted, dataLen)); + + delete[] encrypted; + delete[] decrypted; +} +#endif // RSA_TEST +#ifdef ECC_TEST +TEST_F(CryptoAPIFixture, ecc) +{ + // Generate ECC key pair for user1 + + size_t dataLen = 16; + uint8_t data[dataLen]; + memset(data, 1, dataLen); + + printBufferHexa(data, dataLen, "ecc plain data"); + + size_t encryptedLen = getECCencryptedLength(); + uint8_t *encrypted = new uint8_t[encryptedLen]; + + // ECC encryption: user2 -> user1 + CK_RV rv2 = ECCencrypt(user2, eccKeyIds.first, data, dataLen, encrypted, + encryptedLen); + printBufferHexa(encrypted, encryptedLen, "ecc encrypted"); + EXPECT_EQ(CKR_OK, rv2); + + size_t decryptedLen = getECCdecryptedLength(); + uint8_t *decrypted = new uint8_t[decryptedLen]; + + // ECC decryption: user1 + CK_RV rv3 = ECCdecrypt(user1, eccKeyIds.second, encrypted, encryptedLen, + decrypted, decryptedLen); + EXPECT_EQ(CKR_OK, rv3); + + printBufferHexa(decrypted, decryptedLen, "ecc decrypted"); + + EXPECT_EQ(0, memcmp(data, decrypted, dataLen)); + + delete[] encrypted; + delete[] decrypted; +} +#endif // ECC_TEST +#ifdef SIGN_VERIFY_TEST +TEST_F(CryptoAPIFixture, SignVerifySingleChunkTest) +{ + CK_RV rv; + // Define the data size to be within a single chunk (e.g., 32KB) + size_t singleChunkDataLen = + 32 * 1024; // 32KB, smaller than the 64KB chunk size + std::vector singleChunkData(singleChunkDataLen, + 0xAB); // Fill the data with 0xAB + + // Define chunk size (same as the data size, ensuring only one chunk) + size_t chunkSize = + singleChunkDataLen; // For single chunk, chunk size is equal to data size + size_t numChunks = 1; // Only one chunk in this case + + // Buffer for signature + size_t signatureLen = getSignatureLength(); + uint8_t + signature[signatureLen]; // Assuming RSA-2048 for a 256-byte signature + + // Sign the single chunk + std::cout << "Signing a single chunk..." << std::endl; + size_t offset = 0; // No offset needed for a single chunk + rv = signUpdate(user1, &singleChunkData[offset], singleChunkDataLen, + SHA_256, 0); // Only one call to signUpdate + EXPECT_EQ(CKR_OK, rv) << "signUpdate failed for the single chunk"; + + // Finalize signing + rv = + signFinalize(user1, signature, signatureLen, SHA_256, rsaKeyIds.second); + EXPECT_EQ(CKR_OK, rv) << "signFinalize failed"; + + // Verify the single chunk + std::cout << "Verifying a single chunk..." << std::endl; + rv = verifyUpdate(user2, &singleChunkData[offset], singleChunkDataLen, + SHA_256, 0); // Only one call to verifyUpdate + EXPECT_EQ(CKR_OK, rv) << "verifyUpdate failed for the single chunk"; + + // Finalize verifying + rv = verifyFinalize(user2, signature, signatureLen, SHA_256, + rsaKeyIds.first); + EXPECT_EQ(CKR_OK, rv) << "verifyFinalize failed"; + + // If all assertions pass, signing and verification of the single chunk were successful + std::cout << "Sign and Verify for a single chunk Passed" << std::endl; +} + +// Test for sign and verify functions +TEST_F(CryptoAPIFixture, SignVerifyChunkedTest) +{ + CK_RV rv; + // Simulate large data (e.g., 1MB) + size_t largeDataLen = 1024 * 1024; // 1MB + std::vector largeData( + largeDataLen, 0xAB); // Fill the data with 0xAB for simulation + + // Define chunk size (e.g., 64KB) + size_t chunkSize = 64 * 1024; + size_t numChunks = (largeDataLen + chunkSize - 1) / + chunkSize; // Calculate the number of chunks + + // Buffer for signature + size_t signatureLen = getSignatureLength(); + uint8_t + signature[signatureLen]; // Assuming RSA-2048 for a 256-byte signature + + // Sign in chunks + std::cout << "Signing in chunks..." << std::endl; + for (size_t i = 0; i < numChunks; ++i) { + size_t offset = i * chunkSize; + size_t currentChunkSize = std::min( + chunkSize, largeDataLen - offset); // Handle last chunk size + rv = + signUpdate(user1, &largeData[offset], currentChunkSize, SHA_256, i); + EXPECT_EQ(CKR_OK, rv) << "signUpdate failed for chunk " << i; + } + + // Finalize signing, user1 + rv = + signFinalize(user1, signature, signatureLen, SHA_256, rsaKeyIds.second); + EXPECT_EQ(CKR_OK, rv) << "signFinalize failed"; + + // Now, let's verify in chunks + std::cout << "Verifying in chunks..." << std::endl; + for (size_t i = 0; i < numChunks; ++i) { + size_t offset = i * chunkSize; + size_t currentChunkSize = std::min(chunkSize, largeDataLen - offset); + rv = verifyUpdate(user2, &largeData[offset], currentChunkSize, SHA_256, + i); + EXPECT_EQ(CKR_OK, rv) << "verifyUpdate failed for chunk " << i; + } + + // Finalize verifying + rv = verifyFinalize(user2, signature, signatureLen, SHA_256, + rsaKeyIds.first); + EXPECT_EQ(CKR_OK, rv) << "verifyFinalize failed"; + + // If all assertions pass, signing and verification of large data in chunks + // were successful + std::cout << "Sign and Verify for large data in chunks Passed" << std::endl; +} +#endif // SIGN_VERIFY_TEST +void testEncryptionDecryptionAPI(AESChainingMode mode, AESKeyLength keyLength) +{ + int user1 = 1; + int user2 = 2; + size_t counter = 1; + std::vector permissions = { + KeyPermission::DECRYPT, KeyPermission::ENCRYPT, KeyPermission::SIGN, + KeyPermission::VERIFY, KeyPermission::EXPORTABLE}; + AESChainingMode chainingMode = mode; // Change as needed + std::string keyId = generateAESKey(user1, keyLength, permissions, user2); + size_t inputLength1 = 64; + unsigned char inputData1[inputLength1]; + memset(inputData1, 0x02, inputLength1); + size_t inputLength2 = 32; + unsigned char inputData2[inputLength2]; + memset(inputData2, 0x02, inputLength2); + size_t inputLength3 = 32; + unsigned char inputData3[inputLength3]; + memset(inputData3, 0x02, inputLength3); + + size_t encryptedLength1 = getAESencryptedLength(inputLength1, true, mode); + uint8_t encryptedData1[encryptedLength1]; + size_t encryptedLength2 = getAESencryptedLength(inputLength2, false, mode); + uint8_t encryptedData2[encryptedLength2]; + size_t encryptedLength3 = getAESencryptedLength(inputLength3, false, mode); + uint8_t encryptedData3[encryptedLength3]; + counter = 3; + + // Encrypt the data + CK_RV result1 = AESencrypt(user1, user2, (void *)inputData1, inputLength1, + encryptedData1, encryptedLength1, keyLength, + chainingMode, counter, keyId); + + // Check for successful encryption + EXPECT_EQ(result1, CKR_OK); + // Encrypt the data + CK_RV result2 = AESencrypt(user1, user2, (void *)inputData2, inputLength2, + encryptedData2, encryptedLength2, keyLength, + chainingMode, counter, keyId); + + // Check for successful encryption + EXPECT_EQ(result2, CKR_OK); // Encrypt the data + CK_RV result3 = AESencrypt(user1, user2, (void *)inputData3, inputLength3, + encryptedData3, encryptedLength3, keyLength, + chainingMode, counter, keyId); + + // Check for successful encryption + EXPECT_EQ(result3, CKR_OK); + + // Decrypt the data + size_t decryptedLength1 = + getAESdecryptedLength(encryptedLength1, true, mode); + size_t decryptedLength2 = + getAESdecryptedLength(encryptedLength2, false, mode); + size_t decryptedLength3 = + getAESdecryptedLength(encryptedLength3, false, mode); + printBufferHexa(encryptedData1, encryptedLength1, + "Encrypted data1 aes through api"); + printBufferHexa(encryptedData2, encryptedLength2, + "Encrypted data2 aes through api"); + printBufferHexa(encryptedData3, encryptedLength3, + "Encrypted data3 aes through api"); + uint8_t decryptedData1[decryptedLength1]; + uint8_t decryptedData2[decryptedLength2]; + uint8_t decryptedData3[decryptedLength3]; + + result1 = AESdecrypt(user1, user2, encryptedData1, encryptedLength1, + decryptedData1, decryptedLength1, keyLength, + chainingMode, counter, keyId); + EXPECT_EQ(result1, CKR_OK); + printBufferHexa(inputData1, inputLength1, "Original Data1: "); + printBufferHexa(decryptedData1, decryptedLength1, "Decrypted Data1: "); + result2 = AESdecrypt(user1, user2, encryptedData2, encryptedLength2, + decryptedData2, decryptedLength2, keyLength, + chainingMode, counter, keyId); + EXPECT_EQ(result2, CKR_OK); + + printBufferHexa(inputData2, inputLength2, "Original Data2: "); + printBufferHexa(decryptedData2, decryptedLength2, "Decrypted Data2: "); + result3 = AESdecrypt(user1, user2, encryptedData3, encryptedLength3, + decryptedData3, decryptedLength3, keyLength, + chainingMode, counter, keyId); + printBufferHexa(inputData3, inputLength3, "Original Data3: "); + printBufferHexa(decryptedData3, decryptedLength3, "Decrypted Data3: "); + + // Check for successful decryption + EXPECT_EQ(result3, CKR_OK); + + // Verify the decrypted data matches the original input + EXPECT_EQ(memcmp(inputData1, decryptedData1, decryptedLength1), 0); + EXPECT_EQ(memcmp(inputData2, decryptedData2, decryptedLength2), 0); + EXPECT_EQ(memcmp(inputData3, decryptedData3, decryptedLength3), 0); + EXPECT_EQ(inputLength1, decryptedLength1); + EXPECT_EQ(inputLength2, decryptedLength2); + EXPECT_EQ(inputLength3, decryptedLength3); +}; + +//#define AES_TESTS + +#ifdef AES_TESTS +TEST(KeyLengthsAPI, KeyLength128_ECB) +{ + testEncryptionDecryptionAPI(AESChainingMode::ECB, AESKeyLength::AES_128); +} + +TEST(KeyLengthsAPI, KeyLength128_CBC) +{ + testEncryptionDecryptionAPI(AESChainingMode::CBC, AESKeyLength::AES_128); +} + +TEST(KeyLengthsAPI, KeyLength128_CFB) +{ + testEncryptionDecryptionAPI(AESChainingMode::CFB, AESKeyLength::AES_128); +} + +TEST(KeyLengthsAPI, KeyLength128_OFB) +{ + testEncryptionDecryptionAPI(AESChainingMode::OFB, AESKeyLength::AES_128); +} + +TEST(KeyLengthsAPI, KeyLength128_CTR) +{ + testEncryptionDecryptionAPI(AESChainingMode::CTR, AESKeyLength::AES_128); +} + +TEST(KeyLengthsAPI, KeyLength192_ECB) +{ + testEncryptionDecryptionAPI(AESChainingMode::ECB, AESKeyLength::AES_192); +} + +TEST(KeyLengthsAPI, KeyLength192_CBC) +{ + testEncryptionDecryptionAPI(AESChainingMode::CBC, AESKeyLength::AES_192); +} + +TEST(KeyLengthsAPI, KeyLength192_CFB) +{ + testEncryptionDecryptionAPI(AESChainingMode::CFB, AESKeyLength::AES_192); +} + +TEST(KeyLengthsAPI, KeyLength192_OFB) +{ + testEncryptionDecryptionAPI(AESChainingMode::OFB, AESKeyLength::AES_192); +} + +TEST(KeyLengthsAPI, KeyLength192_CTR) +{ + testEncryptionDecryptionAPI(AESChainingMode::CTR, AESKeyLength::AES_192); +} + +TEST(KeyLengthsAPI, KeyLength256_ECB) +{ + testEncryptionDecryptionAPI(AESChainingMode::ECB, AESKeyLength::AES_256); +} + +TEST(KeyLengthsAPI, KeyLength256_CBC) +{ + testEncryptionDecryptionAPI(AESChainingMode::CBC, AESKeyLength::AES_256); +} + +TEST(KeyLengthsAPI, KeyLength256_CFB) +{ + testEncryptionDecryptionAPI(AESChainingMode::CFB, AESKeyLength::AES_256); +} + +TEST(KeyLengthsAPI, KeyLength256_OFB) +{ + testEncryptionDecryptionAPI(AESChainingMode::OFB, AESKeyLength::AES_256); +} + +TEST(KeyLengthsAPI, KeyLength256_CTR) +{ + testEncryptionDecryptionAPI(AESChainingMode::CTR, AESKeyLength::AES_256); +} +#endif +void GenericEncryptionDecryptionTest(CryptoConfig config) +{ + try { + int user1 = 1; + int user2 = 2; + + std::vector permissions = { + KeyPermission::DECRYPT, KeyPermission::ENCRYPT, KeyPermission::SIGN, + KeyPermission::VERIFY, KeyPermission::EXPORTABLE}; + + configure(user1, config); //give encrypt-decrypt behavior + configure(user2, config); //give encrypt-decrypt behavior + bootSystem({{user1, permissions}, + {user2, permissions}}); //generate keys with permissions + + size_t inputLength1 = 32; + unsigned char inputData1[inputLength1]; + memset(inputData1, 0x01, inputLength1); + size_t inputLength2 = 32; + unsigned char inputData2[inputLength2]; + memset(inputData2, 0x02, inputLength2); + size_t inputLength3 = 24; + unsigned char inputData3[inputLength3]; + memset(inputData3, 0x03, inputLength3); + + size_t encryptedLength1 = getEncryptedLen(user1, inputLength1, true); + uint8_t encryptedData1[encryptedLength1]; + size_t encryptedLength2 = getEncryptedLen(user1, inputLength2, false); + uint8_t encryptedData2[encryptedLength2]; + size_t encryptedLength3 = getEncryptedLen(user1, inputLength3, false); + uint8_t encryptedData3[encryptedLength3]; + size_t counter = 3; + + size_t signatureLen = getSignatureLength(); + uint8_t *signature = new uint8_t[signatureLen]; + // Encrypt the data + CK_RV result1 = encrypt(user1, user2, (void *)inputData1, inputLength1, + encryptedData1, encryptedLength1, signature, + signatureLen, counter); + // printBufferHexa(encryptedData1, encryptedLength1, + // "Encrypted data1 aes through api"); + // Check for successful encryption + EXPECT_EQ(result1, CKR_OK); + // Encrypt the data + CK_RV result2 = encrypt(user1, user2, (void *)inputData2, inputLength2, + encryptedData2, encryptedLength2, signature, + signatureLen, counter); + // printBufferHexa(encryptedData2, encryptedLength2, + // "Encrypted data2 aes through api"); + // Check for successful encryption + EXPECT_EQ(result2, CKR_OK); // Encrypt the data + CK_RV result3 = encrypt(user1, user2, (void *)inputData3, inputLength3, + encryptedData3, encryptedLength3, signature, + signatureLen, counter); + // Check for successful encryption + EXPECT_EQ(result3, CKR_OK); + + // printBufferHexa(encryptedData3, encryptedLength3, + // "Encrypted data3 aes through api"); + // Decrypt the data + size_t decryptedLength1 = + getDecryptedLen(user1, encryptedLength1, true); + size_t decryptedLength2 = + getDecryptedLen(user1, encryptedLength2, false); + size_t decryptedLength3 = + getDecryptedLen(user1, encryptedLength3, false); + + uint8_t decryptedData1[decryptedLength1]; + uint8_t decryptedData2[decryptedLength2]; + uint8_t decryptedData3[decryptedLength3]; + + result1 = + decrypt(user1, user2, encryptedData1, encryptedLength1, signature, + signatureLen, decryptedData1, decryptedLength1, counter); + EXPECT_EQ(result1, CKR_OK); + printBufferHexa(inputData1, inputLength1, "Original Data1: "); + printBufferHexa(decryptedData1, decryptedLength1, "Decrypted Data1: "); + result2 = + decrypt(user1, user2, encryptedData2, encryptedLength2, signature, + signatureLen, decryptedData2, decryptedLength2, counter); + EXPECT_EQ(result2, CKR_OK); + printBufferHexa(inputData2, inputLength2, "Original Data2: "); + printBufferHexa(decryptedData2, decryptedLength2, "Decrypted Data2: "); + result3 = result1 = + decrypt(user1, user2, encryptedData3, encryptedLength3, signature, + signatureLen, decryptedData3, decryptedLength3, counter); + + printBufferHexa(inputData3, inputLength3, "Original Data3: "); + printBufferHexa(decryptedData3, decryptedLength3, "Decrypted Data3: "); + + // Check for successful decryption + EXPECT_EQ(result3, CKR_OK); + + // Verify the decrypted data matches the original input + EXPECT_EQ(memcmp(inputData1, decryptedData1, decryptedLength1), 0); + EXPECT_EQ(memcmp(inputData2, decryptedData2, decryptedLength2), 0); + EXPECT_EQ(memcmp(inputData3, decryptedData3, decryptedLength3), 0); + EXPECT_EQ(inputLength1, decryptedLength1); + EXPECT_EQ(inputLength2, decryptedLength2); + EXPECT_EQ(inputLength3, decryptedLength3); + } + catch (std::exception &e) { + std::cerr << "Error::::::::::: " << e.what() << std::endl; + } +} + +// Control macros to enable or disable RSA and ECC tests +//#define RUN_RSA_TESTS // Set to 1 to run RSA tests, 0 to skip +#define RUN_ECC_TESTS // Set to 1 to run ECC tests, 0 to skip + +//AES_128 combinations +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength128_ECB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_128, + AESChainingMode::ECB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength128_ECB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_128, + AESChainingMode::ECB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength128_CBC_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_128, + AESChainingMode::CBC, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength128_CBC_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_128, + AESChainingMode::CBC, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength128_CFB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_128, + AESChainingMode::CFB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength128_CFB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_128, + AESChainingMode::CFB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength128_OFB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_128, + AESChainingMode::OFB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength128_OFB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_128, + AESChainingMode::OFB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength128_CTR_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_128, + AESChainingMode::CTR, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength128_CTR_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_128, + AESChainingMode::CTR, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +// AES_192 combinations +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength192_ECB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_192, + AESChainingMode::ECB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength192_ECB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_192, + AESChainingMode::ECB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength192_CBC_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_192, + AESChainingMode::CBC, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength192_CBC_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_192, + AESChainingMode::CBC, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength192_CFB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_192, + AESChainingMode::CFB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength192_CFB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_192, + AESChainingMode::CFB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength192_OFB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_192, + AESChainingMode::OFB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength192_OFB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_192, + AESChainingMode::OFB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength192_CTR_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_192, + AESChainingMode::CTR, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength192_CTR_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_192, + AESChainingMode::CTR, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +// AES_256 combinations +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength256_ECB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_256, + AESChainingMode::ECB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength256_ECB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_256, + AESChainingMode::ECB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength256_CBC_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_256, + AESChainingMode::CBC, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength256_CBC_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_256, + AESChainingMode::CBC, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength256_CFB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_256, + AESChainingMode::CFB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength256_CFB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_256, + AESChainingMode::CFB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength256_OFB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_256, + AESChainingMode::OFB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength256_OFB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_256, + AESChainingMode::OFB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength256_CTR_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_256, + AESChainingMode::CTR, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA256_KeyLength256_CTR_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_256, + AESChainingMode::CTR, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +// SHA_3_512 combinations for AES_128 +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength128_ECB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_128, + AESChainingMode::ECB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength128_ECB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_128, + AESChainingMode::ECB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength128_CBC_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_128, + AESChainingMode::CBC, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength128_CBC_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_128, + AESChainingMode::CBC, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength128_CFB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_128, + AESChainingMode::CFB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength128_CFB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_128, + AESChainingMode::CFB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength128_OFB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_128, + AESChainingMode::OFB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength128_OFB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_128, + AESChainingMode::OFB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength128_CTR_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_128, + AESChainingMode::CTR, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength128_CTR_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_128, + AESChainingMode::CTR, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +// SHA_3_512 combinations for AES_192 +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength192_ECB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_192, + AESChainingMode::ECB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength192_ECB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_192, + AESChainingMode::ECB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength192_CBC_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_192, + AESChainingMode::CBC, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength192_CBC_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_192, + AESChainingMode::CBC, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength192_CFB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_192, + AESChainingMode::CFB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength192_CFB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_192, + AESChainingMode::CFB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength192_OFB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_192, + AESChainingMode::OFB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength192_OFB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_192, + AESChainingMode::OFB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength192_CTR_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_192, + AESChainingMode::CTR, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength192_CTR_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_192, + AESChainingMode::CTR, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +// SHA_3_512 combinations for AES_256 +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength256_ECB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_256, + AESChainingMode::ECB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength256_ECB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_256, + AESChainingMode::ECB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength256_CBC_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_256, + AESChainingMode::CBC, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength256_CBC_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_256, + AESChainingMode::CBC, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength256_CFB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_256, + AESChainingMode::CFB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength256_CFB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_256, + AESChainingMode::CFB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength256_OFB_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_256, + AESChainingMode::OFB, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength256_OFB_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_256, + AESChainingMode::OFB, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_RSA_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength256_CTR_RSA) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_256, + AESChainingMode::CTR, AsymmetricFunction::RSA); + GenericEncryptionDecryptionTest(config); +} +#endif + +#ifdef RUN_ECC_TESTS +TEST(EncryptDecryptAPI, SHA3_512_KeyLength256_CTR_ECC) +{ + CryptoConfig config(SHAAlgorithm::SHA_3_512, AESKeyLength::AES_256, + AESChainingMode::CTR, AsymmetricFunction::ECC); + GenericEncryptionDecryptionTest(config); +} +#endif \ No newline at end of file diff --git a/tests/ecc_tests.cpp b/tests/ecc_tests.cpp index 6a6b55ac..ad53b5ae 100644 --- a/tests/ecc_tests.cpp +++ b/tests/ecc_tests.cpp @@ -6,8 +6,7 @@ TEST(ECCTest, EncryptDecrypt) { mpz_class privateKey = generatePrivateKey(); Point publicKey = generatePublicKey(privateKey); - std::vector messageBytes = {0b01101000, 0b01100101, 0b01101100, 0b01101100, 0b01101111}; // 'hello' - + std::vector messageBytes (16, 1); // Encrypt the message auto cipher = encryptECC(messageBytes, publicKey); diff --git a/tests/hash_tests.cpp b/tests/hash_tests.cpp index ddaca874..6c102810 100644 --- a/tests/hash_tests.cpp +++ b/tests/hash_tests.cpp @@ -21,12 +21,12 @@ class HashTest : public ::testing::Test { factoryManager = &HashFactory::getInstance(); CK_RV result; // Create SHA256 object using FactoryManager - result = factoryManager->create(IHash::SHA256, sha256); + result = factoryManager->create(SHA_256, sha256); if (!sha256 || result != CKR_OK) { FAIL() << "Failed to create SHA256 instance"; } - result = factoryManager->create(IHash::SHA3_512, sha512); + result = factoryManager->create(SHA_3_512, sha512); if(!sha512 || result != CKR_OK){ FAIL() << "Failed to create SHA512 instance"; } diff --git a/tests/keys_tests.cpp b/tests/keys_tests.cpp new file mode 100644 index 00000000..7f8e1317 --- /dev/null +++ b/tests/keys_tests.cpp @@ -0,0 +1,107 @@ +// #include "hsm.h" // כלול את הקובץ שבו נמצאת הפונקציה generateKey +// #include +// #include +// #include +// #include +// // using json = nlohmann::json; + +// // פונקציה מדומה ליצירת מפתח +// std::string mockEncryption(int userId) { +// return "mockedKeyForUser" + std::to_string(userId); +// } + +// // בדיקה לפונקציה generateKey +// TEST(GenerateKeyTest, GeneratesCorrectJsonFile) { +// int userId = 123; +// KeyPermission permission = KeyPermission::READ; +// Hsm h; +// // קריאה לפונקציה כדי ליצור את קובץ המפתח +// h.generateKey(userId, permission, mockEncryption); + +// // יצירת שם הקובץ כדי לבדוק אם נוצר כהלכה +// std::string fileName = "../keys/key_" + std::to_string(userId) + ".json"; + +// // בדיקה שהקובץ נוצר +// ASSERT_TRUE(std::filesystem::exists(fileName)) << "Key file was not created!"; + +// // קריאת תוכן הקובץ +// std::ifstream file(fileName); +// ASSERT_TRUE(file.is_open()) << "Failed to open the key file!"; + +// // קריאת תוכן הקובץ ל-json +// nlohmann::json jsonData; +// file >> jsonData; +// file.close(); + +// // בדיקה שהמפתח, ההרשאה וה-userId נכונים +// EXPECT_EQ(jsonData["userId"], userId); +// EXPECT_EQ(jsonData["permission"], "Read"); +// EXPECT_EQ(jsonData["key"], "mockedKeyForUser123"); +// } + +// int main(int argc, char **argv) { +// ::testing::InitGoogleTest(&argc, argv); +// return RUN_ALL_TESTS(); +// } +// #include "hsm.h" // Include your HSM header file +// #include +// #include +// #include +// #include + +// using json = nlohmann::json; + +// // Utility function to read file content +// std::string readFileContent(const std::string &filePath) { +// std::ifstream file(filePath); +// if (!file.is_open()) { +// throw std::runtime_error("Failed to open file: " + filePath); +// } +// std::string content((std::istreambuf_iterator(file)), +// std::istreambuf_iterator()); +// return content; +// } + +// // Test the key generation function against a data file +// TEST(HsmTests, CompareWithDataFileTest) { +// Hsm hsm; +// int userId = 1; +// std::string keyId = "key_1726490958462"; +// std::vector permissions = {KeyPermission::VERIFY, +// KeyPermission::SIGN}; + +// // Setup: Generate a key and save it +// auto keyIds = hsm.generateAESKey(userId, permissions); +// std::string keyFilePath = "../keys/" + keyIds + ".key"; + +// // Path to the data file for comparison +// std::string dataFilePath = "../keys/key_1726490958462.key"; + +// // Read content from the generated key file +// std::string generatedKeyContent; +// try { +// generatedKeyContent = readFileContent(keyFilePath); +// } catch (const std::exception &ex) { +// FAIL() << "Exception while reading generated key file: " << ex.what(); +// } + +// // Read content from the expected data file +// std::string expectedKeyContent; +// try { +// expectedKeyContent = readFileContent(dataFilePath); +// } catch (const std::exception &ex) { +// FAIL() << "Exception while reading data file: " << ex.what(); +// } + +// // Compare the contents +// ASSERT_EQ(generatedKeyContent, expectedKeyContent) +// << "Key content does not match expected data"; + +// // Clean up: remove the key file after the test +// // std::filesystem::remove(keyFilePath); +// } + +// int main(int argc, char **argv) { +// ::testing::InitGoogleTest(&argc, argv); +// return RUN_ALL_TESTS(); +// } diff --git a/tests/sha256_tests.cpp b/tests/sha256_tests.cpp index bd38f031..938932be 100644 --- a/tests/sha256_tests.cpp +++ b/tests/sha256_tests.cpp @@ -1,54 +1,63 @@ -#include -#include -#include "../include/sha256.h" - -std::string bytesToHexString(const std::vector& bytes) { - std::stringstream ss; - ss << std::hex << std::setfill('0'); - for (const auto& byte : bytes) { - ss << std::setw(2) << static_cast(byte); - } - return ss.str(); -} - -// Test for hash of an empty string -TEST(SHA256Test, EmptyStringHash) { - std::vector data = {}; - std::vector hash = sha256_compute(data); - - // Expected hash value for an empty string - std::string expectedHash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; - ASSERT_EQ(bytesToHexString(hash), expectedHash); -} - -// Test for hash of the string "abc" -TEST(SHA256Test, ABCStringHash) { - std::vector data = {'a', 'b', 'c'}; - std::vector hash = sha256_compute(data); - - // Expected hash value for the string "abc" - std::string expectedHash = "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"; - ASSERT_EQ(bytesToHexString(hash), expectedHash); -} - -// Test for hash of a string longer than 64 bytes -TEST(SHA256Test, StringLongerThan64BytesHash) { - std::string longString = "The quick brown fox jumps over the lazy dog"; - std::vector data(longString.begin(), longString.end()); - std::vector hash = sha256_compute(data); - - // Expected hash value for the string "The quick brown fox jumps over the lazy dog" - std::string expectedHash = "d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592"; - ASSERT_EQ(bytesToHexString(hash), expectedHash); -} - -// Test for hash of a string containing special characters -TEST(SHA256Test, SpecialCharsHash) { - std::string specialString = "!@#$%^&*()"; - std::vector data(specialString.begin(), specialString.end()); - std::vector hash = sha256_compute(data); - - // Expected hash value for the string containing special characters - std::string expectedHash = "95ce789c5c9d18490972709838ca3a9719094bca3ac16332cfec0652b0236141"; - ASSERT_EQ(bytesToHexString(hash), expectedHash); -} \ No newline at end of file +// #include +// #include +// #include "sha256.h" + +// std::string bytesToHexString(const std::vector& bytes) { +// std::stringstream ss; +// ss << std::hex << std::setfill('0'); +// for (const auto& byte : bytes) { +// ss << std::setw(2) << static_cast(byte); +// } +// return ss.str(); +// } + +// // Test for hash of an empty string +// TEST(SHA256Test, EmptyStringHash) { +// std::vector data = {}; +// std::vector hash = sha256_compute(data); + +// // Expected hash value for an empty string +// std::string expectedHash = +// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; +// ASSERT_EQ(bytesToHexString(hash), expectedHash); +// } + +// // Test for hash of the string "abc" +// TEST(SHA256Test, ABCStringHash) { +// std::vector data = {'a', 'b', 'c'}; +// std::vector hash = sha256_compute(data); + +// // Expected hash value for the string "abc" +// std::string expectedHash = +// "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"; +// ASSERT_EQ(bytesToHexString(hash), expectedHash); +// } + +// // Test for hash of a string longer than 64 bytes +// TEST(SHA256Test, StringLongerThan64BytesHash) { +// std::string longString = "The quick brown fox jumps over the lazy dog"; +// std::vector data(longString.begin(), longString.end()); +// std::vector hash = sha256_compute(data); + +// // Expected hash value for the string "The quick brown fox jumps over the +// lazy dog" std::string expectedHash = +// "d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592"; +// ASSERT_EQ(bytesToHexString(hash), expectedHash); +// } + +// // Test for hash of a string containing special characters +// TEST(SHA256Test, SpecialCharsHash) { +// std::string specialString = "!@#$%^&*()"; +// std::vector data(specialString.begin(), specialString.end()); +// std::vector hash = sha256_compute(data); + +// // Expected hash value for the string containing special characters +// std::string expectedHash = +// "95ce789c5c9d18490972709838ca3a9719094bca3ac16332cfec0652b0236141"; +// ASSERT_EQ(bytesToHexString(hash), expectedHash); +// } + +// int main(int argc, char **argv) { +// ::testing::InitGoogleTest(&argc, argv); +// return RUN_ALL_TESTS(); +// } \ No newline at end of file From 911ba3b2d6d78d6842396a8d123e79aba6eb719c Mon Sep 17 00:00:00 2001 From: rut-git Date: Tue, 1 Oct 2024 11:26:44 +0300 Subject: [PATCH 19/21] HSM: Preparation for integration --- .../clangd/index/IHash.h.9F25BB14811A51FF.idx | Bin 0 -> 928 bytes .../index/SHA3-512.cpp.BAD9771630307F13.idx | Bin 0 -> 5272 bytes .../index/SHA3-512.h.242C9E2F57B7EB34.idx | Bin 0 -> 1514 bytes .../clangd/index/aes.cpp.A398B57227D33F7E.idx | Bin 0 -> 7518 bytes .../clangd/index/aes.h.54DB80C57619729A.idx | Bin 0 -> 3366 bytes .../index/aes_cbc.cpp.EAA792ACEE593C7B.idx | Bin 0 -> 2252 bytes .../index/aes_cfb.cpp.2EA4140DFBA97DB3.idx | Bin 0 -> 2242 bytes .../index/aes_ctr.cpp.E504A53DAA4D3C5B.idx | Bin 0 -> 3314 bytes .../index/aes_ecb.cpp.1BDF509FA418B2AE.idx | Bin 0 -> 2294 bytes .../index/aes_ofb.cpp.F7EA8AA373FF8B78.idx | Bin 0 -> 2446 bytes .../index/aes_stream.h.646B800E14F16018.idx | Bin 0 -> 4450 bytes ...es_stream_factory.cpp.7D6A962CCB847BBF.idx | Bin 0 -> 1614 bytes .../aes_stream_factory.h.6007C1E937134275.idx | Bin 0 -> 1256 bytes .../index/aes_tests.cpp.ADCF8D3D1544459E.idx | Bin 0 -> 11416 bytes .../asymmetric_keys.h.F6B39C3E45961EDD.idx | Bin 0 -> 328 bytes .../index/big_int10.cpp.140567735BDD1D20.idx | Bin 0 -> 11576 bytes .../index/big_int10.h.C3D09B3E73376EC8.idx | Bin 0 -> 3970 bytes .../index/big_int64.cpp.36B19D88625F787A.idx | Bin 0 -> 18398 bytes .../index/big_int64.h.2D08006D10EDE9AE.idx | Bin 0 -> 6434 bytes .../big_int_utils.h.D96CB7752F83552C.idx | Bin 0 -> 1830 bytes .../index/crypto_api.cpp.E927BFDCAA5B6960.idx | Bin 0 -> 20086 bytes .../index/crypto_api.h.4392B6162F6AAFC2.idx | Bin 0 -> 4334 bytes .../crypto_service.cpp.C896849CC9E8BCBB.idx | Bin 0 -> 11492 bytes .../crypto_service.h.1E16FAF97B2AE712.idx | Bin 0 -> 4648 bytes .../debug_utils.cpp.C0C4E38F73825AF2.idx | Bin 0 -> 2180 bytes .../index/debug_utils.h.B8FE501C48F17FE2.idx | Bin 0 -> 1066 bytes .../clangd/index/ecc.cpp.ACE89B9BF3464706.idx | Bin 0 -> 8700 bytes .../clangd/index/ecc.h.245F06981E47A1E8.idx | Bin 0 -> 3306 bytes .../index/ecc_keys.cpp.94FCEEAE4E9A5503.idx | Bin 0 -> 328 bytes .../index/ecc_tests.cpp.691CD3DAC13A387E.idx | Bin 0 -> 1594 bytes .../encryption.grpc.pb.h.FC865B7DD33369A9.idx | Bin 0 -> 251146 bytes .../encryption.pb.h.2BA2DE5ABC344FBB.idx | Bin 0 -> 220562 bytes .../index/general.cpp.C630C257D2227628.idx | Bin 0 -> 694 bytes .../index/general.h.D1014BEDDCC93124.idx | Bin 0 -> 3422 bytes .../hash_factory.cpp.7CEBEA3079B6D93F.idx | Bin 0 -> 1920 bytes .../index/hash_factory.h.FCA775239DF4C591.idx | Bin 0 -> 846 bytes .../clangd/index/hsm.cpp.D9D3C2C34C86E137.idx | Bin 0 -> 324 bytes .../clangd/index/hsm.h.ECC6854A1862F7DA.idx | Bin 0 -> 3672 bytes .../key_manager.cpp.1A56188EEED4808D.idx | Bin 0 -> 332 bytes .../index/key_manager.h.FD9E9F7920C81D78.idx | Bin 0 -> 478 bytes .../index/logger.cpp.4BC27BCE16A51595.idx | Bin 0 -> 4402 bytes .../index/logger.h.47079DC102E8987A.idx | Bin 0 -> 1958 bytes .../prime_tests.cpp.56193772442193D7.idx | Bin 0 -> 5510 bytes .../index/prime_tests.h.1B12341116CFBD8B.idx | Bin 0 -> 936 bytes .../index/return_codes.h.A6CABDD08505CCAB.idx | Bin 0 -> 428 bytes .../clangd/index/rsa.cpp.F6A80C29B260EDD2.idx | Bin 0 -> 7898 bytes .../clangd/index/rsa.h.26B72C9FFEF6AB5B.idx | Bin 0 -> 1386 bytes .../index/sha256.cpp.49D51591E44B1F34.idx | Bin 0 -> 3048 bytes .../index/sha256.h.928B534961153A72.idx | Bin 0 -> 1268 bytes .../sha256_tests.cpp.56E321C06E324FA9.idx | Bin 0 -> 4804 bytes .../index/temp_hsm.h.70D71B76F185F0B6.idx | Bin 0 -> 7052 bytes .vscode/launch.json | 29 + Dockerfile | 32 - .gitignore => hsm/.gitignore | 0 CMakeLists.txt => hsm/CMakeLists.txt | 0 hsm/Dockerfile | 50 + README.md => hsm/README.md | 0 {include => hsm/include}/IHash.h | 0 {include => hsm/include}/SHA3-512.h | 0 {include => hsm/include}/aes.h | 0 {include => hsm/include}/aes_stream.h | 0 {include => hsm/include}/aes_stream_factory.h | 0 {include => hsm/include}/big_int10.h | 0 {include => hsm/include}/big_int64.h | 0 {include => hsm/include}/big_int_utils.h | 0 {include => hsm/include}/crypto_api.h | 26 +- {include => hsm/include}/crypto_service.h | 7 +- {include => hsm/include}/debug_utils.h | 3 + {include => hsm/include}/ecc.h | 0 {include => hsm/include}/general.h | 12 +- {include => hsm/include}/hash_factory.h | 0 {include => hsm/include}/prime_tests.h | 0 {include => hsm/include}/rsa.h | 0 {include => hsm/include}/sha256.h | 0 {include => hsm/include}/temp_hsm.h | 0 {logger => hsm/logger}/logger.cpp | 0 {logger => hsm/logger}/logger.h | 0 {proto => hsm/proto}/encryption.grpc.pb.cc | 0 {proto => hsm/proto}/encryption.grpc.pb.h | 0 {proto => hsm/proto}/encryption.pb.cc | 417 +++-- {proto => hsm/proto}/encryption.pb.h | 93 + {proto => hsm/proto}/encryption.proto | 6 +- .../shared_log_file_name.txt | 0 {src => hsm/src}/SHA3-512.cpp | 0 {src => hsm/src}/aes.cpp | 43 +- {src => hsm/src}/aes_cbc.cpp | 78 +- {src => hsm/src}/aes_cfb.cpp | 0 {src => hsm/src}/aes_ctr.cpp | 122 +- hsm/src/aes_ecb.cpp | 162 ++ {src => hsm/src}/aes_ofb.cpp | 1 - {src => hsm/src}/big_int10.cpp | 0 {src => hsm/src}/big_int64.cpp | 0 hsm/src/crypto_api.cpp | 1552 +++++++++++++++++ {src => hsm/src}/crypto_service.cpp | 132 +- {src => hsm/src}/debug_utils.cpp | 4 + {src => hsm/src}/ecc.cpp | 0 hsm/src/general.cpp | 19 + {src => hsm/src}/hash_factory.cpp | 0 {src => hsm/src}/prime_tests.cpp | 0 {src => hsm/src}/rsa.cpp | 0 {src => hsm/src}/sha256.cpp | 0 {src => hsm/src}/shared_log_file_name.txt | 0 {tests => hsm/tests}/aes_tests.cpp | 0 {tests => hsm/tests}/crypto_api_tests.cpp | 0 {tests => hsm/tests}/ecc_tests.cpp | 0 {tests => hsm/tests}/hash_tests.cpp | 0 {tests => hsm/tests}/keys_tests.cpp | 0 {tests => hsm/tests}/rsa_tests.cpp | 0 {tests => hsm/tests}/sha256_tests.cpp | 0 src/aes_ecb.cpp | 222 --- src/crypto_api.cpp | 1272 -------------- src/general.cpp | 6 - 112 files changed, 2334 insertions(+), 1954 deletions(-) create mode 100644 .cache/clangd/index/IHash.h.9F25BB14811A51FF.idx create mode 100644 .cache/clangd/index/SHA3-512.cpp.BAD9771630307F13.idx create mode 100644 .cache/clangd/index/SHA3-512.h.242C9E2F57B7EB34.idx create mode 100644 .cache/clangd/index/aes.cpp.A398B57227D33F7E.idx create mode 100644 .cache/clangd/index/aes.h.54DB80C57619729A.idx create mode 100644 .cache/clangd/index/aes_cbc.cpp.EAA792ACEE593C7B.idx create mode 100644 .cache/clangd/index/aes_cfb.cpp.2EA4140DFBA97DB3.idx create mode 100644 .cache/clangd/index/aes_ctr.cpp.E504A53DAA4D3C5B.idx create mode 100644 .cache/clangd/index/aes_ecb.cpp.1BDF509FA418B2AE.idx create mode 100644 .cache/clangd/index/aes_ofb.cpp.F7EA8AA373FF8B78.idx create mode 100644 .cache/clangd/index/aes_stream.h.646B800E14F16018.idx create mode 100644 .cache/clangd/index/aes_stream_factory.cpp.7D6A962CCB847BBF.idx create mode 100644 .cache/clangd/index/aes_stream_factory.h.6007C1E937134275.idx create mode 100644 .cache/clangd/index/aes_tests.cpp.ADCF8D3D1544459E.idx create mode 100644 .cache/clangd/index/asymmetric_keys.h.F6B39C3E45961EDD.idx create mode 100644 .cache/clangd/index/big_int10.cpp.140567735BDD1D20.idx create mode 100644 .cache/clangd/index/big_int10.h.C3D09B3E73376EC8.idx create mode 100644 .cache/clangd/index/big_int64.cpp.36B19D88625F787A.idx create mode 100644 .cache/clangd/index/big_int64.h.2D08006D10EDE9AE.idx create mode 100644 .cache/clangd/index/big_int_utils.h.D96CB7752F83552C.idx create mode 100644 .cache/clangd/index/crypto_api.cpp.E927BFDCAA5B6960.idx create mode 100644 .cache/clangd/index/crypto_api.h.4392B6162F6AAFC2.idx create mode 100644 .cache/clangd/index/crypto_service.cpp.C896849CC9E8BCBB.idx create mode 100644 .cache/clangd/index/crypto_service.h.1E16FAF97B2AE712.idx create mode 100644 .cache/clangd/index/debug_utils.cpp.C0C4E38F73825AF2.idx create mode 100644 .cache/clangd/index/debug_utils.h.B8FE501C48F17FE2.idx create mode 100644 .cache/clangd/index/ecc.cpp.ACE89B9BF3464706.idx create mode 100644 .cache/clangd/index/ecc.h.245F06981E47A1E8.idx create mode 100644 .cache/clangd/index/ecc_keys.cpp.94FCEEAE4E9A5503.idx create mode 100644 .cache/clangd/index/ecc_tests.cpp.691CD3DAC13A387E.idx create mode 100644 .cache/clangd/index/encryption.grpc.pb.h.FC865B7DD33369A9.idx create mode 100644 .cache/clangd/index/encryption.pb.h.2BA2DE5ABC344FBB.idx create mode 100644 .cache/clangd/index/general.cpp.C630C257D2227628.idx create mode 100644 .cache/clangd/index/general.h.D1014BEDDCC93124.idx create mode 100644 .cache/clangd/index/hash_factory.cpp.7CEBEA3079B6D93F.idx create mode 100644 .cache/clangd/index/hash_factory.h.FCA775239DF4C591.idx create mode 100644 .cache/clangd/index/hsm.cpp.D9D3C2C34C86E137.idx create mode 100644 .cache/clangd/index/hsm.h.ECC6854A1862F7DA.idx create mode 100644 .cache/clangd/index/key_manager.cpp.1A56188EEED4808D.idx create mode 100644 .cache/clangd/index/key_manager.h.FD9E9F7920C81D78.idx create mode 100644 .cache/clangd/index/logger.cpp.4BC27BCE16A51595.idx create mode 100644 .cache/clangd/index/logger.h.47079DC102E8987A.idx create mode 100644 .cache/clangd/index/prime_tests.cpp.56193772442193D7.idx create mode 100644 .cache/clangd/index/prime_tests.h.1B12341116CFBD8B.idx create mode 100644 .cache/clangd/index/return_codes.h.A6CABDD08505CCAB.idx create mode 100644 .cache/clangd/index/rsa.cpp.F6A80C29B260EDD2.idx create mode 100644 .cache/clangd/index/rsa.h.26B72C9FFEF6AB5B.idx create mode 100644 .cache/clangd/index/sha256.cpp.49D51591E44B1F34.idx create mode 100644 .cache/clangd/index/sha256.h.928B534961153A72.idx create mode 100644 .cache/clangd/index/sha256_tests.cpp.56E321C06E324FA9.idx create mode 100644 .cache/clangd/index/temp_hsm.h.70D71B76F185F0B6.idx create mode 100644 .vscode/launch.json delete mode 100644 Dockerfile rename .gitignore => hsm/.gitignore (100%) rename CMakeLists.txt => hsm/CMakeLists.txt (100%) create mode 100644 hsm/Dockerfile rename README.md => hsm/README.md (100%) rename {include => hsm/include}/IHash.h (100%) rename {include => hsm/include}/SHA3-512.h (100%) rename {include => hsm/include}/aes.h (100%) rename {include => hsm/include}/aes_stream.h (100%) rename {include => hsm/include}/aes_stream_factory.h (100%) rename {include => hsm/include}/big_int10.h (100%) rename {include => hsm/include}/big_int64.h (100%) rename {include => hsm/include}/big_int_utils.h (100%) rename {include => hsm/include}/crypto_api.h (82%) rename {include => hsm/include}/crypto_service.h (91%) rename {include => hsm/include}/debug_utils.h (85%) rename {include => hsm/include}/ecc.h (100%) rename {include => hsm/include}/general.h (89%) rename {include => hsm/include}/hash_factory.h (100%) rename {include => hsm/include}/prime_tests.h (100%) rename {include => hsm/include}/rsa.h (100%) rename {include => hsm/include}/sha256.h (100%) rename {include => hsm/include}/temp_hsm.h (100%) rename {logger => hsm/logger}/logger.cpp (100%) rename {logger => hsm/logger}/logger.h (100%) rename {proto => hsm/proto}/encryption.grpc.pb.cc (100%) rename {proto => hsm/proto}/encryption.grpc.pb.h (100%) rename {proto => hsm/proto}/encryption.pb.cc (96%) rename {proto => hsm/proto}/encryption.pb.h (99%) rename {proto => hsm/proto}/encryption.proto (98%) rename shared_log_file_name.txt => hsm/shared_log_file_name.txt (100%) rename {src => hsm/src}/SHA3-512.cpp (100%) rename {src => hsm/src}/aes.cpp (94%) rename {src => hsm/src}/aes_cbc.cpp (50%) rename {src => hsm/src}/aes_cfb.cpp (100%) rename {src => hsm/src}/aes_ctr.cpp (55%) create mode 100644 hsm/src/aes_ecb.cpp rename {src => hsm/src}/aes_ofb.cpp (99%) rename {src => hsm/src}/big_int10.cpp (100%) rename {src => hsm/src}/big_int64.cpp (100%) create mode 100644 hsm/src/crypto_api.cpp rename {src => hsm/src}/crypto_service.cpp (79%) rename {src => hsm/src}/debug_utils.cpp (88%) rename {src => hsm/src}/ecc.cpp (100%) create mode 100644 hsm/src/general.cpp rename {src => hsm/src}/hash_factory.cpp (100%) rename {src => hsm/src}/prime_tests.cpp (100%) rename {src => hsm/src}/rsa.cpp (100%) rename {src => hsm/src}/sha256.cpp (100%) rename {src => hsm/src}/shared_log_file_name.txt (100%) rename {tests => hsm/tests}/aes_tests.cpp (100%) rename {tests => hsm/tests}/crypto_api_tests.cpp (100%) rename {tests => hsm/tests}/ecc_tests.cpp (100%) rename {tests => hsm/tests}/hash_tests.cpp (100%) rename {tests => hsm/tests}/keys_tests.cpp (100%) rename {tests => hsm/tests}/rsa_tests.cpp (100%) rename {tests => hsm/tests}/sha256_tests.cpp (100%) delete mode 100644 src/aes_ecb.cpp delete mode 100644 src/crypto_api.cpp delete mode 100644 src/general.cpp diff --git a/.cache/clangd/index/IHash.h.9F25BB14811A51FF.idx b/.cache/clangd/index/IHash.h.9F25BB14811A51FF.idx new file mode 100644 index 0000000000000000000000000000000000000000..57e050064507fb1371708fb71f2561a0790d03b9 GI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te!(&29#s6m4l0sAwVQ$u%ae0~Nj3JQc~mS)7Dclvzr+pC>BS3n2(*h^AsYtU#H~*Y2DV@*jm|y{I#6^%^jAynrpHK9za`bCKlax! z?-!w>2>qEyig8pi>sUR#hp|*#CO<*RCt?qkqoQ0q|2WEyqaV{pn#;?qmj7r>*znPj z^*<2%I#Jn)-qi5svj;N2>GRS#;))iKx3EU^@j}TRE`I$_3JEETGAAggk31aagg#<^ z*$HD9yFlk+ML;6BV4w@4ncNLBw^*MW!rWqgZg|xe2vR7{KH$sB1wZ<1SQnp+DsV%9Il)LTndE(C#An z>*=_uL8PU4@o3j`NsMT$ziaEb+8s@U6O1exPKa^BFvc#Bxx~?NL6}P%9T&XpV$qQZ zZZNpT`rHuX7VEnYvinS*df0cLAF!RgMiS8hG6xgn9kBiW&KieD&_+6FFj0%#Sznzf zUlo3nZ1w>t9ZvpRd^Rz;mhup2bHA&7=^&En+fPirqW5kWDUi`l8&pD|oHb=~|s zWR1fZb{Kn8f5l~2CMVu*xJOQDq&iY`N+Sa!gILBLMgODXR<;s#mFP>AkcSuaYezke z5-)V1rh`3k@WK<+Jz*C!PmZFwlieZbQ@vwtvCcMPb}0@lWu@-*=;e3U1_eHnk`oXR zA+jeIjk&DJ;e{GB)`+$Yd=RAvQNg$x<<(+&4SLmx z=Qp5N1Ip-@JO|6`ikNSq^cE_ZyalB#V(vodLJ5`A_K5Tbo?kv#`#U9i%3#_!EL*U2 zzDJU^EG=u6=YzlJt@{N+-hU6Be!g^Hr%dl}2r!yB6BThB`8kokjPwJ?_4L>rXJFr^ XWmuMK2zsk{^pePAO1Vm^03Ysub88gr literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/SHA3-512.h.242C9E2F57B7EB34.idx b/.cache/clangd/index/SHA3-512.h.242C9E2F57B7EB34.idx new file mode 100644 index 0000000000000000000000000000000000000000..d175f3db6aa0fdde0254b90237ab2b61c40c5916 GIT binary patch literal 1514 zcmY*YeN0nV6uD|mH^gHf@xR+V@{)CH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I*jl;Zn#UaRp>m zQ02EE_ZFn&OBEEWf_##H7b@I^dL+IF74A`S1DxLgl}ULclx?K8>?SDP1l37-GgNJ+ z#;X-dwo>EO0o6MoCI8+-?t7|z-H_W&#UG&j2S|AyU!mGpXhQBc4rRv4_@>VY*$I5Y!Jrbw#NeDSimNW{#igf z3z!5J`E{uxv_C!L5fG-7>qbK{XH{oILLZ7v(R8M0=EO1-y9{(L19PJKpja*x&xL%V zwmsr_I~Ju{c?zMJzpB3;aor&9YIsqezNitK;-dx6T61=o_;p{y{r-7bBWRBb&pqYb z{yPLOnB9Qa4fy1EkpNi;rySC5pxaHIi$4I}4^*50WfG`Ko&b##AZ2cEhidKAByNX` z+974mPo|3{)8$Fa&ePfF=?WxHrL$A1_&S|^oy4}kZnk(Zr?0idvf#X>Yje|<9}uEp zJ4JW0iRVM49vxiVbEh_ytT;$Hu}h!b{?-U~S-R5hLsriUZ*7+_5>@re#t zC4v!HecR*}I z6dgQlr-1M&AWquz^9=$)Bn-eqH~rp#_`5v(F!%T1#Vt%4=BDAMNw8>m7tKO`b=0a?>7^cjB>6p)04*)yQi@0bRL(u13si z#2XddnxC&z2#rIrOY%bRN`J*QB+=!Q=z64vJi2@yU60W4sr^-RlJNC!csA{n*eOrA z7wF~dHmz%SpvUg%{x5`WJSHtKs-;{>6RdUo4f&1O2tfqoPe=0STJoodpQrEiwbX=Z SrlYH8U|?*xMBhl;6!|}~F_+r_ literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/aes.h.54DB80C57619729A.idx b/.cache/clangd/index/aes.h.54DB80C57619729A.idx new file mode 100644 index 0000000000000000000000000000000000000000..f1b5ec7f427b1db3f9819976db623f3e839802b1 GIT binary patch literal 3366 zcmYk72~<M8$c+XR*&Ji(0iRg4lvuv|5L%s1$L2<(=HzL&#d3wf2Aiv-i3C-2IUhV=zcK z0EEwpDbAi-m`(=(IKsbz!u~O7LKrugASX#=Nv3*27$7W?K0`Z1c)BX}6PiUo3h3@0{eO zH}gep&s7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ff --git a/.cache/clangd/index/aes_cfb.cpp.2EA4140DFBA97DB3.idx b/.cache/clangd/index/aes_cfb.cpp.2EA4140DFBA97DB3.idx new file mode 100644 index 0000000000000000000000000000000000000000..c3462e5ffffe8a01acf2c444fd7d70568edc9b46 GIT binary patch literal 2242 zcmYjS3rtg27`~_8V!6Ggt-bfqQZ<6Y=tF#rhbz+3p^S>a+HGc_Q-Oj*AV3R*t2`K86h@wh7_3vI=J82#}`j4?yGSoo3;@Wid zKzzhd(a6A_^gpiNy?SeGb3(W-wC&!kSiiloU6gv;p3Fu`NN~!-lc`T`owJ00^xM#n z9l3vB+?@G&PfUL4jqc<53rZ_aslU1wZ;ZhrbVy^n5uk+#@JxihWh?SvzZeNE~( zuUhMBg>J``!0q!3o+VW$*_O#Gf|prNErKtS!CI|XYR4HvXv2ldPj#KU<1L3b&F^f! zcJcg`>>a($#+IHQ)v70xJsqz!$!}h-H)U3|rev+E%^c|){_E-QXSqOT$)#WAE6Qhf z9XNAvBshEQQ9}Rl&ie;0{CT%-<=zvert;RK?mJ;^*#%|yYKk?BtGqNt_Aod;tw?s<8! zP%f5Bad<2Y5(i1K3JXnQlN4Xd!bEYR6nkW$Q|y%Ds96+{xC}^fkiIik3>N3Dl!;iF z@0UO8zZ6jv3#)-&HJHHRgWEDZ+4WNZ3$y8LAFLJ{)y@30K7~WeS#%bImv0}v+)yx$ znT|yBw0Q=+%)%<5tpWyocZucrbfcyy7|{yo0tKNR0`wuEz_gT@pC2@_LsGEKVCJ7g&Ibq!Ymf*qIEW6+#YSW zVRN^t(hIf+oK2-!s0>k>$dQF13r!@tHT)WXlFD+xmji$7G3xszH?q@qWsSd=UzQHj zKJ2v=yffLdQOiPZHn)%z0q@7_1ZWO#CI|+?PysSQ8$tR&y{%z<9?J&xhX&6%9vof?1%WbrZ9Ic|Fr`o#CVCh=sNYMueTVPmBoW|0#zL zeM}|pUVf<1gBr6?Qpn+JSy&4swSdE#&wDm(0bjp7Hs0nDc@{#e0ufcff@!#ZQ3s4q zN_+{fShPGoAMtYgCtKC;uZ#LwM8iBoo)L@EXm%K?fDw!07D1=ShbKPW5#G4&${f)k zN?iq@D}WsHZ?>Iroj(@x5H*i4<0~W0qgJXXdKGn_pKcnKW})5BJ`KB%{OWYtrftci zNI=D_e2D;O=AsGW4g73^%u2Hg$EkU6B5q8a_#9=cNK&N4fw8a-Na}zR8`a)1)sFs}cwB%Km7eR&kt4{+SkWZf%gcMRk5~ev)W5W$uuK2| literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/aes_ctr.cpp.E504A53DAA4D3C5B.idx b/.cache/clangd/index/aes_ctr.cpp.E504A53DAA4D3C5B.idx new file mode 100644 index 0000000000000000000000000000000000000000..bf0ac3e271f756baa00b2e32c56c4074564ceae8 GIT binary patch literal 3314 zcmY*b3s6&68oqzHL6h7-2#JtOf`S;7m-rw743COZu}UAvC`*+E$y!G(BS9b#S)U!c z>L`Vnh&Viy-K4H=r?qGkU{{nDCs-I16{uLO)CaKAZDp+8>K@SJxyxK``11ef|Ni&k zy_DqSM+`+J<)##G(-&mZ6h(QXUqeCuW+PBksT)NV*PN(W{r06u=A)lCMX$D}f4@sT z_L=;M`r>|%vuQtC!vbff$A?Tj7Hm0ixiE3nr&Z4m{eG+LQuL-8S6!*_yOI=9)bRyn zcfzv#`?onWKD=@DT1op;c4APvPUX?o_U&)`+6u>$OAmd-<~eK5rJZT&E5GM9`ng6b zixCD^ALL?cDxQ+3p1`!#nSN z^Zv6{_ZlW5QhPtxmnJ=TAjQ}1$@=uQ+DO~Lf`uj8xx>{zS??|VN_V{X{Afemi}iB1 zJ#`n_Wg(-n?lCi}3U{?XA5I!L6o)2V@3@i; zyIz$1RaG7K@Iv9L#)>l&md{gvuZ_IZ75U`i>5=qb>(0Vk|9tPo+Wya;XJy1?D|YXM z3TNB^WiW2bNktWS(J-TH`QPdV5}s5{u^k}p0HvZA1ij!(O-GeNKS!^Z44iEa7BbWf zieeY>7b&M+FNG9!FjxI(R{1`)gy(}SG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D8+wxcpx}>B`3!3Xk(C>U9Yl7JkuX|8)Cw|eok1~$xgZLMH91qF zPLN@I>M#Fbdh+f+oi=%OimJHxgBg~ZVI>K}24OZ>Oo(itu|Yh+4iGuOn-I4^cnd@k z>;kO|5->59uiu(IIoXE%jfN%Y6WH3m=!WO|-eg*#RQXXVJoXf&Ab-C8H-e)4$hRA} Y;Q2+n{ literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/aes_ecb.cpp.1BDF509FA418B2AE.idx b/.cache/clangd/index/aes_ecb.cpp.1BDF509FA418B2AE.idx new file mode 100644 index 0000000000000000000000000000000000000000..62ad41fedf7b212051991146eeb9113cc930d4ba GIT binary patch literal 2294 zcmY*Z3s4hR6x|zkfg~FVKP8)lh=M2t6pGMNkYWV!1EW?EMWFmt3RFxY1Sm!Dg8~ky zMTHVUv}08iY*9*~4k%KAO8F??5^EJ(t@y7@ozeDzzAVioZ*%wFd+vMZp8HlU@%MjZ zOc08gC7Q%obtFj;ggN@D)XKP2Ac%AWg3y#|_XjRBa1ri)zR9cTVf6!Fo_9_BuIwMb zzZu^e)Z%uez)qI;ddxp%?Fy3$q4D#L_lk=>@>MN$bXs}i*~2xf@~Att*Iz{rSr1)# zRUQ8*Mck5-^z2aMgQTfbJs+F%hOU@v-Iz}sMpfNG7X~-ZJYdopn`k>*X|ZTV>-(q(W()VdV|C;_W zS}C7BO60x%E3y9SXLT{x!y7ua?iRkgtP76MUGsGG!}4d#&33EG?xjb2U6KT4?X;~+ zbpKALS?k~G_R~mQSzveEQtjXFdkd}VOg)Ev$`8KbYJZn?E|DGkCHA;oV}y6ll)ytT z&L=OY63+BwuDkWR%;oW|d1Fm^?SUVx=-d8v#HoLs5;u(1R%TV_H|hwtlU{cSRcd0C zKk7h5LAQrrru{4-$6P=#B_JpPktma!X-S~Ajekmdha=OL70wfKEKoob2%5k`v-$;5&Ya*ieyY=(Vzgq*1eAqNCG2qA-;q0i_0R=Edi6@LghRwzIzP>Mup+%!E4 zzVE5eH&B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mr{m22Y8|5&GR0_PtcVSuOY5>CNsxAeuUk0eTkrTtAEsGt5qxKnvsBo30l7eh ze9>D5pn){7NCE)Oq?tv5nMu7-Tog!fp-GxWvI5AHJd65ZCU*e2bexczo@9^CQvyhl z6oXw@k`*C90ufS>3K4=NWKeJbb)=5LwdzT|2$@Ke2w6xAgZcn4j*Od<96$%BLq%@|;`Vq^+6#feaYDIFurE0$;xinXL-G}CXU z8KWp|lqf@-Ax>0Fye;02nTe5!4vg#}c2R#0qay;_l7o_GU^L%vz9?U&HdB-@$B-k+ zmut%v<;xGv7xhJe24R1Tx#B>y?dYHg_n&g@`{adV3I4=qL|2Z`Pqn zOc*#=*08Z?RFKY-_w>a9D4r4_I*CrkHrC39W2EDCzNj?-^{k#lNb{&?-aqopF+r6? zD$xsd24Fsw?}b{>-hW>DsBZDNPyt|pxacrG8W#;&sK&^|n$#$ZaDj)JqftWuT3Cx3 zq3-5hFjV!cJ2=HsqPvNnO{e1)_*mY7gX>tG4-Re&H%4P*jx{?_@S5^frS6fatyxm* s>;A#Jza}3EY)@MK%a}24w(ys_q;lyhrLfF!Kq@0WJZMjaoRYA_e_SZND*ylh literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/aes_stream.h.646B800E14F16018.idx b/.cache/clangd/index/aes_stream.h.646B800E14F16018.idx new file mode 100644 index 0000000000000000000000000000000000000000..5182f156c0dca90ee3dcf1011fc1c7c36615ca90 GIT binary patch literal 4450 zcmY*d3s6+&6~5;xj|=}Ud*R>ZAuCuD&8*h3PS|9kk~;W8acrVfViKzujGBo;^|MiAqZ_{L~_#cFD+6|IP`IG{*08q~yRe54aws~PRX^xVDs{Wski?wxzi`Oi83 z`Oo>je|R}}=+IY9P0K0FEuB8Oq@c5=X-WJSDk+|Jp5Nb)rj@SRQP*0dck@)tTzR15 zo!ZbBE zipHn^@WQF~`S;hn)S>mPe>Uyz0T;)0cf8sCt6^>KQC*FvK5l(bzBm-vIs31@hV&j- z@z(FUHNI8+>b<6&_x`(k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)jLId(JfYYVRd{`e3$S8YOQ$ko1x$H;et~r4oqT0lm;FlBf=km zA@Bz)Y~BEjf;U)U^95!Se8CEvC!hdNu)<;obRF1%#WpJ-G+2QZHWy$8xPTQl13&== zV18Lcp>X3P)9-ZfRM{5u#AEL6d_lUxr+Rl zej(S9xsLppWg$0FU=syVG$FT9U>gMiCqnKba~JsmvqJ76a}W6e|3dDkzm@-ZIW@cbZ)@9CDLm6;rU6y?f zl!3_B1;MwMGEgk*R^@A<45W;%;>>LRgdy6U6*g}o0wQy@EYd`^(B5osvm`RWoUp=X zM>s;mvBG9W3&4O3~7G#CZeh3csV}-?e$Q{_gVvFk_2G@0t3v--P z@f4AgfW8$n)tj2)e5Hvrr2`wXUyB9d0HDQUi~S%5`$fftSr1}9{6v?;SPAJ79=8+D z^qR@eSE5K%I+R}%`GimDz^?4hqSl|d8|}(>+@*_j z={WFv{eI`GtLUn9%*JmQjNw}jP?`X^N&o~?0*t;Apk>`a9Cg)E0*sClU}Tg4 z1Fr;_2Gz{C^e6!?FG>J>QvwX65?~P3D1eTY00f`}fF>mXBq;$fM++6d5$bLsksO#; VmFzD&IzdnJX$r~hf1yN>>VLqDkV60f literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/aes_stream_factory.cpp.7D6A962CCB847BBF.idx b/.cache/clangd/index/aes_stream_factory.cpp.7D6A962CCB847BBF.idx new file mode 100644 index 0000000000000000000000000000000000000000..ccb3f81f264eff586a502ddb11f766a0d0ae62fa GIT binary patch literal 1614 zcmYjR4NMbf82);_7TP;GuI1~MUaywuN`a=}3`1bEZVWn|1ChB6h$25-CIT^(73`Gx z10x8MS!bAzgsE&Zh+TkzIuaGP1u}^)WOIs=%`tu)gAoLDo0xs)^0i#jes}NB^FHtM zzIU6~r=+CF0Z1xXUs3ER%OwE-YV>oKmF`HE0I*sLKtzB%6GQhcI$V(r{jShz zL-*j-AV*C}k32bDz1ntQs%rjD+GM^ZMmfB$@v^~|={a_D!=&lNk<+e|_mUGoiC84J z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1b_r}EeWC9eWOJ>0Ci=X3`?t%@8d}AL7x@ErWFPPF ziaV8cFk#U%uy;}q8NYX4QZE@nXQlmQ1f7+tWCWd+`pI}71xN#A{GJC%gJhVka3?4Y zl@WAS8ZIN~tTal-`!-G*C&O5QQ+#QH3>^S;R+=m$=&UqVM$lPlrVRH4{~Q8hjAZ$> zch`9Qnf>l{vn0l^frH6k>+8l24fvnD>+-j)I(TVy;oe!JH@t-pkO&jGxVF;ujL$oW z$geHGmSWpfBL!C%}6ZodC}qbpkvT&yw)d`Ri>I4Y3IsqPS=meNgRC?N&^!{8r^~9W_DEM>Y w|NaTsteZ9?9B1tKoRRnJA)|WW1VzdD{~a@7Y_bT3CZ?uz8zW;8BNVj#f3;u2aR2}S literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/asymmetric_keys.h.F6B39C3E45961EDD.idx b/.cache/clangd/index/asymmetric_keys.h.F6B39C3E45961EDD.idx new file mode 100644 index 0000000000000000000000000000000000000000..4cc348e32b14a2932641f4dba8f5382e7e24e395 GIT binary patch literal 328 zcmWIYbaQiHWMFVk@vO*AElFfyU|K*>R-WCt>U^)Hw~}?z=~uI(R?oG`VkkJo;j>b*Ep$o5VZpSL z6kEPS8^ySeyTt6(oYc_twba>Q{q{NhH!Ms4_L;|o8*&y`<|a7+?RvF8l5hQCU2}0J z7A6K}RvuPfFu}k9lmmiq_a5^*czj#H&IEKbGcy~r2$*2t1j{lqvlgYM6$b-3Fmo80 z!1`hOmiAmy_#8OXjggC)k%LhZtP9ClCN79^P;nk+R$f+Vm|ljW)SN_+OmR_iF*k_8 P{Cc%i=(9Tv%nS?wmyKTB literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/big_int10.cpp.140567735BDD1D20.idx b/.cache/clangd/index/big_int10.cpp.140567735BDD1D20.idx new file mode 100644 index 0000000000000000000000000000000000000000..649ddd3806afa9cfeb6ce98a0e97431390b221d9 GIT binary patch literal 11576 zcmcIqcX(Ar+CNj0oO?63oIAH9H$69vR01KifG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|+a>04lW3$A9<80Am z!EttDH|#bQG{^L%EYwjhIL=;dlybpw_UYweJIZ(o%2W+iRTdW9KH1j4p1kP ze=5Sd`<6_fA<+?exA%h+*lo)Dn);d{3Q_)q^K=K8Vg1<1zXd$o>y}W?WG$IPpWP3#I^0Mv{7I;f!DR>qP2IkKa^}lL z3C%)z3b3mHhw8{PNh_6Uk+<&b-YL^4AmI*Cheg_56e7dT92__YJAkzt+rEl{*)qNq zt4n1P>&3xKu}8A*LaY|*<%Kx7P%kgRS_ux3?bl(;Ivfn@DJF`=M2XL1c3yw~a~?;Y$BCdmqArZh_ry0~zB=i3! zwM7n0`4;NgB6$e-YvIhiUm3x$%A}Eh9p=@r>`BA3`-xw~yQl-2ri}REmY>6E*KCRd n^iNUj@=s0vX_J3C<)6dHjrglYK%0Tw?M1uFjrnhJ5x literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/big_int10.h.C3D09B3E73376EC8.idx b/.cache/clangd/index/big_int10.h.C3D09B3E73376EC8.idx new file mode 100644 index 0000000000000000000000000000000000000000..b69121a8cb84347526591bb750b11ae887d35e69 GIT binary patch literal 3970 zcmYjU2~-qU7Onbxfogtt72VKHH_%NtG>wg5BQ4103L>&(6ek`P96=#Ohj;`vU_^}( z7fhlU93|s2E~9aaqd^aGTw=&5afxP(8kfY0nNe|!$sD6{jLW|VO0G@~WP-~IV`F(c;6y_s)De7U=M>z!lC2M%4BuzaQV#?jhZ`v)JH4?ecPckZGs zFZz`CtiyAVw;UMiXV^0<+uCxnv+VH4%U1P2dU@~pO|v|%8@Cs2+H?N3*YsKM9Y1t^ z!N>dRPUhbm_xMK4`?Fmq9zBzq#wG3FvV5F*PWq)k6&9ZH`?mB-#YXLp&d)mQj<)^t z(xlVPLB4r!HqJdzyy$KFwz8;6^-t-ZoYut)S0{fpWNt@Z$Q!g)XlxqxhX=Da6vm(Y ztM%r#lI#n7_E3j4U|Ef$<(<)kg0BwQG0h&hw?1>7=6nBTozdRk*DVU3H?Xw*X`(j&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cjR4q*kM9RgZ5K}e$s0$R2{NaM3XyO0eJ(wGLIWt)REz73#dbAzC7PP~M+6zHA~KdLCG^XThV_0a|uAI0;rO%q=?`q%kF+mi-LUMVq|(?~7VS z5olGCU{YI^&|B~zLem4Wvem&@tPNO6HaJM5!2z{wYmi1;1GH>rkj5f{Nn{IyG+G!? z_iO-Is-Tt)3#!quK;mS#f;1Wxm_)WGNMrrMB(f<%8jlvxvK2uZtq4rgv%xIs{Gwyb zsK<-sVv;gVSWH-zpqBjzPEsgj9jPpn-iI_BLyT6uLm5pI(nQQm{6AtX+iu-o1tPQ7 z9E?{Dqv5W(%U%U(>~TQL z9tCMURxr2hO_0X^2x{4rAdRgNXxWP(jXfD?*@GaB4H#(IdmxQ@gC%=j8F=`CmYoKw zvBSe8vco_cF9o1wXMr?23z$Uq6G&q-2DR)WkjCB)wCo;`t}6RuiF|CUt0q@x%U|g9 owdZe58@DCAm#?3{py7OFvinDaU$~e5qIKby|Le)${ZzsK0nP@V!~g&Q literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/big_int64.cpp.36B19D88625F787A.idx b/.cache/clangd/index/big_int64.cpp.36B19D88625F787A.idx new file mode 100644 index 0000000000000000000000000000000000000000..0a6270b0e19c7f6d84952c444fc13692e5c4efa0 GIT binary patch literal 18398 zcmch8cYMwF{{K0je)4(G&zU)&>^+ExtyR^n)%oqZw>q@9doR`Aw)b{W#7vEdR0y$3 zgsO5;Vusi>L>fV)1hHa7)Chj>^yKCB>AnB|Ji^J-`*q&)wO{Y|lMmj1e?>2c&VvH79U>Q*U5&ozDP%NhL3{Nt%p zJ3l-(GCkWp?X6$md3p8Sqgj_j!~2#jeY3}1=O2B1b=S;eo%i&O3Y;3yi!O?r`uf;| z{H}6VfR^ib0yGtiOIPb&4cBN085|8w)kIH@K?DsE`-=|(knAc

{(6)-@X>J}=KSl~2`e7&U2yfD<5xFC-2O@@@6O1$4mrCQ z^b9;zF!Q^aA;%Wo*~WTM)|M@@LSu$Uv^jOHP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c8% ziT0!LDp7NuDY6KYsm&>`$P&9}Tq4s-WINbZ5G1#{6Y=NUR#;_of!(o3rg#K>u1$(XDK0W=l87RWtTxqYY`sfo!xP%{U@kMj`!S zX&#m?)Q5+q=P=$~)vYFJHpv^enwznw3EyCXf>%l|_+l3p4*aXUk>ERB^hWwicYnN? z51L-N0KwO~K=|?N@4ejod%urg?e|pkFOkjv1pkD=FAhf({u*)PSEqIOKm7{U>_4@_ m2oH;hj0!lyZ?riA`0K0hzxJM6L2gRzCfzU?afeW+aQr`(&*-uM literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/big_int64.h.2D08006D10EDE9AE.idx b/.cache/clangd/index/big_int64.h.2D08006D10EDE9AE.idx new file mode 100644 index 0000000000000000000000000000000000000000..d6291006d02d2948601b76112157722450818453 GIT binary patch literal 6434 zcmY*d30#e77r*E9mfm{q?bTbVn-(c)B4t-Hq{3j3r3f>OE$b*oma$f5q#4<=WXX&f z%kYgch8f%NSrb_%vZeW2G-Rtmk@}w7>v*pFtM|R9|NlA9e$M|C)hja6=%UkgAJZ#w z%GepBB%MyD^529R@o~AJ(@o}oNX*=`vhTOo0+p0E1G|oH%igT?&D)e-ML>EPIrgIoANm>9kK zaQUoF{WkX9cQJp5cSyNS_YODIocr?L#@37XOgXWCb%%%%(<+J&9ljm^=F1D=w`<$F zhgh_nw4x^4kP=hb^Yh3~3-vhl&K(qZKl9}f ziyLL`$)#xrypy{;{p9j@gMR+yRiLtAZ&+yaZr7)`jncP#YIS(Tjt;M@vKC}Tb-2-L z$V8`;*}f%K9tp*HKep&RuYJ+gfg$Zn!i>ZEWo5mJ8hOs<;2*1JN-leIf&&W|_bRcP zS@a|+ZqK+0D~<*4-aXK#t$X9UA+D3dw|JaL>L+jV>>T#zN4DGl%sU!*ZQ<7A4aTou z96C7k@z*=|)y9SPO$}Y%Aok^)puY!y-~3pb!|7S+_RF8Wn{nz*TiG#V#uorW!pMB7|@MVR-(KT)weIABv0D( zcvxVFgMuM6j8ha++Em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F83552C.idx b/.cache/clangd/index/big_int_utils.h.D96CB7752F83552C.idx new file mode 100644 index 0000000000000000000000000000000000000000..10bbf59a12c0f8b63a0b1d25baac6cf06a1ff03a GIT binary patch literal 1830 zcmYjQ3rtg27(SKDF1J0GmO^P!D7P($v^*N86%@;W7IbTQOw1^ZPEbUqGH97YqHzin z-3IcIEkPXN;bsP!XfmUV$tDAYDavEwG-5WF;0zPy)agLS&b{5?wn@L_`~L6#_x}HP z&YSC#la(X@Nn6&J?<^?GBLD!t=eK+2hjBJUEjlI7&?SOJ7^^4#~iR)5E60a5R zFH;WOdVf0Ax3YR=>*6?d!S1)^Pp7ZWoKN39WPh14UEOd$Y|E6j*wNLQobgtCN6}WV zycajSMZ3B-eIVS`v1ztye&>OS&@5}ufF>)VXCUwD#sO*J<(T@r-{iMin@!H&BV#4w zg~O`fPMxoPWU-V5wM;=}^_pwL9F(^uMm{bi)~Z0}`7VO&~C>J`o48DpfTVdjxxa9eMK?E16U zN7XMoFXWs4l8&kKwW%fR#$Nke_{89Q-IkMjI4bPh)`+LoYsD#v{Y{4|g!ew#cXN6A zM<=riI`?#hH{JG=Sv%LH8diwS@#BRd??~&nl~XH<)&|AYj0D$|o|*v8-8=I?MQJ&+ z{(g8o!RAc^832r@x2J*wK%qpHO9YJPo;4fGwS`Ai5U7!%SW>Ly08l<8(6R>o;ftSr z|HtNR2$ms(QDRhZ04P79%W!9ov8siAb{hC21K~>qalpMInC*~VSCdmQc*y}lC^BTi zOc@7&5_^Khfyi*~s|jgt%-u=|0+7KjviorWD5)3FupPAjG{$$q+lL?sLk1nx$vFTN z?E!Q_$S~396LYbD{4fLxWPlLLH~^GL;4*YeW3~F@ekUMUiVPNLk#hhj$ty0y!|Z~| z>8c~=Adn-237TXa0Lq(i8R{#p&Bj#EK87G18Au7K-~dp*lxq*+$2Q94S<)8}gdl?r z+5$KL6kOyQ(^0V1dCUWV^!Z^cwW*yH2pNHw0FCVW;iwh~T@n2+LnZ+x_~R6CT|TpAC-Ke{B1ObAi_#Lh z5GZ4bwiw*lYD)sotO{!|&(erA5zjIMGc|Zfe8A9D?CHW&;bVnl_Do?ps!zB0%gN~m zf3#L1A;s&23`vq=yg$SONEOduAPm9%AOoY}DxT4Sv|Ejirrm1Z{@zO7DIp|~XHr7y z#&k;EQalJ`bb4Kk8;jGKcow0EV0aeoAFbq>Uak-3nUOS#`7mvaZP~&xXY4Y25Izo& zDJF}>_;fQy6%;-qQ3&;mVu*SM;=R@j?GT)+f)lBz|7g+py|*Hv_J*^ E1CC2Rs{jB1 literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/crypto_api.cpp.E927BFDCAA5B6960.idx b/.cache/clangd/index/crypto_api.cpp.E927BFDCAA5B6960.idx new file mode 100644 index 0000000000000000000000000000000000000000..7b42b809fa1854fc66848e26732f513468396af6 GIT binary patch literal 20086 zcmZ8p2UrwG8{XZS-JRhUxTBY&Hz|UEfLOrZHDbvoCNa$xTWpCX#u|+UQB=TAtkD>| zq99nnUa_DkQbZB42NhI6|G{&Z_4j$?c%AQNr+np|Z@#s6myR7r_2jsA1G`KdIcWU% zkmERO@^{?$u|J&_InK?I<0h^yQ%C+>5UIakUT4NX$=E+{eMZHt^FwFl@7e3{(|q@_ z3tla4-Dh9>_MT!~SgCE@vlb7N#@x8g$|g^pZ;b!)tYwYvSj)S%ci%i8`R$$~TUI&6Pg_6x!GYfG2L2Q? zRo$A&&FekPc~IY|TS9E6`Mb1dtIef#Ay&y!qTxHo)q__ro73$V&#<*u2FmT0yfOa$ zW!r+PVgDrz{<%Zfy+QufO%J)OoBGG%fIBtszI%LhYfk=Wpse$M$)CAy?b70C{H&$+ z*&C$GQu^6v+wSzqE_yU=%!K!;7k(LZ_wua~nfq7xRi;0=bZGy(%x`brjZ-HV9jo}t z!li0R+drhGe+MO2Y)*R54cWdt$Zm486C*9+mYBZ`{rN$=8KW%E&ceeFdwst(=CZ$k z?a(}r&6Sz`=Kopus@3V-7N6bO*tU90_ah_He)2ol%r>oL-2HZ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raB^8L zp@ZxkR)6yWiMOQMM&6Z>5b>4_7fV*fQUJpx5-MTsbQ4K9seied4(rb?0RbB-JG>(6 zGeh*BAx1D)o+0^XNI|qeY9{sJ=)=3uw1?-5Vs`v?+_9R}w7vo^uRsv3vn2@?;8F{M zSQ&E`49L>b{zB+g2*YS_A@b0_7B-_JAk`b9;k4+^4v??KfY;i$g_0z%Bq@xo*dEES zhs{_~>m);+0WM;gc0hE|^a4HA#q)0rPCa@xt*Jj3!0s~J)Ly8Uj-erN zh^*OSI81}4z$vnJi{UmwrZ!)HIzwrKj^S(pW^3Dv1Xv`o(W(kkQuu@0niDcWB3w)m$dB*5L|#{t%|^PNY<(d%tEqO zMc`E=)19wB7oakvqnKI}S$ETaN(|iEeaU`}W54!izxHOoe!+hIapb@e Y^<`1v<`IEGjYC4hnzRfK4QR^!4-D%)J^%m! literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/crypto_api.h.4392B6162F6AAFC2.idx b/.cache/clangd/index/crypto_api.h.4392B6162F6AAFC2.idx new file mode 100644 index 0000000000000000000000000000000000000000..e226abc3abeecac897744d4f9f90beacbdd2763f GIT binary patch literal 4334 zcmYjT30PBC7QQSmA?85>Bp4tuG=vaH07DcpauG3Xp$J44Cu~MRML{+dlp=M(qD7IZ zK&>LURH|02(izmEGA<}8qN26MU5d0?w>s)5YUlCtZXWqQ`0n}h=iGbtqmK#?f5-)3 zYGzbPZq_2BH2}bo_$yjem_3#docI8gY#m6-&AS=E{dw@iD9f%x<0G3VX7_$-W7(X( z3j1|UQ|Qq3ney`zS&d~B_F~<~H=?j(afdP|wYC}sGo`=1_}?w|vu$6!`Eb8JD#SY3 z#Y==uS@SZw^VQnhP`{(1y?y6}Qg8Kcp5yyRqeT35y2Y-0+H3Y6IMD9E_H~b9WmPBK z3D1bVe80Z8$$GlM|9D9G@nDvmsR}(uVb2iXotb`aux0Y#&X4Vn&y=VVw)NyMJF~s@-jqt7YVoOE zS069@XtnjaI@>RNM!)YDf-aYLl_~G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aeNZia+`J(a`uJnJtih4O69h1 zX^_fu4n`--{!XN?aK$A1Bn4VW_nr3X3bgLgyfdE`r+PNf_e4q`WiVr`i`vD8v18O@ zY&beYJ;R2TOVvxQJlr>Ph;;DCwZGCs{UKsJL`>*mOJsMi;Cf za1M9}L!ElVIr1HZ(Q^85xkfw@e%Yfr1J}Q#WS(rr$fA;WsJFgI~#yrqQ9 zn>%IRD$5VO<$rB|2K*tBxUrw~BQgBb;SY(V6Z`35{R!gp{(U7r{(;@(`c68do9P{Q l4}-+r+AlG&pGNj`N=m{^B^Bigo^Vo`%)Y&{ogH+L{2!MK#EJj_ literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/crypto_service.h.1E16FAF97B2AE712.idx b/.cache/clangd/index/crypto_service.h.1E16FAF97B2AE712.idx new file mode 100644 index 0000000000000000000000000000000000000000..6eb503e1778b2d468bc3c9def719ccee1b0e7355 GIT binary patch literal 4648 zcmYjV3sh9q8lH17V9p%&>;nuSFwV?j7(f^h(2H?}R3xE=NPr?zq96|yR0c#a#RLik z6&0;6sF|kVJ%?RzrVfz*Y`glG4}P> z^^OWf)a=-j{H&r`Llg>y6MPpIS>{Y<6bc&SZSaZglsO5X^d&E}FSc(RxI5hbi^gr~ z`lTm3?q{TYP`CAX?8~?EO=oUQ*wyjk`o?m%n!3W|MeDbjHy+H{oAhqRrMU7?_h~AF zduMrWaM8asM-xtW)VSs*4E25czSAfB{PXJ8cbAXd6L(1;XzFpR+K_T?U)iW>_Lus9 zJY_dAe)aOI_RsHKzk255fs4Po9CW*KXRF_%oI}nPBjRK0Jifj4&TD}+j|QG*A6b2F z{p8Kp*Ocvw`RVXjal=mM)L>7RnS9@?sPN43lXquid?ZYs@%lzP?f;yR#pH+GqQ1DLZtC!f_=l zu4KcAUeKEq_K*kodh52WYJ92Ajxb4MaJnd8x>|%Sx#qOBP zhsIIX6OKP)#Lqy1i{K(F2(S82L-m2yiIjB!fLS#A5nkZk(1ZSnH*D7VA4;UGHyrn{ zVh`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B)jLG=Us=j36e380gf3z8jOa#e2%*zH32Zml*C(8Gs6!!RQeZ*1Ab4Clmw*sm z?N0*t-0|M>=f5|ikdPE0bcDk*q#JS|L`UnBAT@5i%8d>|f8RM7)w--0qMF zP*Ra)x3`j}1LFb*fDT^Lfgyj_Q8ZI`Y7cjf{C9 zGd!)gxUu6!q!x=;xf52OJJPvA^bqIU|i%Q@&oN5D{xaR0u^+(HKevy z%SXt)%1z{aKy%N%zj-K|{~RWr_=JFRB3ub~3W@k40p%-l6}bcCES$KSsH2?FCAYtT zwU8>4U=l3KfUqLO6cRB-EMPzuZ6y*@NWoOFKy~C67AR(3O)h7SMrY-Qzb3aJHId># z#D6fU98QaxB59e4%pA~AYFv_XdZ<*XF)A1Gmxdonb@uu<`q&RJ-&DYZ_+a87$dq~% dP>($7F(x@S2_vB)gQKU9GMNS#m%&2V(0_EfH=+Ol literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/debug_utils.h.B8FE501C48F17FE2.idx b/.cache/clangd/index/debug_utils.h.B8FE501C48F17FE2.idx new file mode 100644 index 0000000000000000000000000000000000000000..dc4930d8ec3228ae6ecc3c3d91772e3ca123272f GIT binary patch literal 1066 zcmWIYbaPW;VPJ4h@vO*AElC728H9njxTGkvpOJyVg_VJ!V$R;+*z7|FB5(aqHcz%Z z)%33U;&#nL3DO*`d%b4G-9DqH`E!Eh$Nl=bTd%!((VTN(+LL?5ewT`c-tXEj$ri$u zdm$uX>p9*d?-!VQGJLHxy}`GKO~-_bqkdl73jM|B*Y;P<4qR~4{0wiGk>~V<($k;r zc9?BZAb-@Q>0DQ&+L_79_gu<0GL){F*7)MuMyJg#4m}xOQ!ZM7K+OgMLCR)LIXrp80de+^SE@~BOEeoa$N@v)h*o7NeY zvpGC78s@z=I(Yj_&{_$l*=J&nFHi4gTspm5MZsa>8pV{a3%%F7C4YbLP~dWir{eAa zpRlmfhpUudKXvta{3&Mt0r8d3-g1YAzV?2yR;7Ed{N5|KwHb;lbCZ?=<0tTT!`oB# zUDJ3N#DF{y;1_2Vmtx>#V`PxvX5?oLfAIA0uD`S9@i6d0Gx z#kaNs-7O|1rVO(x_~D9+D(_bB1)9ys$tVRgyC^j$5yUPoN-hotF@!(_1n|Ka3=9GY grU-%wcOfL_LnZi6^m6T*d~A9#n~<=GAfEsO0F(z{{Qv*} literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/ecc.cpp.ACE89B9BF3464706.idx b/.cache/clangd/index/ecc.cpp.ACE89B9BF3464706.idx new file mode 100644 index 0000000000000000000000000000000000000000..62af457a9fc82a5621061f0c14bd6411104cb7ad GIT binary patch literal 8700 zcmai42UHZ-*PnN1z};nFm!;^5j0Ya{E65=&5GDo42YoE z5G<%shy`JTK#Y-~qDC;WAqvD;zPFg?8~@)q-{(25`#bl}o!jqyZyg&lY}hLYh8a93 zBra-h%uJ497$f|5SxoeoM|2owq>^FccI8Zn`l>!q@u=yo3?83ZzOL&j?=;7Wa9~Mq zZfbE%tlpEY!Qn;1MCJG`(NA^WJ@0dVME2sKC4GL3`e9Z4vyR_eM(i`{n-!vY6xTH^ zU~A;eHQ%dBC(iJ`7hjcUs$3sb7`Jb_+sdWUYYvPmd{OF|_bB_vtV5a0M)~@b`g)8F zT{NUnKC5x^MlYRbE3a86^@RCJ`A<$vQ$F3_>zw?G(B^lFIG>?QjH2UY3t&Xu@V4_Og!-JA z%qOc$rd52K^(y13+4~Du+jcye^VFjF+Ui+#emBq7u^axWJTqifwRLl+$|UNe zjn|#C=9bp&niY91z{>wx!{m;j?IZhaj(C0Xwa&MaFAG|wv0L*`DiTBeBIgcSl~!VC zGAOr{k?tw0kWPCM;Pt|FoOMX_?6MTwK06kl_1t=S%MFuPKU%}>C*3{_^VxOsU|O<- zy_RMX++cn(-Sn~b&mp-p0_-!UpUMw6jGy$&HxC_kVx1oqFRb(jf4^(__M0tGN|dQn z&x0=--e*1=+)o*LyeN9|0sYkZ^?|K>O?+H_Zg>Amc~o-tP@kE%e@JvMeKW=Imh)K2 ziS{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+!UuQ?nS**RB3efNA?c>|MyT4zr KZaumNGXDcim+wIU literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/ecc.h.245F06981E47A1E8.idx b/.cache/clangd/index/ecc.h.245F06981E47A1E8.idx new file mode 100644 index 0000000000000000000000000000000000000000..eb7b3cf483e0104aef70659504ace926c158a05d GIT binary patch literal 3306 zcmYjT2~<;O7XA~GzT3d^?E~6t_tTHNk4rNqyoX)77pO<$DoWo7-{qO(o`h9s* zGt$$0Fhb+!W|TV$7SE9&gp}mJbaBZaonnM`cp_9@zdGCT-Yvb)gJ!*H{q^v=`+c2r zr*ApZ^64JOzWV96EbC|2Id85JZK|LC>R)3{MHly&K6czW`p^FIhBFUeJu_|S&-{$J z(%LubYF%N#p11pV#D2~lC>_0gX6ovfwO8sFY~0I#e@uj~c+-jb(voOD+>Gw%n%d|OPo^SLj zds4D~e$1>^d(OolmZfi;d_-OSy1vfTpl-O3eE-#l^LtZg(GTWr-q3b(xl?huFKBuH znSamjPH9S9^St7-xrfguI{sAMo6>yY$&9V18qxAC#;!NA$l|45%X zRkDAXXG7-LMXeJ8b6#5(=bmjj_lJ}(pRT+$xl8o8uP5jcwKr>OTk2BwwsV^3#}(F; zMO%OSnk_DTYu#PTuGT!iZL@bDyyw%WZGSj5@A|w2ohio7OX(j3U49&YqRQu;Q(vtZ zQFksWFTwBqtJ|(G(Vok|ql@Y)l54hJ``h!3yklYP$aO_cYh@qzuJpSjxzp5=5kYwt z(qF`N`^Od>u6~{sAbw^V+y80Cp^27^9ZcJ@##*JlVZFWAI5xlQOv8+%j)vR2Z|gHl za_(PB8@Ji|qNuCRx$yGYftK9Q({_%?-(P+F8a+~czF}ZFI6$rdn`t$vedZ6|)AO zR&TBlRV`86FPwRPTYEuw-^t@;WBxu%bT%@#&al6#W^d*%0c`5LcN6wzzGhb)ldrk+ za!u#U6>&e;D88skU;3!f)?IdTLRG8D{@+#3gYtDJ9FdhXQDS+dU&pR=&u6lw|8Ra& z`e#SpIuC^I{&t1kH0oC`f3eB$&Y$wfyny4= zWtFWjN;M-figo!TPAAg^B1+?h^id*C`q3}VE60Zi*fBDKgIQ*#5as9La?thE+^F3i zo`%s_a0sWveG&CLIZBBpPssjc!!9&owoO0faIv@4xB#g#^ zgN3#z5EZ0wJ)!nN?}_LkOaL zM6M7w&&*s>?|p9-Mx((YkPZw&l()C52j8)Ai$?7IeuHbwjD(@MK>b1V zQkxH=R8m)w>lD8bk$R*9_u+csV(-vZxoM5#SI^2dms`Hqbevp!DeWC;nm` ziLa4pRJ?!ybg-W4@@-fFmFp&TQz&t5s5b(oFQE4?$3Ur=?;}I`} zgQgQRk8{BcC?{qf-GUjgP0T!|1vAW%n0X`%X23Bq^Y|6aYyWfhQTCJ<)q^Wx)ki~O zm@{C55*~%QFdU|Y>@a7HFupNtC6d{RuoBP(vJ!(N01cZ)rL{W>d^Slir?coHVUm~& zk%q`&BqT~ySlqBEQllKAKpQ2ri#>$wF^>Z{Bqbod&#)5oh8QRzR59*&W$lC=AIv1b;4A9jtR}hB1b8NFQ^dD3lr^I?kju8DRdHvmgrv8%#9DqH$~C zD4YT;U@qJ*JkYJNG^>QkVUAU^x?x%ln-3a%lHK8{S?GRLV#mJ!ElzGB!xnjo7{Q7F z)Wn9@G?lu?pbPeS_3o@)_~mQnOV3C(;#;TNqN{^TC0G&#m!R} z$_5I47Lf|2ECsc|1`ucuGB#`~fi|P?9tLeQV}TWbv5_oz0vED?i4ikT+kzS5lkN;M zHY5ju6ts(^1#c3Uydc3LS-oNCAxndTq!67z2{>s(N XIkfFum*OW$f;}-FCAd%Q?yvs`+{N## literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/ecc_keys.cpp.94FCEEAE4E9A5503.idx b/.cache/clangd/index/ecc_keys.cpp.94FCEEAE4E9A5503.idx new file mode 100644 index 0000000000000000000000000000000000000000..e80d727090f943fb92ec14b32b5b00c7ad16fcd2 GIT binary patch literal 328 zcmWIYbaQiHWMFVk@vO*AElFfyU|w1}QX|P5{<)z;a=NT;;c7F8YEt;D--AtO@zhc!) zgW}ySJ;7^j+x9$=o@>GNHapJk`6RwM?JaTAS>1d&lbT;Gn0W1?(!n#i-%p=fFQv;m zWtQqAnW_Wf%rlnwIr2Rd6*xKa z!oTOOVLwv;yq;9asmK{{)FxT literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/ecc_tests.cpp.691CD3DAC13A387E.idx b/.cache/clangd/index/ecc_tests.cpp.691CD3DAC13A387E.idx new file mode 100644 index 0000000000000000000000000000000000000000..d3cdc94da1107f0a67cdb684cd4622c7471b3ad6 GIT binary patch literal 1594 zcmWIYbaOLeV_HprFYi&7PR|rh{S@HSa6HNxz1mW{j4!C<)Z@;Ng zaV+^u%e>2;)iTLCZofJ2zdYf#qQ7ocYqRx+^^3fHW=sye&=)Kqs&ZqovC_!o+*?bsg0UuM}m(+!E|MBlnC)d)hv()-#4rPHz#Eo#V>4Gehvsz4F`d z_|9K_s4gsbe(JTb?RDvEbiO@X>9jLNCArP?)fp4bH9IdBI$W-K8~;V!c4NS?ki)OJ zvczJg-z=(n^PAPkhHbK6aOHxplGAR*@4f3+YtkwEXzlM}gCJeq?vmsGC&d^)blO@` zC|KzIyT*KD{1{M}D!2k+HAo%Th*GT-^ z86Pnw9$qZc?_O81vYhp;$07ZN=cfkEx%lfg~}~`%2t2`P0Pi1au(CN|*zK9X4l8(id<;b0Ey2Ob~a& zR6`s9lY~VBn%*_#FMF1sH%dZtK;h156_dY~rU4zmEyOJY^E0PK@@L7o*%fH2TQsGWP8O$Y0f|sR^oNoT{qo*2FP73Z1AM>)a%v@%NhH&ps5b~loMdbow)-| zc=o&r*}pY6?m`PjSsPWcdgs*_(NzE7pYx`;XVn#;Fmn16aaxoYHjniNnsDiJ_S9qQ z<{)8Y@9c1!TCvXIIlAgUSLXa>JID42&5%0_r;F*7y($WVPN2cGa30Wy`8)B_wkBJOagoi Y$+;;xz!HvugNuuanU#&3g`JTT0RMF-dH?_b literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/encryption.grpc.pb.h.FC865B7DD33369A9.idx b/.cache/clangd/index/encryption.grpc.pb.h.FC865B7DD33369A9.idx new file mode 100644 index 0000000000000000000000000000000000000000..e118a8adebd06e6d132f4f2d186da40ffaba74be GIT binary patch literal 251146 zcmY(L2RN1AAHd!BzIVLl<#I2sz0y)?rzy0HhW1iPMSHJbr0j&EQ1+HxiApJ1Nmf&t z5ke{@lK(mH>A3#?=lT2mo}SP1J?A~|+2_1>`2q_IqKYXocl(0l4m%ESB_$*z_~8GC z4jl6+}ue)iPIud)*b7dIdfEn%|KRLN3Zv;@u#QX-z%uR zviU!Uvz|+;cVud4Yj$>y_iqU_HTG{g>3sUk@qpCDuN8g4AKgan_MBuv%fYfy0h@om z&(l$tHGlHCEAzuqxnvikTfe)xYwag5OK5JGnOZD=Sti(fn#fqQ^U%A+dp%oLJZ4x>>g(HAw#nK+v|)I9h;>2htxWj9o%lv+T*z2-Al2$ zrkS(jc$C}J-A_g?x!z!*tl=iQm(u*Xzh<8KTvAiSFHB?Y%d%}lj!OgtEt|W;f6wNF zb|^_xjXE{>|M=9dLs);s<#%&+l+KsbS$wt>2Pw9 zSDJlz(1dxu>+RDmW*d7s7*Ub;8+5j-YLsknp6&NZ?}Y?cG#kBU~k9wl+$|ub=qQS35{SDscuAa`JOeKo*JrrXWUBVYvcC2 zx@t>Yw@wb2KD+(hs$VbLSEMg39=A^B^@Qn5mNaOH0_`LM1E;uOycXvc(ZhY{5ZFI* z-*cUkmlku2Uz*tzzRcx3I@Mg~II-gRqs0>>JPi)y?|fxLEq!%**|PR>gBOYHoe!79 z96ho5ph=CZ-^O<*u2(6qxObQRe#dwpk6j!6p0yck1Sa+AW{*<)uD-w5=+lqn&6761 zn>DfDw68P%)YOEs(zsJ^jdlgTS~8%VL-ocuXC+PiuwDN0jOZXW!h!TF)Y0l&J$Wkm zj%(m&KKt&2t?7pIue@9$c&xZ$rN^hF60Nak-c>XB`MH4(7OwNPerR*GsgRjZ4X!vD zIe*)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Ii` ZMtx4FK4(#%Q>o8Ksm}+g&xh(h{~vc;Xleie literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/encryption.pb.h.2BA2DE5ABC344FBB.idx b/.cache/clangd/index/encryption.pb.h.2BA2DE5ABC344FBB.idx new file mode 100644 index 0000000000000000000000000000000000000000..67922fabae2eb1daff6b24b802f18d80caa4c8ca GIT binary patch literal 220562 zcmY&h2UHWw*H4y^C6t7ggx+f?D#nflMG?E$yJGLpUa){vL8>A}K?I~45yjpR5J9nb ziio{n0Tl}(@9qve8{gr3zw`gj@7$TWbLY01&GYddG9-M43TMzf?~Tjnubso=a5#GK ze{0sRUVK!I!{K$|a5nB&OkKXRrl;=f(M_SB4yx`ls+=SB<4T4;?>S@cKKaq(7ivcH zT_TrTZf@E+e%fc>wwmb7WjkML&Og&DEmD!R$t-Gt!_6?cU+e3Fi2Qw(e}w6)PsMlr zxl(nY@bBezGvU)e>%4RKZof2F&F07qBd>m)V6)3W^ls{Glm798c>|v{ z9nA~gIfH*}MEdOi2J%hyE1J?&?F4+6dAB`uzFC`;*QCdMO^J!I6sb*6F_!+4O_^kC zq5rVR;^UyP#*;Z-)dr!>dLxE+Hg2#PaZFKrA|&+sMAM-oJ6m7&40_SdUF~p&*X_~v zKvN@Gny{oTV9;jIw4%}Oj)B6TzdL(WsLq=`cIc~muZl;j2lX7_u>5Vo^kpTJ2QCdP zEjF{*l09^O>E8>EJ~>(@yR27o?k}^*<|J+C{p9Ps6l))^w@JT?judtIJ7YlZJ&pN$ z)nXl%YaCpw^`+~cO7;3|`ysC{PPx#!SK7^d_?iCSOIAnO>!p7Av z=6meZ3m!Q|uiHpt@_Nz^o|B=VXokk4PR7H6Ehe8BYSGQkP(N>k7CAoHr`&UukudCR z=E%CZ%&OWYnIpm~e7J|64-NS|d2LAG+zWRGnhcZe82_wdWAL?W|7qtr@G6XKCVM#> z$ShqnCy3OCXofBg;rhH97??9`tV)j69PRO2b1XAAoyuK9o|fD%Ut!pJ?+Vp13uf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X5-QA?wsUm~G5U2?>Goc1A zmSJg&dqK){+d+xMfx#GT3}eDFxRYTPhSjvbKCb;}qlyH8LDYyQCe$FZ3@uIb|Koe^ z(rF!MgHwp%V$@9V6auE4Xp5=edzL5Bu-?EM{Ftx}2z_$3A8xu)UsQkDi?e|t(mV2b zCLV+9%D$u5Mt^zb*#>c3oLZ)W8(dhNv9?*=eMKU%v;(bC&&1O~%d+hQza4q_nwonN z3Uo?NJri8tyt+N`i>AZv5{ZEIX3oqrq3fgAE!YlpZM&V8-7OId7{a(Po(VOCF@r0! z{*CS@mwHr04+fn^7r}%YRP2a$Rm?m-*;;W&MS{Sf)o3G_P{VV~(7QJ2>$2m69`Zy2 zgNZk3nNS0Ka7d^6eS^kNjC~}MR2BkPJRh$lKAeL5VWdLM7v;WLyySP3RS1l(n0WTj zQo`J)1wIf~C>1bn&pt#hgeh+^jG%=ur7VUKuMnneMGzrW2MEt#`kP&p9h^grI27d= zDMpX8f|!L&l(F~}5v~xXWX0k!2PZI;;=qWqTj|zfN(3t{4ycO7Ax+?j0-nFtkMmDsh9y_3Sml89Ct)0)J*y5sX0~|8-ytlq;xG%6xSj? zMd2AX|9_xLK`9{@P;B3H6QAT4}l%u(5EuOL{yTV-wc&zC@qwDf>HER^29PfyC;oHI5VFLS0vg@r?cNCu zr6+4?7e4V4c7ebKH>EW`KD>GeQ$}Nw`E%oL7k5^iqDg$?2VoLy3)~dg*fX{TVG3$Y zfarB0$o~M+#ua1$ literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/hash_factory.cpp.7CEBEA3079B6D93F.idx b/.cache/clangd/index/hash_factory.cpp.7CEBEA3079B6D93F.idx new file mode 100644 index 0000000000000000000000000000000000000000..85de4a9aed34e64666fa47cc20c406e5d82f3545 GIT binary patch literal 1920 zcmY*a4Nw$i7~VUM`{8!??v}gbgk`kLE@^Bmj2*kWVDQSlAKgk?!YQ5LVX2X@ z>&;7;l=pw>HEv1p-Sw<(SQ~%0BHp88e63~W+Al@HLy;@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9}^!t%mGggSii9Ii+2Ov#V^7y2NMSB)e$m-=}j?UIP|>c$5}=$4n__}NoXiAz@&k~ zpdf@f_w&;A6Eq9rUW1I3=T|{8(p<;}rl%-1ClO>$aZz${Jcz*qA|QYp#$bRZ2QZ%v gAB7dW8x$zInXM>Wx{>js%%nIr+oVcQ;Q+eEZbr+L`{WI_^EYt~>5< z{^S2jy`Ohk6hm=kZW7R|3`MDF#Sl6t5kwakB^Pr8X-1x}E}?aWZt7bY7?N{Sa(IAZ Q99&#X%&ctOEbNS&0D3`w&;S4c literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/hsm.h.ECC6854A1862F7DA.idx b/.cache/clangd/index/hsm.h.ECC6854A1862F7DA.idx new file mode 100644 index 0000000000000000000000000000000000000000..77201dece3765e7c12a4f26a648ccd0374653e10 GIT binary patch literal 3672 zcmYL~2~btn8OIMV2W5GBkevrSfyY(Z1W_N$1p(P*6R1|yI*OtZL<3LUf?6@sRAp3B z5?taMiA%&pCe=huTw~q0R;*D8rfxWC5l5^RvEO&@eDm%Mf8PA>@9gJ(|ANf4w6Xme zOP-OrsJvwUG|m`vfj`Uq%GsA}81uAaY|)n81=n*|M!5d=W#{&FEh|!YeR!ufyRKqW z`KJG-d|$9*gKmd%q3!3@0|qTD*?2zVQ_Gd(@vrW#soDMGlBIV(YF_Ad<{}Vs=*kqns-EMUMEU|w3&S!s*KCIYxCBO7t=hRkZ_uRbvZQ!dRwI5EH z-2KT%Za+Oe;QDBD_WIiNiI2Hg*t5~k<188OF=fVCSCWmxo>qU*5dG#@`lM!`?hy4z z*9G-ZL00!TLs0&>^M>Om&za)yR!sL9?{KAJY*1WAp+ipbtr@+IwgD~2{`qLJ+x+n3 zqGNY=($cW_Yd#sGx@Xe;t)cus`R|rCAJ1Usy!s(af-Pe<{^iwIx2}inTRXR-#y>V@ zW1pMmh~(M>))BPzj!iY?~IGr3g-`VvkrFljA zeZ~3J%R17Fn`)*6w8fOA4PLjP>tB^h=Kl1VlLNimJ$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2M1To6 z6}r#_D2kvh<`A`|00JA+hir-+urYJUrmo>IF=Xg4DP(}ggdw`ian9|=Gqt}5+s@7o z0#19V71$UzWK+(7jUhvwP`ZGP(Ly$53fLGZWK)uWjWI$t};SCX%B@2*q9JRQ#62$xj;7ECD?Ba z0@^tW0-!Mkh^F!nHr9T!spx}^6`$D8QooCqpvdNtQE*NciY+$gVt z!F24D4$u=u1NB6i05%2!*^~reV+@c@UBjBN?$es6?gNcQpJ=M~U}LE#n`%7RSm4Q~ z$__S`b+YLLg(0zy(~z`eu(5uVP4yc(!QxGw&^He>R%@c^8UT%@n$DSOG}u_6sS~Qq zU}IS(o9Z#xSd7W0DhxK3V6v(9f{lfj?8=fk({Ol8<#daRKjKidCzgIdv2HE8oU{JQ Sg+v}7H!7CJTi=Yb{`@}-AU~G? literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/key_manager.cpp.1A56188EEED4808D.idx b/.cache/clangd/index/key_manager.cpp.1A56188EEED4808D.idx new file mode 100644 index 0000000000000000000000000000000000000000..5c78bf1aa0d3ed548c1078e2f050bd3426969da0 GIT binary patch literal 332 zcmWIYbaQiIWMFVk@vO*AElFfyU|N8_!tkbcT*W{ezKJ@y@w0<+yUtH|Te$LrxJ?~am_OO$Vr58M2XG~0Zw(Ym-)9~Ih z)+w`Mk63{(1pcn@i7ZWop8#fC(BPRgIcZeDQ literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/key_manager.h.FD9E9F7920C81D78.idx b/.cache/clangd/index/key_manager.h.FD9E9F7920C81D78.idx new file mode 100644 index 0000000000000000000000000000000000000000..3c246ec99a975d471bb2ee1c4195dacf5dc8ab7d GIT binary patch literal 478 zcmWIYbaT7L$iU#7;#rZKT9U}Zz`!63#Kk2=na6;16;Q5X&e91RS1}n1xPI2;-*VyD zhPPt;sT(&5isd-V9KU1ldQX=J@1vbch zWvpgu_kA#*K8Ghd-`Yn$wX&jqO5m}L zDYB=wWq#}Yx8?!g^64ks-9PM*_io&Lc)>fqyX`ZID|3?^fWBc{-XnaHF_(#lfg8vJ z0S*o}4p9b9CPoHk7DhJKc{|$9d|bzHjE8{>BG16V#>FNDR=~r`P?VZhTnvf@g2~7`Zr@IG7}%q6|vB4!i57yU$?c;b3E6NCW~nVGITa07DR) A&Hw-a literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/logger.cpp.4BC27BCE16A51595.idx b/.cache/clangd/index/logger.cpp.4BC27BCE16A51595.idx new file mode 100644 index 0000000000000000000000000000000000000000..5d91c695c2cddf11285442d1c85387ff36124ca4 GIT binary patch literal 4402 zcmZ8k3v^Re7R~1+ZJL|h*W@KHFKN?XJ`|xp3Te}{wDb>^(gad$i8gH^VhBOfiU@W& zI3iG~jDvi%{8Wm-{9^| zpEI6?J5Q{-cyr+8$C@9XwB^*sA8-BsVXh(4V?C3%vEl81HZQrm!Cp+g@7Z)^$-!+q zP0p?-u3gyv2T3?I-DbW#SU=j8vQ*-UCb}fC#gXdy&*2)0-uj%AqFEj(kV4B#~5{{Jegk zf8~kHQ%YLK6189BXK7Bw=|QdhWtc6Rc*psxI;07)v`J;+)lE5$-k&;+Zk^0RtSdAX zMmn8N=fJx6mBtr$w}&ShWG14P>*W^OZnRrLz5laMXKb~fY|zP)iMo+#%%n5e3_GZE zzrBBzrDK1PmT8E(KvTfbsj5^O)bod)9lQ5(&C^C1N7M<430j(^*d$PEw&}(my?1^& zEz=Qo29uFVTWAX(+r01U1nEcel?IuXs1=MNgU)0#ZD8FOi5+N|^M_u8%s|vKMwUir zv00g*{>R-9f7hO%d7YLqM2$4aN}E+?GpOI~Tk++4R}!x1WJaQPF)kaO#-=$zEm=5w zPV764&>MNuNMm|0CAbeQKKeGo^mw`yVj%3D>h(jdQlDG5v~c|I|z$#S8p5JM+` zEYhSArU2fPSxZ(dEAwFm!j_2TQ2}^hR-g@R5bjLt%o3#NtY{ms3*qjx?kte3%l|a+ zWzlI)N?|>#H-ozaYt6D_duF8*Ost#b%L7&fQ=FcF>50Qf<CEjhMs-Mlf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cpp.56193772442193D7.idx b/.cache/clangd/index/prime_tests.cpp.56193772442193D7.idx new file mode 100644 index 0000000000000000000000000000000000000000..28a26754327caa40f49ba0c618798c701fc15a05 GIT binary patch literal 5510 zcmZ8k30M?I7VeUM&CJj+7sm_@!!=wAB8Uf<#v>k^gKX50MB`!%A&Ix(ikPSgqS*if zX23*)$LEEtV8r9o;6?%%MHIzE(Qt?d5&=OGN63I|HCk5h&NuY*&wEw%>b<|-d-eA8 zDO1)sFwCTnrY9|mOPt3t45P(=35m-;Wrr|KEHF&c4|``WS|9}T=IF|eix2J@_ia(S zT6T2$7}>%R$v1xHc0@0m9A~+=<;SA#(=pR?1LOSn2I@MDQOVusuH+@HOpMTNZJN=M zQS;^(&z4?W-Ilh%y)mzQ)8goj^0noWPm4M?otgJA{NawrSxd^3uhgjxHvYXw)iJ8Q zHi792PY2y?zI(fMM%1Brrz7|8RwV}9of(*7)jXo{ll@y&#Wh7U#>f6^L#$>_Oi1$V z-NW`Id|lu_t+2Ssqm?hrnlf$JN2-vC3UBAEz+Y>u{`f41UyvpDZ2Nm*_4{AMPkK+0 zv2W|DWAN(H<;!#KayF+!de+zfIlL~*e0mx;0W`jGG^Sudd`k zPlsLh%n3_ZXg*F#oV#PdJGgvGfO~k}>EOBAd)xH;zlO(lImt!I-5dU96L77%rX_5n z|E#LoD~qG}N9Q_CEAvoS47*s@yYx$g&79QRbyIgA$;dZG zu06F)@on6r+JOtlzH$6`-krvjs}GN?yOcjYaqF1Wb;nb$Y`^xOr(4%1+%`P9)An}4 zszo2JLJU*m)*1NQw3Svo0muaJ9A6Ajs$@GH{GDFp)<;(0sb>n!(9g9m5lpo$iW;Om@#)=iHk+K@8$zWD!MaovBChM_6At(z$O}y!v zp8I*|mOO-5p%G+_@Cvb=#1tuB1e9!U=9?PdKeHo&<%N?VKM6`Q6)&`bybY9O23}|f zdAk&MfV_j^^PcY*th7cuY;!GA*CGwI*^Ja?q@gxvf^8<)k>C(64N?3bgLt7EqPpQV zVgX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z3AmQPP~s&r0JqxD?+QdQq#@?oY`=;MOrdIIs76Mb##)h~m9_-D@DSNPL|U3=3c*ka zMzR7g90A)Spr!aCC@+EoaVIZib9^@KWxk2Ze#`IGt_s{O4Z!dL7)?y%ah3E-{B=wGLTq`_x$|wL-rgNT@xFevZ8jdSPbum zmj$_?cgx*`wgor*#HK*n$BK1U+Q*96vmAMm8o>%xNK=Kh#Can2s6w6;S0hceR9=h5 z)uQoKeghe9AUBHZ(YSi4yb(DyA{~{tAWaJmhFI4A;ioENbvqk7GnUrVf8 z@Qfv(Dxp=W=3d#7pT_^*A`|nUwhQdZQlb}Bk3miG69{`E?fT6y+6-f;+yYJ(dcaws z561MtSSlX?_W^0KS;raH(Obe_>;L-U)7O6Q;jke{-i2%^-7Lu8f`(CSf^jBzh0@~~ z$d7>y4R1BrRZC03X3l0aXG>ghp;ztv##^D5!IZ={fHkpDOysJ5&{CYj$x=8Qf|tiF zoG1D_Vfp-o1>%dd_!#^k!MwiV+=Gzw88SB~y|d26)xfwBA;Y-R*O#|#hSAagI?-1b d`f8xB^A~-zP>G?Pt%|djDHOIg8aWS2=D(PCP;meN literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/prime_tests.h.1B12341116CFBD8B.idx b/.cache/clangd/index/prime_tests.h.1B12341116CFBD8B.idx new file mode 100644 index 0000000000000000000000000000000000000000..77827be4785644dac52fbe66eeb772fef5c30387 GIT binary patch literal 936 zcmWIYbaPw4%)sEB;#rZKT9U}Zz`!63#Kk2=ne2=V4AD#s3>9;hPCT1+*g&A=dti;h z!p4A$K~*0#RrY=f%etIB;Ysh_6jjS#nx)S7_Ld!3y6~l{Eoa)6`EHvFCdTI5eKu12k9gne+;u|jfs7jelwzJ;C#FCB z6n(k1Nw-S*akski%%u3ljt#2EoH#C8H6NPreyQN$nk$z|9`QzB>d8*uC34bCb>+g5Igo+fTl$d!hPH_?E|{huo#bx1<<~ zD|3@B0mJ2@{CnNY9_7qD3_=VHyxnY^-E1=49Go0744f>C46N*o+^pZ0TSq$llZZ=jn351fO)U@JEU`)e&#>ffr574t9U}AfO z>qcdi2rCaas~M{e+)i#bLpF1`@!TAy9M&)sc(^$&Iql&d;1;zNb%q5Bj0V~Q4ibnZ z46pzJ3WI|IDx5C*lhtZRRyhaIaurq`B+KR5)Df1mtFY_9OyJ?>VBp|DIE6!*LmR>4 zWZ>jLIE+)BQy;+-)fP2|IS(cZbPqVpq3(e>04NL&XQ(jDB|u?t*g}QXl=a&+{B(aa xa&a?qFiJv285oLEa}q(E;-chYWe|f0L_h#{5X+iX(Z@VKFmdrPaKS_w7yzA43_Jh; literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/return_codes.h.A6CABDD08505CCAB.idx b/.cache/clangd/index/return_codes.h.A6CABDD08505CCAB.idx new file mode 100644 index 0000000000000000000000000000000000000000..9ed8bf2fe41dc6ce2c66947282a648ff8bbf70d7 GIT binary patch literal 428 zcmWIYbaPw6$iU#7;#rZKT9U}Zz`!63#Kk2=nGrxb6o@P4upTtzYf#`}aEMDO4|g;7 zjo?h0sy1cPExv#Eb_;CZv%DbqxG2Lc1E$G!tq(;uMpZZ+a@(3LGB3|$Uh|D=!@vcB zyW=^!o>>)5<-WhPRh~mf-l(`TH%Sp__HuE-?05IHjky_sj$mRIW0nRJ44gnY1_nkZ zR)(U~wBlz-DjB&TD!>XD7{04KNliK5>JJna;t-O7iZbx2hj>0^KR6o>O9u)|b4V+}RLebm#GdP6&cs0kpMh#l9`y1v||2&yVMEyuX~;&Y3f3&dki9fPm|2 zit=3?6u)Xo%mSLCC`0a_HYPg4fJaf2WfT>k*EKi%i)R6nH`-10K6z8V`CMg?ekjc{ zGtp3EF>%7~8?|#IzjQnL_SXDdYwxiGKb7@(rAX5EO_^zquO*!}%=(Vo8I7HyNeh~vEm?6Zf2DZe=_7&S`A*;6ij2I_X!FB9 z&B!#EJ8Nft_~>iyYv(UEIDa5f`sGe7INE7`VAN7s?(yGJ51jwhq;c}>-)>eVYad+9 z`^SHA&AjzN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v6fZi3(Mxz}v@q@-yxO~D;jcRw-B;n$ zASFomDWO=G35ufhEGZ=w>+)hrS?XC1l!I88B?YC>vs9Ey3^_v?q};St$Z^kzlLdmE zMnn3?k{1OxmUZt!)bi$eOW-12O#Ic%B>U3ed{Bn!m$_UaL~`VE)mhBtsjIKlI8IgzjIWLJJ66UxJUO@493B6>%Soq80j%poebkSE${+D(IZK5w3t~FmB z-(8|^Hi#Y?O@pTgWAR7WjMVGsA~fTf@c}~qICXc2cgZaS2e0)W++O^6S{w7Um6;5l zmia2^)PSlsqd{v7j9oMJ-`DRL95*N|dYY7dq8;sPTw7u>yDTB>ut}%U8+_7Zs&1M* zo!P*+Ch=TgUh3ah&2;dC2uNBLpb7*phue!@b6PnMjZPi} zV8R{s*@GlWU||hmAW0HfTLao8?Idur*7@Th@URAd09m9T`i<7;wkz*}^S6E%%b%bU zHX%&3ZGO?Vbbqy*_cNn;6xr%ueK?mlVDtu23xYmU+U347dV}@Jvu;jox&0c^Kq{Bo z0%Cy9J5fnguZ^067y=Cp2Ca*B0`5fZ1n8)C0{E7c7?Y%8*d_tWVJy0#cKY>W7rc*; ilZYo^V(kJpLHBP={K~cHBN{W~a@pfdI6T~xMf@LFCP7&M literal 0 HcmV?d00001 diff --git a/.cache/clangd/index/temp_hsm.h.70D71B76F185F0B6.idx b/.cache/clangd/index/temp_hsm.h.70D71B76F185F0B6.idx new file mode 100644 index 0000000000000000000000000000000000000000..becca23ed4b089613110e644994116a25a33587b GIT binary patch literal 7052 zcmZWu30PD|w(iqj^)}q5H>jqe7r+J@8W4mAK|uu?)Tk`cD8i_KMie26_!J`;ml#Dy zA7jL5a6wIQd2XXKI_^dj2pTnt3aBp{HHj~35|_LfojBD^pRPOa_4iSA|66rWRh{$K zIj4%;AsHEq{UwsLi9_a;O{y&9Boc{+{>`kcn9=|e$x!-YPQxc}o}PL)T6wj}yK~&= zZJBAyHSg5h-VbiO@!4a$2J3gm2caQJnjAOxXeHM37BfH*YY&fZ%wqQozqA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po5RgOcP{u%_~>A}GZeFp>~FC2$BeJ2Eo4{`b%5QKa|&C~elxHe$%Q=Fbq z2jy4cP6$yH<;-M$vJcbOE>KWUjWhRf-7g^3?j|lElIklPG$HvJo5z5$VFz$&}^NkZD}jnom=gMvm@WEw|f z>c5TWx|yNt>bj4?f%nY1#ScvT(>9vOoB*E_;?sBws9IRAg_5a+u3H3i=I=DD9*2nI5Q(PTB-QVn_4Q9D z{$G-Z0_nhxyC57EIp33JsC=x*QN;0aB2){BG(o}1I~=y2CMXQA1Ysp;82)!Pdblo@ za8PuDbS_=DO4tx~=D#!Jf2(Y9sxjgO#Ne_7(gHy(5Q-StO(i%ko$z}+mxI)K&xEhF z1)q1uoH}qxMQ>SREGei88sg(4(-`U((k~VT(}Yx=E=tkU!_!4aqr8y3SVpcwb)iXw z!V41^S`1N(p&wJsQt(;I(l~*v2g`b}A)f`(2&P7eU_{*xe%m1w_nANrgYGa(!yI=( z#$#YbwK(pA{Jvmna(KFwHh2R)-GI66rP~@3zou-8;bYu^;K;)Hz9VNRcToOEg+zs- zMmW+8mSzY;>3df+-al1w>IMz%L8c%pX50cX8_nSi?FMc)C^55i+@R^NfCX>RW;ErN z_INt!8|nj+WJ&JihDH(D7@a;B&2puY|Q$XPa}baHF*Z>GI_@ozX$zliS{)vJ>H!s#>6>XqHm%?MaoO=Loxf1OG?AYu zT4ob)O(0|D?F4ftgkf};F(>7szV-4y=|xYZEi#_jC0&)SM%gs=Qx&Rl!l-6yBQtN- zFstkZ1x@*xRStlHru?`QJzV#yxQ>cR(+VA4duB!P%-N0yddG@CEj~yje(aI{!wi3p of0ns^zW5-Kc(X?xdsMSW(rd}oefmrLf@Erqw~tom=kF`|7ahzQy8r+H literal 0 HcmV?d00001 diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..9d584953 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,29 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/build/runTests", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", // השתמשי ב-"lldb" אם את משתמשת ב-LLDB + // "preLaunchTask": "build", + "miDebuggerPath": "/usr/bin/gdb", // נתיב ל-GDB + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + "internalConsoleOptions": "openOnSessionStart", + "logging": { "engineLogging": true }, + "launchCompleteCommand": "exec-run" + } + ] +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a2325f36..00000000 --- a/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -# Use the Ubuntu 20.04 image as the base -FROM ubuntu:20.04 - -# Install CMake, Google Test dependencies, and g++ -RUN apt-get update && apt-get install -y \ - cmake \ - libgtest-dev \ - g++ \ - make - -# Set the working directory inside the container -WORKDIR /app - -# Copy the current directory contents into the container at /app -COPY . . - -# Create a build directory -RUN mkdir build - -# Change to the build directory -WORKDIR /app/build - -# Install Google Test -RUN cd /usr/src/gtest && cmake CMakeLists.txt && make && \ - find /usr/src/gtest -name "*.a" -exec cp {} /usr/lib \; - -# Build the project using CMake and Make -RUN cmake .. -DUSE_SYCL=OFF -DUSE_DEBUG=OFF -RUN make - -# Command to run tests (optional) -CMD ["./DPCPPExample"] diff --git a/.gitignore b/hsm/.gitignore similarity index 100% rename from .gitignore rename to hsm/.gitignore diff --git a/CMakeLists.txt b/hsm/CMakeLists.txt similarity index 100% rename from CMakeLists.txt rename to hsm/CMakeLists.txt diff --git a/hsm/Dockerfile b/hsm/Dockerfile new file mode 100644 index 00000000..d5aad03d --- /dev/null +++ b/hsm/Dockerfile @@ -0,0 +1,50 @@ +FROM ubuntu:20.04 +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ + build-essential \ + cmake \ + libgtest-dev \ + g++ \ + make \ + libgmp-dev \ + curl \ + libprotobuf-dev \ + protobuf-compiler \ + git \ + libtool \ + autoconf \ + ca-certificates \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* +# Clone gRPC and install it +RUN git config --global http.sslVerify false && \ + git clone -b v1.41.1 --recursive https://github.com/grpc/grpc /grpc && \ + cd /grpc && \ + mkdir -p cmake/build && cd cmake/build && \ + cmake ../.. && \ + make && make install +# התקן protobuf +RUN git clone https://github.com/protocolbuffers/protobuf.git && \ + cd protobuf && \ + git checkout v3.18.1 && \ + git submodule update --init --recursive && \ + ./autogen.sh && \ + ./configure && \ + make && \ + make install && \ + ldconfig +# הגדר את תיקיית העבודה בתוך הקונטיינר +WORKDIR /app +# העתק את תוכן התיקייה הנוכחית לתוך הקונטיינר בכתובת /app +COPY . . +# צור תיקיית build +RUN rm -rf build && mkdir build +# שנה לתיקיית build +WORKDIR /app/build +# התקן את Google Test +RUN cd /usr/src/gtest && cmake CMakeLists.txt && make && \ + find /usr/src/gtest -name "*.a" -exec cp {} /usr/lib \; +# בנה את הפרויקט באמצעות CMake ו-Make +RUN cmake .. -DUSE_SYCL=OFF -DUSE_DEBUG=OFF +RUN make +# פקודה להריץ את השרת (אופציונלי) +CMD ["./grpc_server"] \ No newline at end of file diff --git a/README.md b/hsm/README.md similarity index 100% rename from README.md rename to hsm/README.md diff --git a/include/IHash.h b/hsm/include/IHash.h similarity index 100% rename from include/IHash.h rename to hsm/include/IHash.h diff --git a/include/SHA3-512.h b/hsm/include/SHA3-512.h similarity index 100% rename from include/SHA3-512.h rename to hsm/include/SHA3-512.h diff --git a/include/aes.h b/hsm/include/aes.h similarity index 100% rename from include/aes.h rename to hsm/include/aes.h diff --git a/include/aes_stream.h b/hsm/include/aes_stream.h similarity index 100% rename from include/aes_stream.h rename to hsm/include/aes_stream.h diff --git a/include/aes_stream_factory.h b/hsm/include/aes_stream_factory.h similarity index 100% rename from include/aes_stream_factory.h rename to hsm/include/aes_stream_factory.h diff --git a/include/big_int10.h b/hsm/include/big_int10.h similarity index 100% rename from include/big_int10.h rename to hsm/include/big_int10.h diff --git a/include/big_int64.h b/hsm/include/big_int64.h similarity index 100% rename from include/big_int64.h rename to hsm/include/big_int64.h diff --git a/include/big_int_utils.h b/hsm/include/big_int_utils.h similarity index 100% rename from include/big_int_utils.h rename to hsm/include/big_int_utils.h diff --git a/include/crypto_api.h b/hsm/include/crypto_api.h similarity index 82% rename from include/crypto_api.h rename to hsm/include/crypto_api.h index ad39c680..f5589d2c 100644 --- a/include/crypto_api.h +++ b/hsm/include/crypto_api.h @@ -12,12 +12,17 @@ #include "general.h" #include "sha256.h" -CK_RV configure(int userId, CryptoConfig config); + CK_RV bootSystem( const std::map> &usersIdspermissions); -// geneate key pair to each coponnet cinfigure the +// generate key pair to each coponnet cinfigure the //encrypt and decrypt behaviour for later +CK_RV addProccess( + int userId, std::vector &permissions); + +CK_RV configure(int userId, CryptoConfig config); + // keys generation: std::string generateAESKey(int userId, AESKeyLength aesKeyLength, std::vector permissions, @@ -44,6 +49,7 @@ CK_RV verifyFinalize(int recieverId, void *signature, size_t signatureLen, SHAAlgorithm hashFunc, std::string keyId); // get public key id's + std::string getPublicECCKeyByUserId(int userId); std::string getPublicRSAKeyByUserId(int userId); @@ -83,6 +89,7 @@ CK_RV AESdecrypt(int senderId, int receiverId, void *in, size_t inLen, void *out, size_t &outLen, AESKeyLength keyLength, AESChainingMode chainingMode, size_t counter, std::string keyId); + // encrypt-decrypt size_t getEncryptedLen(int senderId, size_t inLen, bool isFirst); @@ -94,4 +101,19 @@ CK_RV encrypt(int senderId, int receiverId, void *in, size_t inLen, void *out, CK_RV decrypt(int senderId, int receiverId, void *in, size_t inLen,void * signature,size_t signatureLen, void *out, size_t &outLen, size_t counter); +template +void deleteFromMap(std::map& streamingMap, int userId) { + // Find the userId in the map + auto it = streamingMap.find(userId); + + // Check if userId is found before attempting to erase + if (it != streamingMap.end()) { + streamingMap.erase(it); // Erase the user by iterator + log(logger::LogLevel::INFO, + "Deleted user: " + std::to_string(userId) + " from map."); + } else { + log(logger::LogLevel::INFO, + "User: " + std::to_string(userId) + " not found in map."); + } +} #endif // __CRYPTO_API_H__ \ No newline at end of file diff --git a/include/crypto_service.h b/hsm/include/crypto_service.h similarity index 91% rename from include/crypto_service.h rename to hsm/include/crypto_service.h index 3cd69383..33f0af65 100644 --- a/include/crypto_service.h +++ b/hsm/include/crypto_service.h @@ -7,14 +7,15 @@ class CryptoServiceServer final : public crypto::CryptoService::Service { public: + grpc::Status bootSystem(grpc::ServerContext* context, const crypto::BootSystemRequest* request, crypto::Empty* response) override; + grpc::Status addProccess(grpc::ServerContext* context, const crypto::AddProcessRequest* request, crypto::Empty* response) override; + grpc::Status configure(grpc::ServerContext* context, const crypto::ConfigureRequest* request, crypto::Empty* response) override; grpc::Status encrypt(grpc::ServerContext* context, const crypto::EncryptRequest* request, crypto::EncryptResponse* response) override; grpc::Status decrypt(grpc::ServerContext* context, const crypto::DecryptRequest* request, crypto::DecryptResponse* response) override; grpc::Status generateAESKey(grpc::ServerContext* context, const crypto::GenerateAESKeyRequest* request, crypto::GenerateAESKeyResponse* response) override; grpc::Status generateRSAKeyPair(grpc::ServerContext* context, const crypto::GenerateKeyPairRequest* request, crypto::GenerateKeyPairResponse* response) override; grpc::Status generateECCKeyPair(grpc::ServerContext* context, const crypto::GenerateKeyPairRequest* request, crypto::GenerateKeyPairResponse* response) override; -// sign-verify grpc::Status getSignedDataLength(grpc::ServerContext* context, const crypto::GetHashLengthRequest* request, crypto::GetLengthResponse* response) override; - grpc::Status getPublicECCKeyByUserId(grpc::ServerContext* context, const crypto::KeyRequest* request, crypto::KeyResponse* response) override; grpc::Status getPublicRSAKeyByUserId(grpc::ServerContext* context, const crypto::KeyRequest* request, crypto::KeyResponse* response) override; // ecc @@ -32,7 +33,7 @@ class CryptoServiceServer final : public crypto::CryptoService::Service { grpc::Status getAESdecryptedLength(grpc::ServerContext* context, const crypto::GetAESLengthRequest* request, crypto::GetLengthResponse* response) override; grpc::Status AESencrypt(grpc::ServerContext* context, const crypto::AESEncryptRequest* request, crypto::AESEncryptResponse* response) override; grpc::Status AESdecrypt(grpc::ServerContext* context, const crypto::AESDecryptRequest* request, crypto::AESDecryptResponse* response) override; -// +//sign - verify grpc::Status getEncryptedLen(grpc::ServerContext* context, const crypto::GetWholeLength* request, crypto::GetLengthResponse* response) override; grpc::Status getDecryptedLen(grpc::ServerContext* context, const crypto::GetWholeLength* request, crypto::GetLengthResponse* response) override; grpc::Status signUpdate(grpc::ServerContext* context, const crypto::SignRequest* request, crypto::SignResponse* response) override; diff --git a/include/debug_utils.h b/hsm/include/debug_utils.h similarity index 85% rename from include/debug_utils.h rename to hsm/include/debug_utils.h index 6c6ef075..a95b6d15 100644 --- a/include/debug_utils.h +++ b/hsm/include/debug_utils.h @@ -22,5 +22,8 @@ void encryptStartPrintParams(unsigned char block[], unsigned int inLen, unsigned void encryptContinuePrintParams(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen); void printStreamAES(const StreamAES& obj, size_t blockSize, std::string message); void printEncryptedMessage(const EncryptedMessage& message) ; +//Declaration of the debugLog functionvoid +void debugLog(const std::string& message, const std::string& functionName); // Macro for easier use +#define DEBUG_LOG(msg) debugLog(msg, __func__) #endif // __DEBUG_UTILS_H__ diff --git a/include/ecc.h b/hsm/include/ecc.h similarity index 100% rename from include/ecc.h rename to hsm/include/ecc.h diff --git a/include/general.h b/hsm/include/general.h similarity index 89% rename from include/general.h rename to hsm/include/general.h index 105da335..131fec85 100644 --- a/include/general.h +++ b/hsm/include/general.h @@ -1,6 +1,5 @@ #ifndef __GENERAL_H__ #define __GENERAL_H__ - #include "../logger/logger.h" typedef unsigned long CK_RV; @@ -27,6 +26,10 @@ constexpr CK_RV CKR_DATA_TOO_LARGE = 0x00000080; // 128 constexpr CK_RV CKR_USER_NOT_AUTHORIZED = 0x00000100; // 256 /* Signature or hash did not match */ constexpr CK_RV CKR_SIGNATURE_INVALID = 0x000000C0; // 192 +/*user sent an empty buffer to be encrypted or decrypted*/ +constexpr CK_RV CKR_EMPTY_BUFFER = 0x00000200; // 512 +/* User is not logged in or user does not exist */ +constexpr CK_RV CKR_USER_NOT_LOGGED_IN = 0x00000101; // 257 enum KeyPermission { VERIFY, SIGN, ENCRYPT, DECRYPT, EXPORTABLE }; enum AsymmetricFunction { RSA, ECC }; @@ -38,7 +41,6 @@ enum AESChainingMode { OFB, /*Output Feedback*/ CTR /*Counter*/ }; - enum AESKeyLength { AES_128 = 16, AES_192 = 24, AES_256 = 32 }; struct CryptoConfig { @@ -52,8 +54,8 @@ struct CryptoConfig { : hashFunction(hashFunc), aesKeyLength(aesLen), aesChainingMode(aesMode), asymmetricFunction(asymFunc) {} CryptoConfig() {} -}; - +}; void log(logger::LogLevel level, const std::string &message); -#endif // __GENERAL_H__ +bool isValidAESKeyLength(AESKeyLength aesKeyLength); +#endif // __GENERAL_H__ \ No newline at end of file diff --git a/include/hash_factory.h b/hsm/include/hash_factory.h similarity index 100% rename from include/hash_factory.h rename to hsm/include/hash_factory.h diff --git a/include/prime_tests.h b/hsm/include/prime_tests.h similarity index 100% rename from include/prime_tests.h rename to hsm/include/prime_tests.h diff --git a/include/rsa.h b/hsm/include/rsa.h similarity index 100% rename from include/rsa.h rename to hsm/include/rsa.h diff --git a/include/sha256.h b/hsm/include/sha256.h similarity index 100% rename from include/sha256.h rename to hsm/include/sha256.h diff --git a/include/temp_hsm.h b/hsm/include/temp_hsm.h similarity index 100% rename from include/temp_hsm.h rename to hsm/include/temp_hsm.h diff --git a/logger/logger.cpp b/hsm/logger/logger.cpp similarity index 100% rename from logger/logger.cpp rename to hsm/logger/logger.cpp diff --git a/logger/logger.h b/hsm/logger/logger.h similarity index 100% rename from logger/logger.h rename to hsm/logger/logger.h diff --git a/proto/encryption.grpc.pb.cc b/hsm/proto/encryption.grpc.pb.cc similarity index 100% rename from proto/encryption.grpc.pb.cc rename to hsm/proto/encryption.grpc.pb.cc diff --git a/proto/encryption.grpc.pb.h b/hsm/proto/encryption.grpc.pb.h similarity index 100% rename from proto/encryption.grpc.pb.h rename to hsm/proto/encryption.grpc.pb.h diff --git a/proto/encryption.pb.cc b/hsm/proto/encryption.pb.cc similarity index 96% rename from proto/encryption.pb.cc rename to hsm/proto/encryption.pb.cc index 67cf4d5c..020b5b7b 100644 --- a/proto/encryption.pb.cc +++ b/hsm/proto/encryption.pb.cc @@ -125,7 +125,8 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetLengthResponseDefaultTypeInt constexpr GetWholeLength::GetWholeLength( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : senderid_(0) - , inlen_(0){} + , inlen_(0) + , isfirst_(false){} struct GetWholeLengthDefaultTypeInternal { constexpr GetWholeLengthDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -429,7 +430,8 @@ constexpr AESEncryptRequest::AESEncryptRequest( , key_length_(0) , chainingmode_(0) -{} + + , isfirst_(false){} struct AESEncryptRequestDefaultTypeInternal { constexpr AESEncryptRequestDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -465,7 +467,8 @@ constexpr AESDecryptRequest::AESDecryptRequest( , chainingmode_(0) - , counter_(int64_t{0}){} + , counter_(int64_t{0}) + , isfirst_(false){} struct AESDecryptRequestDefaultTypeInternal { constexpr AESDecryptRequestDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -564,6 +567,7 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::of ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::crypto::GetWholeLength, senderid_), PROTOBUF_FIELD_OFFSET(::crypto::GetWholeLength, inlen_), + PROTOBUF_FIELD_OFFSET(::crypto::GetWholeLength, isfirst_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyRequest, _internal_metadata_), ~0u, // no _extensions_ @@ -749,6 +753,7 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::of PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, key_id_), PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, key_length_), PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, chainingmode_), + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, isfirst_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptResponse, _internal_metadata_), ~0u, // no _extensions_ @@ -772,6 +777,7 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::of PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, chainingmode_), PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, counter_), PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, key_id_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, isfirst_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptResponse, _internal_metadata_), ~0u, // no _extensions_ @@ -790,30 +796,30 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB { 49, -1, -1, sizeof(::crypto::GetLengthRequest)}, { 56, -1, -1, sizeof(::crypto::GetLengthResponse)}, { 63, -1, -1, sizeof(::crypto::GetWholeLength)}, - { 71, -1, -1, sizeof(::crypto::GenerateAESKeyRequest)}, - { 81, -1, -1, sizeof(::crypto::GenerateAESKeyResponse)}, - { 88, -1, -1, sizeof(::crypto::GenerateKeyPairRequest)}, - { 96, -1, -1, sizeof(::crypto::GenerateKeyPairResponse)}, - { 104, -1, -1, sizeof(::crypto::SignRequest)}, - { 115, -1, -1, sizeof(::crypto::SignResponse)}, - { 122, -1, -1, sizeof(::crypto::VerifyRequest)}, - { 135, -1, -1, sizeof(::crypto::VerifyResponse)}, - { 143, -1, -1, sizeof(::crypto::KeyRequest)}, - { 150, -1, -1, sizeof(::crypto::KeyResponse)}, - { 157, -1, -1, sizeof(::crypto::UserKeyPermissions)}, - { 165, -1, -1, sizeof(::crypto::BootSystemRequest)}, - { 172, -1, -1, sizeof(::crypto::Empty)}, - { 178, -1, -1, sizeof(::crypto::CryptoConfig)}, - { 188, -1, -1, sizeof(::crypto::ConfigureRequest)}, - { 196, -1, -1, sizeof(::crypto::AddProcessRequest)}, - { 204, -1, -1, sizeof(::crypto::EncryptRequest)}, - { 215, -1, -1, sizeof(::crypto::EncryptResponse)}, - { 223, -1, -1, sizeof(::crypto::DecryptRequest)}, - { 235, -1, -1, sizeof(::crypto::DecryptResponse)}, - { 242, -1, -1, sizeof(::crypto::AESEncryptRequest)}, - { 256, -1, -1, sizeof(::crypto::AESEncryptResponse)}, - { 263, -1, -1, sizeof(::crypto::AESDecryptRequest)}, - { 279, -1, -1, sizeof(::crypto::AESDecryptResponse)}, + { 72, -1, -1, sizeof(::crypto::GenerateAESKeyRequest)}, + { 82, -1, -1, sizeof(::crypto::GenerateAESKeyResponse)}, + { 89, -1, -1, sizeof(::crypto::GenerateKeyPairRequest)}, + { 97, -1, -1, sizeof(::crypto::GenerateKeyPairResponse)}, + { 105, -1, -1, sizeof(::crypto::SignRequest)}, + { 116, -1, -1, sizeof(::crypto::SignResponse)}, + { 123, -1, -1, sizeof(::crypto::VerifyRequest)}, + { 136, -1, -1, sizeof(::crypto::VerifyResponse)}, + { 144, -1, -1, sizeof(::crypto::KeyRequest)}, + { 151, -1, -1, sizeof(::crypto::KeyResponse)}, + { 158, -1, -1, sizeof(::crypto::UserKeyPermissions)}, + { 166, -1, -1, sizeof(::crypto::BootSystemRequest)}, + { 173, -1, -1, sizeof(::crypto::Empty)}, + { 179, -1, -1, sizeof(::crypto::CryptoConfig)}, + { 189, -1, -1, sizeof(::crypto::ConfigureRequest)}, + { 197, -1, -1, sizeof(::crypto::AddProcessRequest)}, + { 205, -1, -1, sizeof(::crypto::EncryptRequest)}, + { 216, -1, -1, sizeof(::crypto::EncryptResponse)}, + { 224, -1, -1, sizeof(::crypto::DecryptRequest)}, + { 236, -1, -1, sizeof(::crypto::DecryptResponse)}, + { 243, -1, -1, sizeof(::crypto::AESEncryptRequest)}, + { 258, -1, -1, sizeof(::crypto::AESEncryptResponse)}, + { 265, -1, -1, sizeof(::crypto::AESDecryptRequest)}, + { 282, -1, -1, sizeof(::crypto::AESDecryptResponse)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { @@ -866,131 +872,132 @@ const char descriptor_table_protodef_proto_2fencryption_2eproto[] PROTOBUF_SECTI "AESChainingMode\"2\n\030AsymetricDecryptRespo" "nse\022\026\n\016decrypted_data\030\001 \001(\014\"\"\n\020GetLength" "Request\022\016\n\006in_len\030\001 \001(\005\" \n\021GetLengthResp" - "onse\022\013\n\003len\030\001 \001(\005\"1\n\016GetWholeLength\022\020\n\010s" - "enderId\030\001 \001(\005\022\r\n\005inLen\030\002 \001(\005\"\221\001\n\025Generat" - "eAESKeyRequest\022\017\n\007user_id\030\001 \001(\005\022*\n\013permi" - "ssions\030\002 \003(\0162\025.crypto.KeyPermission\022\'\n\tk" - "eyLength\030\003 \001(\0162\024.crypto.AESKeyLength\022\022\n\n" - "destUserId\030\004 \001(\005\")\n\026GenerateAESKeyRespon" - "se\022\017\n\007aes_key\030\001 \001(\t\"U\n\026GenerateKeyPairRe" - "quest\022\017\n\007user_id\030\001 \001(\005\022*\n\013permissions\030\002 " - "\003(\0162\025.crypto.KeyPermission\"B\n\027GenerateKe" - "yPairResponse\022\022\n\npublic_key\030\001 \001(\t\022\023\n\013pri" - "vate_key\030\002 \001(\t\"x\n\013SignRequest\022\021\n\tsender_" - "id\030\001 \001(\005\022\014\n\004data\030\002 \001(\014\022\'\n\thash_func\030\003 \001(" - "\0162\024.crypto.SHAAlgorithm\022\017\n\007counter\030\005 \001(\003" - "\022\016\n\006key_id\030\006 \001(\t\"!\n\014SignResponse\022\021\n\tsign" - "ature\030\001 \001(\014\"\242\001\n\rVerifyRequest\022\021\n\tsender_" - "id\030\001 \001(\005\022\023\n\013receiver_id\030\002 \001(\005\022\014\n\004data\030\003 " - "\001(\014\022\021\n\tsignature\030\004 \001(\014\022\'\n\thash_func\030\005 \001(" - "\0162\024.crypto.SHAAlgorithm\022\016\n\006key_id\030\006 \001(\t\022" - "\017\n\007counter\030\007 \001(\005\",\n\016VerifyResponse\022\r\n\005va" - "lid\030\001 \001(\010\022\013\n\003out\030\002 \001(\014\"\035\n\nKeyRequest\022\017\n\007" - "user_id\030\001 \001(\005\"\032\n\013KeyResponse\022\013\n\003key\030\001 \001(" - "\t\"P\n\022UserKeyPermissions\022\016\n\006userId\030\001 \001(\005\022" + "onse\022\013\n\003len\030\001 \001(\005\"B\n\016GetWholeLength\022\020\n\010s" + "enderId\030\001 \001(\005\022\r\n\005inLen\030\002 \001(\005\022\017\n\007isFirst\030" + "\003 \001(\010\"\221\001\n\025GenerateAESKeyRequest\022\017\n\007user_" + "id\030\001 \001(\005\022*\n\013permissions\030\002 \003(\0162\025.crypto.K" + "eyPermission\022\'\n\tkeyLength\030\003 \001(\0162\024.crypto" + ".AESKeyLength\022\022\n\ndestUserId\030\004 \001(\005\")\n\026Gen" + "erateAESKeyResponse\022\017\n\007aes_key\030\001 \001(\t\"U\n\026" + "GenerateKeyPairRequest\022\017\n\007user_id\030\001 \001(\005\022" "*\n\013permissions\030\002 \003(\0162\025.crypto.KeyPermiss" - "ion\"L\n\021BootSystemRequest\0227\n\023usersIdsPerm" - "issions\030\001 \003(\0132\032.crypto.UserKeyPermission" - "s\"\007\n\005Empty\"\320\001\n\014CryptoConfig\022*\n\014hashFunct" - "ion\030\001 \001(\0162\024.crypto.SHAAlgorithm\022*\n\014aesKe" - "yLength\030\002 \001(\0162\024.crypto.AESKeyLength\0220\n\017a" - "esChainingMode\030\003 \001(\0162\027.crypto.AESChainin" - "gMode\0226\n\022asymmetricFunction\030\004 \001(\0162\032.cryp" - "to.AsymmetricFunction\"H\n\020ConfigureReques" - "t\022\016\n\006userId\030\001 \001(\005\022$\n\006config\030\002 \001(\0132\024.cryp" - "to.CryptoConfig\"O\n\021AddProcessRequest\022\016\n\006" - "userId\030\001 \001(\005\022*\n\013permissions\030\002 \003(\0162\025.cryp" - "to.KeyPermission\"h\n\016EncryptRequest\022\021\n\tse" - "nder_id\030\001 \001(\005\022\023\n\013receiver_id\030\002 \001(\005\022\014\n\004da" - "ta\030\003 \001(\014\022\017\n\007counter\030\004 \001(\003\022\017\n\007isFirst\030\005 \001" - "(\010\"<\n\017EncryptResponse\022\026\n\016encrypted_data\030" - "\001 \001(\014\022\021\n\tsignature\030\002 \001(\014\"\205\001\n\016DecryptRequ" - "est\022\021\n\tsender_id\030\001 \001(\005\022\023\n\013receiver_id\030\002 " - "\001(\005\022\026\n\016encrypted_data\030\003 \001(\014\022\017\n\007counter\030\004" - " \001(\003\022\021\n\tsignature\030\005 \001(\014\022\017\n\007isFirst\030\006 \001(\010" - "\")\n\017DecryptResponse\022\026\n\016decrypted_data\030\001 " - "\001(\014\"\355\001\n\021AESEncryptRequest\022\021\n\tsender_id\030\001" - " \001(\005\022\023\n\013receiver_id\030\002 \001(\005\022\014\n\004data\030\003 \001(\014\022" - "(\n\004func\030\004 \001(\0162\032.crypto.AsymmetricFunctio" - "n\022\017\n\007counter\030\005 \001(\003\022\016\n\006key_id\030\006 \001(\t\022(\n\nke" - "y_length\030\007 \001(\0162\024.crypto.AESKeyLength\022-\n\014" - "chainingMode\030\010 \001(\0162\027.crypto.AESChainingM" - "ode\",\n\022AESEncryptResponse\022\026\n\016encrypted_d" - "ata\030\001 \001(\014\"\222\002\n\021AESDecryptRequest\022\021\n\tsende" - "r_id\030\001 \001(\005\022\023\n\013receiver_id\030\002 \001(\005\022\017\n\007data_" - "in\030\003 \001(\014\022\016\n\006in_len\030\004 \001(\005\022\020\n\010data_out\030\005 \001" - "(\014\022(\n\004func\030\006 \001(\0162\032.crypto.AsymmetricFunc" - "tion\022(\n\nkey_length\030\007 \001(\0162\024.crypto.AESKey" - "Length\022-\n\014chainingMode\030\010 \001(\0162\027.crypto.AE" - "SChainingMode\022\017\n\007counter\030\t \001(\003\022\016\n\006key_id" - "\030\n \001(\t\",\n\022AESDecryptResponse\022\026\n\016decrypte" - "d_data\030\001 \001(\014*O\n\rKeyPermission\022\n\n\006VERIFY\020" - "\000\022\010\n\004SIGN\020\001\022\013\n\007ENCRYPT\020\002\022\013\n\007DECRYPT\020\003\022\016\n" - "\nEXPORTABLE\020\004*>\n\017AESChainingMode\022\007\n\003ECB\020" - "\000\022\007\n\003CBC\020\001\022\007\n\003CFB\020\002\022\007\n\003OFB\020\003\022\007\n\003CTR\020\004*&\n" - "\022AsymmetricFunction\022\007\n\003RSA\020\000\022\007\n\003ECC\020\001*(\n" - "\014SHAAlgorithm\022\n\n\006SHA256\020\000\022\014\n\010SHA3_512\020\001*" - "5\n\014AESKeyLength\022\013\n\007AES_128\020\000\022\013\n\007AES_192\020" - "\001\022\013\n\007AES_256\020\0022\231\021\n\rCryptoService\0226\n\nboot" - "System\022\031.crypto.BootSystemRequest\032\r.cryp" - "to.Empty\0227\n\013addProccess\022\031.crypto.AddProc" - "essRequest\032\r.crypto.Empty\0224\n\tconfigure\022\030" - ".crypto.ConfigureRequest\032\r.crypto.Empty\022" - "O\n\016generateAESKey\022\035.crypto.GenerateAESKe" - "yRequest\032\036.crypto.GenerateAESKeyResponse" - "\022U\n\022generateRSAKeyPair\022\036.crypto.Generate" - "KeyPairRequest\032\037.crypto.GenerateKeyPairR" - "esponse\022U\n\022generateECCKeyPair\022\036.crypto.G" - "enerateKeyPairRequest\032\037.crypto.GenerateK" - "eyPairResponse\022N\n\023getSignedDataLength\022\034." - "crypto.GetHashLengthRequest\032\031.crypto.Get" - "LengthResponse\022L\n\025getECCencryptedLength\022" - "\030.crypto.GetLengthRequest\032\031.crypto.GetLe" - "ngthResponse\022L\n\025getECCDecryptedLength\022\030." - "crypto.GetLengthRequest\032\031.crypto.GetLeng" - "thResponse\022L\n\025getRSAencryptedLength\022\030.cr" - "ypto.GetLengthRequest\032\031.crypto.GetLength" - "Response\022L\n\025getRSAdecryptedLength\022\030.cryp" - "to.GetLengthRequest\032\031.crypto.GetLengthRe" - "sponse\022O\n\025getAESencryptedLength\022\033.crypto" - ".GetAESLengthRequest\032\031.crypto.GetLengthR" - "esponse\022O\n\025getAESdecryptedLength\022\033.crypt" - "o.GetAESLengthRequest\032\031.crypto.GetLength" - "Response\022D\n\017getEncryptedLen\022\026.crypto.Get" - "WholeLength\032\031.crypto.GetLengthResponse\022D" - "\n\017getDecryptedLen\022\026.crypto.GetWholeLengt" - "h\032\031.crypto.GetLengthResponse\0221\n\004sign\022\023.c" - "rypto.SignRequest\032\024.crypto.SignResponse\022" - "7\n\006verify\022\025.crypto.VerifyRequest\032\026.crypt" - "o.VerifyResponse\022B\n\027getPublicECCKeyByUse" - "rId\022\022.crypto.KeyRequest\032\023.crypto.KeyResp" - "onse\022B\n\027getPublicRSAKeyByUserId\022\022.crypto" - ".KeyRequest\032\023.crypto.KeyResponse\022O\n\nECCe" - "ncrypt\022\037.crypto.AsymetricEncryptRequest\032" - " .crypto.AsymetricEncryptResponse\022O\n\nECC" - "decrypt\022\037.crypto.AsymetricDecryptRequest" - "\032 .crypto.AsymetricDecryptResponse\022O\n\nRS" - "Aencrypt\022\037.crypto.AsymetricEncryptReques" - "t\032 .crypto.AsymetricEncryptResponse\022O\n\nR" - "SAdecrypt\022\037.crypto.AsymetricDecryptReque" - "st\032 .crypto.AsymetricDecryptResponse\022C\n\n" - "AESencrypt\022\031.crypto.AESEncryptRequest\032\032." - "crypto.AESEncryptResponse\022C\n\nAESdecrypt\022" - "\031.crypto.AESDecryptRequest\032\032.crypto.AESD" - "ecryptResponse\022:\n\007encrypt\022\026.crypto.Encry" - "ptRequest\032\027.crypto.EncryptResponse\022:\n\007de" - "crypt\022\026.crypto.DecryptRequest\032\027.crypto.D" - "ecryptResponse\0227\n\nsignUpdate\022\023.crypto.Si" - "gnRequest\032\024.crypto.SignResponse\0229\n\014signF" - "inalize\022\023.crypto.SignRequest\032\024.crypto.Si" - "gnResponse\022=\n\014verifyUpdate\022\025.crypto.Veri" - "fyRequest\032\026.crypto.VerifyResponse\022\?\n\016ver" - "ifyFinalize\022\025.crypto.VerifyRequest\032\026.cry" - "pto.VerifyResponseb\006proto3" + "ion\"B\n\027GenerateKeyPairResponse\022\022\n\npublic" + "_key\030\001 \001(\t\022\023\n\013private_key\030\002 \001(\t\"x\n\013SignR" + "equest\022\021\n\tsender_id\030\001 \001(\005\022\014\n\004data\030\002 \001(\014\022" + "\'\n\thash_func\030\003 \001(\0162\024.crypto.SHAAlgorithm" + "\022\017\n\007counter\030\005 \001(\003\022\016\n\006key_id\030\006 \001(\t\"!\n\014Sig" + "nResponse\022\021\n\tsignature\030\001 \001(\014\"\242\001\n\rVerifyR" + "equest\022\021\n\tsender_id\030\001 \001(\005\022\023\n\013receiver_id" + "\030\002 \001(\005\022\014\n\004data\030\003 \001(\014\022\021\n\tsignature\030\004 \001(\014\022" + "\'\n\thash_func\030\005 \001(\0162\024.crypto.SHAAlgorithm" + "\022\016\n\006key_id\030\006 \001(\t\022\017\n\007counter\030\007 \001(\005\",\n\016Ver" + "ifyResponse\022\r\n\005valid\030\001 \001(\010\022\013\n\003out\030\002 \001(\014\"" + "\035\n\nKeyRequest\022\017\n\007user_id\030\001 \001(\005\"\032\n\013KeyRes" + "ponse\022\013\n\003key\030\001 \001(\t\"P\n\022UserKeyPermissions" + "\022\016\n\006userId\030\001 \001(\005\022*\n\013permissions\030\002 \003(\0162\025." + "crypto.KeyPermission\"L\n\021BootSystemReques" + "t\0227\n\023usersIdsPermissions\030\001 \003(\0132\032.crypto." + "UserKeyPermissions\"\007\n\005Empty\"\320\001\n\014CryptoCo" + "nfig\022*\n\014hashFunction\030\001 \001(\0162\024.crypto.SHAA" + "lgorithm\022*\n\014aesKeyLength\030\002 \001(\0162\024.crypto." + "AESKeyLength\0220\n\017aesChainingMode\030\003 \001(\0162\027." + "crypto.AESChainingMode\0226\n\022asymmetricFunc" + "tion\030\004 \001(\0162\032.crypto.AsymmetricFunction\"H" + "\n\020ConfigureRequest\022\016\n\006userId\030\001 \001(\005\022$\n\006co" + "nfig\030\002 \001(\0132\024.crypto.CryptoConfig\"O\n\021AddP" + "rocessRequest\022\016\n\006userId\030\001 \001(\005\022*\n\013permiss" + "ions\030\002 \003(\0162\025.crypto.KeyPermission\"h\n\016Enc" + "ryptRequest\022\021\n\tsender_id\030\001 \001(\005\022\023\n\013receiv" + "er_id\030\002 \001(\005\022\014\n\004data\030\003 \001(\014\022\017\n\007counter\030\004 \001" + "(\003\022\017\n\007isFirst\030\005 \001(\010\"<\n\017EncryptResponse\022\026" + "\n\016encrypted_data\030\001 \001(\014\022\021\n\tsignature\030\002 \001(" + "\014\"\205\001\n\016DecryptRequest\022\021\n\tsender_id\030\001 \001(\005\022" + "\023\n\013receiver_id\030\002 \001(\005\022\026\n\016encrypted_data\030\003" + " \001(\014\022\017\n\007counter\030\004 \001(\003\022\021\n\tsignature\030\005 \001(\014" + "\022\017\n\007isFirst\030\006 \001(\010\")\n\017DecryptResponse\022\026\n\016" + "decrypted_data\030\001 \001(\014\"\376\001\n\021AESEncryptReque" + "st\022\021\n\tsender_id\030\001 \001(\005\022\023\n\013receiver_id\030\002 \001" + "(\005\022\014\n\004data\030\003 \001(\014\022(\n\004func\030\004 \001(\0162\032.crypto." + "AsymmetricFunction\022\017\n\007counter\030\005 \001(\003\022\016\n\006k" + "ey_id\030\006 \001(\t\022(\n\nkey_length\030\007 \001(\0162\024.crypto" + ".AESKeyLength\022-\n\014chainingMode\030\010 \001(\0162\027.cr" + "ypto.AESChainingMode\022\017\n\007isFirst\030\t \001(\010\",\n" + "\022AESEncryptResponse\022\026\n\016encrypted_data\030\001 " + "\001(\014\"\243\002\n\021AESDecryptRequest\022\021\n\tsender_id\030\001" + " \001(\005\022\023\n\013receiver_id\030\002 \001(\005\022\017\n\007data_in\030\003 \001" + "(\014\022\016\n\006in_len\030\004 \001(\005\022\020\n\010data_out\030\005 \001(\014\022(\n\004" + "func\030\006 \001(\0162\032.crypto.AsymmetricFunction\022(" + "\n\nkey_length\030\007 \001(\0162\024.crypto.AESKeyLength" + "\022-\n\014chainingMode\030\010 \001(\0162\027.crypto.AESChain" + "ingMode\022\017\n\007counter\030\t \001(\003\022\016\n\006key_id\030\n \001(\t" + "\022\017\n\007isFirst\030\013 \001(\010\",\n\022AESDecryptResponse\022" + "\026\n\016decrypted_data\030\001 \001(\014*O\n\rKeyPermission" + "\022\n\n\006VERIFY\020\000\022\010\n\004SIGN\020\001\022\013\n\007ENCRYPT\020\002\022\013\n\007D" + "ECRYPT\020\003\022\016\n\nEXPORTABLE\020\004*>\n\017AESChainingM" + "ode\022\007\n\003ECB\020\000\022\007\n\003CBC\020\001\022\007\n\003CFB\020\002\022\007\n\003OFB\020\003\022" + "\007\n\003CTR\020\004*&\n\022AsymmetricFunction\022\007\n\003RSA\020\000\022" + "\007\n\003ECC\020\001*(\n\014SHAAlgorithm\022\n\n\006SHA256\020\000\022\014\n\010" + "SHA3_512\020\001*5\n\014AESKeyLength\022\013\n\007AES_128\020\000\022" + "\013\n\007AES_192\020\001\022\013\n\007AES_256\020\0022\231\021\n\rCryptoServ" + "ice\0226\n\nbootSystem\022\031.crypto.BootSystemReq" + "uest\032\r.crypto.Empty\0227\n\013addProccess\022\031.cry" + "pto.AddProcessRequest\032\r.crypto.Empty\0224\n\t" + "configure\022\030.crypto.ConfigureRequest\032\r.cr" + "ypto.Empty\022O\n\016generateAESKey\022\035.crypto.Ge" + "nerateAESKeyRequest\032\036.crypto.GenerateAES" + "KeyResponse\022U\n\022generateRSAKeyPair\022\036.cryp" + "to.GenerateKeyPairRequest\032\037.crypto.Gener" + "ateKeyPairResponse\022U\n\022generateECCKeyPair" + "\022\036.crypto.GenerateKeyPairRequest\032\037.crypt" + "o.GenerateKeyPairResponse\022N\n\023getSignedDa" + "taLength\022\034.crypto.GetHashLengthRequest\032\031" + ".crypto.GetLengthResponse\022L\n\025getECCencry" + "ptedLength\022\030.crypto.GetLengthRequest\032\031.c" + "rypto.GetLengthResponse\022L\n\025getECCDecrypt" + "edLength\022\030.crypto.GetLengthRequest\032\031.cry" + "pto.GetLengthResponse\022L\n\025getRSAencrypted" + "Length\022\030.crypto.GetLengthRequest\032\031.crypt" + "o.GetLengthResponse\022L\n\025getRSAdecryptedLe" + "ngth\022\030.crypto.GetLengthRequest\032\031.crypto." + "GetLengthResponse\022O\n\025getAESencryptedLeng" + "th\022\033.crypto.GetAESLengthRequest\032\031.crypto" + ".GetLengthResponse\022O\n\025getAESdecryptedLen" + "gth\022\033.crypto.GetAESLengthRequest\032\031.crypt" + "o.GetLengthResponse\022D\n\017getEncryptedLen\022\026" + ".crypto.GetWholeLength\032\031.crypto.GetLengt" + "hResponse\022D\n\017getDecryptedLen\022\026.crypto.Ge" + "tWholeLength\032\031.crypto.GetLengthResponse\022" + "1\n\004sign\022\023.crypto.SignRequest\032\024.crypto.Si" + "gnResponse\0227\n\006verify\022\025.crypto.VerifyRequ" + "est\032\026.crypto.VerifyResponse\022B\n\027getPublic" + "ECCKeyByUserId\022\022.crypto.KeyRequest\032\023.cry" + "pto.KeyResponse\022B\n\027getPublicRSAKeyByUser" + "Id\022\022.crypto.KeyRequest\032\023.crypto.KeyRespo" + "nse\022O\n\nECCencrypt\022\037.crypto.AsymetricEncr" + "yptRequest\032 .crypto.AsymetricEncryptResp" + "onse\022O\n\nECCdecrypt\022\037.crypto.AsymetricDec" + "ryptRequest\032 .crypto.AsymetricDecryptRes" + "ponse\022O\n\nRSAencrypt\022\037.crypto.AsymetricEn" + "cryptRequest\032 .crypto.AsymetricEncryptRe" + "sponse\022O\n\nRSAdecrypt\022\037.crypto.AsymetricD" + "ecryptRequest\032 .crypto.AsymetricDecryptR" + "esponse\022C\n\nAESencrypt\022\031.crypto.AESEncryp" + "tRequest\032\032.crypto.AESEncryptResponse\022C\n\n" + "AESdecrypt\022\031.crypto.AESDecryptRequest\032\032." + "crypto.AESDecryptResponse\022:\n\007encrypt\022\026.c" + "rypto.EncryptRequest\032\027.crypto.EncryptRes" + "ponse\022:\n\007decrypt\022\026.crypto.DecryptRequest" + "\032\027.crypto.DecryptResponse\0227\n\nsignUpdate\022" + "\023.crypto.SignRequest\032\024.crypto.SignRespon" + "se\0229\n\014signFinalize\022\023.crypto.SignRequest\032" + "\024.crypto.SignResponse\022=\n\014verifyUpdate\022\025." + "crypto.VerifyRequest\032\026.crypto.VerifyResp" + "onse\022\?\n\016verifyFinalize\022\025.crypto.VerifyRe" + "quest\032\026.crypto.VerifyResponseb\006proto3" ; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_proto_2fencryption_2eproto_once; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_proto_2fencryption_2eproto = { - false, false, 5346, descriptor_table_protodef_proto_2fencryption_2eproto, "proto/encryption.proto", + false, false, 5397, descriptor_table_protodef_proto_2fencryption_2eproto, "proto/encryption.proto", &descriptor_table_proto_2fencryption_2eproto_once, nullptr, 0, 33, schemas, file_default_instances, TableStruct_proto_2fencryption_2eproto::offsets, file_level_metadata_proto_2fencryption_2eproto, file_level_enum_descriptors_proto_2fencryption_2eproto, file_level_service_descriptors_proto_2fencryption_2eproto, @@ -2813,16 +2820,16 @@ GetWholeLength::GetWholeLength(const GetWholeLength& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::memcpy(&senderid_, &from.senderid_, - static_cast(reinterpret_cast(&inlen_) - - reinterpret_cast(&senderid_)) + sizeof(inlen_)); + static_cast(reinterpret_cast(&isfirst_) - + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); // @@protoc_insertion_point(copy_constructor:crypto.GetWholeLength) } void GetWholeLength::SharedCtor() { ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&senderid_) - reinterpret_cast(this)), - 0, static_cast(reinterpret_cast(&inlen_) - - reinterpret_cast(&senderid_)) + sizeof(inlen_)); + 0, static_cast(reinterpret_cast(&isfirst_) - + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); } GetWholeLength::~GetWholeLength() { @@ -2853,8 +2860,8 @@ void GetWholeLength::Clear() { (void) cached_has_bits; ::memset(&senderid_, 0, static_cast( - reinterpret_cast(&inlen_) - - reinterpret_cast(&senderid_)) + sizeof(inlen_)); + reinterpret_cast(&isfirst_) - + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -2880,6 +2887,14 @@ const char* GetWholeLength::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE } else goto handle_unusual; continue; + // bool isFirst = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + isfirst_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -2921,6 +2936,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* GetWholeLength::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_inlen(), target); } + // bool isFirst = 3; + if (this->_internal_isfirst() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_isfirst(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -2947,6 +2968,11 @@ size_t GetWholeLength::ByteSizeLong() const { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_inlen()); } + // bool isFirst = 3; + if (this->_internal_isfirst() != 0) { + total_size += 1 + 1; + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); } @@ -2975,6 +3001,9 @@ void GetWholeLength::MergeFrom(const GetWholeLength& from) { if (from._internal_inlen() != 0) { _internal_set_inlen(from._internal_inlen()); } + if (from._internal_isfirst() != 0) { + _internal_set_isfirst(from._internal_isfirst()); + } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -2993,8 +3022,8 @@ void GetWholeLength::InternalSwap(GetWholeLength* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(GetWholeLength, inlen_) - + sizeof(GetWholeLength::inlen_) + PROTOBUF_FIELD_OFFSET(GetWholeLength, isfirst_) + + sizeof(GetWholeLength::isfirst_) - PROTOBUF_FIELD_OFFSET(GetWholeLength, senderid_)>( reinterpret_cast(&senderid_), reinterpret_cast(&other->senderid_)); @@ -7675,8 +7704,8 @@ AESEncryptRequest::AESEncryptRequest(const AESEncryptRequest& from) GetArenaForAllocation()); } ::memcpy(&sender_id_, &from.sender_id_, - static_cast(reinterpret_cast(&chainingmode_) - - reinterpret_cast(&sender_id_)) + sizeof(chainingmode_)); + static_cast(reinterpret_cast(&isfirst_) - + reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); // @@protoc_insertion_point(copy_constructor:crypto.AESEncryptRequest) } @@ -7685,8 +7714,8 @@ data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlready key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&sender_id_) - reinterpret_cast(this)), - 0, static_cast(reinterpret_cast(&chainingmode_) - - reinterpret_cast(&sender_id_)) + sizeof(chainingmode_)); + 0, static_cast(reinterpret_cast(&isfirst_) - + reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); } AESEncryptRequest::~AESEncryptRequest() { @@ -7721,8 +7750,8 @@ void AESEncryptRequest::Clear() { data_.ClearToEmpty(); key_id_.ClearToEmpty(); ::memset(&sender_id_, 0, static_cast( - reinterpret_cast(&chainingmode_) - - reinterpret_cast(&sender_id_)) + sizeof(chainingmode_)); + reinterpret_cast(&isfirst_) - + reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -7802,6 +7831,14 @@ const char* AESEncryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP } else goto handle_unusual; continue; + // bool isFirst = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + isfirst_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -7886,6 +7923,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AESEncryptRequest::_InternalSerialize( 8, this->_internal_chainingmode(), target); } + // bool isFirst = 9; + if (this->_internal_isfirst() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_isfirst(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -7949,6 +7992,11 @@ size_t AESEncryptRequest::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_chainingmode()); } + // bool isFirst = 9; + if (this->_internal_isfirst() != 0) { + total_size += 1 + 1; + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); } @@ -7995,6 +8043,9 @@ void AESEncryptRequest::MergeFrom(const AESEncryptRequest& from) { if (from._internal_chainingmode() != 0) { _internal_set_chainingmode(from._internal_chainingmode()); } + if (from._internal_isfirst() != 0) { + _internal_set_isfirst(from._internal_isfirst()); + } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -8025,8 +8076,8 @@ void AESEncryptRequest::InternalSwap(AESEncryptRequest* other) { &other->key_id_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(AESEncryptRequest, chainingmode_) - + sizeof(AESEncryptRequest::chainingmode_) + PROTOBUF_FIELD_OFFSET(AESEncryptRequest, isfirst_) + + sizeof(AESEncryptRequest::isfirst_) - PROTOBUF_FIELD_OFFSET(AESEncryptRequest, sender_id_)>( reinterpret_cast(&sender_id_), reinterpret_cast(&other->sender_id_)); @@ -8264,8 +8315,8 @@ AESDecryptRequest::AESDecryptRequest(const AESDecryptRequest& from) GetArenaForAllocation()); } ::memcpy(&sender_id_, &from.sender_id_, - static_cast(reinterpret_cast(&counter_) - - reinterpret_cast(&sender_id_)) + sizeof(counter_)); + static_cast(reinterpret_cast(&isfirst_) - + reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); // @@protoc_insertion_point(copy_constructor:crypto.AESDecryptRequest) } @@ -8275,8 +8326,8 @@ data_out_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlr key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&sender_id_) - reinterpret_cast(this)), - 0, static_cast(reinterpret_cast(&counter_) - - reinterpret_cast(&sender_id_)) + sizeof(counter_)); + 0, static_cast(reinterpret_cast(&isfirst_) - + reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); } AESDecryptRequest::~AESDecryptRequest() { @@ -8313,8 +8364,8 @@ void AESDecryptRequest::Clear() { data_out_.ClearToEmpty(); key_id_.ClearToEmpty(); ::memset(&sender_id_, 0, static_cast( - reinterpret_cast(&counter_) - - reinterpret_cast(&sender_id_)) + sizeof(counter_)); + reinterpret_cast(&isfirst_) - + reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -8411,6 +8462,14 @@ const char* AESDecryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP } else goto handle_unusual; continue; + // bool isFirst = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { + isfirst_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -8507,6 +8566,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AESDecryptRequest::_InternalSerialize( 10, this->_internal_key_id(), target); } + // bool isFirst = 11; + if (this->_internal_isfirst() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_isfirst(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -8582,6 +8647,11 @@ size_t AESDecryptRequest::ByteSizeLong() const { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_counter()); } + // bool isFirst = 11; + if (this->_internal_isfirst() != 0) { + total_size += 1 + 1; + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); } @@ -8634,6 +8704,9 @@ void AESDecryptRequest::MergeFrom(const AESDecryptRequest& from) { if (from._internal_counter() != 0) { _internal_set_counter(from._internal_counter()); } + if (from._internal_isfirst() != 0) { + _internal_set_isfirst(from._internal_isfirst()); + } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -8669,8 +8742,8 @@ void AESDecryptRequest::InternalSwap(AESDecryptRequest* other) { &other->key_id_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(AESDecryptRequest, counter_) - + sizeof(AESDecryptRequest::counter_) + PROTOBUF_FIELD_OFFSET(AESDecryptRequest, isfirst_) + + sizeof(AESDecryptRequest::isfirst_) - PROTOBUF_FIELD_OFFSET(AESDecryptRequest, sender_id_)>( reinterpret_cast(&sender_id_), reinterpret_cast(&other->sender_id_)); diff --git a/proto/encryption.pb.h b/hsm/proto/encryption.pb.h similarity index 99% rename from proto/encryption.pb.h rename to hsm/proto/encryption.pb.h index 3b5088b4..141822eb 100644 --- a/proto/encryption.pb.h +++ b/hsm/proto/encryption.pb.h @@ -1699,6 +1699,7 @@ class GetWholeLength final : enum : int { kSenderIdFieldNumber = 1, kInLenFieldNumber = 2, + kIsFirstFieldNumber = 3, }; // int32 senderId = 1; void clear_senderid(); @@ -1718,6 +1719,15 @@ class GetWholeLength final : void _internal_set_inlen(::PROTOBUF_NAMESPACE_ID::int32 value); public: + // bool isFirst = 3; + void clear_isfirst(); + bool isfirst() const; + void set_isfirst(bool value); + private: + bool _internal_isfirst() const; + void _internal_set_isfirst(bool value); + public: + // @@protoc_insertion_point(class_scope:crypto.GetWholeLength) private: class _Internal; @@ -1727,6 +1737,7 @@ class GetWholeLength final : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::int32 senderid_; ::PROTOBUF_NAMESPACE_ID::int32 inlen_; + bool isfirst_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -5182,6 +5193,7 @@ class AESEncryptRequest final : kFuncFieldNumber = 4, kKeyLengthFieldNumber = 7, kChainingModeFieldNumber = 8, + kIsFirstFieldNumber = 9, }; // bytes data = 3; void clear_data(); @@ -5265,6 +5277,15 @@ class AESEncryptRequest final : void _internal_set_chainingmode(::crypto::AESChainingMode value); public: + // bool isFirst = 9; + void clear_isfirst(); + bool isfirst() const; + void set_isfirst(bool value); + private: + bool _internal_isfirst() const; + void _internal_set_isfirst(bool value); + public: + // @@protoc_insertion_point(class_scope:crypto.AESEncryptRequest) private: class _Internal; @@ -5280,6 +5301,7 @@ class AESEncryptRequest final : int func_; int key_length_; int chainingmode_; + bool isfirst_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -5562,6 +5584,7 @@ class AESDecryptRequest final : kKeyLengthFieldNumber = 7, kChainingModeFieldNumber = 8, kCounterFieldNumber = 9, + kIsFirstFieldNumber = 11, }; // bytes data_in = 3; void clear_data_in(); @@ -5668,6 +5691,15 @@ class AESDecryptRequest final : void _internal_set_counter(::PROTOBUF_NAMESPACE_ID::int64 value); public: + // bool isFirst = 11; + void clear_isfirst(); + bool isfirst() const; + void set_isfirst(bool value); + private: + bool _internal_isfirst() const; + void _internal_set_isfirst(bool value); + public: + // @@protoc_insertion_point(class_scope:crypto.AESDecryptRequest) private: class _Internal; @@ -5685,6 +5717,7 @@ class AESDecryptRequest final : int key_length_; int chainingmode_; ::PROTOBUF_NAMESPACE_ID::int64 counter_; + bool isfirst_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -6375,6 +6408,26 @@ inline void GetWholeLength::set_inlen(::PROTOBUF_NAMESPACE_ID::int32 value) { // @@protoc_insertion_point(field_set:crypto.GetWholeLength.inLen) } +// bool isFirst = 3; +inline void GetWholeLength::clear_isfirst() { + isfirst_ = false; +} +inline bool GetWholeLength::_internal_isfirst() const { + return isfirst_; +} +inline bool GetWholeLength::isfirst() const { + // @@protoc_insertion_point(field_get:crypto.GetWholeLength.isFirst) + return _internal_isfirst(); +} +inline void GetWholeLength::_internal_set_isfirst(bool value) { + + isfirst_ = value; +} +inline void GetWholeLength::set_isfirst(bool value) { + _internal_set_isfirst(value); + // @@protoc_insertion_point(field_set:crypto.GetWholeLength.isFirst) +} + // ------------------------------------------------------------------- // GenerateAESKeyRequest @@ -8315,6 +8368,26 @@ inline void AESEncryptRequest::set_chainingmode(::crypto::AESChainingMode value) // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.chainingMode) } +// bool isFirst = 9; +inline void AESEncryptRequest::clear_isfirst() { + isfirst_ = false; +} +inline bool AESEncryptRequest::_internal_isfirst() const { + return isfirst_; +} +inline bool AESEncryptRequest::isfirst() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.isFirst) + return _internal_isfirst(); +} +inline void AESEncryptRequest::_internal_set_isfirst(bool value) { + + isfirst_ = value; +} +inline void AESEncryptRequest::set_isfirst(bool value) { + _internal_set_isfirst(value); + // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.isFirst) +} + // ------------------------------------------------------------------- // AESEncryptResponse @@ -8647,6 +8720,26 @@ inline void AESDecryptRequest::set_allocated_key_id(std::string* key_id) { // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptRequest.key_id) } +// bool isFirst = 11; +inline void AESDecryptRequest::clear_isfirst() { + isfirst_ = false; +} +inline bool AESDecryptRequest::_internal_isfirst() const { + return isfirst_; +} +inline bool AESDecryptRequest::isfirst() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.isFirst) + return _internal_isfirst(); +} +inline void AESDecryptRequest::_internal_set_isfirst(bool value) { + + isfirst_ = value; +} +inline void AESDecryptRequest::set_isfirst(bool value) { + _internal_set_isfirst(value); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.isFirst) +} + // ------------------------------------------------------------------- // AESDecryptResponse diff --git a/proto/encryption.proto b/hsm/proto/encryption.proto similarity index 98% rename from proto/encryption.proto rename to hsm/proto/encryption.proto index 7c548500..4fab3eab 100644 --- a/proto/encryption.proto +++ b/hsm/proto/encryption.proto @@ -67,6 +67,8 @@ message GetLengthResponse { message GetWholeLength{ int32 senderId = 1; int32 inLen = 2; + bool isFirst = 3; + } message GenerateAESKeyRequest { int32 user_id = 1; @@ -168,6 +170,7 @@ message AESEncryptRequest { string key_id = 6; AESKeyLength key_length = 7; AESChainingMode chainingMode = 8; + bool isFirst = 9; } message AESEncryptResponse { bytes encrypted_data = 1; @@ -176,13 +179,14 @@ message AESDecryptRequest { int32 sender_id=1; int32 receiver_id = 2; bytes data_in = 3; - int32 in_len=4; + int32 in_len = 4; bytes data_out = 5; AsymmetricFunction func = 6; AESKeyLength key_length = 7; AESChainingMode chainingMode=8; int64 counter = 9; string key_id = 10; + bool isFirst = 11; } message AESDecryptResponse { bytes decrypted_data = 1; diff --git a/shared_log_file_name.txt b/hsm/shared_log_file_name.txt similarity index 100% rename from shared_log_file_name.txt rename to hsm/shared_log_file_name.txt diff --git a/src/SHA3-512.cpp b/hsm/src/SHA3-512.cpp similarity index 100% rename from src/SHA3-512.cpp rename to hsm/src/SHA3-512.cpp diff --git a/src/aes.cpp b/hsm/src/aes.cpp similarity index 94% rename from src/aes.cpp rename to hsm/src/aes.cpp index 0ff1d820..aabf219a 100644 --- a/src/aes.cpp +++ b/hsm/src/aes.cpp @@ -29,19 +29,10 @@ void generateRandomIV(unsigned char *iv) std::uniform_int_distribution<> dis(0, 255); for (unsigned int i = 0; i < BLOCK_BYTES_LEN; i++) iv[i] = static_cast(dis(gen)); + //TODO delete this! + std::memset(iv, 01, BLOCK_BYTES_LEN); } -/** - * @brief Calculates the padded length for the given original data length. - * - * This function computes the length that the original data needs to be - * padded to, ensuring that it is a multiple of the block size (BLOCK_BYTES_LEN). - * If the original length is already a multiple of the block size, an additional - * block size is added to the padded length. - * - * @param originalLength The original length of the data. - * @return The padded length of the data, rounded up to the nearest block size. - */ unsigned int getPaddedLength(unsigned int originalLength) { unsigned int paddedLength = @@ -89,6 +80,8 @@ unsigned int getUnpadMessageLength(unsigned char *message, */ void generateKey(unsigned char *key, AESKeyLength keyLength) { + // Allocate memory for the key + // Initialize a random device and a random number generator std::random_device rd; std::mt19937 gen(rd()); @@ -97,7 +90,7 @@ void generateKey(unsigned char *key, AESKeyLength keyLength) // Fill the key with random bytes for (int i = 0; i < aesKeyLengthData[keyLength].keySize; i++) key[i] = dis(gen); - + memset(key, 0, aesKeyLengthData[keyLength].keySize); } /** @@ -904,19 +897,6 @@ void xorBlocks(const unsigned char *a, const unsigned char *b, unsigned char *c, } } -/** - * @brief Calculates the total length of the encrypted data, including padding and IV if applicable. - * - * This function determines the final size of the encrypted output based on the input length, - * whether it's the first block (which may require an IV), and the AES chaining mode being used. - * If the input length is a multiple of the block size, padding is added. In non-ECB modes, - * an IV (Initialization Vector) is added if this is the first block. - * - * @param inLen The length of the input data to be encrypted. - * @param isFirst Indicates if this is the first block of data. - * @param chainingMode The AES chaining mode (e.g., ECB, CBC). - * @return The total length of the encrypted output, including padding and IV. - */ size_t calculatEncryptedLenAES(size_t inLen, bool isFirst, AESChainingMode chainingMode) { @@ -927,18 +907,6 @@ size_t calculatEncryptedLenAES(size_t inLen, bool isFirst, return (inLen + 15) & ~15; } -/** - * @brief Calculates the decrypted data length, adjusting for the IV if applicable. - * - * This function determines the length of the decrypted output based on the input length - * (which includes padding and potentially an IV). If this is the first block and a non-ECB - * mode is used, the function subtracts the IV size from the input length. - * - * @param inLen The length of the encrypted input data. - * @param isFirst Indicates if this is the first block of data. - * @param chainingMode The AES chaining mode (e.g., ECB, CBC). - * @return The length of the decrypted output, adjusted for IV. - */ size_t calculatDecryptedLenAES(size_t inLen, bool isFirst, AESChainingMode chainingMode) { @@ -947,5 +915,4 @@ size_t calculatDecryptedLenAES(size_t inLen, bool isFirst, return inLen; } - #endif \ No newline at end of file diff --git a/src/aes_cbc.cpp b/hsm/src/aes_cbc.cpp similarity index 50% rename from src/aes_cbc.cpp rename to hsm/src/aes_cbc.cpp index 44809cd5..d6fc07d2 100644 --- a/src/aes_cbc.cpp +++ b/hsm/src/aes_cbc.cpp @@ -1,19 +1,6 @@ #include "../include/aes_stream.h" #include -/** - * @brief Initializes the AES CBC encryption process. - * - * This function generates a random IV, performs AES encryption on the input block, - * and stores the last encrypted block to be used in the continuation of the encryption process. - * - * @param block The input data block to be encrypted. - * @param inLen The length of the input block. - * @param out The output buffer to store the encrypted data. - * @param outLen The length of the output buffer. - * @param key The AES key used for encryption. - * @param keyLength The length of the AES key (128, 192, or 256 bits). - */ void AESCbc::encryptStart(unsigned char block[], unsigned int inLen, unsigned char *out, unsigned int outLen, unsigned char *key, AESKeyLength keyLength) @@ -28,16 +15,6 @@ void AESCbc::encryptStart(unsigned char block[], unsigned int inLen, this->keyLength = keyLength; } -/** - * @brief Continues the AES CBC encryption process. - * - * This function encrypts additional data blocks, using the last encrypted block as IV for the next block. - * - * @param block The input data block to be encrypted. - * @param inLen The length of the input block. - * @param out The output buffer to store the encrypted data. - * @param outLen The length of the output buffer. - */ void AESCbc::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char *out, unsigned int outLen) { @@ -45,19 +22,6 @@ void AESCbc::encryptContinue(unsigned char block[], unsigned int inLen, memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } -/** - * @brief Initializes the AES CBC decryption process. - * - * This function retrieves the IV from the input block, performs AES decryption, - * and stores the last block to be used in the continuation of the decryption process. - * - * @param block The input data block to be decrypted. - * @param inLen The length of the input block. - * @param out The output buffer to store the decrypted data. - * @param outLen The length of the output buffer (output parameter). - * @param key The AES key used for decryption. - * @param keyLength The length of the AES key (128, 192, or 256 bits). - */ void AESCbc::decryptStart(unsigned char block[], unsigned int inLen, unsigned char *out, unsigned int &outLen, unsigned char *key, AESKeyLength keyLength) @@ -68,16 +32,6 @@ void AESCbc::decryptStart(unsigned char block[], unsigned int inLen, memcpy(lastBlock, block + inLen - 2 * BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } -/** - * @brief Continues the AES CBC decryption process. - * - * This function decrypts additional data blocks, using the last encrypted block as IV for the next block. - * - * @param block The input data block to be decrypted. - * @param inLen The length of the input block. - * @param out The output buffer to store the decrypted data. - * @param outLen The length of the output buffer (output parameter). - */ void AESCbc::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char *out, unsigned int &outLen) { @@ -85,21 +39,6 @@ void AESCbc::decryptContinue(unsigned char block[], unsigned int inLen, memcpy(lastBlock, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } -/** - * @brief Encrypts a padded message using AES in CBC mode. - * - * This function performs AES encryption on padded input data in CBC mode. - * It generates the round keys and applies XOR between the current block and the previous ciphertext block. - * - * @param in The input data to be encrypted (padded). - * @param inLen The length of the input data. - * @param key The AES key used for encryption. - * @param out The output buffer to store the encrypted data. - * @param outLen The length of the output buffer. - * @param iv The initialization vector used for the first encryption block. - * @param lastData Optional parameter for chaining blocks (not used in this implementation). - * @param keyLength The length of the AES key (128, 192, or 256 bits). - */ void AESCbc::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, unsigned char *out, unsigned int outLen, const unsigned char *iv, unsigned char *lastData, @@ -123,21 +62,6 @@ void AESCbc::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, delete[] roundKeys; } -/** - * @brief Decrypts an AES-encrypted message using CBC mode. - * - * This function performs AES decryption on the input data in CBC mode. - * It generates the round keys, decrypts the input, and applies XOR between the current ciphertext block and the previous block. - * - * @param in The input data to be decrypted. - * @param inLen The length of the input data. - * @param key The AES key used for decryption. - * @param out The output buffer to store the decrypted data. - * @param outLen The length of the output buffer (output parameter). - * @param iv The initialization vector used for the first decryption block. - * @param lastData Optional parameter for chaining blocks (not used in this implementation). - * @param keyLength The length of the AES key (128, 192, or 256 bits). - */ void AESCbc::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, unsigned char *out, unsigned int &outLen, const unsigned char *iv, unsigned char *lastData, @@ -158,4 +82,4 @@ void AESCbc::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, } outLen = getUnpadMessageLength(out, inLen); delete[] roundKeys; -} +} \ No newline at end of file diff --git a/src/aes_cfb.cpp b/hsm/src/aes_cfb.cpp similarity index 100% rename from src/aes_cfb.cpp rename to hsm/src/aes_cfb.cpp diff --git a/src/aes_ctr.cpp b/hsm/src/aes_ctr.cpp similarity index 55% rename from src/aes_ctr.cpp rename to hsm/src/aes_ctr.cpp index 699e3280..6f222f02 100644 --- a/src/aes_ctr.cpp +++ b/hsm/src/aes_ctr.cpp @@ -4,17 +4,17 @@ #include /** - * Encrypts a single block of data using AES in CTR mode. - * This function handles the encryption of a single block in CTR (Counter) mode. - * It computes the counter value based on the given initialization vector (IV) and - * block index, encrypts the counter, and then XORs the encrypted counter with the - * input block to produce the output block. - * @param input Pointer to the input block of plaintext data (BLOCK_BYTES_LEN bytes). - * @param output Pointer to the output block where the encrypted ciphertext will be stored (BLOCK_BYTES_LEN bytes). - * @param roundKeys Pointer to the array of round keys used for AES encryption. - * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). - * @param iv Pointer to the initialization vector (IV) used for the counter. - * @param blockIndex The index of the current block to be encrypted, used to compute the counter value. + Encrypts a single block of data using AES in CTR mode. + This function handles the encryption of a single block in CTR (Counter) mode. + It computes the counter value based on the given initialization vector (IV) and + block index, encrypts the counter, and then XORs the encrypted counter with the + input block to produce the output block. + @param input Pointer to the input block of plaintext data (BLOCK_BYTES_LEN bytes). + @param output Pointer to the output block where the encrypted ciphertext will be stored (BLOCK_BYTES_LEN bytes). + @param roundKeys Pointer to the array of round keys used for AES encryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + @param iv Pointer to the initialization vector (IV) used for the counter. + @param blockIndex The index of the current block to be encrypted, used to compute the counter value. */ void encryptBlockThreadedCTR(const unsigned char *input, unsigned char *output, unsigned char *roundKeys, AESKeyLength keyLength, @@ -34,20 +34,22 @@ void encryptBlockThreadedCTR(const unsigned char *input, unsigned char *output, } encryptBlock(counter, block, roundKeys, keyLength); + xorBlocks(block, input, output, BLOCK_BYTES_LEN); } /** - * Encrypts multiple blocks of data using AES in CTR mode with multithreading. - * This function divides the input plaintext into blocks and encrypts each block - * in parallel using multiple threads in CTR (Counter) mode. Each thread is responsible - * for encrypting a separate block. - * @param plaintext Pointer to the input plaintext data to be encrypted. - * @param ciphertext Pointer to the buffer where the encrypted ciphertext will be stored. - * @param length The total length of the plaintext data (must be a multiple of BLOCK_BYTES_LEN). - * @param roundKeys Pointer to the array of round keys used for AES encryption. - * @param keyLength The length of the AES key being used. - * @param lastData Pointer to the initialization vector (IV) used for the counter. + Encrypts multiple blocks of data using AES in CTR mode with multithreading. + This function divides the input plaintext into blocks and encrypts each block + in parallel using multiple threads in CTR (Counter) mode. The function ensures + that each block is encrypted using AES with a counter value derived from the + initialization vector (IV) and block index, and all threads are joined before completing. + @param plaintext Pointer to the input plaintext data to be encrypted. + @param ciphertext Pointer to the buffer where the encrypted ciphertext will be stored. + @param length The total length of the plaintext data (must be a multiple of BLOCK_BYTES_LEN). + @param roundKeys Pointer to the array of round keys used for AES encryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + @param iv Pointer to the initialization vector (IV) used for the counter. */ void encryptCTRMultithreaded(const unsigned char *plaintext, unsigned char *ciphertext, unsigned int length, @@ -70,16 +72,17 @@ void encryptCTRMultithreaded(const unsigned char *plaintext, } /** - * Decrypts a single block of data using AES in CTR mode. - * The decryption in CTR mode is similar to encryption. This function handles - * the decryption of a single block by computing the counter value and applying - * XOR between the encrypted counter and the ciphertext. - * @param input Pointer to the input block of ciphertext data (BLOCK_BYTES_LEN bytes). - * @param output Pointer to the output block where the decrypted plaintext will be stored. - * @param roundKeys Pointer to the array of round keys used for AES encryption. - * @param keyLength The length of the AES key being used. - * @param iv Pointer to the initialization vector (IV) used for the counter. - * @param blockIndex The index of the current block to be decrypted. + Decrypts a single block of data using AES in CTR mode. + This function handles the decryption of a single block in CTR (Counter) mode. + It computes the counter value based on the given initialization vector (IV) and + block index, encrypts the counter, and then XORs the encrypted counter with the + input block to produce the output block. + @param input Pointer to the input block of ciphertext data (BLOCK_BYTES_LEN bytes). + @param output Pointer to the output block where the decrypted plaintext will be stored (BLOCK_BYTES_LEN bytes). + @param roundKeys Pointer to the array of round keys used for AES encryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + @param iv Pointer to the initialization vector (IV) used for the counter. + @param blockIndex The index of the current block to be decrypted, used to compute the counter value. */ void decryptBlockThreadedCTR(const unsigned char *input, unsigned char *output, unsigned char *roundKeys, AESKeyLength keyLength, @@ -99,19 +102,22 @@ void decryptBlockThreadedCTR(const unsigned char *input, unsigned char *output, } encryptBlock(counter, block, roundKeys, keyLength); + xorBlocks(block, input, output, BLOCK_BYTES_LEN); } /** - * Decrypts multiple blocks of data using AES in CTR mode with multithreading. - * This function divides the input ciphertext into blocks and decrypts each block - * in parallel using multiple threads. Each thread is responsible for decrypting a separate block. - * @param ciphertext Pointer to the input ciphertext data to be decrypted. - * @param plaintext Pointer to the buffer where the decrypted plaintext will be stored. - * @param length The total length of the ciphertext data (must be a multiple of BLOCK_BYTES_LEN). - * @param roundKeys Pointer to the array of round keys used for AES encryption. - * @param keyLength The length of the AES key being used. - * @param iv Pointer to the initialization vector (IV) used for the counter. + Decrypts multiple blocks of data using AES in CTR mode with multithreading. + This function divides the input ciphertext into blocks and decrypts each block + in parallel using multiple threads in CTR (Counter) mode. The function ensures + that each block is decrypted using AES with a counter value derived from the + initialization vector (IV) and block index, and all threads are joined before completing. + @param ciphertext Pointer to the input ciphertext data to be decrypted. + @param plaintext Pointer to the buffer where the decrypted plaintext will be stored. + @param length The total length of the ciphertext data (must be a multiple of BLOCK_BYTES_LEN). + @param roundKeys Pointer to the array of round keys used for AES encryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + @param iv Pointer to the initialization vector (IV) used for the counter. */ void decryptCTRMultithreaded(const unsigned char *ciphertext, unsigned char *plaintext, unsigned int length, @@ -131,16 +137,6 @@ void decryptCTRMultithreaded(const unsigned char *ciphertext, th.join(); } -/** - * Initializes the encryption process using AES in CTR mode. - * It generates a random IV, encrypts the provided data, and stores the encrypted output. - * @param block Pointer to the input block of plaintext data. - * @param inLen Length of the input data. - * @param out Pointer to the output buffer where the encrypted data will be stored. - * @param outLen Length of the output buffer. - * @param key Pointer to the AES key. - * @param keyLength The length of the AES key being used. - */ void AESCtr::encryptStart(unsigned char block[], unsigned int inLen, unsigned char *out, unsigned int outLen, unsigned char *key, AESKeyLength keyLength) @@ -156,13 +152,6 @@ void AESCtr::encryptStart(unsigned char block[], unsigned int inLen, this->keyLength = keyLength; } -/** - * Continues the encryption process for subsequent blocks of data using AES in CTR mode. - * @param block Pointer to the input block of plaintext data. - * @param inLen Length of the input data. - * @param out Pointer to the output buffer where the encrypted data will be stored. - * @param outLen Length of the output buffer. - */ void AESCtr::encryptContinue(unsigned char block[], unsigned int inLen, unsigned char *out, unsigned int outLen) { @@ -170,16 +159,6 @@ void AESCtr::encryptContinue(unsigned char block[], unsigned int inLen, memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } -/** - * Initializes the decryption process using AES in CTR mode. - * It extracts the IV from the input, decrypts the data, and stores the plaintext output. - * @param block Pointer to the input block of ciphertext data. - * @param inLen Length of the input data. - * @param out Pointer to the output buffer where the decrypted data will be stored. - * @param outLen Reference to store the length of the decrypted data. - * @param key Pointer to the AES key. - * @param keyLength The length of the AES key being used. - */ void AESCtr::decryptStart(unsigned char block[], unsigned int inLen, unsigned char *out, unsigned int &outLen, unsigned char *key, AESKeyLength keyLength) @@ -191,17 +170,10 @@ void AESCtr::decryptStart(unsigned char block[], unsigned int inLen, memcpy(lastBlock, block + inLen - 2 * BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } -/** - * Continues the decryption process for subsequent blocks of data using AES in CTR mode. - * @param block Pointer to the input block of ciphertext data. - * @param inLen Length of the input data. - * @param out Pointer to the output buffer where the decrypted data will be stored. - * @param outLen Reference to store the length of the decrypted data. - */ void AESCtr::decryptContinue(unsigned char block[], unsigned int inLen, unsigned char *out, unsigned int &outLen) { - decrypt(block, inLen, key, out, outLen, lastBlock, lastData, keyLength); + decrypt(block, inLen, key, out, outLen, lastData, lastData, keyLength); memcpy(lastBlock, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); } diff --git a/hsm/src/aes_ecb.cpp b/hsm/src/aes_ecb.cpp new file mode 100644 index 00000000..489b7d09 --- /dev/null +++ b/hsm/src/aes_ecb.cpp @@ -0,0 +1,162 @@ +#include "../include/aes_stream.h" +#include +#include +#include +#include "../include/debug_utils.h" +#include "../include/aes_stream.h" +/** + Encrypts a single block of data using AES in ECB mode. + This function wraps the `encryptBlock` function to allow it to be used + in a threaded context. It performs AES encryption on a single block of + plaintext using the provided round keys and key length. + @param in Pointer to the input block of plaintext data (BLOCK_BYTES_LEN bytes). + @param out Pointer to the output block where the encrypted ciphertext will be stored (BLOCK_BYTES_LEN bytes). + @param roundKeys Pointer to the array of round keys used for AES encryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + */ +void encryptBlockThreadedECB(const unsigned char in[], unsigned char out[], + unsigned char *roundKeys, AESKeyLength keyLength) +{ + encryptBlock(in, out, roundKeys, keyLength); +} + +/** + Encrypts multiple blocks of data using AES in ECB mode with multithreading. + This function divides the input plaintext into blocks and encrypts each block + in parallel using multiple threads. The function ensures that each block is + encrypted using AES in ECB mode, and all threads are joined before completing. + @param plaintext Pointer to the input plaintext data to be encrypted. + @param ciphertext Pointer to the buffer where the encrypted ciphertext will be stored. + @param length The total length of the plaintext data (must be a multiple of BLOCK_BYTES_LEN). + @param roundKeys Pointer to the array of round keys used for AES encryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + */ +void encryptECBMultithreaded(const unsigned char *plaintext, + unsigned char *ciphertext, unsigned int length, + unsigned char *roundKeys, AESKeyLength keyLength) +{ + unsigned int numBlocks = length / BLOCK_BYTES_LEN; + std::vector threads; + + for (unsigned int i = 0; i < numBlocks; ++i) { + threads.push_back(std::thread( + encryptBlockThreadedECB, &plaintext[i * BLOCK_BYTES_LEN], + &ciphertext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); + } + + for (auto &th : threads) { + th.join(); + } +} + +/** + Decrypts a single block of data using AES in ECB mode. + This function wraps the `decryptBlock` function to allow it to be used + in a threaded context. It performs AES decryption on a single block of + ciphertext using the provided round keys and key length. + @param input Pointer to the input block of ciphertext data (BLOCK_BYTES_LEN bytes). + @param output Pointer to the output block where the decrypted plaintext will be stored (BLOCK_BYTES_LEN bytes). + @param roundKeys Pointer to the array of round keys used for AES decryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + */ +void decryptBlockThreadedECB(const unsigned char *input, unsigned char *output, + unsigned char *roundKeys, AESKeyLength keyLength) +{ + decryptBlock(input, output, roundKeys, keyLength); +} + +/** + Decrypts multiple blocks of data using AES in ECB mode with multithreading. + This function divides the input ciphertext into blocks and decrypts each block + in parallel using multiple threads in ECB (Electronic Codebook) mode. The function + ensures that each block is decrypted using AES with the provided round keys, and + all threads are joined before completing. + @param ciphertext Pointer to the input ciphertext data to be decrypted. + @param plaintext Pointer to the buffer where the decrypted plaintext will be stored. + @param length The total length of the ciphertext data (must be a multiple of BLOCK_BYTES_LEN). + @param roundKeys Pointer to the array of round keys used for AES decryption. + @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). + */ +void decryptECBMultithreaded(const unsigned char *ciphertext, + unsigned char *plaintext, unsigned int length, + unsigned char *roundKeys, AESKeyLength keyLength) +{ + unsigned int numBlocks = length / BLOCK_BYTES_LEN; + std::vector threads; + + for (unsigned int i = 0; i < numBlocks; i++) + threads.push_back(std::thread( + decryptBlockThreadedECB, &ciphertext[i * BLOCK_BYTES_LEN], + &plaintext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); + + for (auto &th : threads) + th.join(); +} + +void AESEcb::encryptStart(unsigned char block[], unsigned int inLen, + unsigned char *out, unsigned int outLen, + unsigned char *key, AESKeyLength keyLength) +{ + encrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); + this->key = new unsigned char[keyLength]; + memcpy(this->key, key, keyLength); + this->keyLength = keyLength; +} + +void AESEcb::encryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *out, unsigned int outLen) +{ + encrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); +} + +void AESEcb::decryptStart(unsigned char block[], unsigned int inLen, + unsigned char *out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength) +{ + decrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); +} + +void AESEcb::decryptContinue(unsigned char block[], unsigned int inLen, + unsigned char *out, unsigned int &outLen) +{ + decrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); +} + +void AESEcb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *out, unsigned int outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength) +{ + size_t paddedLength = getPaddedLength(inLen); + unsigned char *paddedIn = new unsigned char[paddedLength]; + padMessage(in, inLen, paddedIn); + unsigned char block[BLOCK_BYTES_LEN]; + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * + NUM_BLOCKS * 4]; + keyExpansion(key, roundKeys, keyLength); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) { + memcpy(block, paddedIn + i, BLOCK_BYTES_LEN); + encryptECBMultithreaded(block, out + i, BLOCK_BYTES_LEN, roundKeys, + keyLength); + } + delete[] paddedIn; + delete[] roundKeys; +} + +void AESEcb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, + unsigned char *out, unsigned int &outLen, + const unsigned char *iv, unsigned char *lastData, + AESKeyLength keyLength) +{ + checkLength(inLen); + outLen = inLen; + unsigned char *roundKeys = + new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * + NUM_BLOCKS * 4]; + keyExpansion(key, roundKeys, keyLength); + for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) + decryptECBMultithreaded(in, out, outLen, roundKeys, keyLength); + outLen = getUnpadMessageLength(out, inLen); + delete[] roundKeys; +} \ No newline at end of file diff --git a/src/aes_ofb.cpp b/hsm/src/aes_ofb.cpp similarity index 99% rename from src/aes_ofb.cpp rename to hsm/src/aes_ofb.cpp index 5620919d..9c42f1ad 100644 --- a/src/aes_ofb.cpp +++ b/hsm/src/aes_ofb.cpp @@ -1,4 +1,3 @@ - #include "../include/aes_stream.h" void AESOfb::encryptStart(unsigned char block[], unsigned int inLen, diff --git a/src/big_int10.cpp b/hsm/src/big_int10.cpp similarity index 100% rename from src/big_int10.cpp rename to hsm/src/big_int10.cpp diff --git a/src/big_int64.cpp b/hsm/src/big_int64.cpp similarity index 100% rename from src/big_int64.cpp rename to hsm/src/big_int64.cpp diff --git a/hsm/src/crypto_api.cpp b/hsm/src/crypto_api.cpp new file mode 100644 index 00000000..24b3d0f1 --- /dev/null +++ b/hsm/src/crypto_api.cpp @@ -0,0 +1,1552 @@ +#include +#include +#include +#include +#include +#include "../include/crypto_api.h" +#include "../include/hash_factory.h" +#include "../include/rsa.h" +#include "../include/temp_hsm.h" +#include "../logger/logger.h" +#include "../include/debug_utils.h" + +std::map> mapToInMiddleEncryptions; +std::map> mapToInMiddleDecryptions; +std::map, size_t>> mapToInMiddleHashing; + +constexpr size_t BITS_IN_BYTE = 8; +constexpr size_t ECC_CIPHER_LENGTH = 512; +constexpr size_t ECC_MAX_DECRYPTED_LENGTH = 256; + +std::string keyPermissionToString(KeyPermission permission) +{ + switch (permission) { + case VERIFY: + return "VERIFY"; + case SIGN: + return "SIGN"; + case ENCRYPT: + return "ENCRYPT"; + case DECRYPT: + return "DECRYPT"; + case EXPORTABLE: + return "EXPORTABLE"; + default: + return "UNKNOWN"; + } +} + +std::string permissionsToString(const std::vector &permissions) +{ + std::ostringstream oss; + for (size_t i = 0; i < permissions.size(); ++i) { + oss << keyPermissionToString(permissions[i]); + if (i != permissions.size() - 1) { + oss << ", "; + } + } + return oss.str(); +} + +/** + * @brief Boot the system by generating asymmetric keys for users. + * + * This function logs the start of the boot process, iterates over a map of user IDs and + * their associated key permissions, and generates ECC and RSA key pairs for each user. + * + * @param usersIdspermissions A map where each key is a user ID (int), and the value is a + * vector of KeyPermission objects representing the user's permissions. + * + * @return CKR_OK on successful completion of the key generation process. + */ +CK_RV bootSystem( + const std::map> &usersIdspermissions) +{ + log(logger::LogLevel::INFO, + "CryptoApi Boot System: Booting system started..."); + for (const auto &[userId, permissions] : usersIdspermissions) { + if (permissions.empty()) { + log(logger::LogLevel::ERROR, "User ID: " + std::to_string(userId) + + " did not send no permissions."); + return CKR_ARGUMENTS_BAD; + } + log(logger::LogLevel::INFO, + "Generating assymetric keys for User ID: " + + std::to_string(userId) + + ", Permissions: " + permissionsToString(permissions)); + TempHsm::getInstance().generateECCKeyPair(userId, permissions); + TempHsm::getInstance().generateRSAKeyPair(userId, permissions); + } + return CKR_OK; +} + +/** + * @brief Adds a user to the HSM by generating asymmetric keys for a user. + * + * This function adds a user to the HSM, it generates ECC and RSA + * key pairs for the specified user based on their permissions. + * + * @param userId The ID of the user that is being added. + * @param permissions A vector of KeyPermission objects representing the + * permissions associated with the user. + * + * @return CKR_OK on successful completion of the process. + */ +CK_RV addProccess(int userId, std::vector &permissions) +{ + log(logger::LogLevel::INFO, + "AddProccess: adding proccess...\n Generating " + "assymetric keys for user: "); + if (permissions.empty()) { + log(logger::LogLevel::ERROR, "User ID: " + std::to_string(userId) + + " did not send no permissions."); + return CKR_ARGUMENTS_BAD; + } + log(logger::LogLevel::INFO, + "User ID: " + std::to_string(userId) + + ", Permissions: " + permissionsToString(permissions)); + TempHsm::getInstance().generateECCKeyPair(userId, permissions); + TempHsm::getInstance().generateRSAKeyPair(userId, permissions); + + return CKR_OK; +} + +//Configures the encryption settings for a specific user. +CK_RV configure(int userId, CryptoConfig config) +{ + log(logger::LogLevel::INFO, + "Configure: configuring user: " + std::to_string(userId)); + TempHsm::getInstance().configure(userId, config); + return CKR_OK; +} + +//Logs and handles error conditions for operations with only input buffers. +CK_RV logAndHandleErrors(std::string action, int userId, void *in, size_t inLen, + bool isStarting) +{ + if (isStarting) + log(logger::LogLevel::INFO, + "Starting " + action + " for user ID: " + std::to_string(userId)); + + // Check if 'in' is nullptr or has zero length + if (in == nullptr || inLen == 0) { + log(logger::LogLevel::ERROR, + action + " failed for user ID: " + std::to_string(userId) + + ". An empty buffer was provided for " + action + "."); + return CKR_EMPTY_BUFFER; + } + + return CKR_OK; // Return success if no errors occurred +} + +//Logs and handles error conditions for encryption/decryption operations with input and output buffers. +CK_RV logAndHandleErrors(std::string action, int userId, std::string keyId, + void *in, size_t inLen, void *out, size_t outLen, + size_t requiredLength, bool isStarting) +{ + // if (isStarting) + // log(logger::LogLevel::INFO, + // "Starting " + action + " for user ID: " + std::to_string(userId) + + // " with keyId: " + keyId); + + // // Check if 'in' is nullptr or has zero length + // if (in == nullptr || inLen == 0) { + // log(logger::LogLevel::ERROR, + // action + " failed for user ID: " + std::to_string(userId) + + // ". An empty buffer was provided for " + action + "."); + // return CKR_EMPTY_BUFFER; + // } + CK_RV returnCode = logAndHandleErrors(action, userId, in, inLen, + isStarting); + if(returnCode != CKR_OK) + return returnCode; + + // Check if 'out' is nullptr + if (out == nullptr) { + log(logger::LogLevel::ERROR, + action + " failed for user ID: " + std::to_string(userId) + + ". Output buffer is nullptr for " + action + "."); + return CKR_EMPTY_BUFFER; + } + + // Check if the allocated output buffer is too small + if (outLen < requiredLength) { + log(logger::LogLevel::ERROR, + action + " failed for user ID: " + std::to_string(userId) + + ". Insufficient memory allocated for the result. Required " + "size: " + + std::to_string(requiredLength) + " bytes."); + return CKR_BUFFER_TOO_SMALL; + } + + return CKR_OK; // Return success if no errors occurred +} + +CK_RV logAndHandleErrors(std::string action, int userId, std::string keyId, + void *in, size_t inLen, void *out, size_t outLen, + size_t requiredLength, bool isStarting, AESKeyLength keyLen) +{ + CK_RV returnCode = logAndHandleErrors(action, userId, keyId, + in, inLen, out, outLen, + requiredLength, isStarting); + if(returnCode!=CKR_OK) + return returnCode; + + if(!isValidAESKeyLength(keyLen)) + { + log(logger::LogLevel::ERROR, + "Invalid AES key length provided: "+std::to_string(keyLen)+". Supported lengths are 128, 192, or 256 bits."); + return CKR_KEY_SIZE_RANGE; + } + + return CKR_OK; +} + +#pragma region RSA and ECC + +// Serialize the EncryptedMessage to a void* buffer +void serializeToBuffer(const EncryptedMessage &message, uint8_t *out) +{ + size_t count1, count2; + std::vector buffer1, buffer2; + size_t offset = 0; + + buffer1.resize((mpz_sizeinbase(message.c1X.get_mpz_t(), 2) + 7) / + 8); // size in bytes + mpz_export(buffer1.data(), &count1, 1, 1, 0, 0, message.c1X.get_mpz_t()); + buffer1.resize(count1); // resize buffer to actual size after export + + buffer2.resize((mpz_sizeinbase(message.c2X.get_mpz_t(), 2) + 7) / + 8); // size in bytes + mpz_export(buffer2.data(), &count2, 1, 1, 0, 0, message.c2X.get_mpz_t()); + buffer2.resize(count2); // resize buffer to actual size after export + + // Store c1X (length followed by data) + std::memcpy(out + offset, &count1, sizeof(uint8_t)); + offset += sizeof(uint8_t); + std::memcpy(out + offset, buffer1.data(), count1); + offset += count1; + + // Store c1Y + std::memcpy(out + offset, &message.c1Y, sizeof(message.c1Y)); + offset += sizeof(message.c1Y); + + // Store c2X (length followed by data) + std::memcpy(out + offset, &count2, sizeof(uint8_t)); + offset += sizeof(uint8_t); + std::memcpy(out + offset, buffer2.data(), count2); + offset += count2; + + // Store c2Y + std::memcpy(out + offset, &message.c2Y, sizeof(message.c2Y)); +} + +// Deserialize the buffer back to EncryptedMessage +EncryptedMessage deserializeFromBuffer(const void *buffer, size_t bufferSize) +{ + size_t offset = 0; + const uint8_t *byteBuffer = static_cast(buffer); + + // Deserialize c1X + mpz_class c1X; + size_t count1 = byteBuffer[offset]; + offset += sizeof(uint8_t); + mpz_import(c1X.get_mpz_t(), count1, 1, 1, 0, 0, byteBuffer + offset); + offset += count1; + + // Deserialize c1Y + bool c1Y; + std::memcpy(&c1Y, byteBuffer + offset, sizeof(c1Y)); + offset += sizeof(c1Y); + + // Deserialize c2X + mpz_class c2X; + size_t count2 = byteBuffer[offset]; + offset += sizeof(uint8_t); + mpz_import(c2X.get_mpz_t(), count2, 1, 1, 0, 0, byteBuffer + offset); + offset += count2; + + // Deserialize c2Y + bool c2Y; + std::memcpy(&c2Y, byteBuffer + offset, sizeof(c2Y)); + + return EncryptedMessage(c1X, c1Y, c2X, c2Y); +} + +//Retrieves the encrypted length based on the asymmetric encryption function. +size_t getEncryptedLengthByAssymFunc(AsymmetricFunction func) +{ + if (func == RSA) + return getRSAencryptedLength(); + else + return getECCencryptedLength(); +} + +/** + * @brief Retrieves the length of RSA-encrypted data. + * + * This function calculates the length of the data encrypted using the RSA algorithm, + * based on a predefined RSA key size. + * + * @return The encrypted data length for RSA. + */ +size_t getRSAencryptedLength() +{ + return rsaGetEncryptedLen(RSA_KEY_SIZE); +} + +/** + * @brief Retrieves the length of RSA-decrypted data. + * + * This function calculates the length of data decrypted using the RSA algorithm, + * based on a predefined RSA key size. + * + * @return The decrypted data length for RSA. + */ +size_t getRSAdecryptedLength() +{ + return rsaGetDecryptedLen(RSA_KEY_SIZE); +} + +/** + * @brief Retrieves the length of ECC-encrypted data. + * + * This function calculates the length of the data encrypted using the Elliptic Curve Cryptography (ECC) algorithm. + * It factors in the ECC cipher length and related padding. + * + * @return The encrypted data length for ECC. + */ +size_t getECCencryptedLength() +{ + return 2 * (sizeof(uint8_t) + sizeof(bool)) + + ECC_CIPHER_LENGTH / BITS_IN_BYTE; +} + +/** + * @brief Retrieves the maximum length of ECC-decrypted data. + * + * This function returns the maximum length of data that can be decrypted using the ECC algorithm. + * + * @return The maximum decrypted data length for ECC. + */ +size_t getECCdecryptedLength() +{ + return ECC_MAX_DECRYPTED_LENGTH / BITS_IN_BYTE; +} + +/** + * @brief Retrieves the public ECC key id for a specific user. + * + * This function retrieves the public Elliptic Curve Cryptography (ECC) key ID associated with a user ID. + * + * @param userId The ID of the user whose public ECC key is requested. + * + * @return The public ECC key ID for the given user. + */ +std::string getPublicECCKeyByUserId(int userId) +{ + //todo: error no such user id + return TempHsm::getInstance().getPublicKeyIdByUserId( + userId, AsymmetricFunction::ECC); +} + +/** + * @brief Retrieves the public RSA key id for a specific user. + * + * This function retrieves the public RSA key ID associated with a user ID. + * + * @param userId The ID of the user whose public RSA key is requested. + * + * @return The public RSA key ID for the given user. + */ +std::string getPublicRSAKeyByUserId(int userId) +{ + //todo: error no such user id + return TempHsm::getInstance().getPublicKeyIdByUserId( + userId, AsymmetricFunction::RSA); +} + +// Retrieves the private ECC key id for a specific user. +std::string getPrivateECCKeyByUserId(int userId) +{ + //todo: error no such user id + return TempHsm::getInstance().getPrivateKeyIdByUserId( + userId, AsymmetricFunction::ECC); +} + +// Retrieves the private RSA key id for a specific user. +std::string getPrivateRSAKeyByUserId(int userId) +{ + //todo: error no such user id + return TempHsm::getInstance().getPrivateKeyIdByUserId( + userId, AsymmetricFunction ::RSA); +} + +/** + * @brief Encrypts data using Elliptic Curve Cryptography (ECC). + * + * This function performs ECC encryption on the input data using the specified sender ID and key ID. + * It retrieves the corresponding ECC public key from the HSM and encrypts the input data using the public key. + * The encrypted data is then serialized and stored in the output buffer. + * + * @param senderId The ID of the sender. + * @param keyId The ID of the ECC public key to be used for encryption. + * @param in The input data to be encrypted. + * @param inLen The length of the input data. + * @param out The buffer where the encrypted output will be stored. + * @param outLen The length of the encrypted output. + * @return CKR_OK on success or an appropriate error code on failure. + */ +CK_RV ECCencrypt(int senderId, std::string keyId, void *in, size_t inLen, + void *out, size_t &outLen) +{ + CK_RV error = + logAndHandleErrors("ECC Encryption", senderId, keyId, in, inLen, out, + outLen, getECCencryptedLength(), true); + if (error != CKR_OK) + return error; + + std::vector inVec(static_cast(in), + static_cast(in) + inLen); + Point eccPublicKey; + + try { + eccPublicKey = TempHsm::getInstance().getECCPublicKey( + senderId, keyId, KeyPermission::ENCRYPT); + } + catch (std::exception &e) { + log(logger::LogLevel::ERROR, + "Failed to retrieve ECC public key for user id: " + + std::to_string(senderId) + ", keyId: " + keyId + + ". Error: " + e.what()); + return CKR_USER_NOT_AUTHORIZED; + } + + //perform ecc encryption + EncryptedMessage cipher = encryptECC(inVec, eccPublicKey); + + //cast cipher from EncryptedMessage to out buffer + serializeToBuffer(cipher, static_cast(out)); + + log(logger::LogLevel::INFO, + "Successfully completed ECC encryption for user id: " + + std::to_string(senderId)); + + return CKR_OK; +} + +// Decrypts data using Elliptic Curve Cryptography (ECC). +CK_RV ECCdecrypt(int receiverId, std::string keyId, void *in, size_t inLen, + void *out, size_t &outLen, size_t requiredOutLen) +{ + // std::string eccPrivateKeyString; + // try { + // eccPrivateKeyString = + // TempHsm::getInstance().getAuthorizedKey(receiverId, keyId, + // "DECRYPT"); + // } catch (std::exception &e) { + // return CKR_USER_NOT_AUTHORIZED; + // } + // mpz_class eccPrivateKey(eccPrivateKeyString); + // // Decrypt the message + // std::vector decryptedMessage = + // decryptECC(*(reinterpret_cast(in)), + // eccPrivateKey); + // outLen = decryptedMessage.size(); + // std::memcpy(out, decryptedMessage.data(), outLen); + // return CKR_OK; + + CK_RV error = logAndHandleErrors("ECC Decryption", receiverId, keyId, in, + inLen, out, outLen, requiredOutLen, true); + if (error != CKR_OK) + return error; + + mpz_class key; + + try { + key = TempHsm::getInstance().getECCPrivateKey(receiverId, keyId, + KeyPermission::DECRYPT); + } + catch (std::exception &e) { + log(logger::LogLevel::ERROR, + "Failed to retrieve ECC private key for user id: " + + std::to_string(receiverId) + ", keyId: " + keyId + + ". Error: " + e.what()); + return CKR_USER_NOT_AUTHORIZED; + } + + //cast the cipher from in buffer to EncryptedMessage + EncryptedMessage cipher = deserializeFromBuffer(in, inLen); + + //perform decryption + std::vector decryptedMessage = decryptECC(cipher, key); + outLen = decryptedMessage.size(); + std::memcpy(out, decryptedMessage.data(), outLen); + + log(logger::LogLevel::INFO, + "Successfully completed ECC decryption for user id: " + + std::to_string(receiverId)); + + return CKR_OK; +} + +/** + * @brief Decrypts data using Elliptic Curve Cryptography (ECC). + * + * This function decrypts the input data using the ECC decryption algorithm and the provided key. + * It retrieves the private ecc key from the HSM for the specified user and key ID, then decrypts the input data. + * + * @param receiverId The ID of the reciever. + * @param keyId The ID of the key to be used for decryption. + * @param in A pointer to the input data to be decrypted. + * @param inLen The length of the input data. + * @param out A pointer to the buffer where the decrypted output will be stored. + * @param[out] outLen The length of the decrypted output. + * + * @return CKR_OK if the decryption is successful, or an appropriate error code if the decryption fails. + * + * @note This function logs the start and end of the decryption process for debugging purposes. + * @note If the decryption fails due to an unauthorized key, it returns CKR_USER_NOT_AUTHORIZED. + */ +CK_RV ECCdecrypt(int receiverId, std::string keyId, void *in, size_t inLen, + void *out, size_t &outLen) +{ + return ECCdecrypt(receiverId, keyId, in, inLen, out, outLen, + getECCdecryptedLength()); +} + +/** + * @brief Encrypts data using RSA. + * + * This function performs RSA encryption on the input data using the specified sender ID and key ID. + * It retrieves the corresponding RSA key from the HSM and encrypts the input data. + * The encrypted data is then stored in the output buffer. + * + * @param userId The ID of the user. + * @param keyId The ID of the RSA encryption key to be used. + * @param in The input data to be encrypted. + * @param inLen The length of the input data. + * @param out The buffer where the encrypted output will be stored. + * @param outLen The length of the buffer for the encrypted output. + * + * @return CKR_OK on successful encryption, or CKR_USER_NOT_AUTHORIZED if the key retrieval fails. + */ +CK_RV RSAencrypt(int userId, std::string keyId, void *in, size_t inLen, + void *out, size_t outLen) +{ + // std::string rsaKeyString; + // try { + // rsaKeyString = + // TempHsm::getInstance().getAuthorizedKey(userId, keyId, "ENCRYPT"); + // } catch (std::exception &e) { + // return CKR_USER_NOT_AUTHORIZED; + // } + // CK_RV returnCode = + // rsaEncrypt(reinterpret_cast(in), inLen, + // reinterpret_cast(rsaKeyString.c_str()), + // rsaKeyString.size(), reinterpret_cast(out), + // outLen, rsaKeyString.size() * BITS_IN_BYTE); + + CK_RV error = + logAndHandleErrors("RSA Encryption", userId, keyId, in, inLen, out, + outLen, getRSAencryptedLength(), true); + if (error != CKR_OK) + return error; + + std::pair key; + + try { + key = TempHsm::getInstance().getRSAKey(userId, keyId, + KeyPermission::ENCRYPT); + } + catch (std::exception &e) { + log(logger::LogLevel::ERROR, + "Failed to retrieve RSA key for user id: " + + std::to_string(userId) + ", keyId: " + keyId + + ". Error: " + e.what()); + //either keyid not found or user not authorised to use key + //so really should have 2 types of codes that could be + //returned but for now... + return CKR_USER_NOT_AUTHORIZED; + } + + CK_RV returnCode = rsaEncrypt( + reinterpret_cast(in), inLen, key.first, key.second, + reinterpret_cast(out), outLen, RSA_KEY_SIZE); + + if (returnCode == CKR_OK) + log(logger::LogLevel::INFO, + "Successfully completed RSA encryption for user id: " + + std::to_string(userId)); + + return returnCode; +} + +//Decrypts data using RSA. +CK_RV RSAdecrypt(int userId, std::string keyId, void *in, size_t inLen, + void *out, size_t *outLen, size_t requiredLength) +{ + // std::string rsaKeyString; + // try { + // rsaKeyString = + // TempHsm::getInstance().getAuthorizedKey(userId, keyId, "DECRYPT"); + // } catch (std::exception &e) { + // return CKR_USER_NOT_AUTHORIZED; + // } + // CK_RV returnCode = + // rsaDecrypt(reinterpret_cast(in), inLen, + // reinterpret_cast(rsaKeyString.c_str()), + // rsaKeyString.size(), reinterpret_cast(out), + // outLen, rsaKeyString.size() * BITS_IN_BYTE); + // return returnCode; + + // RSAdecryptPrintParams(userId, keyId, in, inLen, + // out, outLen); + CK_RV error = logAndHandleErrors("RSA Decryption", userId, keyId, in, inLen, + out, *outLen, requiredLength, true); + if (error != CKR_OK) + return error; + + std::pair key; + + try { + key = TempHsm::getInstance().getRSAKey(userId, keyId, + KeyPermission::DECRYPT); + } + catch (std::exception &e) { + log(logger::LogLevel::ERROR, + "Failed to retrieve RSA key for user id: " + + std::to_string(userId) + ", keyId: " + keyId + + ". Error: " + e.what()); + //either keyid not found or user not authorised to use key + //so really should have 2 types of codes that could be + //returned but for now... + return CKR_USER_NOT_AUTHORIZED; + } + + CK_RV returnCode = rsaDecrypt( + reinterpret_cast(in), inLen, key.first, key.second, + reinterpret_cast(out), outLen, RSA_KEY_SIZE); + + if (returnCode == CKR_OK) + log(logger::LogLevel::INFO, + "Successfully completed RSA decryption for user id: " + + std::to_string(userId)); + + return returnCode; +} + +/** + * @brief Decrypts data using RSA. + * + * This function decrypts the input data using the RSA decryption algorithm and the provided key. + * It retrieves the corresponding RSA key from the HSM for the specified user and key ID, then decrypts the input data. + * The decrypted data is then stored in the output buffer. + * + * @param userId The ID of the user. + * @param keyId The ID of the RSA decryption key to be used. + * @param in The input data to be decrypted. + * @param inLen The length of the input data. + * @param out The buffer where the decrypted output will be stored. + * @param outLen The length of the buffer for the decrypted output. + * + * @return CKR_OK on successful decryption, or CKR_USER_NOT_AUTHORIZED if the + * key retrieval fails, or the return code fron rsa decryption. + */ +CK_RV RSAdecrypt(int userId, std::string keyId, void *in, size_t inLen, + void *out, size_t *outLen) +{ + return RSAdecrypt(userId, keyId, in, inLen, out, outLen, + getRSAdecryptedLength()); +} + +// Generates a pair of asymmetric ECC keys and returns their keyIds +std::pair generateECCKeyPair( + int userId, std::vector permissions) +{ + //todo logging and validations + return TempHsm::getInstance().generateECCKeyPair(userId, permissions); +} + +// Generates a pair of asymmetric RSA keys and returns their keyIds +std::pair generateRSAKeyPair( + int userId, std::vector permissions) +{ + //todo logging and validations + return TempHsm::getInstance().generateRSAKeyPair(userId, permissions); +} + +#pragma endregion RSA and ECC + +#pragma region AES + +// Checks if the user is encrypting the first chunck. +bool isFirstChunckForEncryption(int userId) +{ + return mapToInMiddleEncryptions.count(userId) == 0; +} + +// Checks if the user is decrypting the first chunck. +bool isFirstChunckForDecryption(int userId) +{ + return mapToInMiddleDecryptions.count(userId) == 0; +} + +// Retrieves an AES key from the HSM by key ID. +CK_RV retrieveAESKeyByKeyId(int userId, std::string aesKeyId, + std::shared_ptr &symmetricKey, + KeyPermission permission) +{ + try { + // std::pair, int> keyAndLength = + // TempHsm::getInstance().getAESKey(userId, aesKeyId, permission); + symmetricKey = TempHsm::getInstance().getAESKey(userId, aesKeyId, permission).first; + } + catch (std::exception &e) { + log(logger::LogLevel::ERROR, + "Failed to retrieve AES key for user id: " + + std::to_string(userId) + ", keyId: " + aesKeyId + + ". Error: " + e.what()); + return CKR_USER_NOT_AUTHORIZED; + } + return CKR_OK; +} + +//function to encrypt symmetric key with RSA or ECC +CK_RV encryptAESkey(int senderId, int recieverId, uint8_t *symmetricKey, + size_t symmetricKeyLen, void *encryptedKey, + size_t encryptedKeyLen, AsymmetricFunction func) +{ + std::string recieversPublicKeyId = + TempHsm::getInstance().getPublicKeyIdByUserId(recieverId, func); + CK_RV returnCode; + + // encrypt symmetric key with ECC or RSA with recievers public key + if (func == RSA) + returnCode = RSAencrypt(senderId, recieversPublicKeyId, symmetricKey, + symmetricKeyLen, encryptedKey, encryptedKeyLen); + else { + returnCode = ECCencrypt(senderId, recieversPublicKeyId, symmetricKey, + symmetricKeyLen, encryptedKey, encryptedKeyLen); + } + // printBufferHex(encryptedKey, encryptedKeyLen, "encrypted key"); + + return returnCode; +} + +//function to decrypt symmetric key with RSA or ECC +CK_RV decryptAESkey(int senderId, int recieverId, void *in, size_t inLen, + uint8_t *symmetricKey, size_t &symmetricKeyLen, + AsymmetricFunction func, AESKeyLength keyLen) +{ + std::string recieverrsPrivateKeyId = + TempHsm::getInstance().getPrivateKeyIdByUserId(recieverId, func); + CK_RV returnCode; + + // decrypt symmetric key with ECC or RSA with recievers private key + if (func == RSA) + returnCode = RSAdecrypt(recieverId, recieverrsPrivateKeyId, in, inLen, + symmetricKey, &symmetricKeyLen, keyLen); + else + returnCode = ECCdecrypt(recieverId, recieverrsPrivateKeyId, in, inLen, + symmetricKey, symmetricKeyLen, keyLen); + + //printBufferHexa(symmetricKey, symmetricKeyLen, "decrypted key"); + + return returnCode; +} + +//Performs AES encryption on the first data block. +CK_RV performAESEncryption(int senderId, void *in, size_t inLen, void *out, + size_t outLen, AESChainingMode chainingMode, + std::shared_ptr symmetricKey, + AESKeyLength keyLength, size_t counter) +{ + StreamAES *streamAES = FactoryManager::getInstance().create(chainingMode); + mapToInMiddleEncryptions[senderId] = std::make_pair(streamAES, counter); + + mapToInMiddleEncryptions[senderId].first->encryptStart( + reinterpret_cast(in), inLen, + static_cast(out), outLen, symmetricKey.get(), + keyLength); + + return CKR_OK; +} + +// Encrypts data using AES encryption with optional key generation or retrieval. +CK_RV AESencrypt(int senderId, int receiverId, void *in, size_t inLen, + void *out, size_t outLen, AESKeyLength keyLength, + AESChainingMode chainingMode, size_t counter, + std::string keyId, bool generateKeyFlag, + AsymmetricFunction func) +{ + CK_RV returnCode = logAndHandleErrors( + "AES Encryption", senderId, keyId, in, inLen, out, outLen, + getAESencryptedLength( + inLen, isFirstChunckForEncryption(senderId), chainingMode), + isFirstChunckForEncryption(senderId), keyLength); + + if (returnCode != CKR_OK) { + deleteFromMap(mapToInMiddleEncryptions, senderId); + return returnCode; + } + + size_t encryptedKeyLength = 0; + + //if first chunck + if (isFirstChunckForEncryption(senderId)) { + size_t symmetricKeyLen = keyLength; + std::shared_ptr key; + + // Handle key generation or retrieval: + // if using key generation - generate a new key and concatenate it to the encrypted data + if (generateKeyFlag) { + key = + std::shared_ptr(new unsigned char[keyLength]); + generateKey(key.get(), keyLength); + encryptedKeyLength = getEncryptedLengthByAssymFunc(func); + //encrypt the symmetric key and store it in the out buffer + returnCode = + encryptAESkey(senderId, receiverId, key.get(), symmetricKeyLen, + out, getEncryptedLengthByAssymFunc(func), func); + + if (returnCode != CKR_OK) { + deleteFromMap(mapToInMiddleEncryptions, senderId); + return returnCode; + } + } + //otherwise retrieve the key from file by keyId: + else { + + retrieveAESKeyByKeyId(senderId, keyId, key, + ENCRYPT); + } + //printBufferHexa(symmetricKey, symmetricKeyLen, "key retrieved for encrypting"); + log(logger::LogLevel::INFO, + "Performing AES encryption for user id: " + + std::to_string(senderId) + + " for chunck of data number 1 with keyId: " + keyId); + // Perform AES encryption + returnCode = performAESEncryption( + senderId, in, inLen, + static_cast(out) + encryptedKeyLength, + outLen - encryptedKeyLength, chainingMode, key, keyLength, counter); + if (returnCode != CKR_OK) { + deleteFromMap(mapToInMiddleEncryptions, senderId); + return returnCode; + } + } + else { + // Handle chunk continuation + log(logger::LogLevel::INFO, + "Performing AES encryption for user id: " + + std::to_string(senderId) + " for chunck of data number " + + std::to_string(counter - + mapToInMiddleEncryptions[senderId].second + 1) + + "."); + //perform encryption + mapToInMiddleEncryptions[senderId].first->encryptContinue( + reinterpret_cast(in), inLen, + static_cast(out), outLen); + } + + //reduce a chunck from the chuncks counter + mapToInMiddleEncryptions[senderId].second--; + + // If all chunks have been encrypted, erase the entry from the map + if (mapToInMiddleEncryptions[senderId].second == 0) { + deleteFromMap(mapToInMiddleEncryptions, senderId); + log(logger::LogLevel::INFO, + "Successfully completed AES encryption for user id: " + + std::to_string(senderId) + " for all " + + std::to_string(counter) + " chuncks."); + } + + return CKR_OK; +} + +// Performs AES decryption on the first data block. +CK_RV performAESDecryption(int receiverId, void *in, size_t inLen, void *out, + size_t &outLen, AESChainingMode chainingMode, + std::shared_ptr symmetricKey, + AESKeyLength keyLength, size_t counter, + bool generateKeyFlag) +{ + StreamAES *streamAES = FactoryManager::getInstance().create(chainingMode); + mapToInMiddleDecryptions[receiverId] = std::make_pair(streamAES, counter); + unsigned int outLen2 = outLen; + try { + mapToInMiddleDecryptions[receiverId].first->decryptStart( + reinterpret_cast(in), inLen, + static_cast(out), outLen2, symmetricKey.get(), + keyLength); + } + catch (std::exception &e) { + log(logger::LogLevel::ERROR, + "Failed to decrypt AES data for user id: " + + std::to_string(receiverId) + ". Error: " + e.what()); + return CKR_ARGUMENTS_BAD; + } + + outLen = outLen2; + return CKR_OK; +} + +// Decrypts data using AES decryption with optional key generation or retrieval. +CK_RV AESdecrypt(int senderId, int receiverId, void *in, size_t inLen, + void *out, size_t &outLen, AsymmetricFunction func, + AESKeyLength keyLength, AESChainingMode chainingMode, + size_t counter, bool generateKeyFlag, std::string keyId = "") +{ + size_t encryptedKeyLen = + ((isFirstChunckForDecryption(receiverId)) && generateKeyFlag) + ? ((func == RSA) ? rsaGetEncryptedLen(RSA_KEY_SIZE) + : getECCencryptedLength()) + : 0; + size_t requiredLength = + getAESdecryptedLength(inLen, isFirstChunckForDecryption(receiverId), + chainingMode) - + encryptedKeyLen; + + CK_RV error = logAndHandleErrors( + "AES Decryption", senderId, keyId, in, inLen - encryptedKeyLen, out, + outLen, requiredLength, isFirstChunckForDecryption(receiverId), keyLength); + if (error != CKR_OK) { + deleteFromMap(mapToInMiddleDecryptions, receiverId); + return error; + } + + //if first chunck + if (isFirstChunckForDecryption(receiverId)) { + std::shared_ptr symmetricKey; + size_t offset = 0; + + // Handle key generation or retrieval: + //if using key generation - decrypt the concatenated key + if (generateKeyFlag) { + symmetricKey = + std::shared_ptr(new unsigned char[keyLength]); + size_t encryptedKeyLength = getEncryptedLengthByAssymFunc(func); + size_t symmetricKeyLength = keyLength; + //decrypt the symmetric key + CK_RV returnCode = decryptAESkey( + senderId, receiverId, in, encryptedKeyLength, + symmetricKey.get(), symmetricKeyLength, func, keyLength); + offset = encryptedKeyLength; + + if (returnCode != CKR_OK) { + deleteFromMap(mapToInMiddleDecryptions, receiverId); + return returnCode; + } + } + //otherwise retrieve the key from file by keyId: + else { + retrieveAESKeyByKeyId(receiverId, keyId, symmetricKey, + DECRYPT); + } + log(logger::LogLevel::INFO, + "Performing AES decryption for user id: " + + std::to_string(receiverId) + + " for chunck of data number 1 with keyId: " + keyId + " ."); + // Perform AES decryption + CK_RV error = performAESDecryption( + receiverId, static_cast(in) + offset, + inLen - offset, out, outLen, chainingMode, symmetricKey, keyLength, + counter, generateKeyFlag); + if (error != CKR_OK) { + deleteFromMap(mapToInMiddleDecryptions, receiverId); + return error; + } + } + // Handle chunk continuation + else { + log(logger::LogLevel::INFO, + "Performing AES decryption for user id: " + + std::to_string(receiverId) + " for chunck of data number " + + std::to_string( + counter - mapToInMiddleDecryptions[receiverId].second + 1) + + "."); + unsigned int outLen2 = outLen; + try { + mapToInMiddleDecryptions[receiverId].first->decryptContinue( + reinterpret_cast(in), inLen, + static_cast(out), outLen2); + } + catch (std::exception &e) { + log(logger::LogLevel::ERROR, + "Failed to decrypt AES data for user id: " + + std::to_string(receiverId) + ". Error: " + e.what()); + deleteFromMap(mapToInMiddleDecryptions, receiverId); + return CKR_ARGUMENTS_BAD; + } + outLen = outLen2; + } + // reduce a chunck from the chuncks counter + mapToInMiddleDecryptions[receiverId].second--; + + // If all chunks have been decrypted, erase the entry from the map + if (mapToInMiddleDecryptions[receiverId].second == 0) { + deleteFromMap(mapToInMiddleDecryptions, receiverId); + log(logger::LogLevel::INFO, + "Successfully completed AES decryption for user id: " + + std::to_string(receiverId) + " for all " + + std::to_string(counter) + " chuncks."); + } + + return CKR_OK; +} + +// Generates a symmetric AES key, writes it to file and returns its keyId +std::string generateAESKey(int userId, AESKeyLength aesKeyLength, + std::vector permissions, + int destUserId) +{ + if(!isValidAESKeyLength(aesKeyLength)) + { + log(logger::LogLevel::ERROR, + "Invalid AES key length provided: "+std::to_string(aesKeyLength)+". Supported lengths are 128, 192, or 256 bits."); + //return CKR_KEY_SIZE_RANGE; + return ""; + } + log(logger::LogLevel::INFO, + "Generating AES key for user " + std::to_string(userId)); + return TempHsm::getInstance().generateAESKey(userId, aesKeyLength, + permissions, destUserId); +} + +// Function to calculate length of encrypted data by AES when using a keyId. +size_t getAESencryptedLength(size_t dataLen, bool isFirst, + AESChainingMode chainingMode) +{ + return calculatEncryptedLenAES(dataLen, isFirst, chainingMode); +} + +// Function to calculate length of decrypted data by AES when using a keyId. +size_t getAESdecryptedLength(size_t dataLen, bool isFirst, + AESChainingMode chainingMode) +{ + if (dataLen==0) + return 0; + return calculatDecryptedLenAES(dataLen, isFirst, chainingMode); +} + +/** + * @brief Encrypts data using AES. + * + * This function performs AES encryption. + * It performs encryption using the provided sender and receiver IDs, input data, and key ID. + * Unlike the inner `AESencrypt` function, this version does not generate a new AES key + * but instead retrieves an existing key. + * + * @param senderId The ID of the sender. + * @param receiverId The ID of the receiver. + * @param in The input data to be encrypted. + * @param inLen The length of the input data. + * @param[out] out The buffer where the encrypted output will be stored. + * @param[out] outLen The length of the encrypted output. + * @param func The asymmetric encryption function used (e.g., RSA, ECC). + * @param keyLength The AES key length (128, 192, or 256 bits). + * @param chainingMode The AES chaining mode (e.g., CBC, CTR). + * @param counter The counter for the chunked encryption process. + * @param keyId The ID of the key to be retrieved. + * @return CKR_OK on success or an appropriate error code on failure. + */ +CK_RV AESencrypt(int senderId, int receiverId, void *in, size_t inLen, + void *out, size_t outLen, AESKeyLength keyLength, + AESChainingMode chainingMode, size_t counter, + std::string keyId) +{ + return AESencrypt(senderId, receiverId, in, inLen, out, outLen, keyLength, + chainingMode, counter, keyId, false, RSA); +} + +/** + * @brief Decrypts data using AES. + * + * This function performs AES decryption. + * It performs decryption using the provided sender and receiver IDs, input data, and key ID. + * Unlike the inner `AESdecrypt` function, this version does not get an aes key concatenated + * to data but instead retrieves an existing key. + * + * @param senderId The ID of the sender. + * @param receiverId The ID of the receiver. + * @param in The input data to be decrypted. + * @param inLen The length of the input data. + * @param[out] out The buffer where the decrypted output will be stored. + * @param[out] outLen The length of the decrypted output. + * @param keyLength The AES key length (128, 192, or 256 bits). + * @param chainingMode The AES chaining mode (e.g., CBC, CTR). + * @param counter The chuncks counter for the chunked decryption process. + * @param keyId The ID of the key to be retrieved. + * @return CKR_OK on successful encryption, an appropriate error code on failure.. + */ +CK_RV AESdecrypt(int senderId, int receiverId, void *in, size_t inLen, + void *out, size_t &outLen, AESKeyLength keyLength, + AESChainingMode chainingMode, size_t counter, + std::string keyId) +{ + return AESdecrypt(senderId, receiverId, in, inLen, out, outLen, RSA, + keyLength, chainingMode, counter, false, keyId); +} + +#pragma endregion A + +#pragma region SIGN VERIFY + +// Retrieves the size of the hashed message based on the hash algorithm. +size_t getHashedMessageSize(SHAAlgorithm hashFunc) +{ + switch (hashFunc) { + case SHAAlgorithm::SHA_256: + return 256 / BITS_IN_BYTE; + case SHAAlgorithm::SHA_3_512: + return 512 / BITS_IN_BYTE; + default: + throw std::invalid_argument("Invalid hash function"); + } +} + +// Checks if the hashing process is done for a specific user. +bool isDoneHashing(int userId) +{ + return mapToInMiddleHashing.count(userId) != 0 && + mapToInMiddleHashing[userId].second == 0; +} + +// Checks if the user is hashing the first chunck. +bool isFirstChunckHash(int userId) +{ + return mapToInMiddleHashing.count(userId) == 0; +} + +// Updates the hash with the provided data. +CK_RV hashDataUpdate(int userId, void *data, size_t dataLen, + SHAAlgorithm hashfunc, int counter, + std::string signOrVerify) +{ + //printBufferHexa(static_cast(data), dataLen, "chunck to hash:"); + CK_RV returnCode = logAndHandleErrors("Digital Signature", userId, data, dataLen, + isFirstChunckHash(userId)); + if (returnCode != CKR_OK) + return returnCode; + log(logger::LogLevel::INFO, signOrVerify + + " for user id: " + std::to_string(userId) + + " chunck of data."); + + if (isFirstChunckHash(userId)) { // first time + HashFactory *factoryManager = &HashFactory::getInstance(); + mapToInMiddleHashing[userId] = + std::make_pair(std::unique_ptr(), counter); + returnCode = factoryManager->create(hashfunc, + mapToInMiddleHashing[userId].first); + if (returnCode != CKR_OK) + return returnCode; + } + + std::vector(static_cast(data), + static_cast(data) + dataLen); + + returnCode = mapToInMiddleHashing[userId].first->update( + std::vector(static_cast(data), + static_cast(data) + dataLen)); + mapToInMiddleHashing[userId].second--; + + return returnCode; +} + +// Finalizes the hash computation and retrieves the resulting hash. +CK_RV hashDataFinalize(int userId, void *out, size_t outLen) +{ + log(logger::LogLevel::INFO, + "Signing for user id: " + std::to_string(userId) + " finalizing."); + + std::vector result; + if (mapToInMiddleHashing.count(userId) == 0) + return CKR_SIGNATURE_INVALID; + + CK_RV returnCode = mapToInMiddleHashing[userId].first->finalize(result); + auto it = mapToInMiddleHashing.find(userId); + + mapToInMiddleHashing.erase(userId); + memcpy(out, result.data(), outLen); + + return returnCode; +} + +/** + * @brief Retrieves the length of the signature based on the RSA encryption length. + * + * This function calculates and returns the length of a signature, which is determined by + * the length of the RSA-encrypted data. It internally calls the function that provides + * the RSA encrypted length. + * + * @return The length of the signature in bytes. + */ +size_t getSignatureLength() +{ + return getRSAencryptedLength(); +} + +// Updates the hash with the provided data for signing. +CK_RV signUpdate(int senderId, void *data, size_t dataLen, + SHAAlgorithm hashfunc, int counter) +{ + CK_RV returnCode = + hashDataUpdate(senderId, data, dataLen, hashfunc, counter, "Signing "); + if (returnCode != CKR_OK) + deleteFromMap(mapToInMiddleHashing, senderId); + + return returnCode; +} + +// Finalizes the signing process and retrieves the resulting digital signature. +CK_RV signFinalize(int senderId, void *signature, size_t signatureLen, + SHAAlgorithm hashfunc, std::string keyId) +{ + size_t hashLen = getHashedMessageSize(hashfunc); + std::vector hash(hashLen); + CK_RV returnCode = hashDataFinalize(senderId, hash.data(), hashLen); + + if (returnCode != CKR_OK) { + deleteFromMap(mapToInMiddleHashing, senderId); + return returnCode; + } + + returnCode = RSAencrypt(senderId, keyId, hash.data(), hashLen, signature, + signatureLen); + //printBufferHexa(hash.data(), hashLen, "hash by sign finalize"); + if (returnCode != CKR_OK) + deleteFromMap(mapToInMiddleHashing, senderId); + + return returnCode; +} + +// Verifies and updates the hash with the provided data. +CK_RV verifyUpdate(int recieverId, void *data, size_t dataLen, + SHAAlgorithm hashFunc, size_t counter) +{ + ////printGlobalMaps(mapToInMiddleEncryptions, mapToInMiddleDecryptions, mapToInMiddleHashing);(); + CK_RV returnCode = hashDataUpdate(recieverId, data, dataLen, hashFunc, + counter, "Verifying "); + if (returnCode != CKR_OK) + deleteFromMap(mapToInMiddleHashing, recieverId); + + return returnCode; +} + +// Verifies the digital signature of the hashed input data and finalizes the signature verification process. +CK_RV verifyFinalize(int recieverId, void *signature, size_t signatureLen, + SHAAlgorithm hashFunc, std::string keyId) +{ + ////printGlobalMaps(mapToInMiddleEncryptions, mapToInMiddleDecryptions, mapToInMiddleHashing);(); + size_t hashLen = getHashedMessageSize(hashFunc); + std::vector hash(hashLen); + CK_RV returnCode = hashDataFinalize(recieverId, hash.data(), hashLen); + if (returnCode != CKR_OK) { + deleteFromMap(mapToInMiddleHashing, recieverId); + return returnCode; + } + + size_t decryptSignatureLen = rsaGetDecryptedLen(RSA_KEY_SIZE); + std::vector decryptSignature(decryptSignatureLen); + returnCode = RSAdecrypt(recieverId, keyId, signature, signatureLen, + decryptSignature.data(), &decryptSignatureLen, + getRSAdecryptedLength()); + //printBufferHexa(decryptSignature.data(), decryptSignatureLen, "decrypted signature by verify finalize"); + if (returnCode != CKR_OK) { + deleteFromMap(mapToInMiddleHashing, recieverId); + return returnCode; + } + // printBufferHexa(decryptSignature.data(), decryptSignatureLen, "decrypt signature"); + // printBufferHexa(hash.data(), hash.size(), "hash"); + + //printBufferHexa(hash.data(), hashLen, "hash by verify finalize (before if)"); + if (decryptSignatureLen != hashLen || + memcmp(decryptSignature.data(), hash.data(), decryptSignatureLen) != + 0) { + returnCode = CKR_SIGNATURE_INVALID; + log(logger::LogLevel::ERROR, + "Verifying signature failed for user id: " + + std::to_string(recieverId) + "."); + } + + if (returnCode != CKR_OK) + deleteFromMap(mapToInMiddleHashing, recieverId); + + return returnCode; +} + +#pragma endregion SIGN VERIFY + +#pragma region ENCRYPT DECRYPT + +/** + * @brief Retrieves the encrypted length for the specified user and input data. + * + * This function calculates the total length of the encrypted data based on the sender's + * encryption configuration, including both symmetric and asymmetric encryption lengths. + * If this is the first chunk of data (`isFirst` is true), the length also includes the + * encrypted symmetric key. + * + * The function retrieves the encryption function type from the user's configuration. + * If the user ID does not exist or any error occurs while retrieving the configuration, + * it logs an error and returns the error code `CKR_FUNCTION_FAILED` instead of the length. + * + * @param senderId The ID of the user whose encryption configuration is being retrieved. + * @param inLen The length of the input data to be encrypted. + * @param isFirst Indicates if this is the first chunk of data, which includes the symmetric key. + * + * @return The total length of the encrypted data in bytes, or `CKR_FUNCTION_FAILED` if + * the user does not exist or an error occurs. + */ +size_t getEncryptedLen(int senderId, size_t inLen, bool isFirst) +{ + try { + // Retrieve the encryption function type for the given sender ID + CryptoConfig config = TempHsm::getInstance().getUserConfig(senderId); + + // encrypted padded data (+ if first chunk: encrypted symmetric key) + return getAESencryptedLength(inLen, isFirst, config.aesChainingMode) + + (isFirst + ? getEncryptedLengthByAssymFunc(config.asymmetricFunction) + : 0); + } + catch (const std::runtime_error &e) { + log(logger::LogLevel::ERROR, + "Error while retrieving encryption configuration for user ID " + + std::to_string(senderId) + ": " + e.what()); + + return CKR_USER_NOT_LOGGED_IN; + } +} + +/** + * @brief Retrieves the decrypted length for the specified user and input data. + * + * This function calculates the total length of the decrypted data based on the sender's + * encryption configuration. It determines the decrypted length of the data that was + * encrypted with AES, subtracting the asymmetric encrypted key length if it's the first + * chunk (`isFirst` is true). + * + * The function retrieves the encryption function type from the user's configuration. + * If the user ID does not exist or any error occurs while retrieving the configuration, + * it logs an error and returns the error code `CKR_FUNCTION_FAILED` instead of the length. + * + * @param senderId The ID of the user whose encryption configuration is being retrieved. + * @param inLen The length of the encrypted input data. + * @param isFirst Indicates if this is the first chunk of data, which includes the symmetric key. + * + * @return The total length of the decrypted data in bytes, or `CKR_FUNCTION_FAILED` if + * the user does not exist or an error occurs. + */ +size_t getDecryptedLen(int senderId, size_t inLen, bool isFirst) +{ + try { + // Retrieve the encryption function type for the given sender ID + CryptoConfig config = TempHsm::getInstance().getUserConfig(senderId); + size_t encryptedLength = + (inLen - + (isFirst ? getEncryptedLengthByAssymFunc(config.asymmetricFunction) + : 0)); + + return calculatDecryptedLenAES(encryptedLength, isFirst, + config.aesChainingMode); + } + catch (const std::runtime_error &e) { + log(logger::LogLevel::ERROR, + "Error while retrieving encryption configuration for user ID " + + std::to_string(senderId) + ": " + e.what()); + + return CKR_USER_NOT_LOGGED_IN; + } +} + +/** + * @brief Encrypts the input data using AES and signs it with RSA. + * + * This function performs the encryption and signing operations for the input data. + * It uses the sender's user ID to retrieve its encryption and signing configurations. + * The encrypted data is then signed using the sender's private key. + * and by the last chunck the signature is sent in the signature buffer. + * The encryption and signing are based on the settings defined in the sender's user configuration. + * + * @param senderId The ID of the sender, used to retrieve the encryption and signing configurations. + * @param receiverId The ID of the receiver, used to retrieve the public key for encryption. + * @param in The input data to be encrypted and signed. + * @param inLen The length of the input data. + * @param out The buffer to store the encrypteddata. + * @param outLen The length of the encrypted data. + * @param signature The buffer to store the digital signature. + * @param signatureLen The length of the digital signature. + * @param counter The counter value used for streaming. + * + * @return CKR_OK on success, or an appropriate error code on failure. + */ +CK_RV encrypt(int senderId, int receiverId, void *in, size_t inLen, void *out, + size_t outLen, void *signature, size_t signatureLen, + size_t counter) +{ + CryptoConfig config; + + try { + config = TempHsm::getInstance().getUserConfig(senderId); + } + catch (const std::runtime_error &e) { + log(logger::LogLevel::ERROR, + "Error while retrieving encryption configuration for user ID " + + std::to_string(senderId) + ": " + e.what()); + + return CKR_USER_NOT_LOGGED_IN; + } + + CK_RV returnCode; + + std::string recieversPublicKeyId = + TempHsm::getInstance().getPublicKeyIdByUserId( + receiverId, config.asymmetricFunction); + + //perform encryption + returnCode = + AESencrypt(senderId, receiverId, in, inLen, out, outLen, + config.aesKeyLength, config.aesChainingMode, counter, + recieversPublicKeyId, true, config.asymmetricFunction); + if (returnCode != CKR_OK) + return returnCode; + + //sign the data + returnCode = signUpdate(senderId, in, inLen, config.hashFunction, counter); + if (returnCode != CKR_OK) + return returnCode; + if (isDoneHashing(senderId)) { + std::string senderPrivateKeyId = + TempHsm::getInstance().getPrivateKeyIdByUserId(senderId, RSA); + returnCode = signFinalize(senderId, signature, signatureLen, + config.hashFunction, senderPrivateKeyId); + if (returnCode != CKR_OK) + return returnCode; + } + + return CKR_OK; +} + +/** + * @brief Decrypts the input data using AES and verifies it with RSA. + * + * This function gets the digital signature and encrypted data, + * decrypts the data using AES, and verifies the digital signature using RSA. + * The decryption and signature verification are based on the settings defined in the sender's user configuration. + * + * @param senderId The ID of the sender, used for retrieving the signature verification settings. + * @param receiverId The ID of the receiver, used for retrieving the private key for decryption. + * @param in The input buffer containing the concatenated signature and encrypted data. + * @param inLen The length of the input buffer. + * @param out The buffer to store the decrypted data. + * @param[out] outLen The length of the decrypted data. + * @param counter The counter value used for streaming. + * + * @return CKR_OK on success, or an appropriate error code on failure. + */ +CK_RV decrypt(int senderId, int receiverId, void *in, size_t inLen, + void *signature, size_t signatureLen, void *out, size_t &outLen, + size_t counter) +{ + CryptoConfig config; + + try { + config = TempHsm::getInstance().getUserConfig(senderId); + } + catch (const std::runtime_error &e) { + log(logger::LogLevel::ERROR, + "Error while retrieving encryption configuration for user ID " + + std::to_string(senderId) + ": " + e.what()); + + return CKR_USER_NOT_LOGGED_IN; + } + + CK_RV returnCode; + + //perform decryption + returnCode = AESdecrypt(senderId, receiverId, in, inLen, out, outLen, + config.asymmetricFunction, config.aesKeyLength, + config.aesChainingMode, counter, true); + if (returnCode != CKR_OK) + return returnCode; + + //perform signature verification + returnCode = + verifyUpdate(receiverId, out, outLen, config.hashFunction, counter); + if (returnCode != CKR_OK) + return returnCode; + if (isDoneHashing(receiverId)) { + std::string senderPublicKeyId = + TempHsm::getInstance().getPublicKeyIdByUserId(senderId, RSA); + returnCode = verifyFinalize(receiverId, signature, signatureLen, + config.hashFunction, senderPublicKeyId); + } + + if (returnCode != CKR_OK) + return returnCode; + return CKR_OK; +} + +#pragma endregion ENCRYPT DECRYPT + +////////////////////////////////////// +//json copying to maps +// /** +// * @brief Loads key data from a JSON file and populates key maps. +// * +// * This function reads a JSON file containing key information and populates +// * the corresponding key maps with user IDs and key IDs. It handles +// different +// * key types, including ECC and RSA private and public keys. The JSON file +// * should have a structure where each key entry includes the key type, user +// ID, +// * and key ID. +// * +// * @note The JSON file is expected to be located at "../keys/keys.json". +// * The key types supported are "ECC-Private", "ECC-Public", +// "RSA-Private", +// * and "RSA-Public". +// * +// * @return void This function does not return any value. +// * +// * @throws std::ifstream::failure If the file could not be opened for +// reading. +// */ +// void loadDataFromJson() { +// std::string filePath = "../keys/keys.json"; +// std::ifstream file(filePath); +// if (!file.is_open()) { +// std::cerr << "Could not open the file!" << std::endl; +// return; +// } +// nlohmann::json jsonData; +// file >> jsonData; +// for (const auto &key : jsonData["keys"]) { +// // Check if the key_type is "ECC-Private" +// int user; +// std::string keyId; +// if (key["key_type"] == "ECC-Private") { +// // Extract user and key_id +// user = key["user"]; +// keyId = key["key_id"]; +// // Insert into the map +// TempHsm::EccPrivateKeysIds[user] = keyId; +// } else if (key["key_type"] == "ECC-Public") { +// user = key["user"]; +// keyId = key["key_id"]; +// TempHsm::EccPublicKeysIds[user] = keyId; +// } else if (key["key_type"] == "RSA-Private") { +// user = key["user"]; +// keyId = key["key_id"]; +// TempHsm::RsaPrivateKeysIds[user] = keyId; +// } else if (key["key_type"] == "RSA-Public") { +// user = key["user"]; +// keyId = key["key_id"]; +// TempHsm::RsaPublicKeysIds[user] = keyId; +// } +// } +// // Close the file after reading +// file.close(); +// } \ No newline at end of file diff --git a/src/crypto_service.cpp b/hsm/src/crypto_service.cpp similarity index 79% rename from src/crypto_service.cpp rename to hsm/src/crypto_service.cpp index 88644ee2..9f8b7092 100644 --- a/src/crypto_service.cpp +++ b/hsm/src/crypto_service.cpp @@ -1,12 +1,47 @@ #include "../include/crypto_service.h" #include "../include/general.h" #include "../include/crypto_api.h" +#include "../include/debug_utils.h" + #include #include +#include #include #include +#include +#include #include "../include/debug_utils.h" +grpc::Status CryptoServiceServer::bootSystem(grpc::ServerContext* context, const crypto::BootSystemRequest* request, crypto::Empty* response) +{ + std::map> usersIdsPermissions; + for(auto user:request->usersidspermissions()) + for(auto permission: user.permissions()) + usersIdsPermissions[user.userid()].push_back(static_cast(permission)); + if(::bootSystem(usersIdsPermissions) == CKR_OK) + return grpc::Status::OK; + return grpc::Status::CANCELLED; +} + +grpc::Status CryptoServiceServer::addProccess(grpc::ServerContext* context, const crypto::AddProcessRequest* request, crypto::Empty* response){ + + std::vector permissions; + for(auto permission: request->permissions()) + permissions.push_back(static_cast(permission)); + if(::addProccess(request->userid(),permissions) == CKR_OK) + return grpc::Status::OK; + return grpc::Status::CANCELLED; +} + +grpc::Status CryptoServiceServer::configure(grpc::ServerContext* context, const crypto::ConfigureRequest* request, crypto::Empty* response) +{ + CryptoConfig config(static_cast(request->config().hashfunction()),static_cast(request->config().aeskeylength()), + static_cast(request->config().aeschainingmode()),static_cast(request->config().asymmetricfunction())); + if(::configure(request->userid(),config) == CKR_OK) + return grpc::Status::OK; + return grpc::Status::CANCELLED; +} + /** * Encrypts the provided data and returns the encrypted result and signature. * @@ -22,11 +57,17 @@ grpc::Status CryptoServiceServer::encrypt(grpc::ServerContext* context, const cr void *out = new uint8_t[outLen]; size_t signatureLen = ::getSignatureLength(); void* signature = new uint8_t[signatureLen]; - ::encrypt(request->sender_id(), request->receiver_id(), static_cast(const_cast(request->data().data())), request->data().length(), out, outLen, signature, signatureLen, request->counter()); + CK_RV status = ::encrypt(request->sender_id(), request->receiver_id(), static_cast(const_cast(request->data().data())), request->data().length(), out, outLen, signature, signatureLen, request->counter()); + if(status != CKR_OK) + return grpc::Status::CANCELLED; char *charPtr = static_cast(out); response->set_encrypted_data(out, outLen); response->set_signature(signature, signatureLen); + + delete [] (uint8_t*)out; + return grpc::Status::OK; + } /** @@ -39,10 +80,13 @@ grpc::Status CryptoServiceServer::encrypt(grpc::ServerContext* context, const cr */ grpc::Status CryptoServiceServer::decrypt(grpc::ServerContext* context, const crypto::DecryptRequest* request, crypto::DecryptResponse* response) { - size_t outLen = ::getEncryptedLen(request->sender_id(), request->encrypted_data().length(), request->isfirst()); + size_t outLen = ::getDecryptedLen(request->sender_id(), request->encrypted_data().length(), request->isfirst()); void* out = new uint8_t[outLen]; - ::decrypt(request->sender_id(), request->receiver_id(), static_cast(const_cast(request->encrypted_data().data())), request->encrypted_data().length(), static_cast(const_cast(request->signature().data())), request->signature().length(), out, outLen, request->counter()); + CK_RV status = ::decrypt(request->sender_id(), request->receiver_id(), static_cast(const_cast(request->encrypted_data().data())), request->encrypted_data().length(), static_cast(const_cast(request->signature().data())), request->signature().length(), out, outLen, request->counter()); + if(status != CKR_OK) + return grpc::Status::CANCELLED; response->set_decrypted_data(out, outLen); + delete [] (uint8_t*)out; return grpc::Status::OK; } @@ -153,7 +197,7 @@ grpc::Status CryptoServiceServer::ECCencrypt(grpc::ServerContext* context, const ::ECCencrypt(request->senderid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, outLen); response->set_encrypted_data(out, outLen); - + delete [] (uint8_t*)out; return grpc::Status::OK; } @@ -164,7 +208,7 @@ grpc::Status CryptoServiceServer::ECCdecrypt(grpc::ServerContext* context, const void* out = new uint8_t[outLen]; ::ECCdecrypt(request->receiverid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, outLen); response->set_decrypted_data(out, outLen); - + delete [] (uint8_t*)out; return grpc::Status::OK; } @@ -190,7 +234,8 @@ grpc::Status CryptoServiceServer::RSAencrypt(grpc::ServerContext* context, const ::RSAencrypt(request->senderid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, outLen); response->set_encrypted_data(out, outLen); - + delete [] (uint8_t*)out; + return grpc::Status::OK; } @@ -201,6 +246,7 @@ grpc::Status CryptoServiceServer::RSAdecrypt(grpc::ServerContext* context, const void* out = new uint8_t[outLen]; ::RSAdecrypt(request->receiverid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, &outLen); response->set_decrypted_data(out, outLen); + delete [] (uint8_t*)out; return grpc::Status::OK; } @@ -256,23 +302,24 @@ grpc::Status CryptoServiceServer::AESencrypt(grpc::ServerContext *context, const crypto::AESEncryptRequest *request, crypto::AESEncryptResponse *response) { - size_t outLen = ::getAESencryptedLength( - request->data().length(), true, - static_cast(request->chainingmode())); - uint8_t out[outLen]; - ::AESencrypt(request->sender_id(), request->receiver_id(), - (void *)request->data().data(), request->data().length(), - out, outLen, - static_cast(request->key_length()), - static_cast(request->chainingmode()), - request->counter(), request->key_id()); - - std::cout << std::dec << std::endl; - - response->set_encrypted_data(reinterpret_cast(out), outLen); - return grpc::Status::OK; + size_t outLen = ::getAESencryptedLength( + request->data().length(), request->isfirst(), + static_cast(request->chainingmode())); + + std::unique_ptr> out(new uint8_t[outLen]); + + CK_RV status = ::AESencrypt(request->sender_id(), request->receiver_id(), + (void *)request->data().data(), request->data().length(), + out.get(), outLen, + static_cast(request->key_length()), + static_cast(request->chainingmode()), + request->counter(), request->key_id()); + response->set_encrypted_data(out.get(), outLen); + + return grpc::Status::OK; } + /** * Decrypts data using AES decryption. * @@ -281,20 +328,22 @@ grpc::Status CryptoServiceServer::AESencrypt(grpc::ServerContext *context, * @param response The response object to send back the decrypted data. * @return grpc::Status indicating the success or failure of the operation. */ -grpc::Status -CryptoServiceServer::AESdecrypt(grpc::ServerContext *context, +grpc::Status CryptoServiceServer::AESdecrypt(grpc::ServerContext *context, const crypto::AESDecryptRequest *request, crypto::AESDecryptResponse *response) { - size_t outLen = ::getAESdecryptedLength(request->data_in().length(), false, static_cast(request->chainingmode())); - uint8_t *out = new uint8_t[outLen]; - ::AESdecrypt(request->sender_id(), request->receiver_id(), - (void *)request->data_in().data(), request->data_in().length(), - out, outLen, static_cast(request->key_length()), - static_cast(request->chainingmode()), - request->counter(), request->key_id()); - response->set_decrypted_data(out, outLen); - return grpc::Status::OK; + size_t outLen = ::getAESdecryptedLength(request->data_in().length(), request->isfirst(), static_cast(request->chainingmode())); + + std::unique_ptr out(new uint8_t[outLen]); + CK_RV status = ::AESdecrypt(request->sender_id(), request->receiver_id(), + (void *)request->data_in().data(), request->data_in().length(), + out.get(), outLen, static_cast(request->key_length()), + static_cast(request->chainingmode()), + request->counter(), request->key_id()); + if(status != CKR_OK) + return grpc::Status::CANCELLED; + response->set_decrypted_data(out.get(), outLen); + return grpc::Status::OK; } /** @@ -307,7 +356,7 @@ CryptoServiceServer::AESdecrypt(grpc::ServerContext *context, */ grpc::Status CryptoServiceServer::getEncryptedLen(grpc::ServerContext* context, const crypto::GetWholeLength* request, crypto::GetLengthResponse* response) { - response->set_len(::getEncryptedLen(request->senderid(), request->inlen(), true)); + response->set_len(::getEncryptedLen(request->senderid(), request->inlen(), request->isfirst())); return grpc::Status::OK; } @@ -322,7 +371,7 @@ grpc::Status CryptoServiceServer::getEncryptedLen(grpc::ServerContext* context, */ grpc::Status CryptoServiceServer::getDecryptedLen(grpc::ServerContext* context, const crypto::GetWholeLength* request, crypto::GetLengthResponse* response) { - response->set_len(::getDecryptedLen(request->senderid(), request->inlen(), true)); + response->set_len(::getDecryptedLen(request->senderid(), request->inlen(), request->isfirst())); return grpc::Status::OK; } @@ -356,6 +405,7 @@ grpc::Status CryptoServiceServer::signFinalize(grpc::ServerContext* context, con if(CK_RV status = ::signFinalize(request->sender_id(), signature, signatureLen, static_cast(request->hash_func()), request->key_id()) != CKR_OK) return grpc::Status::CANCELLED; response->set_signature(signature, getSignatureLength()); + delete [] (uint8_t*)signature; return grpc::Status::OK; } @@ -394,7 +444,6 @@ grpc::Status CryptoServiceServer::verifyFinalize(grpc::ServerContext* context, c if(::verifyFinalize(request->receiver_id(), (void*)request->signature().data(),request->signature().length(), static_cast(request->hash_func()), request->key_id())!=CKR_OK) return grpc::Status::CANCELLED; response->set_valid(true); - return grpc::Status::OK; } @@ -413,19 +462,6 @@ void RunServer() { } int main(int argc, char** argv) { - CryptoConfig config(SHAAlgorithm::SHA_256, AESKeyLength::AES_128, - AESChainingMode::CFB, AsymmetricFunction::RSA); - ::configure(1, config); - ::configure(2, config); - ::bootSystem({{1, { KeyPermission::VERIFY, - KeyPermission::SIGN, - KeyPermission::ENCRYPT, - KeyPermission::DECRYPT, - KeyPermission::EXPORTABLE}},{2, {KeyPermission::VERIFY, - KeyPermission::SIGN, - KeyPermission::ENCRYPT, - KeyPermission::DECRYPT, - KeyPermission::EXPORTABLE}}}); RunServer(); return 0; } diff --git a/src/debug_utils.cpp b/hsm/src/debug_utils.cpp similarity index 88% rename from src/debug_utils.cpp rename to hsm/src/debug_utils.cpp index 42526949..e81e685f 100644 --- a/src/debug_utils.cpp +++ b/hsm/src/debug_utils.cpp @@ -49,3 +49,7 @@ void printStreamAES(const StreamAES& obj, size_t blockSize, std::string message) std::cout << "Key Length: " << obj.keyLength << " bytes" << std::endl; } +// Definition of the debugLog function +void debugLog(const std::string& message, const std::string& functionName) { + std::cout << "Function: " << functionName << " -> " << message << std::endl; +} \ No newline at end of file diff --git a/src/ecc.cpp b/hsm/src/ecc.cpp similarity index 100% rename from src/ecc.cpp rename to hsm/src/ecc.cpp diff --git a/hsm/src/general.cpp b/hsm/src/general.cpp new file mode 100644 index 00000000..69b5cf44 --- /dev/null +++ b/hsm/src/general.cpp @@ -0,0 +1,19 @@ +#include "../include/general.h" + +void log(logger::LogLevel level, const std::string &message) { + static logger logInstance("HSM"); + logInstance.logMessage(level, message); +} + +bool isValidAESKeyLength(AESKeyLength aesKeyLength) +{ + // Create a set of valid key lengths and check if the provided key length is in this set + switch (aesKeyLength) { + case AES_128: + case AES_192: + case AES_256: + return true; + default: + return false; + } +} \ No newline at end of file diff --git a/src/hash_factory.cpp b/hsm/src/hash_factory.cpp similarity index 100% rename from src/hash_factory.cpp rename to hsm/src/hash_factory.cpp diff --git a/src/prime_tests.cpp b/hsm/src/prime_tests.cpp similarity index 100% rename from src/prime_tests.cpp rename to hsm/src/prime_tests.cpp diff --git a/src/rsa.cpp b/hsm/src/rsa.cpp similarity index 100% rename from src/rsa.cpp rename to hsm/src/rsa.cpp diff --git a/src/sha256.cpp b/hsm/src/sha256.cpp similarity index 100% rename from src/sha256.cpp rename to hsm/src/sha256.cpp diff --git a/src/shared_log_file_name.txt b/hsm/src/shared_log_file_name.txt similarity index 100% rename from src/shared_log_file_name.txt rename to hsm/src/shared_log_file_name.txt diff --git a/tests/aes_tests.cpp b/hsm/tests/aes_tests.cpp similarity index 100% rename from tests/aes_tests.cpp rename to hsm/tests/aes_tests.cpp diff --git a/tests/crypto_api_tests.cpp b/hsm/tests/crypto_api_tests.cpp similarity index 100% rename from tests/crypto_api_tests.cpp rename to hsm/tests/crypto_api_tests.cpp diff --git a/tests/ecc_tests.cpp b/hsm/tests/ecc_tests.cpp similarity index 100% rename from tests/ecc_tests.cpp rename to hsm/tests/ecc_tests.cpp diff --git a/tests/hash_tests.cpp b/hsm/tests/hash_tests.cpp similarity index 100% rename from tests/hash_tests.cpp rename to hsm/tests/hash_tests.cpp diff --git a/tests/keys_tests.cpp b/hsm/tests/keys_tests.cpp similarity index 100% rename from tests/keys_tests.cpp rename to hsm/tests/keys_tests.cpp diff --git a/tests/rsa_tests.cpp b/hsm/tests/rsa_tests.cpp similarity index 100% rename from tests/rsa_tests.cpp rename to hsm/tests/rsa_tests.cpp diff --git a/tests/sha256_tests.cpp b/hsm/tests/sha256_tests.cpp similarity index 100% rename from tests/sha256_tests.cpp rename to hsm/tests/sha256_tests.cpp diff --git a/src/aes_ecb.cpp b/src/aes_ecb.cpp deleted file mode 100644 index 986f904b..00000000 --- a/src/aes_ecb.cpp +++ /dev/null @@ -1,222 +0,0 @@ -#include "../include/aes_stream.h" -#include -#include -#include -#include "../include/aes_stream.h" - -/** - * @brief Encrypts a single block of data using AES in ECB mode. - * - * This function wraps the `encryptBlock` function to allow it to be used - * in a threaded context. It performs AES encryption on a single block of - * plaintext using the provided round keys and key length. - * - * @param in Pointer to the input block of plaintext data (BLOCK_BYTES_LEN bytes). - * @param out Pointer to the output block where the encrypted ciphertext will be stored (BLOCK_BYTES_LEN bytes). - * @param roundKeys Pointer to the array of round keys used for AES encryption. - * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). - */ -void encryptBlockThreadedECB(const unsigned char in[], unsigned char out[], - unsigned char *roundKeys, AESKeyLength keyLength) -{ - encryptBlock(in, out, roundKeys, keyLength); -} - -/** - * @brief Encrypts multiple blocks of data using AES in ECB mode with multithreading. - * - * This function divides the input plaintext into blocks and encrypts each block - * in parallel using multiple threads. The function ensures that each block is - * encrypted using AES in ECB mode, and all threads are joined before completing. - * - * @param plaintext Pointer to the input plaintext data to be encrypted. - * @param ciphertext Pointer to the buffer where the encrypted ciphertext will be stored. - * @param length The total length of the plaintext data (must be a multiple of BLOCK_BYTES_LEN). - * @param roundKeys Pointer to the array of round keys used for AES encryption. - * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). - */ -void encryptECBMultithreaded(const unsigned char *plaintext, - unsigned char *ciphertext, unsigned int length, - unsigned char *roundKeys, AESKeyLength keyLength) -{ - unsigned int numBlocks = length / BLOCK_BYTES_LEN; - std::vector threads; - for (unsigned int i = 0; i < numBlocks; ++i) { - threads.push_back(std::thread( - encryptBlockThreadedECB, &plaintext[i * BLOCK_BYTES_LEN], - &ciphertext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); - } - - for (auto &th : threads) { - th.join(); - } -} - -/** - * @brief Decrypts a single block of data using AES in ECB mode. - * - * This function wraps the `decryptBlock` function to allow it to be used - * in a threaded context. It performs AES decryption on a single block of - * ciphertext using the provided round keys and key length. - * - * @param input Pointer to the input block of ciphertext data (BLOCK_BYTES_LEN bytes). - * @param output Pointer to the output block where the decrypted plaintext will be stored (BLOCK_BYTES_LEN bytes). - * @param roundKeys Pointer to the array of round keys used for AES decryption. - * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). - */ -void decryptBlockThreadedECB(const unsigned char *input, unsigned char *output, - unsigned char *roundKeys, AESKeyLength keyLength) -{ - decryptBlock(input, output, roundKeys, keyLength); -} - -/** - * @brief Decrypts multiple blocks of data using AES in ECB mode with multithreading. - * - * This function divides the input ciphertext into blocks and decrypts each block - * in parallel using multiple threads in ECB (Electronic Codebook) mode. The function - * ensures that each block is decrypted using AES with the provided round keys, and - * all threads are joined before completing. - * - * @param ciphertext Pointer to the input ciphertext data to be decrypted. - * @param plaintext Pointer to the buffer where the decrypted plaintext will be stored. - * @param length The total length of the ciphertext data (must be a multiple of BLOCK_BYTES_LEN). - * @param roundKeys Pointer to the array of round keys used for AES decryption. - * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). - */ -void decryptECBMultithreaded(const unsigned char *ciphertext, - unsigned char *plaintext, unsigned int length, - unsigned char *roundKeys, AESKeyLength keyLength) -{ - unsigned int numBlocks = length / BLOCK_BYTES_LEN; - std::vector threads; - for (unsigned int i = 0; i < numBlocks; i++) - threads.push_back(std::thread( - decryptBlockThreadedECB, &ciphertext[i * BLOCK_BYTES_LEN], - &plaintext[i * BLOCK_BYTES_LEN], roundKeys, keyLength)); - - for (auto &th : threads) - th.join(); -} - -/** - * @brief Starts AES encryption in ECB mode. - * - * This function initializes the encryption process by encrypting the first block of data - * and storing the encryption key for further use. - * - * @param block The input plaintext block to encrypt. - * @param inLen The length of the input data. - * @param out The buffer to store the encrypted output. - * @param outLen The length of the encrypted output. - * @param key The encryption key. - * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). - */ -void AESEcb::encryptStart(unsigned char block[], unsigned int inLen, - unsigned char *out, unsigned int outLen, - unsigned char *key, AESKeyLength keyLength) -{ - encrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); - this->key = new unsigned char[keyLength]; - memcpy(this->key, key, keyLength); - this->keyLength = keyLength; -} - -/** - * @brief Continues AES encryption in ECB mode. - * - * This function continues the encryption process for additional blocks - * after the encryption has been started with `encryptStart`. - * - * @param block The input plaintext block to encrypt. - * @param inLen The length of the input data. - * @param out The buffer to store the encrypted output. - * @param outLen The length of the encrypted output. - */ -void AESEcb::encryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *out, unsigned int outLen) -{ - encrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); -} - -/** - * @brief Starts AES decryption in ECB mode. - * - * This function initializes the decryption process by decrypting the first block of data - * and storing the decryption key for further use. - * - * @param block The input ciphertext block to decrypt. - * @param inLen The length of the input data. - * @param out The buffer to store the decrypted output. - * @param outLen The length of the decrypted output. - * @param key The decryption key. - * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). - */ -void AESEcb::decryptStart(unsigned char block[], unsigned int inLen, - unsigned char *out, unsigned int &outLen, - unsigned char *key, AESKeyLength keyLength) -{ - decrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); -} - -/** - * @brief Continues AES decryption in ECB mode. - * - * This function continues the decryption process for additional blocks - * after the decryption has been started with `decryptStart`. - * - * @param block The input ciphertext block to decrypt. - * @param inLen The length of the input data. - * @param out The buffer to store the decrypted output. - * @param outLen The length of the decrypted output. - */ -void AESEcb::decryptContinue(unsigned char block[], unsigned int inLen, - unsigned char *out, unsigned int &outLen) -{ - decrypt(block, inLen, key, out, outLen, nullptr, nullptr, keyLength); -} - -/** - * @brief Encrypts data using AES in ECB mode. - * - * This function performs AES encryption on the input data, applying necessary padding. - * It uses multithreading to encrypt each block of data in parallel. - * - * @param in The input plaintext data. - * @param inLen The length of the input data. - * @param key The encryption key. - * @param out The buffer to store the encrypted output. - * @param outLen The length of the encrypted output. - * @param iv Unused in ECB mode. - * @param lastData Unused in ECB mode. - * @param keyLength The length of the AES key being used (e.g., AES_KEY_LENGTH_128, AES_KEY_LENGTH_192, AES_KEY_LENGTH_256). - */ -void AESEcb::encrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *out, unsigned int outLen, - const unsigned char *iv, unsigned char *lastData, - AESKeyLength keyLength) -{ - size_t paddedLength = getPaddedLength(inLen); - unsigned char *paddedIn = new unsigned char[paddedLength]; - padMessage(in, inLen, paddedIn); - unsigned char block[BLOCK_BYTES_LEN]; - memcpy(block, paddedIn, BLOCK_BYTES_LEN); - encryptECBMultithreaded(paddedIn, out, paddedLength, key, keyLength); -} - -void AESEcb::decrypt(unsigned char in[], unsigned int inLen, unsigned char *key, - unsigned char *out, unsigned int &outLen, - const unsigned char *iv, unsigned char *lastData, - AESKeyLength keyLength) -{ - checkLength(inLen); - outLen = inLen; - unsigned char *roundKeys = - new unsigned char[(aesKeyLengthData[keyLength].numRound + 1) * - NUM_BLOCKS * 4]; - keyExpansion(key, roundKeys, keyLength); - for (unsigned int i = 0; i < outLen; i += BLOCK_BYTES_LEN) - decryptECBMultithreaded(in, out, outLen, roundKeys, keyLength); - outLen = getUnpadMessageLength(out, inLen); - delete[] roundKeys; -} \ No newline at end of file diff --git a/src/crypto_api.cpp b/src/crypto_api.cpp deleted file mode 100644 index 4aae542f..00000000 --- a/src/crypto_api.cpp +++ /dev/null @@ -1,1272 +0,0 @@ -#include -#include -#include -#include -#include "../include/crypto_api.h" -#include "../include/hash_factory.h" -#include "../include/rsa.h" -#include "../include/temp_hsm.h" -#include "../logger/logger.h" -#include "../include/debug_utils.h" - -std::map> mapToInMiddleEncryptions; -std::map> mapToInMiddleDecryptions; -std::map, size_t>> mapToInMiddleHashing; - -constexpr size_t BITS_IN_BYTE = 8; -constexpr size_t ECC_CIPHER_LENGTH = 512; -constexpr size_t ECC_MAX_DECRYPTED_LENGTH = 256; - -/** - * Converts a KeyPermission enumeration value to its corresponding string representation. - * - * @param permission The KeyPermission value to convert. - * @return A string representation of the KeyPermission. - */ -std::string keyPermissionToString(KeyPermission permission) -{ - switch (permission) { - case VERIFY: - return "VERIFY"; - case SIGN: - return "SIGN"; - case ENCRYPT: - return "ENCRYPT"; - case DECRYPT: - return "DECRYPT"; - case EXPORTABLE: - return "EXPORTABLE"; - default: - return "UNKNOWN"; - } -} - -/** - * Converts a vector of KeyPermission values to a comma-separated string representation. - * - * @param permissions A vector of KeyPermission values to convert. - * @return A string representation of the KeyPermissions, separated by commas. - */ -std::string permissionsToString(const std::vector &permissions) -{ - std::ostringstream oss; - for (size_t i = 0; i < permissions.size(); ++i) { - oss << keyPermissionToString(permissions[i]); - if (i != permissions.size() - 1) { - oss << ", "; - } - } - return oss.str(); -} - - -/** - * @brief Boot the system by generating asymmetric keys for users. - * - * This function logs the start of the boot process, iterates over a map of user IDs and - * their associated key permissions, and generates ECC and RSA key pairs for each user. - * - * @param usersIdspermissions A map where each key is a user ID (int), and the value is a - * vector of KeyPermission objects representing the user's permissions. - * - * @return CKR_OK on successful completion of the key generation process. - */ -CK_RV bootSystem( - const std::map> &usersIdspermissions) -{ - log(logger::LogLevel::INFO, - "CryptoApi Boot System: Booting system started...\n Generating " - "assymetric keys for users: "); - for (const auto &[userId, permissions] : usersIdspermissions) { - log(logger::LogLevel::INFO, - "User ID: " + std::to_string(userId) + - ", Permissions: " + permissionsToString(permissions)); - TempHsm::getInstance().generateECCKeyPair(userId, permissions); - TempHsm::getInstance().generateRSAKeyPair(userId, permissions); - } - return CKR_OK; -} - -/** - * @brief Adds a user to the HSM by generating asymmetric keys for a user. - * - * This function adds a user to the HSM, it generates ECC and RSA - * key pairs for the specified user based on their permissions. - * - * @param userId The ID of the user that is being added. - * @param permissions A vector of KeyPermission objects representing the - * permissions associated with the user. - * - * @return CKR_OK on successful completion of the process. - */ -CK_RV addProccess(int userId, std::vector &permissions) -{ - log(logger::LogLevel::INFO, - "AddProccess: adding proccess...\n Generating " - "assymetric keys for user: "); - log(logger::LogLevel::INFO, - "User ID: " + std::to_string(userId) + - ", Permissions: " + permissionsToString(permissions)); - TempHsm::getInstance().generateECCKeyPair(userId, permissions); - TempHsm::getInstance().generateRSAKeyPair(userId, permissions); - - return CKR_OK; -} - -/** - * Configures the user with the provided CryptoConfig settings. - * - * @param userId The ID of the user to configure. - * @param config The CryptoConfig settings to apply to the user. - * @return CKR_OK on successful configuration. - */ -CK_RV configure(int userId, CryptoConfig config) -{ - log(logger::LogLevel::INFO, - "Configure: configuring user: " + std::to_string(userId)); - TempHsm::getInstance().configure(userId, config); - return CKR_OK; -} - -#pragma region RSA and ECC - -/** - * Returns the encrypted length based on the specified asymmetric function. - * - * @param func The asymmetric function (RSA or ECC) to use for length calculation. - * @return The encrypted length in bytes for the specified function. - */ -size_t getEncryptedLengthByAssymFunc(AsymmetricFunction func) -{ - if (func == RSA) - return getRSAencryptedLength(); - else - return getECCencryptedLength(); -} - -/** - * Returns the encrypted length for RSA encryption. - * - * @return The RSA encrypted length in bytes. - */ -size_t getRSAencryptedLength() -{ - return rsaGetEncryptedLen(RSA_KEY_SIZE); -} - -/** - * Returns the decrypted length for RSA encryption. - * - * @return The RSA decrypted length in bytes. - */ -size_t getRSAdecryptedLength() -{ - return rsaGetDecryptedLen(RSA_KEY_SIZE); -} - -/** - * Returns the encrypted length for ECC encryption. - * - * @return The ECC encrypted length in bytes. - */ -size_t getECCencryptedLength() -{ - return 2 * (sizeof(uint8_t) + sizeof(bool)) + - ECC_CIPHER_LENGTH / BITS_IN_BYTE; -} - -/** - * Returns the decrypted length for ECC encryption. - * - * @return The ECC decrypted length in bytes. - */ -size_t getECCdecryptedLength() -{ - return ECC_MAX_DECRYPTED_LENGTH / BITS_IN_BYTE; -} - -/** - * Retrieves the public ECC key for the specified user ID. - * - * @param userId The ID of the user whose public ECC key is to be retrieved. - * @return The public ECC key as a string. - */ -std::string getPublicECCKeyByUserId(int userId) -{ - return TempHsm::getInstance().getPublicKeyIdByUserId( - userId, AsymmetricFunction::ECC); -} - -/** - * Retrieves the public RSA key for the specified user ID. - * - * @param userId The ID of the user whose public RSA key is to be retrieved. - * @return The public RSA key as a string. - */ -std::string getPublicRSAKeyByUserId(int userId) -{ - return TempHsm::getInstance().getPublicKeyIdByUserId( - userId, AsymmetricFunction::RSA); -} - - -// Serialize the EncryptedMessage to a void* buffer -void serializeToBuffer(const EncryptedMessage &message, uint8_t *out) -{ - size_t count1, count2; - std::vector buffer1, buffer2; - size_t offset = 0; - - buffer1.resize((mpz_sizeinbase(message.c1X.get_mpz_t(), 2) + 7) / - 8); // size in bytes - mpz_export(buffer1.data(), &count1, 1, 1, 0, 0, message.c1X.get_mpz_t()); - buffer1.resize(count1); // resize buffer to actual size after export - - buffer2.resize((mpz_sizeinbase(message.c2X.get_mpz_t(), 2) + 7) / - 8); // size in bytes - mpz_export(buffer2.data(), &count2, 1, 1, 0, 0, message.c2X.get_mpz_t()); - buffer2.resize(count2); // resize buffer to actual size after export - - // Store c1X (length followed by data) - std::memcpy(out + offset, &count1, sizeof(uint8_t)); - offset += sizeof(uint8_t); - std::memcpy(out + offset, buffer1.data(), count1); - offset += count1; - - // Store c1Y - std::memcpy(out + offset, &message.c1Y, sizeof(message.c1Y)); - offset += sizeof(message.c1Y); - - // Store c2X (length followed by data) - std::memcpy(out + offset, &count2, sizeof(uint8_t)); - offset += sizeof(uint8_t); - std::memcpy(out + offset, buffer2.data(), count2); - offset += count2; - - // Store c2Y - std::memcpy(out + offset, &message.c2Y, sizeof(message.c2Y)); -} - -// Deserialize the buffer back to EncryptedMessage -EncryptedMessage deserializeFromBuffer(const void *buffer, size_t bufferSize) -{ - size_t offset = 0; - const uint8_t *byteBuffer = static_cast(buffer); - - // Deserialize c1X - mpz_class c1X; - size_t count1 = byteBuffer[offset]; - offset += sizeof(uint8_t); - mpz_import(c1X.get_mpz_t(), count1, 1, 1, 0, 0, byteBuffer + offset); - offset += count1; - - // Deserialize c1Y - bool c1Y; - std::memcpy(&c1Y, byteBuffer + offset, sizeof(c1Y)); - offset += sizeof(c1Y); - - // Deserialize c2X - mpz_class c2X; - size_t count2 = byteBuffer[offset]; - offset += sizeof(uint8_t); - mpz_import(c2X.get_mpz_t(), count2, 1, 1, 0, 0, byteBuffer + offset); - offset += count2; - - // Deserialize c2Y - bool c2Y; - std::memcpy(&c2Y, byteBuffer + offset, sizeof(c2Y)); - - return EncryptedMessage(c1X, c1Y, c2X, c2Y); -} - -/** - * @brief Encrypts data using Elliptic Curve Cryptography (ECC). - * - * This function performs ECC encryption on the input data using the specified sender ID and key ID. - * It retrieves the corresponding ECC public key from the HSM and encrypts the input data using the public key. - * The encrypted data is then serialized and stored in the output buffer. - * - * @param senderId The ID of the sender. - * @param keyId The ID of the ECC public key to be used for encryption. - * @param in The input data to be encrypted. - * @param inLen The length of the input data. - * @param out The buffer where the encrypted output will be stored. - * @param outLen The length of the encrypted output. - * @return CKR_OK on success or an appropriate error code on failure. - */ -CK_RV ECCencrypt(int senderId, std::string keyId, void *in, size_t inLen, - void *out, size_t &outLen) -{ - log(logger::LogLevel::INFO, - "Starting ECC encryption for user id: " + std::to_string(senderId) + - " with keyId: " + keyId); - std::vector inVec(static_cast(in), - static_cast(in) + inLen); - Point eccPublicKey; - try { - eccPublicKey = TempHsm::getInstance().getECCPublicKey( - senderId, keyId, KeyPermission::ENCRYPT); - } - catch (std::exception &e) { - log(logger::LogLevel::ERROR, - "Failed to retrieve ECC public key for user id: " + - std::to_string(senderId) + ", keyId: " + keyId + - ". Error: " + e.what()); - return CKR_USER_NOT_AUTHORIZED; - } - //perform ecc encryption - EncryptedMessage cipher = encryptECC(inVec, eccPublicKey); - - //cast cipher from EncryptedMessage to out buffer - serializeToBuffer(cipher, static_cast(out)); - - log(logger::LogLevel::INFO, - "Successfully completed ECC encryption for user id: " + - std::to_string(senderId)); - - return CKR_OK; -} - -/** - * @brief Decrypts data using Elliptic Curve Cryptography (ECC). - * - * This function decrypts the input data using the ECC decryption algorithm and the provided key. - * It retrieves the private ecc key from the HSM for the specified user and key ID, then decrypts the input data. - * - * @param receiverId The ID of the reciever. - * @param keyId The ID of the key to be used for decryption. - * @param in A pointer to the input data to be decrypted. - * @param inLen The length of the input data. - * @param out A pointer to the buffer where the decrypted output will be stored. - * @param[out] outLen The length of the decrypted output. - * - * @return CKR_OK if the decryption is successful, or an appropriate error code if the decryption fails. - * - * @note This function logs the start and end of the decryption process for debugging purposes. - * @note If the decryption fails due to an unauthorized key, it returns CKR_USER_NOT_AUTHORIZED. - */ -CK_RV ECCdecrypt(int receiverId, std::string keyId, void *in, size_t inLen, - void *out, size_t &outLen) -{ - log(logger::LogLevel::INFO, - "Starting ECC decryption for user id: " + std::to_string(receiverId) + - " with keyId: " + keyId); - mpz_class key; - try { - key = TempHsm::getInstance().getECCPrivateKey(receiverId, keyId, - KeyPermission::DECRYPT); - } - catch (std::exception &e) { - log(logger::LogLevel::ERROR, - "Failed to retrieve ECC private key for user id: " + - std::to_string(receiverId) + ", keyId: " + keyId + - ". Error: " + e.what()); - return CKR_USER_NOT_AUTHORIZED; - } - - //cast the cipher from in buffer to EncryptedMessage - EncryptedMessage cipher = deserializeFromBuffer(in, inLen); - - //perform decryption - std::vector decryptedMessage = decryptECC(cipher, key); - outLen = decryptedMessage.size(); - std::memcpy(out, decryptedMessage.data(), outLen); - - log(logger::LogLevel::INFO, - "Successfully completed ECC decryption for user id: " + - std::to_string(receiverId)); - - return CKR_OK; -} - -/** - * @brief Encrypts data using RSA. - * - * This function performs RSA encryption on the input data using the specified sender ID and key ID. - * It retrieves the corresponding RSA key from the HSM and encrypts the input data. - * The encrypted data is then stored in the output buffer. - * - * @param userId The ID of the user. - * @param keyId The ID of the RSA encryption key to be used. - * @param in The input data to be encrypted. - * @param inLen The length of the input data. - * @param out The buffer where the encrypted output will be stored. - * @param outLen The length of the buffer for the encrypted output. - * - * @return CKR_OK on successful encryption, or CKR_USER_NOT_AUTHORIZED if the key retrieval fails. - */ -CK_RV RSAencrypt(int userId, std::string keyId, void *in, size_t inLen, - void *out, size_t outLen) -{ - log(logger::LogLevel::INFO, - "Starting RSA encryption for user id: " + std::to_string(userId) + - " with keyId: " + keyId); - std::pair key; - try { - key = TempHsm::getInstance().getRSAKey(userId, keyId, - KeyPermission::ENCRYPT); - } - catch (std::exception &e) { - log(logger::LogLevel::ERROR, - "Failed to retrieve RSA key for user id: " + - std::to_string(userId) + ", keyId: " + keyId + - ". Error: " + e.what()); - return CKR_USER_NOT_AUTHORIZED; - } - CK_RV returnCode = rsaEncrypt( - reinterpret_cast(in), inLen, key.first, key.second, - reinterpret_cast(out), outLen, RSA_KEY_SIZE); - log(logger::LogLevel::INFO, - "Successfully completed RSA encryption for user id: " + - std::to_string(userId)); - return returnCode; -} - -/** - * @brief Decrypts data using RSA. - * - * This function decrypts the input data using the RSA decryption algorithm and the provided key. - * It retrieves the corresponding RSA key from the HSM for the specified user and key ID, then decrypts the input data. - * The decrypted data is then stored in the output buffer. - * - * @param userId The ID of the user. - * @param keyId The ID of the RSA decryption key to be used. - * @param in The input data to be decrypted. - * @param inLen The length of the input data. - * @param out The buffer where the decrypted output will be stored. - * @param outLen The length of the buffer for the decrypted output. - * - * @return CKR_OK on successful decryption, or CKR_USER_NOT_AUTHORIZED if the - * key retrieval fails, or the return code fron rsa decryption. - */ -CK_RV RSAdecrypt(int userId, std::string keyId, void *in, size_t inLen, - void *out, size_t *outLen) -{ - log(logger::LogLevel::INFO, - "Starting RSA decryption for user id: " + std::to_string(userId) + - " with keyId: " + keyId); - std::pair key; - try { - key = TempHsm::getInstance().getRSAKey(userId, keyId, - KeyPermission::DECRYPT); - } - catch (std::exception &e) { - log(logger::LogLevel::ERROR, - "Failed to retrieve RSA key for user id: " + - std::to_string(userId) + ", keyId: " + keyId + - ". Error: " + e.what()); - return CKR_USER_NOT_AUTHORIZED; - } - CK_RV returnCode = rsaDecrypt( - reinterpret_cast(in), inLen, key.first, key.second, - reinterpret_cast(out), outLen, RSA_KEY_SIZE); - - log(logger::LogLevel::INFO, - "Successfully completed RSA decryption for user id: " + - std::to_string(userId)); - return returnCode; -} - -// Generates a pair of asymmetric ECC keys and returns their keyIds -std::pair generateECCKeyPair( - int userId, std::vector permissions) -{ - return TempHsm::getInstance().generateECCKeyPair(userId, permissions); -} - -// Generates a pair of asymmetric RSA keys and returns their keyIds -std::pair generateRSAKeyPair( - int userId, std::vector permissions) -{ - return TempHsm::getInstance().generateRSAKeyPair(userId, permissions); -} - -#pragma endregion RSA and ECC - - -#pragma region AES -//////////////AES////////////////////////////////////////////////////////////// - -// //Generates a symmetric AES key,write it to file and returns its keyId -std::string generateAESKey(int userId, AESKeyLength aesKeyLength, - std::vector permissions, - int destUserId) -{ - return TempHsm::getInstance().generateAESKey(userId, aesKeyLength, - permissions, destUserId); -} - -// Function to calculate length of encrypted data by AES when using a keyId. -size_t getAESencryptedLength(size_t dataLen, bool isFirst, - AESChainingMode chainingMode) -{ - return calculatEncryptedLenAES(dataLen, isFirst, chainingMode); -} - -// Function to calculate length of decrypted data by AES when using a keyId. -size_t getAESdecryptedLength(size_t dataLen, bool isFirst, - AESChainingMode chainingMode) -{ - return calculatDecryptedLenAES(dataLen, isFirst, chainingMode); -} - -/** - * @brief Retrieves an AES key from the HSM by key ID. - * - * This function retrieves the AES key from the HSM using the provided sender ID - * and key ID, allocating memory for the key and setting its length. - * - * @param senderId The ID of the sender requesting the key. - * @param aesKeyId The ID of the AES key to be retrieved. - * @param[out] symmetricKey A pointer to the retrieved AES key. - * @param[out] symmetricKeyLen The length of the retrieved AES key in bytes. - */ -void retrieveAESKeyByKeyId(int userId, std::string aesKeyId, - std::shared_ptr symmetricKey, - size_t symmetricKeyLen, KeyPermission permission) -{ - std::pair, int> keyAndLength = - TempHsm::getInstance().getAESKey(userId, aesKeyId, permission); - symmetricKey = keyAndLength.first; -} - -//function to encrypt symmetric key with RSA or ECC -CK_RV decryptAESkey(int senderId, int recieverId, void *in, size_t inLen, - uint8_t *symmetricKey, size_t &symmetricKeyLen, - AsymmetricFunction func) -{ - std::string recieverrsPrivateKeyId = - TempHsm::getInstance().getPrivateKeyIdByUserId(recieverId, func); - CK_RV returnCode; - // decrypt with RSA symmetric key with recievers private key - if (func == RSA) { - returnCode = RSAdecrypt(recieverId, recieverrsPrivateKeyId, in, inLen, - symmetricKey, &symmetricKeyLen); - } - else - // decrypt with ECC symmetric key with recievers private key - returnCode = ECCdecrypt(recieverId, recieverrsPrivateKeyId, in, inLen, - symmetricKey, symmetricKeyLen); - - return returnCode; -} - -/** - * @brief Performs AES decryption on the first data block. - * - * This function performs AES decryption on the provided input data using the - * specified chaining mode and symmetric key. The result is written to the output - * buffer, and a chunk counter is initialized for multi-part decryption. - * - * @param senderId The ID of the sender. - * @param in The input data to be decrypted. - * @param inLen The length of the input data. - * @param[out] out The buffer where the decrypted output will be stored. - * @param[out] outLen The length of the decrypted output. - * @param chainingMode The AES chaining mode (e.g., CBC, CTR). - * @param symmetricKey The symmetric AES key used for encryption. - * @param symmetricKeyLen The length of the symmetric AES key. - * @param counter The counter for the chunked decryption process. - * @return CKR_OK on success or an appropriate error code on failure. - */ -CK_RV performAESDecryption(int recieverId, void *in, size_t inLen, void *out, - size_t &outLen, AESChainingMode chainingMode, - std::shared_ptr symmetricKey, - AESKeyLength keyLength, size_t counter, - bool generateKeyFlag) -{ - StreamAES *streamAES = FactoryManager::getInstance().create(chainingMode); - mapToInMiddleDecryptions[recieverId] = std::make_pair(streamAES, counter); - unsigned int outLen2 = outLen; - - mapToInMiddleDecryptions[recieverId].first->decryptStart( - reinterpret_cast(in), inLen, - reinterpret_cast(out), outLen2, symmetricKey.get(), - keyLength); - - outLen = outLen2; -} - -/** - * @brief Handles the AES decryption of subsequent chunks of data. - * - * This function continues AES decryption on a subsequent chunk of data using the - * pre-existing decryption context. It also updates the chunk counter and removes - * the receiver from the decryption map once all chunks are processed. - * - * @param recieverId The ID of the receiver. - * @param in The input data chunk to be decrypted. - * @param inLen The length of the input data chunk. - * @param[out] out The buffer where the decrypted output will be stored. - * @param[out] outLen The length of the decrypted output. - */ -void AEShandleDataChunksDecryption(int recieverId, void *in, size_t inLen, - void *out, size_t &outLen, - AESChainingMode chainingMode) -{ - unsigned int outLen2=outLen; - mapToInMiddleDecryptions[recieverId].first->decryptContinue( - reinterpret_cast(in), inLen, - reinterpret_cast(out), outLen2); - outLen=outLen2; -} - -/** - * @brief Decrypts data using AES decryption with optional key generation or retrieval. - * - * This function performs AES decryption, either by generating a temporary AES key or - * retrieving one by key ID. It also handles the continuation of chunked data decryption. - * - * @param senderId The ID of the sender. - * @param receiverId The ID of the receiver. - * @param in The input data to be decrypted. - * @param inLen The length of the input data. - * @param[out] out The buffer where the decrypted output will be stored. - * @param[out] outLen The length of the decrypted output. - * @param func The asymmetric decryption function used (e.g., RSA, ECC). - * @param keyLength The AES key length (128, 192, or 256 bits). - * @param chainingMode The AES chaining mode (e.g., CBC, CTR). - * @param counter The counter for the chunked encryption process. - * @param keyId The ID of the key (used when retrieving an existing key). - * @param generateKeyFlag Indicates whether to generate a new AES key (true) or retrieve an existing one (false). - * @return CKR_OK on success or an appropriate error code on failure. - */ -CK_RV AESdecrypt(int senderId, int receiverId, void *in, size_t inLen, - void *out, size_t &outLen, AsymmetricFunction func, - AESKeyLength keyLength, AESChainingMode chainingMode, - size_t counter, bool generateKeyFlag, std::string keyId = "") -{ - CK_RV returnCode = CKR_OK; - if (mapToInMiddleDecryptions.count(receiverId) == 0) { - std::shared_ptr symmetricKey; - size_t offset = 0; - // Handle key generation or retrieval - if (generateKeyFlag) { - symmetricKey =std::shared_ptr(new unsigned char[keyLength]); - size_t encryptedKeyLength = - getEncryptedLengthByAssymFunc(func); - size_t symmetricKeyLength = keyLength; - returnCode = - decryptAESkey(senderId, receiverId, in, encryptedKeyLength, - symmetricKey.get(), symmetricKeyLength, func); - // memset(symmetricKey.get(), 0, keyLength); - offset = encryptedKeyLength; - if (returnCode != CKR_OK) { - return returnCode; - } - } - else { - symmetricKey = TempHsm::getInstance() - .getAESKey(receiverId, keyId, DECRYPT) - .first; - } - - returnCode=performAESDecryption( - receiverId, static_cast(in) + offset, - inLen - offset, out, outLen, chainingMode, symmetricKey, keyLength, - counter, generateKeyFlag); - - if (returnCode != CKR_OK) - return returnCode; - } - else { - // Handle chunk continuation - AEShandleDataChunksDecryption(receiverId, in, inLen, out, outLen, - chainingMode); - } - // reduce a chunck from the chuncks counter - mapToInMiddleDecryptions[receiverId].second--; - - if (mapToInMiddleDecryptions[receiverId].second == 0) { - auto it = mapToInMiddleDecryptions.find(receiverId); - - mapToInMiddleDecryptions.erase(receiverId); - } - - return CKR_OK; -} - -/** - * @brief User-facing function to handle AES decryption using an existing AES key. - * - * This function is the primary function that the user calls to perform AES decryption. - * It performs decryption using the provided sender and receiver IDs, input data, and key ID. - * Unlike the inner `AESdecrypt` function, this version does not generate a new AES key - * but instead retrieves an existing key. - * - * @param senderId The ID of the sender. - * @param receiverId The ID of the receiver. - * @param in The input data to be decrypted. - * @param inLen The length of the input data. - * @param[out] out The buffer where the decrypted output will be stored. - * @param[out] outLen The length of the decrypted output. - * @param func The asymmetric decryption function used (e.g., RSA, ECC). - * @param keyLength The AES key length (128, 192, or 256 bits). - * @param chainingMode The AES chaining mode (e.g., CBC, CTR). - * @param counter The counter for the chunked decryption process. - * @param keyId The ID of the key to be retrieved. - * @return CKR_OK on success or an appropriate error code on failure. - */ -CK_RV AESdecrypt(int senderId, int receiverId, void *in, size_t inLen, - void *out, size_t &outLen, AESKeyLength keyLength, - AESChainingMode chainingMode, size_t counter, - std::string keyId) -{ - return AESdecrypt(senderId, receiverId, in, inLen, out, outLen, RSA, - keyLength, chainingMode, counter, false, keyId); -} - -//function to encrypt symmetric key with RSA or ECC,the encrypted is in out -CK_RV encryptAESkey(int senderId, int recieverId, uint8_t *symmetricKey, - size_t symmetricKeyLen, void *encryptedKey, - size_t encryptedKeyLen, AsymmetricFunction func) -{ - std::string recieverrsPublicKeyId = - TempHsm::getInstance().getPublicKeyIdByUserId(recieverId, func); - CK_RV returnCode; - // encrypt wuth RSA symmetric key with recievers public key - if (func == RSA) - returnCode = RSAencrypt(senderId, recieverrsPublicKeyId, symmetricKey, - symmetricKeyLen, encryptedKey, encryptedKeyLen); - else - { - // encrypt wuth ECC symmetric key with recievers public key - returnCode = ECCencrypt(senderId, recieverrsPublicKeyId, symmetricKey, - symmetricKeyLen, encryptedKey, encryptedKeyLen); -} - - return returnCode; -} - -/** - * @brief Performs AES encryption on the first data block. - * - * This function performs AES encryption on the provided input data using the - * specified chaining mode and symmetric key. The result is written to the output - * buffer, and a chunk counter is initialized for multi-part encryption. - * - * @param senderId The ID of the sender. - * @param in The input data to be encrypted. - * @param inLen The length of the input data. - * @param[out] out The buffer where the encrypted output will be stored. - * @param[out] outLen The length of the encrypted output. - * @param chainingMode The AES chaining mode (e.g., CBC, CTR). - * @param symmetricKey The symmetric AES key used for encryption. - * @param symmetricKeyLen The length of the symmetric AES key. - * @param counter The counter for the chunked encryption process. - * @return CKR_OK on success or an appropriate error code on failure. - */ -CK_RV performAESEncryption(int senderId, void *in, size_t inLen, void *out, - size_t outLen, AESChainingMode chainingMode, - std::shared_ptr symmetricKey, - AESKeyLength keyLength, size_t counter) -{ - StreamAES *streamAES = FactoryManager::getInstance().create(chainingMode); - mapToInMiddleEncryptions[senderId] = std::make_pair(streamAES, counter); - mapToInMiddleEncryptions[senderId].first->encryptStart( - reinterpret_cast(in), inLen, - reinterpret_cast(out), reinterpret_cast(outLen), symmetricKey.get(), - keyLength); - - return CKR_OK; -} - -/** - * @brief Handles the AES encryption of subsequent chunks of data. - * - * This function continues AES encryption on a subsequent chunk of data using the - * pre-existing encryption context. It also updates the chunk counter and removes - * the sender from the encryption map once all chunks are processed. - * - * @param senderId The ID of the sender. - * @param in The input data chunk to be encrypted. - * @param inLen The length of the input data chunk. - * @param[out] out The buffer where the encrypted output will be stored. - * @param[out] outLen The length of the encrypted output. - */ -void AEShandleDataChunksEncryption(int senderId, void *in, size_t inLen, - void *out, size_t outLen, - AESChainingMode mode) -{ - mapToInMiddleEncryptions[senderId].first->encryptContinue( - reinterpret_cast(in), inLen, - reinterpret_cast(out), reinterpret_cast(outLen)); -} - -/** - * @brief Encrypts data using AES encryption with optional key generation or retrieval. - * - * This function performs AES encryption, either by generating a temporary AES key or - * retrieving one by key ID. It also handles the continuation of chunked data encryption. - * - * @param senderId The ID of the sender. - * @param receiverId The ID of the receiver. - * @param in The input data to be encrypted. - * @param inLen The length of the input data. - * @param[out] out The buffer where the encrypted output will be stored. - * @param[out] outLen The length of the encrypted output. - * @param func The asymmetric encryption function used (e.g., RSA, ECC). - * @param keyLength The AES key length (128, 192, or 256 bits). - * @param chainingMode The AES chaining mode (e.g., CBC, CTR). - * @param counter The counter for the chunked encryption process. - * @param keyId The ID of the key (used when retrieving an existing key). - * @param generateKeyFlag Indicates whether to generate a new AES key (true) or retrieve an existing one (false). - * @return CKR_OK on success or an appropriate error code on failure. - */ -CK_RV AESencrypt(int senderId, int receiverId, void *in, size_t inLen, - void *out, size_t outLen, AESKeyLength keyLength, - AESChainingMode chainingMode, size_t counter, - std::string keyId, bool generateKeyFlag, - AsymmetricFunction func) -{ - CK_RV returnCode; - size_t encryptedKeyLength = 0; - if (mapToInMiddleEncryptions.count(senderId) == 0) { - size_t symmetricKeyLen = keyLength; - std::shared_ptr key; - // Handle key generation or retrieval - if (generateKeyFlag) { - key =std::shared_ptr(new unsigned char[keyLength]); - generateKey(key.get(), keyLength); - encryptedKeyLength = getEncryptedLengthByAssymFunc(func); - returnCode = encryptAESkey( - senderId, receiverId, key.get(), symmetricKeyLen, out, - getEncryptedLengthByAssymFunc(func),func); - if (returnCode != CKR_OK) { - return returnCode; - } - } - else { - key = TempHsm::getInstance() - .getAESKey(senderId, keyId, ENCRYPT) - .first; - } - // Perform AES encryption - returnCode = performAESEncryption( - senderId, in, inLen, - static_cast(out) + encryptedKeyLength, - outLen - encryptedKeyLength, chainingMode, key, keyLength, counter); - - if (returnCode != CKR_OK) - return returnCode; - } - else { - // Handle chunk continuation - AEShandleDataChunksEncryption(senderId, in, inLen, out, outLen, - chainingMode); - } - //reduce a chunck from the chuncks counter - mapToInMiddleEncryptions[senderId].second--; - - // if the last chunck of data delete from map - if (mapToInMiddleEncryptions[senderId].second == 0) { - auto it = mapToInMiddleEncryptions.find(senderId); - mapToInMiddleEncryptions.erase(senderId); - } - - return CKR_OK; -} - -/** - * @brief User-facing function to handle AES encryption using an existing AES key. - * - * This function is the primary function that the user calls to perform AES encryption. - * It performs encryption using the provided sender and receiver IDs, input data, and key ID. - * Unlike the inner `AESencrypt` function, this version does not generate a new AES key - * but instead retrieves an existing key. - * - * @param senderId The ID of the sender. - * @param receiverId The ID of the receiver. - * @param in The input data to be encrypted. - * @param inLen The length of the input data. - * @param[out] out The buffer where the encrypted output will be stored. - * @param[out] outLen The length of the encrypted output. - * @param func The asymmetric encryption function used (e.g., RSA, ECC). - * @param keyLength The AES key length (128, 192, or 256 bits). - * @param chainingMode The AES chaining mode (e.g., CBC, CTR). - * @param counter The counter for the chunked encryption process. - * @param keyId The ID of the key to be retrieved. - * @return CKR_OK on success or an appropriate error code on failure. - */ -CK_RV AESencrypt(int senderId, int receiverId, void *in, size_t inLen, - void *out, size_t outLen, AESKeyLength keyLength, - AESChainingMode chainingMode, size_t counter, - std::string keyId) -{ - return AESencrypt(senderId, receiverId, in, inLen, out, outLen, keyLength, - chainingMode, counter, keyId, false, RSA); -} - -#pragma endregion RSA and ECC - -#pragma region SIGN VERIFY -//////////SIGN VERIFY////////////////////////////////////////////////////////// -#pragma region SIGN VERIFY - -/** - * Returns the size of the hashed message based on the specified hash algorithm. - * - * @param hashFunc The hash algorithm for which to get the message size. - * @return Size of the hashed message in bytes. - * @throws std::invalid_argument if the provided hash function is not supported. - */ -size_t getHashedMessageSize(SHAAlgorithm hashFunc) -{ - switch (hashFunc) { - case SHAAlgorithm::SHA_256: - return 256 / BITS_IN_BYTE; - case SHAAlgorithm::SHA_3_512: - return 512 / BITS_IN_BYTE; - default: - throw std::invalid_argument("Invalid hash function"); - } -} - -/** - * @brief Retrieves the length of the digital signature. - * - * This function calls the function to get the RSA encrypted length, - * which corresponds to the size of the digital signature. - * - * @return The length of the digital signature. - */ -size_t getSignatureLength() -{ - return getRSAencryptedLength(); -} - -/** - * @brief Checks if the hashing process is complete for the given user ID. - * - * This function verifies if the user ID exists in the mapping and - * whether the counter for in-progress hashing has reached zero. - * - * @param userId The ID of the user. - * @return True if the hashing process is complete, false otherwise. - */ -bool isDoneHashing(int userId) -{ - return mapToInMiddleHashing.count(userId) != 0 && - mapToInMiddleHashing[userId].second == 0; -} - -/** - * @brief Checks if this is the first time hashing for the given user ID. - * - * This function checks if the user ID is not present in the mapping, - * indicating that it's the first hashing attempt. - * - * @param userId The ID of the user. - * @return True if it's the first time hashing, false otherwise. - */ -bool isFirstTimeHash(int userId) -{ - return mapToInMiddleHashing.count(userId) == 0; -} - -/** - * @brief Updates the hash data for the specified user ID. - * - * This function processes a chunk of data, creating a hash instance if it's the first update - * and appending the data to the ongoing hash calculation. It decrements the counter for remaining data. - * - * @param userId The ID of the user. - * @param data Pointer to the data to hash. - * @param dataLen Length of the data. - * @param hashfunc The hashing algorithm to use. - * @param counter A counter indicating remaining data chunks. - * @return CK_RV Return code indicating success or failure of the operation. - */ -CK_RV hashDataUpdate(int userId, void *data, size_t dataLen, - SHAAlgorithm hashfunc, int counter) -{ - CK_RV returnCode = CKR_OK; - if (isFirstTimeHash(userId)) { // first time - HashFactory *factoryManager = &HashFactory::getInstance(); - mapToInMiddleHashing[userId] = - std::make_pair(std::unique_ptr(), counter); - returnCode = factoryManager->create(hashfunc, - mapToInMiddleHashing[userId].first); - } - std::vector(static_cast(data), - static_cast(data) + dataLen); - mapToInMiddleHashing[userId].first->update(std::vector( - static_cast(data), static_cast(data) + dataLen)); - mapToInMiddleHashing[userId].second--; - return returnCode; -} - -/** - * @brief Finalizes the hash computation and retrieves the result for the specified user ID. - * - * This function finalizes the ongoing hash calculation for the user ID, copies the result - * to the output buffer, and removes the user ID from the mapping. - * - * @param userId The ID of the user. - * @param out Pointer to the output buffer for the final hash. - * @param outLen Length of the output buffer. - * @return CK_RV Return code indicating success or failure of the operation. - */ -CK_RV hashDataFinalize(int userId, void *out, size_t outLen) -{ - std::vector result; - CK_RV returnCode = mapToInMiddleHashing[userId].first->finalize(result); - auto it = mapToInMiddleHashing.find(userId); - mapToInMiddleHashing.erase(userId); - memcpy(out, result.data(), outLen); - return returnCode; -} - -/** - * @brief Updates the signature process with the given data for the specified sender ID. - * - * This function logs the signing action and calls the hash data update function. - * - * @param senderId The ID of the sender. - * @param data Pointer to the data to sign. - * @param dataLen Length of the data. - * @param hashfunc The hashing algorithm to use. - * @param counter A counter indicating remaining data chunks. - * @return CK_RV Return code indicating success or failure of the operation. - */ -CK_RV signUpdate(int senderId, void *data, size_t dataLen, - SHAAlgorithm hashfunc, int counter) -{ - log(logger::LogLevel::INFO, - "Signing for user id: " + std::to_string(senderId) + - " chunk of data."); - return hashDataUpdate(senderId, data, dataLen, hashfunc, counter); -} - -/** - * @brief Finalizes the signing process for the specified sender ID. - * - * This function finalizes the hashing, encrypts the hash using RSA, - * and produces the digital signature. - * - * @param senderId The ID of the sender. - * @param signature Pointer to the output buffer for the signature. - * @param signatureLen Length of the signature buffer. - * @param hashfunc The hashing algorithm to use. - * @param keyId The ID of the key to use for signing. - * @return CK_RV Return code indicating success or failure of the operation. - */ -CK_RV signFinalize(int senderId, void *signature, size_t signatureLen, - SHAAlgorithm hashfunc, std::string keyId) -{ - log(logger::LogLevel::INFO, - "Signing for user id: " + std::to_string(senderId) + - " for last chunk of data."); - size_t hashLen = getHashedMessageSize(hashfunc); - std::vector hash(hashLen); - CK_RV returnCode = hashDataFinalize(senderId, hash.data(), hashLen); - if (returnCode != CKR_OK) - return returnCode; - returnCode = RSAencrypt(senderId, keyId, hash.data(), hashLen, signature, - signatureLen); - return returnCode; -} - -/** - * @brief Updates the verification process with the given data for the specified receiver ID. - * - * This function logs the verification action and calls the hash data update function. - * - * @param recieverId The ID of the receiver. - * @param data Pointer to the data to verify. - * @param dataLen Length of the data. - * @param hashFunc The hashing algorithm to use. - * @param counter A counter indicating remaining data chunks. - * @return CK_RV Return code indicating success or failure of the operation. - */ -CK_RV verifyUpdate(int recieverId, void *data, size_t dataLen, - SHAAlgorithm hashFunc, size_t counter) -{ - log(logger::LogLevel::INFO, - "Verifying for user id: " + std::to_string(recieverId) + - " chunk of data."); - return hashDataUpdate(recieverId, data, dataLen, hashFunc, counter); -} - -/** - * @brief Finalizes the verification process for the specified receiver ID. - * - * This function finalizes the hashing, decrypts the signature using RSA, - * and checks if the signature matches the computed hash. - * - * @param recieverId The ID of the receiver. - * @param signature Pointer to the digital signature to verify. - * @param signatureLen Length of the signature buffer. - * @param hashFunc The hashing algorithm to use. - * @param keyId The ID of the key to use for verification. - * @return CK_RV Return code indicating success or failure of the operation. - */ -CK_RV verifyFinalize(int recieverId, void *signature, size_t signatureLen, - SHAAlgorithm hashFunc, std::string keyId) -{ - log(logger::LogLevel::INFO, - "Verifying for user id: " + std::to_string(recieverId) + - " for last chunk of data."); - size_t hashLen = getHashedMessageSize(hashFunc); - std::vector hash(hashLen); - CK_RV returnCode = hashDataFinalize(recieverId, hash.data(), hashLen); - if (returnCode != CKR_OK) - return returnCode; - size_t decryptSignatureLen = rsaGetDecryptedLen(RSA_KEY_SIZE); - std::vector decryptSignature(decryptSignatureLen); - returnCode = RSAdecrypt(recieverId, keyId, signature, signatureLen, - decryptSignature.data(), &decryptSignatureLen); - if (returnCode != CKR_OK) - return returnCode; - if (decryptSignatureLen != hashLen || - memcmp(decryptSignature.data(), hash.data(), decryptSignatureLen) != - 0) { - returnCode = CKR_SIGNATURE_INVALID; - log(logger::LogLevel::ERROR, - "Verifying signature failed for user id: " + - std::to_string(recieverId) + "."); - } - - return returnCode; -} - -#pragma endregion SIGN VERIFY - -#pragma region ENCRYPT DECRYPT - -/** - * @brief Calculates the length of the encrypted data based on the input length. - * - * This function retrieves the encryption configuration for the given sender ID - * and calculates the total encrypted length, which includes the length of the - * digital signature, padded encrypted data, and potentially the encrypted symmetric key. - * - * @param senderId The ID of the sender. - * @param inLen The length of the input data. - * @param isFirst Indicates if this is the first chunk of data. - * @return The total length of the encrypted data. - */ -size_t getEncryptedLen(int senderId, size_t inLen, bool isFirst) -{ - // Retrieve the encryption function type for the given sender ID - CryptoConfig config = TempHsm::getInstance().getUserConfig(senderId); - // digital signature + encrypted padded data (+ if first chunk: encrypted symmetric key) - return getAESencryptedLength(inLen, isFirst, config.aesChainingMode) + - (isFirst ? getEncryptedLengthByAssymFunc(config.asymmetricFunction) : 0); -} - -/** - * @brief Calculates the length of the decrypted data based on the input length. - * - * This function retrieves the encryption configuration for the given sender ID - * and calculates the length of the decrypted data by accounting for the encrypted - * length and potential asymmetric function overhead. - * - * @param senderId The ID of the sender. - * @param inLen The length of the input encrypted data. - * @param isFirst Indicates if this is the first chunk of data. - * @return The total length of the decrypted data. - */ -size_t getDecryptedLen(int senderId, size_t inLen, bool isFirst) -{ - // Retrieve the encryption function type for the given sender ID - CryptoConfig config = TempHsm::getInstance().getUserConfig(senderId); - size_t encryptedLength = - (inLen - (isFirst ? getEncryptedLengthByAssymFunc(config.asymmetricFunction) - : 0)); - return calculatDecryptedLenAES(encryptedLength, isFirst, - config.aesChainingMode); -} - -/** - * @brief Encrypts the input data, signs it with a digital signature, according to the user's configuration, and outputs the result. - * - * This function first signs the hashed input data using RSA, then encrypts the data using AES. - * The encryption and signing are performed based on the settings defined in the sender's user configuration. - * The resulting signature and encrypted data are concatenated and stored in the output buffer. - * - * @param senderId The ID of the sender, used for retrieving the appropriate encryption keys and user configuration. - * @param receiverId The ID of the receiver, used for retrieving the public key for encryption. - * @param in The input data to be signed and encrypted. - * @param inLen The length of the input data. - * @param out The buffer to store the concatenated signature and encrypted data. - * @param[out] outLen The length of the output data (signature + encrypted data). - * @param counter The counter value used for streaming. - * - * @return CKR_OK on success, or an appropriate error code on failure. - */ - -CK_RV encrypt(int senderId, int receiverId, void *in, size_t inLen, void *out, - size_t outLen, void *signature, size_t signatureLen, - size_t counter) -{ - CK_RV returnCode; - CryptoConfig config = TempHsm::getInstance().getUserConfig(senderId); - std::string recieversPublicKeyId = - TempHsm::getInstance().getPublicKeyIdByUserId( - receiverId, config.asymmetricFunction); - returnCode = - AESencrypt(senderId, receiverId, in, inLen, out, outLen, - config.aesKeyLength, config.aesChainingMode, counter, - recieversPublicKeyId, true, config.asymmetricFunction); - if (returnCode != CKR_OK) - return returnCode; - returnCode = signUpdate(senderId, in, inLen, config.hashFunction, counter); - if (returnCode != CKR_OK) - return returnCode; - if (isDoneHashing(senderId)) { - std::string senderPrivateKeyId = - TempHsm::getInstance().getPrivateKeyIdByUserId(senderId, RSA); - returnCode = signFinalize(senderId, signature, signatureLen, - config.hashFunction, senderPrivateKeyId); - } - if (returnCode != CKR_OK) - return returnCode; - return CKR_OK; -} - -/** - * @brief Decrypts the input data, verifies its signature, and outputs the result. - * - * This function extracts the digital signature and encrypted data from the input buffer, - * decrypts the data using AES, and verifies the digital signature using RSA. The decryption - * and signature verification are based on the settings defined in the sender's user configuration. - * - * @param senderId The ID of the sender, used for retrieving the signature verification settings. - * @param receiverId The ID of the receiver, used for retrieving the private key for decryption. - * @param in The input buffer containing the concatenated signature and encrypted data. - * @param inLen The length of the input buffer. - * @param out The buffer to store the decrypted data. - * @param[out] outLen The length of the decrypted data. - * @param counter The counter value used for streaming. - * - * @return CKR_OK on success, or an appropriate error code on failure. - */ -CK_RV decrypt(int senderId, int receiverId, void *in, size_t inLen, - void *signature, size_t signatureLen, void *out, size_t &outLen, - size_t counter) -{ - CK_RV returnCode; - CryptoConfig config = TempHsm::getInstance().getUserConfig(senderId); - returnCode = AESdecrypt(senderId, receiverId, in, inLen, out, outLen, - config.asymmetricFunction, config.aesKeyLength, - config.aesChainingMode, counter, true); - if (returnCode != CKR_OK) - return returnCode; - returnCode = - verifyUpdate(receiverId, out, outLen, config.hashFunction, counter); - if (returnCode != CKR_OK) - return returnCode; - if (isDoneHashing(receiverId)) { - std::string senderPublicKeyId = - TempHsm::getInstance().getPublicKeyIdByUserId(senderId, RSA); - returnCode = verifyFinalize(receiverId, signature, signatureLen, - config.hashFunction, senderPublicKeyId); - } - if (returnCode != CKR_OK) - return returnCode; - - return CKR_OK; -} - -#pragma endregion ENCRYPT DECRYPT diff --git a/src/general.cpp b/src/general.cpp deleted file mode 100644 index 0072c372..00000000 --- a/src/general.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "../include/general.h" - -void log(logger::LogLevel level, const std::string &message) { - static logger logInstance("HSM"); - logInstance.logMessage(level, message); -} From 2abd6f4642eba394106f5abdf79a082d52a11b99 Mon Sep 17 00:00:00 2001 From: TehilaTheStudent Date: Wed, 9 Oct 2024 12:16:24 +0300 Subject: [PATCH 20/21] HSM: Add Dockerfile --- .../clangd/index/IHash.h.9F25BB14811A51FF.idx | Bin 928 -> 0 bytes .../index/SHA3-512.cpp.BAD9771630307F13.idx | Bin 5272 -> 0 bytes .../index/SHA3-512.h.242C9E2F57B7EB34.idx | Bin 1514 -> 0 bytes .../clangd/index/aes.cpp.A398B57227D33F7E.idx | Bin 7518 -> 0 bytes .../clangd/index/aes.h.54DB80C57619729A.idx | Bin 3366 -> 0 bytes .../index/aes_cbc.cpp.EAA792ACEE593C7B.idx | Bin 2252 -> 0 bytes .../index/aes_cfb.cpp.2EA4140DFBA97DB3.idx | Bin 2242 -> 0 bytes .../index/aes_ctr.cpp.E504A53DAA4D3C5B.idx | Bin 3314 -> 0 bytes .../index/aes_ecb.cpp.1BDF509FA418B2AE.idx | Bin 2294 -> 0 bytes .../index/aes_ofb.cpp.F7EA8AA373FF8B78.idx | Bin 2446 -> 0 bytes .../index/aes_stream.h.646B800E14F16018.idx | Bin 4450 -> 0 bytes ...es_stream_factory.cpp.7D6A962CCB847BBF.idx | Bin 1614 -> 0 bytes .../aes_stream_factory.h.6007C1E937134275.idx | Bin 1256 -> 0 bytes .../index/aes_tests.cpp.ADCF8D3D1544459E.idx | Bin 11416 -> 0 bytes .../asymmetric_keys.h.F6B39C3E45961EDD.idx | Bin 328 -> 0 bytes .../index/big_int10.cpp.140567735BDD1D20.idx | Bin 11576 -> 0 bytes .../index/big_int10.h.C3D09B3E73376EC8.idx | Bin 3970 -> 0 bytes .../index/big_int64.cpp.36B19D88625F787A.idx | Bin 18398 -> 0 bytes .../index/big_int64.h.2D08006D10EDE9AE.idx | Bin 6434 -> 0 bytes .../big_int_utils.h.D96CB7752F83552C.idx | Bin 1830 -> 0 bytes .../index/crypto_api.cpp.E927BFDCAA5B6960.idx | Bin 20086 -> 0 bytes .../index/crypto_api.h.4392B6162F6AAFC2.idx | Bin 4334 -> 0 bytes .../crypto_service.cpp.C896849CC9E8BCBB.idx | Bin 11492 -> 0 bytes .../crypto_service.h.1E16FAF97B2AE712.idx | Bin 4648 -> 0 bytes .../debug_utils.cpp.C0C4E38F73825AF2.idx | Bin 2180 -> 0 bytes .../index/debug_utils.h.B8FE501C48F17FE2.idx | Bin 1066 -> 0 bytes .../clangd/index/ecc.cpp.ACE89B9BF3464706.idx | Bin 8700 -> 0 bytes .../clangd/index/ecc.h.245F06981E47A1E8.idx | Bin 3306 -> 0 bytes .../index/ecc_keys.cpp.94FCEEAE4E9A5503.idx | Bin 328 -> 0 bytes .../index/ecc_tests.cpp.691CD3DAC13A387E.idx | Bin 1594 -> 0 bytes .../encryption.grpc.pb.h.FC865B7DD33369A9.idx | Bin 251146 -> 0 bytes .../encryption.pb.h.2BA2DE5ABC344FBB.idx | Bin 220562 -> 0 bytes .../index/general.cpp.C630C257D2227628.idx | Bin 694 -> 0 bytes .../index/general.h.D1014BEDDCC93124.idx | Bin 3422 -> 0 bytes .../hash_factory.cpp.7CEBEA3079B6D93F.idx | Bin 1920 -> 0 bytes .../index/hash_factory.h.FCA775239DF4C591.idx | Bin 846 -> 0 bytes .../clangd/index/hsm.cpp.D9D3C2C34C86E137.idx | Bin 324 -> 0 bytes .../clangd/index/hsm.h.ECC6854A1862F7DA.idx | Bin 3672 -> 0 bytes .../key_manager.cpp.1A56188EEED4808D.idx | Bin 332 -> 0 bytes .../index/key_manager.h.FD9E9F7920C81D78.idx | Bin 478 -> 0 bytes .../index/logger.cpp.4BC27BCE16A51595.idx | Bin 4402 -> 0 bytes .../index/logger.h.47079DC102E8987A.idx | Bin 1958 -> 0 bytes .../prime_tests.cpp.56193772442193D7.idx | Bin 5510 -> 0 bytes .../index/prime_tests.h.1B12341116CFBD8B.idx | Bin 936 -> 0 bytes .../index/return_codes.h.A6CABDD08505CCAB.idx | Bin 428 -> 0 bytes .../clangd/index/rsa.cpp.F6A80C29B260EDD2.idx | Bin 7898 -> 0 bytes .../clangd/index/rsa.h.26B72C9FFEF6AB5B.idx | Bin 1386 -> 0 bytes .../index/sha256.cpp.49D51591E44B1F34.idx | Bin 3048 -> 0 bytes .../index/sha256.h.928B534961153A72.idx | Bin 1268 -> 0 bytes .../sha256_tests.cpp.56E321C06E324FA9.idx | Bin 4804 -> 0 bytes .../index/temp_hsm.h.70D71B76F185F0B6.idx | Bin 7052 -> 0 bytes .vscode/launch.json | 29 - hsm/.gitignore | 1 + hsm/CMakeLists.txt | 2 +- hsm/Dockerfile | 102 +- hsm/HSM_Communication.txt | 40 + hsm/docker-compose.yml | 17 + hsm/include/crypto_api.h | 4 +- hsm/include/crypto_service.h | 4 + hsm/include/my_logger.h | 12 + hsm/include/temp_hsm.h | 13 +- hsm/logger/logger.cpp | 186 +- hsm/logger/logger.h | 50 +- hsm/proto/encryption.pb.cc | 2824 +++++++++----- hsm/proto/encryption.pb.h | 3339 ++++++++++++----- hsm/proto/encryption.proto | 131 +- hsm/shared_log_file_name.txt | 1 - hsm/src/crypto_api.cpp | 25 + hsm/src/crypto_service.cpp | 249 +- hsm/src/general.cpp | 7 +- hsm/src/my_logger.cpp | 41 + hsm/src/shared_log_file_name.txt | 1 - 72 files changed, 4884 insertions(+), 2194 deletions(-) delete mode 100644 .cache/clangd/index/IHash.h.9F25BB14811A51FF.idx delete mode 100644 .cache/clangd/index/SHA3-512.cpp.BAD9771630307F13.idx delete mode 100644 .cache/clangd/index/SHA3-512.h.242C9E2F57B7EB34.idx delete mode 100644 .cache/clangd/index/aes.cpp.A398B57227D33F7E.idx delete mode 100644 .cache/clangd/index/aes.h.54DB80C57619729A.idx delete mode 100644 .cache/clangd/index/aes_cbc.cpp.EAA792ACEE593C7B.idx delete mode 100644 .cache/clangd/index/aes_cfb.cpp.2EA4140DFBA97DB3.idx delete mode 100644 .cache/clangd/index/aes_ctr.cpp.E504A53DAA4D3C5B.idx delete mode 100644 .cache/clangd/index/aes_ecb.cpp.1BDF509FA418B2AE.idx delete mode 100644 .cache/clangd/index/aes_ofb.cpp.F7EA8AA373FF8B78.idx delete mode 100644 .cache/clangd/index/aes_stream.h.646B800E14F16018.idx delete mode 100644 .cache/clangd/index/aes_stream_factory.cpp.7D6A962CCB847BBF.idx delete mode 100644 .cache/clangd/index/aes_stream_factory.h.6007C1E937134275.idx delete mode 100644 .cache/clangd/index/aes_tests.cpp.ADCF8D3D1544459E.idx delete mode 100644 .cache/clangd/index/asymmetric_keys.h.F6B39C3E45961EDD.idx delete mode 100644 .cache/clangd/index/big_int10.cpp.140567735BDD1D20.idx delete mode 100644 .cache/clangd/index/big_int10.h.C3D09B3E73376EC8.idx delete mode 100644 .cache/clangd/index/big_int64.cpp.36B19D88625F787A.idx delete mode 100644 .cache/clangd/index/big_int64.h.2D08006D10EDE9AE.idx delete mode 100644 .cache/clangd/index/big_int_utils.h.D96CB7752F83552C.idx delete mode 100644 .cache/clangd/index/crypto_api.cpp.E927BFDCAA5B6960.idx delete mode 100644 .cache/clangd/index/crypto_api.h.4392B6162F6AAFC2.idx delete mode 100644 .cache/clangd/index/crypto_service.cpp.C896849CC9E8BCBB.idx delete mode 100644 .cache/clangd/index/crypto_service.h.1E16FAF97B2AE712.idx delete mode 100644 .cache/clangd/index/debug_utils.cpp.C0C4E38F73825AF2.idx delete mode 100644 .cache/clangd/index/debug_utils.h.B8FE501C48F17FE2.idx delete mode 100644 .cache/clangd/index/ecc.cpp.ACE89B9BF3464706.idx delete mode 100644 .cache/clangd/index/ecc.h.245F06981E47A1E8.idx delete mode 100644 .cache/clangd/index/ecc_keys.cpp.94FCEEAE4E9A5503.idx delete mode 100644 .cache/clangd/index/ecc_tests.cpp.691CD3DAC13A387E.idx delete mode 100644 .cache/clangd/index/encryption.grpc.pb.h.FC865B7DD33369A9.idx delete mode 100644 .cache/clangd/index/encryption.pb.h.2BA2DE5ABC344FBB.idx delete mode 100644 .cache/clangd/index/general.cpp.C630C257D2227628.idx delete mode 100644 .cache/clangd/index/general.h.D1014BEDDCC93124.idx delete mode 100644 .cache/clangd/index/hash_factory.cpp.7CEBEA3079B6D93F.idx delete mode 100644 .cache/clangd/index/hash_factory.h.FCA775239DF4C591.idx delete mode 100644 .cache/clangd/index/hsm.cpp.D9D3C2C34C86E137.idx delete mode 100644 .cache/clangd/index/hsm.h.ECC6854A1862F7DA.idx delete mode 100644 .cache/clangd/index/key_manager.cpp.1A56188EEED4808D.idx delete mode 100644 .cache/clangd/index/key_manager.h.FD9E9F7920C81D78.idx delete mode 100644 .cache/clangd/index/logger.cpp.4BC27BCE16A51595.idx delete mode 100644 .cache/clangd/index/logger.h.47079DC102E8987A.idx delete mode 100644 .cache/clangd/index/prime_tests.cpp.56193772442193D7.idx delete mode 100644 .cache/clangd/index/prime_tests.h.1B12341116CFBD8B.idx delete mode 100644 .cache/clangd/index/return_codes.h.A6CABDD08505CCAB.idx delete mode 100644 .cache/clangd/index/rsa.cpp.F6A80C29B260EDD2.idx delete mode 100644 .cache/clangd/index/rsa.h.26B72C9FFEF6AB5B.idx delete mode 100644 .cache/clangd/index/sha256.cpp.49D51591E44B1F34.idx delete mode 100644 .cache/clangd/index/sha256.h.928B534961153A72.idx delete mode 100644 .cache/clangd/index/sha256_tests.cpp.56E321C06E324FA9.idx delete mode 100644 .cache/clangd/index/temp_hsm.h.70D71B76F185F0B6.idx delete mode 100644 .vscode/launch.json create mode 100644 hsm/HSM_Communication.txt create mode 100644 hsm/docker-compose.yml create mode 100644 hsm/include/my_logger.h delete mode 100644 hsm/shared_log_file_name.txt create mode 100644 hsm/src/my_logger.cpp delete mode 100644 hsm/src/shared_log_file_name.txt diff --git a/.cache/clangd/index/IHash.h.9F25BB14811A51FF.idx b/.cache/clangd/index/IHash.h.9F25BB14811A51FF.idx deleted file mode 100644 index 57e050064507fb1371708fb71f2561a0790d03b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 928 zcmWIYbaR`*%)sEB;#rZKT9U}Zz`!63#Kk2=nVW&MKO+M}#hj%R?70sa2ps*KSn@Sv zDc{URN>_G1&@!~0-TX&0Q|ZNnbn`G5YfFyfwsP<9=38uA|8&949hUXk!RxOt``ox_ zo6hV_QMRd-Yq}=+Ivq`4B=~sdjZV)JwPqQHE!#P!9SV)IsFa_&#a1R@veAyO+x#cS zT%X|U<|f}T$7rRi#7yqL`pcZ#9cSqWNZGBNHGQ^CfXITj8CXNiYM&X4w!+NJ1S ztF650_v?QCiMfS~8Hy`&lkNlEetSwYL!QBLO#voeCLk9GI5-73#TYmsoFtV6*2e-l zlld7~m>4)X#5iQY1Oq2fnwg!EgH`rq*>Nj{1^ZYT*gy){IfTIkO#iWkJA%JF-?mSH zi3espmjIUpO!~Q)aPrq9MrZgLSV6kwIMl!d!uY6TI$7;3&n}5G@c|WZb8&Nn37G!R zOV>}(EQou}&IF7C4mLJ6ZZHAX&%gk59z#)TTCpimGQ>|v{l!EZRwf<}P9;tan74U2 zxa7E0V6L1N<&jj>{fCQ@i-VDakslHSh%jR01cwdGQdrmkRf7Ts7808l&)RG|QL`9i z6Bj2xl1*G({4kr^e;j!k68OCZq)3y~07;Q5mkvx3%tVj{z<`C>3zG&q2NaetVOUs# zR09JNrWqE3j7;E=gQi_0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Ip-@JO|6`ikNSq^cE_ZyalB#V(vodLJ5`A_K5Tbo?kv#`#U9i%3#_!EL*U2 zzDJU^EG=u6=YzlJt@{N+-hU6Be!g^Hr%dl}2r!yB6BThB`8kokjPwJ?_4L>rXJFr^ XWmuMK2zsk{^pePAO1Vm^03Ysub88gr diff --git a/.cache/clangd/index/SHA3-512.h.242C9E2F57B7EB34.idx b/.cache/clangd/index/SHA3-512.h.242C9E2F57B7EB34.idx deleted file mode 100644 index d175f3db6aa0fdde0254b90237ab2b61c40c5916..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1514 zcmY*YeN0nV6uD|mH^gHf@xR+V@{)CHpCBvb$%>N(UwV&AMud=)|Fumu>#y*ATtKMqv(C18g~r*mX`(#8qGQj% zkBbIA>TPNt__%Ukhxt->_vpzdxBrYE>dk%8=%`C;9goLymMm$Fy?W>U){P}ggNG|) zT6l2XyA|iR-6-#-Tpui+SQ!Vb1--Kh_mG1tM42?5jk=1^{U#H?Ok&pl@E^{sJOTJr>zgN-(EFn zKc5=;MrrK(Fg&`k=TPX<=f{g_!I}BGg|$Np3c44 z`&KH(KvPT!cvIWF>&;JEV=^`w5K)N25)066^=WS|GA^uTn1Q#=Vq-wR7tgDH`1^vb z3_F1Kie4G$`~W!hK)e0qUr+r*Znuwhm2+4%h=3IbIC4WVgY*D)lae_ zRjYqtSOIUzB0bAJuc0eaaD8}8#sc?tTAehpfH$g%#E5_2#wyg-S9l@!R860gmh3eWIf$$l3^hp?DT&c;-o^nbm`8Vssm-MqWY z!ZpH90@6|9mfS8FB7RGAXC`kRherh^C{a_@=U|@rZHAhiy!jkH6~y7$1^pq&4x;fM z=z|H#7W6mWt-KREz`N}dT@nl;uQS~nggPNU_tmEse8HFtsE;hb&_`~qPbt7qD!0~0 z6yU!*kF*7PIW zyep4#De3Ko^gzn>R*5M8LmlUQ{`2|F=QH0~-@W!)>#V)j+Q-qs&TfMog4lXG?DO;5 z<3>XeL<0Zr-V?ZkDU2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dUo4f&1O2tfqoPe=0STJoodpQrEiwbX=Z SrlYH8U|?*xMBhl;6!|}~F_+r_ diff --git a/.cache/clangd/index/aes.h.54DB80C57619729A.idx b/.cache/clangd/index/aes.h.54DB80C57619729A.idx deleted file mode 100644 index f1b5ec7f427b1db3f9819976db623f3e839802b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3366 zcmYk72~<M8$c+XR*&Ji(0iRg4lvuv|5L%s1$L2<(=HzL&#d3wf2Aiv-i3C-2IUhV=zcK z0EEwpDbAi-m`(=(IKsbz!u~O7LKrugASX#=Nv3*27$7W?K0`Z1c)BX}6PiUo3h3@0{eO zH}gep&s7gqON!?vBH~)h}bp+tZ(FHplvltBH9v12@-| z@0)fj{_8z2i1mA8jqwRDI;33d=l@-~=ws!fC_&PG-mK0^&CSLYjpc^l>96Ayy{q$T z?yNo0?ZU5UIoFgFpHaOj@pGpT>8fG*9PRPxozH!~E$WzupW+)+mR}a=OXJo%x4*c) z&FKI5V8sSO()@~zev^7Q2J!5m+AHF+z6m8`}Kxp z@i!*!mGtD4C$E2&yf6FIAG>ySl$M?8*PM?2d1iQy@u0*-Y7hl+u3xqL>p)T0Z#{Jt z3y&;V>U{q5lm{RBKR(%hq#k2bqiT4;vD^D&nV+?&Vvbe4+k7vzu8_BU^6C@s zJ7p=1{x+H&qw3r=#~q;!kD}_|_Ovb7#9Z34VNkF&ol(#cv0`sUo&TbTeb|!oy5Ovc z1z~^FpQ&R1)Zd8wc5=>2pAy>&j}niH73vwSZ@nc~mNjh3rA3uauKbUpLtTINS?jUr z<{f_D|I}=At&_fYTUnIR;85z(rT%U9mJLmhcwwz;H_Iya*?4@i8}_-hI^Q#|%k^^d ziP*lK-uE7t?uv6>Gv!lcC4FajdPjhAJL^eZ_{Qt(eZh@;_T)Yt@Orc{`p8Rg{ch?! z?VwZ~JYBReO!U>=qgR`v|E^SNY~sVW7hTykbm(33()Twq4m5|oT9=aJhY#`YObL6} zT7S~zJN4IFgD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zn zrv?z!00fn51iD5LkKen&ST~45*jUp#_<8A*4X{B?K-L68P=nSG3*LOGzQ_#~C6W>) zYUq>R_2uB??=9X%jw?(;V(%iy)q*7S8qFDOulLNM_M%yWV()Q7V)P1*Y%-ZF*jWo{ z8QEFt|8s{Pq0sOVOR|C^pd)o7M}T^E0MV1q&9AAguEc&3$rb7fdE|kFIZ( zZFQZRBpQUNR|B#d_#;K%v3AGDEzv`8PXehx8Qv3(Tr;wNaM3inAXEUFvuG?qXxe9f z+LpPoV)-z1pk$RQ?10s?28>iXRTM@Bxgh`*F7VbnDSwF*ZM<9$!L)e>Fet^YP47aq{P3D3YSd) diff --git a/.cache/clangd/index/aes_cfb.cpp.2EA4140DFBA97DB3.idx b/.cache/clangd/index/aes_cfb.cpp.2EA4140DFBA97DB3.idx deleted file mode 100644 index c3462e5ffffe8a01acf2c444fd7d70568edc9b46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2242 zcmYjS3rtg27`~_8V!6Ggt-bfqQZ<6Y=tF#rhbz+3p^S>a+HGc_Q-Oj*AV3R*t2`K86h@wh7_3vI=J82#}`j4?yGSoo3;@Wid zKzzhd(a6A_^gpiNy?SeGb3(W-wC&!kSiiloU6gv;p3Fu`NN~!-lc`T`owJ00^xM#n z9l3vB+?@G&PfUL4jqc<53rZ_aslU1wZ;ZhrbVy^n5uk+#@JxihWh?SvzZeNE~( zuUhMBg>J``!0q!3o+VW$*_O#Gf|prNErKtS!CI|XYR4HvXv2ldPj#KU<1L3b&F^f! zcJcg`>>a($#+IHQ)v70xJsqz!$!}h-H)U3|rev+E%^c|){_E-QXSqOT$)#WAE6Qhf z9XNAvBshEQQ9}Rl&ie;0{CT%-<=zvert;RK?mJ;^*#%|yYKk?BtGqNt_Aod;tw?s<8! zP%f5Bad<2Y5(i1K3JXnQlN4Xd!bEYR6nkW$Q|y%Ds96+{xC}^fkiIik3>N3Dl!;iF z@0UO8zZ6jv3#)-&HJHHRgWEDZ+4WNZ3$y8LAFLJ{)y@30K7~WeS#%bImv0}v+)yx$ znT|yBw0Q=+%)%<5tpWyocZucrbfcyy7|{yo0tKNR0`wuEz_gT@pC2@_LsGEKVCJ7g&Ibq!Ymf*qIEW6+#YSW zVRN^t(hIf+oK2-!s0>k>$dQF13r!@tHT)WXlFD+xmji$7G3xszH?q@qWsSd=UzQHj zKJ2v=yffLdQOiPZHn)%z0q@7_1ZWO#CI|+?PysSQ8$tR&y{%z<9?J&xhX&6%9vof?1%WbrZ9Ic|Fr`o#CVCh=sNYMueTVPmBoW|0#zL zeM}|pUVf<1gBr6?Qpn+JSy&4swSdE#&wDm(0bjp7Hs0nDc@{#e0ufcff@!#ZQ3s4q zN_+{fShPGoAMtYgCtKC;uZ#LwM8iBoo)L@EXm%K?fDw!07D1=ShbKPW5#G4&${f)k zN?iq@D}WsHZ?>Iroj(@x5H*i4<0~W0qgJXXdKGn_pKcnKW})5BJ`KB%{OWYtrftci zNI=D_e2D;O=AsGW4g73^%u2Hg$EkU6B5q8a_#9=cNK&N4fw8a-Na}zR8`a)1)sFs}cwB%Km7eR&kt4{+SkWZf%gcMRk5~ev)W5W$uuK2| diff --git a/.cache/clangd/index/aes_ctr.cpp.E504A53DAA4D3C5B.idx b/.cache/clangd/index/aes_ctr.cpp.E504A53DAA4D3C5B.idx deleted file mode 100644 index bf0ac3e271f756baa00b2e32c56c4074564ceae8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3314 zcmY*b3s6&68oqzHL6h7-2#JtOf`S;7m-rw743COZu}UAvC`*+E$y!G(BS9b#S)U!c z>L`Vnh&Viy-K4H=r?qGkU{{nDCs-I16{uLO)CaKAZDp+8>K@SJxyxK``11ef|Ni&k zy_DqSM+`+J<)##G(-&mZ6h(QXUqeCuW+PBksT)NV*PN(W{r06u=A)lCMX$D}f4@sT z_L=;M`r>|%vuQtC!vbff$A?Tj7Hm0ixiE3nr&Z4m{eG+LQuL-8S6!*_yOI=9)bRyn zcfzv#`?onWK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mz6Iim+zNB7u$YTut&l>n9p>1%ayw}3!12Zb3I~_p2{WA#LC!lN(g_I! zH={KHAq2O8vIRm3ZiSFmh~eTTt+0~dPEdD}k!RRW&~`#HmP6L9?*~sDDMh;?NtDFd z<9k4~2VQUTq)!?KFBVUfqQ)5q@i+wHj>4UX*5k{I2~QzzQ6zYI9bv%-RO-i>mVz3@ zIGdg=Aw!T$=SpzfPqdem!M}d3LrQ(1?Sll|sFUkiI|2!qAAgT#(G0YiJM=c7ZDi<$ zudY1ohGWm4eb*Gl_3>!L5ZVV}*b|Z@0h{abhwLmz*4v;&*2Y27(9U^jq7-PkQ#ufkNr%s^Q zgXkbJ=`lU67vmoD8+wxcpx}>B`3!3Xk(C>U9Yl7JkuX|8)Cw|eok1~$xgZLMH91qF zPLN@I>M#Fbdh+f+oi=%OimJHxgBg~ZVI>K}24OZ>Oo(itu|Yh+4iGuOn-I4^cnd@k z>;kO|5->59uiu(IIoXE%jfN%Y6WH3m=!WO|-eg*#RQXXVJoXf&Ab-C8H-e)4$hRA} Y;Q2+n{ diff --git a/.cache/clangd/index/aes_ecb.cpp.1BDF509FA418B2AE.idx b/.cache/clangd/index/aes_ecb.cpp.1BDF509FA418B2AE.idx deleted file mode 100644 index 62ad41fedf7b212051991146eeb9113cc930d4ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2294 zcmY*Z3s4hR6x|zkfg~FVKP8)lh=M2t6pGMNkYWV!1EW?EMWFmt3RFxY1Sm!Dg8~ky zMTHVUv}08iY*9*~4k%KAO8F??5^EJ(t@y7@ozeDzzAVioZ*%wFd+vMZp8HlU@%MjZ zOc08gC7Q%obtFj;ggN@D)XKP2Ac%AWg3y#|_XjRBa1ri)zR9cTVf6!Fo_9_BuIwMb zzZu^e)Z%uez)qI;ddxp%?Fy3$q4D#L_lk=>@>MN$bXs}i*~2xf@~Att*Iz{rSr1)# zRUQ8*Mck5-^z2aMgQTfbJs+F%hOU@v-Iz}sMpfNG7X~-ZJ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ory.cpp.7D6A962CCB847BBF.idx deleted file mode 100644 index ccb3f81f264eff586a502ddb11f766a0d0ae62fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1614 zcmYjR4NMbf82);_7TP;GuI1~MUaywuN`a=}3`1bEZVWn|1ChB6h$25-CIT^(73`Gx z10x8MS!bAzgsE&Zh+TkzIuaGP1u}^)WOIs=%`tu)gAoLDo0xs)^0i#jes}NB^FHtM zzIU6~r=+CF0Z1xXUs3ER%OwE-YV>oKmF`HE0I*sLKtzB%6GQhcI$V(r{jShz zL-*j-AV*C}k32bDz1ntQs%rjD+GM^ZMmfB$@v^~|={a_D!=&lNk<+e|_mUGoiC84J z?xL@M`$EE*r2Z;zP24n{xlR5vbNi8N=iTkAY62rXgL&r$U%cNRK_7W5&SW*6$=kSc zYuRsR;bd?9OeB%T7k-tUn|p2h)WqD!b776PXa6lYkTzb}F>yy;pB8$qdiIjJE^&?f z?9qd4(?w^~GMV=NVAiy1Aj=I}}!1p0nwfD6MDH;Q-J4+P3a%CvNu5?5X^r z$KC2|nt-p3+^{`pXU~Ru?_F`re^WQ%Cu^ju~@^r)8ipyea-lS0|t5 zdgsyk%Hj8qhdkUH1Q*8sYNO7_t1qX{4bP4(q|@K4T3&kPkD1%gxBo*fc*9$Pb9Zsx z*GSb?cXreA7135ma4dktaw1$^9$Fp-0+A102}g6CRk3vm!GvlVfV_@3s<*IPIPCr) zaWpW)<;+5E3P6QUVN^%4Q9k#Lg8?nqCFW-24gyfBlN!}Ru%N-&JNVAThRUKpk(&V! z>Y!0=XYIc1=;B4!n?+SK$V~&t=oq6qo{jgpOC4`Je?q&kak}@TB**V^2@O?@3gRsJ z-(%bw+v9K<4P}%JVk$JGC<f1Lh!f4wzH-Y3yd@>i9n3^#1*Onp7WhOUqJ%hVawMmJ zNFSMlq796}#{`!qXh;Ae2opn33?bkrOa$ff6tBfJPaPkbp5sFHiK37)&9=%NGP+)>==%Ol$Ek$I1;i}){fyw$XPi%h9jY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Mk;F;j#gC+JQg43Lc|_-N{KzrPaXdeAb9eg;M>)6t zUEgP(>;l+IZp5OTNx|3K6<-7~>G55TTWVLV9&-uAWT-jcv<(sDmRtfD?yTrc+@?5s zI_hpy8Z8T-rY|nN@(EV*svWCRsi}3>xa{?|QK4_~Mh?71!nW<8%@f1EHLCms9WnW# zF#d#FpUPG-XaA6uSvv+k{1n%Z1rm^u1O$C}SZ|)c?vg6!4+skq9yaW{n{qI<{S0z{?caSTdFM6C3GDtGr-Bdf~#z z%q5QjE8N<-*&$ZoT@mP#rB%Psy8ZB^q$VKlDXhm&?x*0XT9iCW!BehGd8Ptw!7dI$ zfCF+q1V~sv^x-qlr;2s8&5pD1b_r}EeWC9eWOJ>0Ci=X3`?t%@8d}AL7x@ErWFPPF ziaV8cFk#U%uy;}q8NYX4QZE@nXQlmQ1f7+tWCWd+`pI}71xN#A{GJC%gJhVka3?4Y zl@WAS8ZIN~tTal-`!-G*C&O5QQ+#QH3>^S;R+=m$=&UqVM$lPlrVRH4{~Q8hjAZ$> zch`9Qnf>l{vn0l^frH6k>+8l24fvnD>+-j)I(TVy;oe!JH@t-pkO&jGxVF;ujL$oW z$geHGmSWpfBL!C%}6ZodC}qbpkvT&yw)d`Ri>I4Y3IsqPS=meNgRC?N&^!{8r^~9W_DEM>Y w|NaTsteZ9?9B1tKoRRnJA)|WW1VzdD{~a@7Y_bT3CZ?uz8zW;8BNVj#f3;u2aR2}S diff --git a/.cache/clangd/index/asymmetric_keys.h.F6B39C3E45961EDD.idx b/.cache/clangd/index/asymmetric_keys.h.F6B39C3E45961EDD.idx deleted file mode 100644 index 4cc348e32b14a2932641f4dba8f5382e7e24e395..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 328 zcmWIYbaQiHWMFVk@vO*AElFfyU|K*>R-WCt>U^)Hw~}?z=~uI(R?oG`VkkJo;j>b*Ep$o5VZpSL z6kEPS8^ySeyTt6(oYc_twba>Q{q{NhH!Ms4_L;|o8*&y`<|a7+?RvF8l5hQCU2}0J z7A6K}RvuPfFu}k9lmmiq_a5^*czj#H&IEKbGcy~r2$*2t1j{lqvlgYM6$b-3Fmo80 z!1`hOmiAmy_#8OXjggC)k%LhZtP9ClCN79^P;nk+R$f+Vm|ljW)SN_+OmR_iF*k_8 P{Cc%i=(9Tv%nS?wmyKTB diff --git a/.cache/clangd/index/big_int10.cpp.140567735BDD1D20.idx b/.cache/clangd/index/big_int10.cpp.140567735BDD1D20.idx deleted file mode 100644 index 649ddd3806afa9cfeb6ce98a0e97431390b221d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11576 zcmcIqcX(Ar+CNj0oO?63oIAH9H$69vR01KifG7x}hy^=>B4rU4DM2M<+~@iJ{Ctkj&5w6x&Xl+O-gnNk z{rmQ9pQ0$eNA%AbH*)eYswfH<|7TC0^kx)RloUTj$tl_}Xvo-*bnA)N8hZ~NGveg9 zg#9OGotpU7N4*+j->K`pVBqPxCw`f@5euw032W^drGn zyIpWc|Lx)0eawG;$^&QIHy*u`qTxO#HADR=SY;_b5>iGf?r z?HKUmlQUBX_m9fYTzzuyj5!I0jEngbYja-Ddc@c@@tphOrHF>}-PUamSQWYScQvJd z{>o?7;k}c_4Vt(u--r7hPN@H1&yaoR z-1#F{u1VffwlgR)eZYdG=~4TxFZpFo?&~{d2A!Ij{FjSQy>ne*{`{mXD`#(5$c{gD&1!jT(u{b=^LM5_x+L_u z$+Y@NQn$S4UE&|cKH6{NwNH$Do`3F}633G-x!&(RV#o*Yoq4tF=$rSuT-w3EY$&>S zzgNEr!%WK}-wuANWa=C3KDVza?`_%8zJB`1HwSeem;ch^eb2vHZhxz1$>u#*JPmP5 z_B-R=2=!N#^jF_p)-N(cvEl@?!e=A`niHLhD)dSGS8DsCA=uasIk8DJa2wq= zEtm!~5I0*(qJ}>kZDhg)}Mm_P(+!Y3ONz2FqL#qC6cY9yWzE!C9jTf>ZBz8y4h#f@?+?jRcUvGj3i zQHCg=!gYy##VrD5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W^10 z9E~~5>;atvek}r~_eLB}fbtP^gg=}bY?n}+)_ZYKoOZSU?3dXxxlWMTa_T9k2~si2 zY4>v4OX3RZsnE;UP|q4YuB0)QdPQ4HW7g_%6-}t3DRR7OnouqAH^C3h_@ruj9j4-7 z%=3t^h)acIv+kC)*Q*CACe*}qJ}9=~Ix<{GPGAlY$;C!^FZSg|yhq>jhkHc0OBHJD zz21jL_9W}{`G1*qlzO+pR4#LOk-Sk;g&tQ@Q>7kPQLRem_Fp#^&M5vd^O)dCmkGNp zD_qCVyd8h3Y2h)UhL+)MuuikORIb8$P_ zv7B@(Cq3b8;YwF5&HHHrENyV1*>>a=3p%Ygfl#kcO`$_>+RMNw%aRf|+a>04lW3$A9<80Am z!EttDH|#bQG{^L%EYwjhIL=;dlybpw_UYweJIZ(o%2W+iRTdW9KH1j4p1kP ze=5Sd`<6_fA<+?exA%h+*lo)Dn);d{3Q_)q^K=K8Vg1<1zXd$o>y}W?WG$IPpWP3#I^0Mv{7I;f!DR>qP2IkKa^}lL z3C%)z3b3mHhw8{PNh_6Uk+<&b-YL^4AmI*Cheg_56e7dT92__YJAkzt+rEl{*)qNq zt4n1P>&3xKu}8A*LaY|*<%Kx7P%kgRS_ux3?bl(;Ivfn@DJF`=M2XL1c3yw~a~?;Y$BCdmqArZh_ry0~zB=i3! zwM7n0`4;NgB6$e-YvIhiUm3x$%A}Eh9p=@r>`BA3`-xw~yQl-2ri}REmY>6E*KCRd n^iNUj@=s0vX_J3C<)6dHjrglYK%0Tw?M1uFjrnhJ5x diff --git a/.cache/clangd/index/big_int10.h.C3D09B3E73376EC8.idx b/.cache/clangd/index/big_int10.h.C3D09B3E73376EC8.idx deleted file mode 100644 index b69121a8cb84347526591bb750b11ae887d35e69..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3970 zcmYjU2~-qU7Onbxfogtt72VKHH_%NtG>wg5BQ4103L>&(6ek`P96=#Ohj;`vU_^}( z7fhlU93|s2E~9aaqd^aGTw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NyG_)>wM64SRh50qAaj} zCi|R5mxf;hQt% zQ>UMjNGL>C1XYAlm(HaOpZHhhcMq$5&PYTL!+piRCTbIG%AXuUnqAZ@mabOAbpZu!#{lRmvUol#w!u73|SST{mNVt{BEd)hgB zw()8kqoPaf+XJPFLscZ%rQRwE3ZDGFXOGcn8qM$=GwPx)h6j()7#hQ{(inA9H^YJgWOKVz6iZ_n7A>Q(;jvB? z#nCv1y^_&5TbxTp@id-c7h*I%Jl?4y5A`s-N*VRoJT4U_&;*7z0HX=v2~HIy(nN+A z7^8`{M3;)Z)XVVZVbmM$b*dQLWFgh}HWF)p7Msp)_WAGYhG(R#w7Mtmq0=?@_V|p*1 z(M%yz#47-85gcjR4q*kM9RgZ5K}e$s0$R2{NaM3XyO0eJ(wGLIWt)REz73#dbAzC7PP~M+6zHA~KdLCG^XThV_0a|uAI0;rO%q=?`q%kF+mi-LUMVq|(?~7VS z5olGCU{YI^&|B~zLem4Wvem&@tPNO6HaJM5!2z{wYmi1;1GH>rkj5f{Nn{IyG+G!? z_iO-Is-Tt)3#!quK;mS#f;1Wxm_)WGNMrrMB(f<%8jlvxvK2uZtq4rgv%xIs{Gwyb zsK<-sVv;gVSWH-zpqBjzPEsgj9jPpn-iI_BLyT6uLm5pI(nQQm{6AtX+iu-o1tPQ7 z9E?{Dqv5W(%U%U(>~TQL z9tCMURxr2hO_0X^2x{4rAdRgNXxWP(jXfD?*@GaB4H#(IdmxQ@gC%=j8F=`CmYoKw zvBSe8vco_cF9o1wXMr?23z$Uq6G&q-2DR)WkjCB)wCo;`t}6RuiF|CUt0q@x%U|g9 owdZe58@DCAm#?3{py7OFvinDaU$~e5qIKby|Le)${ZzsK0nP@V!~g&Q diff --git a/.cache/clangd/index/big_int64.cpp.36B19D88625F787A.idx b/.cache/clangd/index/big_int64.cpp.36B19D88625F787A.idx deleted file mode 100644 index 0a6270b0e19c7f6d84952c444fc13692e5c4efa0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 liter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I0#l(-ejJe8K7$~LYR~5X8`@vv0zgloriZC#<%@uUtUJ(U2&NblHVRY;7 ziuZr!{-1d~csO6a^>q8f;<7`kVXX9zRj(mhT$8dRYd>6eXZg`s-BPcK#$W|bSN9BJ zx3M^wimo02ncJBQv3l*Z%Z}A+pZzQnWIhxp~;GUN8JA zec;pS>H$Nb3@xi}sn-iT?O45DD3>mzSFaZ;?cZ0g7b?{ok(L+yx}{z(RAD<9Vx=O2 z4?{r;bn91Y{EDT?ZSTf^MxMOuv=XrG#JipNp+?<3_Uz_&jhD}=h9c%EVm=Vb71w)o zI@vMrtYWTGBdpYj2H$JUzqViQHso@HY8b{7hoOVMbp0ncKRc;)qq=lb#lxz2G}c8% ziT0!LDp7NuDY6KYsm&>`$P&9}Tq4s-WINbZ5G1#{6Y=NUR#;_of!(o3rg#K>u1$(XDK0W=l87RWtTxqYY`sfo!xP%{U@kMj`!S zX&#m?)Q5+q=P=$~)vYFJHpv^enwznw3EyCXf>%l|_+l3p4*aXUk>ERB^hWwicYnN? z51L-N0KwO~K=|?N@4ejod%urg?e|pkFOkjv1pkD=FAhf({u*)PSEqIOKm7{U>_4@_ m2oH;hj0!lyZ?riA`0K0hzxJM6L2gRzCfzU?afeW+aQr`(&*-uM diff --git a/.cache/clangd/index/big_int64.h.2D08006D10EDE9AE.idx b/.cache/clangd/index/big_int64.h.2D08006D10EDE9AE.idx deleted file mode 100644 index d6291006d02d2948601b76112157722450818453..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6434 zcmY*d30#e77r*E9mfm{q?bTbVn-(c)B4t-Hq{3j3r3f>OE$b*oma$f5q#4<=WXX&f z%kYgch8f%NSrb_%vZeW2G-Rtmk@}w7>v*pFtM|R9|NlA9e$M|C)hja6=%UkgAJZ#w z%GepBB%MyD^529R@o~AJ(@o}oNX*=`vhTOo0+p0E1G|oH%igT?&D)e-ML>EPIrgIoANm>9kK zaQUoF{WkX9cQJp5cSyNS_YODIocr?L#@37XOgXWCb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OFcHm|}%X0W=}0VTuhNh2SedCC8COF5$CacJ<2xs9Lq=O^vYoe~r@7s18wQX~XO=I8R)f+~P;laa zR(ldawI^RAt>z?vYEBMlwI%^nDR4lmF$ti6!u!x_O9E&|d5iZ$KOJEXXtgA@pjwgx zS`A46T?!6pwIcykJ90p)83~}8kpo(-NC2HH4rnzZ0ThV&Jha-70ICgni}zC!g#z9} zs|BeA#dr>AH6Q^LTsffCegshM$NP9cEmAt*EwoyXTEvf?Jjx`M65>Bg7-;%pZ+d7S oNBW}EIg77O;;V!B`mXTc{}cLb%iuOSna+Ex92+^=J2>n950xEirT_o{ diff --git a/.cache/clangd/index/big_int_utils.h.D96CB7752F83552C.idx b/.cache/clangd/index/big_int_utils.h.D96CB7752F83552C.idx deleted file mode 100644 index 10bbf59a12c0f8b63a0b1d25baac6cf06a1ff03a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1830 zcmYjQ3rtg27(SKDF1J0GmO^P!D7P($v^*N86%@;W7IbTQOw1^ZPEbUqGH97YqHzin z-3IcIEkPXN;bsP!XfmUV$tDAYDavEwG-5WF;0zPy)agLS&b{5?wn@L_`~L6#_x}HP z&YSC#la(X@Nn6&J?<^?GBLD!t=eK+2hjBJUEjlI7&?SOJ7^^4#~iR)5E60a5R zFH;WOdVf0Ax3YR=>*6?d!S1)^Pp7ZWoKN39WPh14UEOd$Y|E6j*wNLQobgtCN6}WV zycajSMZ3B-eIVS`v1ztye&>OS&@5}ufF>)VXCUwD#sO*J<(T@r-{iMin@!H&BV#4w zg~O`fPMxoPWU-V5wM;=}^_pwL9F(^uMm{bi)~Z0}`7VO&~C>J`o48DpfTVdjxxa9eMK?E16U zN7XMoFXWs4l8&kKwW%fR#$Nke_{89Q-IkMjI4bPh)`+LoYsD#v{Y{4|g!ew#cXN6A zM<=riI`?#hH{JG=Sv%LH8diwS@#BRd??~&nl~XH<)&|AYj0D$|o|*v8-8=I?MQJ&+ z{(g8o!RAc^832r@x2J*wK%qpHO9YJPo;4fGwS`Ai5U7!%SW>Ly08l<8(6R>o;ftSr z|HtNR2$ms(QDRhZ04P79%W!9ov8siAb{hC21K~>qalpMInC*~VSCdmQc*y}lC^BTi zOc@7&5_^Khfyi*~s|jgt%-u=|0+7KjviorWD5)3FupPAjG{$$q+lL?sLk1nx$vFTN z?E!Q_$S~396LYbD{4fLxWPlLLH~^GL;4*YeW3~F@ekUMUiVPNLk#hhj$ty0y!|Z~| z>8c~=Adn-237TXa0Lq(i8R{#p&Bj#EK87G18Au7K-~dp*lxq*+$2Q94S<)8}gdl?r z+5$KL6kOyQ(^0V1dCUWV^!Z^cwW*yH2pNHw0FCVW;iwh~T@n2+LnZ+x_~R6CT|TpAC-Ke{B1ObAi_#Lh z5GZ4bwiw*lYD)sotO{!|&(erA5zjIMGc|Zfe8A9D?CHW&;bVnl_Do?ps!zB0%gN~m zf3#L1A;s&23`vq=yg$SONEOduAPm9%AOoY}DxT4Sv|Ejirrm1Z{@zO7DIp|~XHr7y z#&k;EQalJ`bb4Kk8;jGKcow0EV0aeoAFbq>Uak-3nUOS#`7mvaZP~&xXY4Y25Izo& zDJF}>_;fQy6%;-qQ3&;mVu*SM;=R@j?GT)+f)lBz|7g+py|*Hv_J*^ E1CC2Rs{jB1 diff --git a/.cache/clangd/index/crypto_api.cpp.E927BFDCAA5B6960.idx b/.cache/clangd/index/crypto_api.cpp.E927BFDCAA5B6960.idx deleted file mode 100644 index 7b42b809fa1854fc66848e26732f513468396af6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20086 zcmZ8p2UrwG8{XZS-JRhUxTBY&Hz|UEfLOrZHDbvoCNa$xTWpCX#u|+UQB=TAtkD>| zq99nnUa_DkQbZB42NhI6|G{&Z_4j$?c%AQNr+np|Z@#s6myR7r_2jsA1G`KdIcWU% zkmERO@^{?$u|J&_InK?I<0h^yQ%C+>5UIakUT4NX$=E+{eMZHt^FwFl@7e3{(|q@_ z3tla4-Dh9>_MT!~SgCE@vl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8tL#N|&mPHx0V!*mR%W4)H=!6dBL@;tZ?>*@1Ih{3QF>#4TH zZ%i)yc}hhA$t&gaj`^$#pdNeX^Zqn8LG`8V_)>PGOVP2tVQVQr>^Avg{kxGgM8XfH zximz=50~sT=X7IgzeU$99^WR4xJ-6lCVNs{k4hW+_m3UNk&0zC71*b;;$!M?$TFH< zn7M+*5HE)2)b#(1Ts+|Aw>yhJ=!Q)JuQ_j(@HQn3 zQ)MLCv z-C)x8gbW;jKn>reqTnaP|Gsv}%SxKXkj@nzS0IXSBdD<${vZmVD8sEB{(GGHd;<`i5Ns+$CTd z3h&}B%Lc^7R+5I3u*pf-lKN1ptE8&E-jJ9w)QOOIN9r2uFK;37jtr+rka$NraB^8L zp@ZxkR)6yWiMOQMM&6Z>5b>4_7fV*fQUJpx5-MTsbQ4K9seied4(rb?0RbB-JG>(6 zGeh*BAx1D)o+0^XNI|qeY9{sJ=)=3uw1?-5Vs`v?+_9R}w7vo^uRsv3vn2@?;8F{M zSQ&E`49L>b{zB+g2*YS_A@b0_7B-_JAk`b9;k4+^4v??KfY;i$g_0z%Bq@xo*dEES zhs{_~>m);+0WM;gc0hE|^a4HA#q)0rPCa@xt*Jj3!0s~J)Ly8Uj-erN zh^*OSI81}4z$vnJi{UmwrZ!)HIzwrKj^S(pW^3Dv1Xv`o(W(kkQuu@0niDcWB3w)m$dB*5L|#{t%|^PNY<(d%tEqO zMc`E=)19wB7oakvqnKI}S$ETaN(|iEeaU`}W54!izxHOoe!+hIapb@e Y^<`1v<`IEGjYC4hnzRfK4QR^!4-D%)J^%m! diff --git a/.cache/clangd/index/crypto_api.h.4392B6162F6AAFC2.idx b/.cache/clangd/index/crypto_api.h.4392B6162F6AAFC2.idx deleted file mode 100644 index e226abc3abeecac897744d4f9f90beacbdd2763f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4334 zcmYjT30PBC7QQSmA?85>Bp4tuG=vaH07DcpauG3Xp$J44Cu~MRML{+dlp=M(qD7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1LN!r?-?OXTB2HFU<_XBy)*=+(N7|m&vqVhmBO%> z`0gd4j0lCKTOsL-vfJm$1#{<(x=s}fx$r`65PHxek1ymBQJzM#-WS z7-AU?DbxDRx^j~?n-`haT9as6tk0`!Q1b(A511G*72|V3(@OsL&EH#^4-%JyL_|CI z&|j|K-}>}NiaLEQc8KkO-GQXuQ&NCHq=wgUxM-_II~#T zL_9YUKa7P7e!ffW%Udmq1>jNuW)`$%;9Lei7^KHH?rW@?TlEv2O0*Nzm|->+Y`yj2 z(%*lQN=0YU*&E#^6=TI%>$XfPP7|kjqidw%5^;$)I)nEcka;<1#LskGV^?E89Ctu} zq3Bmg`k5}7H}lqH*HW?jblmkii+0>vh}&Yl^-OOHaeNZia+`J(a`uJnJtih4O69h1 zX^_fu4n`--{!XN?aK$A1Bn4VW_nr3X3bgLgyfdE`r+PNf_e4q`WiVr`i`vD8v18O@ zY&beYJ;R2TOVvxQJlr>Ph;;DCwZGCs{UKsJL`>*mOJsMi;Cf za1M9}L!ElVIr1HZ(Q^85xkfw@e%Yfr1J}Q#WS(rr$fA;WsJFgI~#yrqQ9 zn>%IRD$5VO<$rB|2K*tBxUrw~BQgBb;SY(V6Z`35{R!gp{(U7r{(;@(`c68do9P{Q l4}-+r+AlG&pGNj`N=m{^B^Bigo^Vo`%)Y&{ogH+L{2!MK#EJj_ diff --git a/.cache/clangd/index/crypto_service.h.1E16FAF97B2AE712.idx b/.cache/clangd/index/crypto_service.h.1E16FAF97B2AE712.idx deleted file mode 100644 index 6eb503e1778b2d468bc3c9def719ccee1b0e7355..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4648 zcmYjV3sh9q8lH17V9p%&>;nuSFwV?j7(f^h(2H?}R3xE=NPr?zq96|yR0c#a#RLik z6&0;6sF|kVJ%?RzrVfz*Y`glG4}P> z^^OWf)a=-j{H&r`Llg>y6MPpIS>{Y<6bc&SZSaZglsO5X^d&E}FSc(RxI5hbi^gr~ z`lTm3?q{TYP`CA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Svknb*2CQ2m`m9qw zzAvbKti`(faHcxFrMuKO`ttl&cI?KD4%SKP@&27Dm?}lRX<_d#rQ(6yeqw@0etGxf3Y}h}(&%S@-eQt@V-p?N6nVP&>Mvk_ytd1{e&~V>dc0@b~ z*q(E7TX4~{t+kJ~MX&-Ut~52a_w+pOws97CF50bgKjoJHJ4J@cp0Uebo}EeS1ET6% z^&?ukOl&g3HH4zfv;DX7u$PiG(reYH94q2H8V+)++fy;88g;ii*y{*=gPOZo760C) zb;~GxeX(H8!GfWCsy711#$fRysdt3kcI&Xct?8{z`My|2MC;aFMn%spHW==D5}+Aa zcCYxvU0dhy(ekbegFtrC?zj2^=gI;5%-c?pC8?{LO3mZjht4sDkU219 zW<=xB)jLG=Us=j36e380gf3z8jOa#e2%*zH32Zml*C(8Gs6!!RQeZ*1Ab4Clmw*sm z?N0*t-0|M>=f5|ikdPE0bcDk*q#JS|L`UnBAT@5i%8d>|f8RM7)w--0qMF zP*Ra)x3`j}1LFb*fDT^Lfgyj_Q8ZI`Y7cjf{C9 zGd!)gxUu6!q!x=;xf52OJJPvA^bqIU|i%Q@&oN5D{xaR0u^+(HKevy z%SXt)%1z{aKy%N%zj-K|{~RWr_=JFRB3ub~3W@k40p%-l6}bcCES$KSsH2?FCAYtT zwU8>4U=l3KfUqLO6cRB-EMPzuZ6y*@NWoOFKy~C67AR(3O)h7SMrY-Qzb3aJHId># z#D6fU98QaxB59e4%pA~AYFv_XdZ<*XF)A1Gmxdonb@uu<`q&RJ-&DYZ_+a87$dq~% dP>($7F(x@S2_vB)gQKU9GMNS#m%&2V(0_EfH=+Ol diff --git a/.cache/clangd/index/debug_utils.h.B8FE501C48F17FE2.idx b/.cache/clangd/index/debug_utils.h.B8FE501C48F17FE2.idx deleted file mode 100644 index dc4930d8ec3228ae6ecc3c3d91772e3ca123272f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1066 zcmWIYbaPW;VPJ4h@vO*AElC728H9njxTGkvpOJyVg_VJ!V$R;+*z7|FB5(aqHcz%Z z)%33U;&#nL3DO*`d%b4G-9DqH`E!Eh$Nl=bTd%!((VTN(+LL?5ewT`c-tXEj$ri$u zdm$uX>p9*d?-!VQGJLHxy}`GKO~-_bqkdl73jM|B*Y;P<4qR~4{0wiGk>~V<($k;r zc9?BZAb-@Q>0DQ&+L_79_gu<0GL){F*7)MuMyJg#4m}xOQ!ZM7K+OgMLCR)LIXrp80de+^SE@~BOEeoa$N@v)h*o7NeY zvpGC78s@z=I(Yj_&{_$l*=J&nFHi4gTspm5MZsa>8pV{a3%%F7C4YbLP~dWir{eAa zpRlmfhpUudKXvta{3&Mt0r8d3-g1YAzV?2yR;7Ed{N5|KwHb;lbCZ?=<0tTT!`oB# zUDJ3N#DF{y;1_2Vmtx>#V`PxvX5?oLfAIA0uD`S9@i6d0Gx z#kaNs-7O|1rVO(x_~D9+D(_bB1)9ys$tVRgyC^j$5yUPoN-hotF@!(_1n|Ka3=9GY grU-%wcOfL_LnZi6^m6T*d~A9#n~<=GAfEsO0F(z{{Qv*} diff --git a/.cache/clangd/index/ecc.cpp.ACE89B9BF3464706.idx b/.cache/clangd/index/ecc.cpp.ACE89B9BF3464706.idx deleted file mode 100644 index 62af457a9fc82a5621061f0c14bd6411104cb7ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8700 zcmai42UHZ-*PnN1z};nFm!;^5j0Ya{E65=&5GDo42YoE z5G<%shy`JTK#Y-~qDC;WAqvD;zPFg?8~@)q-{(25`#bl}o!jqyZyg&lY}hLYh8a93 zBra-h%uJ497$f|5SxoeoM|2owq>^FccI8Zn`l>!q@u=yo3?83ZzOL&j?=;7Wa9~Mq zZfbE%tlpEY!Qn;1MCJG`(NA^WJ@0dVME2sKC4GL3`e9Z4vyR_eM(i`{n-!vY6xTH^ zU~A;eHQ%dBC(iJ`7hjcUs$3sb7`Jb_+sdWUYYvPmd{OF|_bB_vtV5a0M)~@b`g)8F zT{NUnKC5x^MlYRbE3a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0K_*BzvO?%GquZ93huYs;L;4Q{}HR2nHT5zfr%j*EU4zQ%u!+7cYcm+(NP8jfI$;XRd zLeK`gTQ=L9yh>Xa-Et{DlQa9?5UKGK+yu@b$r)rqAH0OPOGuQ*l}J)4rdJ_J6~*%w zJzZm$k^T(ZP=mM{^yw7A3l9tZn$c$uB>-C9qm!1B;1?S!8 z!!}F3GwNLS?G_6>GIbStbY#XbF*?*$|GfxpLhhT8H<7L#WlRd_5Et_J=po-j_d9$Y z1K=UiHXJRiJy$o>902h+S+78k~jel<^KLuf- zZW?eWLOaI!heRwI^BQMc3o>m%o>c5xWcrrk=(&sWZz}lzSVYfWHXZ+qgi$pU*7g49 zKV!Rujt&1}OxS2DMs&bu9fFPQQ+!UuQ?nS**RB3efNA?c>|MyT4zr KZaumNGXDcim+wIU diff --git a/.cache/clangd/index/ecc.h.245F06981E47A1E8.idx b/.cache/clangd/index/ecc.h.245F06981E47A1E8.idx deleted file mode 100644 index eb7b3cf483e0104aef70659504ace926c158a05d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3306 zcmYjT2~<;O7XA~GzT3d^?E~6t_tTHNk4rNqyoX)77pO<$DoWo7-{qO(o`h9s* zGt$$0Fhb+!W|TV$7SE9&gp}mJbaBZaonnM`cp_9@zdGCT-Yvb)gJ!*H{q^v=`+c2r zr*ApZ^64JOzWV96EbC|2Id85JZK|LC>R)3{MHly&K6czW`p^FIhBFUeJu_|S&-{$J z(%LubYF%N#p11pV#D2~lC>_0gX6ovfwO8sFY~0I#e@uj~c+-jb(voOD+>Gw%n%d|OPo^SLj zds4D~e$1>^d(OolmZfi;d_-OSy1vfTpl-O3eE-#l^LtZg(GTWr-q3b(xl?huFKBuH znSamjPH9S9^St7-xrfguI{sAMo6>yY$&9V18qxAC#;!NA$l|45%X zRkDAXXG7-LMXeJ8b6#5(=bmjj_lJ}(pRT+$xl8o8uP5jcwKr>OTk2BwwsV^3#}(F; zMO%OSnk_DTYu#PTuGT!iZL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G?lu?pbPeS_3o@)_~mQnOV3C(;#;TNqN{^TC0G&#m!R} z$_5I47Lf|2ECsc|1`ucuGB#`~fi|P?9tLeQV}TWbv5_oz0vED?i4ikT+kzS5lkN;M zHY5ju6ts(^1#c3Uydc3LS-oNCAxndTq!67z2{>s(N XIkfFum*OW$f;}-FCAd%Q?yvs`+{N## diff --git a/.cache/clangd/index/ecc_keys.cpp.94FCEEAE4E9A5503.idx b/.cache/clangd/index/ecc_keys.cpp.94FCEEAE4E9A5503.idx deleted file mode 100644 index e80d727090f943fb92ec14b32b5b00c7ad16fcd2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 328 zcmWIYbaQiHWMFVk@vO*AElFfyU|w1}QX|P5{<)z;a=NT;;c7F8YEt;D--AtO@zhc!) zgW}ySJ;7^j+x9$=o@>GNHapJk`6RwM?JaTAS>1d&lbT;Gn0W1?(!n#i-%p=fFQv;m zWtQqAnW_Wf%rlnwIr2Rd6*xKa z!oTOOVLwv;yq;9asmK{{)FxT diff --git a/.cache/clangd/index/ecc_tests.cpp.691CD3DAC13A387E.idx b/.cache/clangd/index/ecc_tests.cpp.691CD3DAC13A387E.idx deleted file mode 100644 index d3cdc94da1107f0a67cdb684cd4622c7471b3ad6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1594 zcmWIYbaOLeV_HprFYi&7PR|rh{S@HSa6HNxz1mW{j4!C<)Z@;Ng zaV+^u%e>2;)iTLCZofJ2zdYf#qQ7ocYqRx+^^3fHW=sye&=)Kqs&ZqovC_!o+*?bsg0UuM}m(+!E|MBlnC)d)hv()-#4rPHz#Eo#V>4Gehvsz4F`d z_|9K_s4gsbe(JTb?RDvEbiO@X>9jLNCArP?)fp4bH9IdBI$W-K8~;V!c4NS?ki)OJ zvczJg-z=(n^PAPkhHbK6aOHxplGAR*@4f3+YtkwEXzlM}gCJeq?vmsGC&d^)blO@` zC|KzIyT*KD{1{M}D!2k+HAo%Th*GT-^ z86Pnw9$qZc?_O81vYhp;$07ZN=cfkEx%lfg~}~`%2t2`P0Pi1au(CN|*zK9X4l8(id<;b0Ey2Ob~a& zR6`s9lY~VBn%*_#FMF1sH%dZtK;h156_dY~rU4zmEyOJY^E0PK@@L7o*%fH2TQsGWP8O$Y0f|sR^oNoT{qo*2FP73Z1AM>)a%v@%NhH&ps5b~loMdbow)-| zc=o&r*}pY6?m`PjSsPWcdgs*_(NzE7pYx`;XVn#;Fmn16aaxoYHjniNnsDiJ_S9qQ z<{)8Y@9c1!TCvXIIlAgUSLXa>JID42&5%0_r;F*7y($WVPN2cGa30Wy`8)B_wkBJOagoi Y$+;;xz!HvugNuuanU#&3g`JTT0RMF-dH?_b diff --git a/.cache/clangd/index/encryption.grpc.pb.h.FC865B7DD33369A9.idx b/.cache/clangd/index/encryption.grpc.pb.h.FC865B7DD33369A9.idx deleted file mode 100644 index e118a8adebd06e6d132f4f2d186da40ffaba74be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 251146 zcmY(L2RN1AAHd!BzIVLl<#I2sz0y)?rzy0HhW1iPMSHJbr0j&EQ1+HxiApJ1Nmf&t z5ke{@lK(mH>A3#?=lT2mo}SP1J?A~|+2_1>`2q_IqKYXocl(0l4m%ESB_$*z_~8GC z4jl6+}ue)iPIud)*b7dIdfEn%|KRLN3Zv;@u#QX-z%uR zviU!Uvz|+;cVud4Yj$>y_iqU_HTG{g>3sUk@qpCDuN8g4AKgan_MBuv%fYfy0h@om z&(l$tHGlHCEAzuqxnvikTfe)xYwag5OK5JGnOZD=Sti(fn#fqQ^U%A+dp%oLJZ4x>>g(HAw#nK+v|)I9h;>2htxWj9o%lv+T*z2-Al2$ zrkS(jc$C}J-A_g?x!z!*tl=iQm(u*Xzh<8KTvAiSFHB?Y%d%}lj!OgtEt|W;f6wNF zb|^_xjXE{>|M=9dLs);s<#%&+l+KsbS$wt>2Pw9 zSDJlz(1dxu>+RDmW*d7s7*Ub;8+5j-YLsknp6&NZ?}Y?c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cKx}(`gxIo-mlVu=Cs5Z6B>%_A>vid3s~Vt>-6^ zQDu;i`^7Q&!-P+b4=^Yrd+%e$5u44D6s9_L+N>Xq?YuD0pE>kTyUrbZO^+RV>c=;) zEr~~&U8C}jzjdnorNxYwCw&`sNoSBZU)*E<(IbPk#~BQBxV?Mn_|9o9GMQalnk0_S zoMnY6K@8@TAc4vt{f4|PgRGx>_o{;GonbJvsB%Nk{Rht*z+Usgj=Pz;pVrn&mQFEA7$6!Jh=5jF@T7;=v3`P>w=5sCxElK;S zeetR`Q?mVxsXerz{ZyDB$zU)Ra$F1sK_U0VU>sTPOwM1|`&njgfrt}021DR#Cm<+~ zS3C2-BIfmG&KNz@fvH!o9>k&S8dAT~+v2r)zx06gp!AS51Ii` ZMtx4FK4(#%Q>o8Ksm}+g&xh(h{~vc;Xleie diff --git a/.cache/clangd/index/encryption.pb.h.2BA2DE5ABC344FBB.idx b/.cache/clangd/index/encryption.pb.h.2BA2DE5ABC344FBB.idx deleted file mode 100644 index 67922fabae2eb1daff6b24b802f18d80caa4c8ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 220562 zcmY&h2UHWw*H4y^C6t7ggx+f?D#nflMG?E$yJGLpUa){vL8>A}K?I~45yjpR5J9nb ziio{n0Tl}(@9qve8{gr3zw`gj@7$TWbLY01&GYddG9-M43TMzf?~Tjnubso=a5#GK ze{0sRUVK!I!{K$|a5nB&OkKXRrl;=f(M_SB4yx`ls+=SB<4T4;?>S@cKKaq(7ivcH zT_TrTZf@E+e%fc>wwmb7WjkML&Og&DEmD!R$t-Gt!_6?cU+e3Fi2Qw(e}w6)PsMlr zxl(nY@bBezGvU)e>%4RKZof2F&F07qBd>m)V6)3W^ls{Glm798c>|v{ z9nA~gIfH*}MEdOi2J%hyE1J?&?F4+6dAB`uzFC`;*QCdMO^J!I6sb*6F_!+4O_^kC zq5rVR;^UyP#*;Z-)dr!>dLxE+Hg2#PaZFKrA|&+sMAM-oJ6m7&40_SdUF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C@qwDf>HER^29PfyC;oHI5VFLS0vg@r?cNCu zr6+4?7e4V4c7ebKH>EW`KD>GeQ$}Nw`E%oL7k5^iqDg$?2VoLy3)~dg*fX{TVG3$Y zfarB0$o~M+#ua1$ diff --git a/.cache/clangd/index/hash_factory.cpp.7CEBEA3079B6D93F.idx b/.cache/clangd/index/hash_factory.cpp.7CEBEA3079B6D93F.idx deleted file mode 100644 index 85de4a9aed34e64666fa47cc20c406e5d82f3545..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1920 zcmY*a4Nw$i7~VUM`{8!??v}gbgk`kLE@^Bmj2*kWVDQSlAKgk?!YQ5LVX2X@ z>&;7;l=pw>HEv1p-Sw<(SQ~%0BHp88e63~W+Al@HLy;@m_gvI9Pu!WEoE5X~Hdj+Q zaJsZlzbP_s?&;m9CZzFx9)4J&$ff-j062UUwWe?yyM}$hSo0*Kj{qB8^y!EUD4m@ zx77W9s4=YNz_Y-|%kp!BVvbcy8~V2H9b6TiVlyOPz>{k0hvqdJ|CHw4cvNaHE67-c zW@>EC6Ky?TNUOza6-LpX^f(PECrM0>&d{}FV4tdqIWACQEjm_uD+4uzo-o1j$roSy zbfoR7MK31NaX1lf&}hY40*>PWBJBImI?OHpzu2CeBP=twy16K*fn%Pu{AfdQG zZh{M0jFvoTaO6&^F?4E?REkqdOsNC|gb1a622 zQ_UirBD{(5kkE&`#wGMOn#DL3(BupWBAjB?tlot< zoTFUGBDavxrQ+L3tEVpwI^}5YB^ZGYX-bOHW}NLnlVSbXAXhENaQ=V}`TTZlbMC4> zRO?6kjR(4<@Z~Z4?H!jK3Dv}NFDavD3?M?j2G+RP%Lb3XLfys zx&-Tkon5Y#+uprOj((45-iv2I9d~g-#QCQsBWPPDgUR{0poEm4kE_A+566Snqub4e z>319pj-wM?BA(}?z!!~YiVy=xdmLN)Af5gdH8=U0oG)-{Xz@>P(msEnsWILR<8rci zTbv0mJ<@n5CQW|q7>|UIJ-0v!BXgCoIID6YPR=P^$Re@GAWBj8@}-U+YjbxO|4Z1GwCh>T zop9Hkb4?~JZYZ-paps`heQV#_nHLix=l-*>{MS|$9`~$iQG=cJ+#A+gvi%MgUUk}3 zbHHI`so}!QOYR*CKfuONT$!6R7wG!6ucH+79g5i4nHU)uIJnuk1;GRZCs2-ofsun% zVPOVi=g|Tg0VZakM?rvtkAshofdj%xxHX@Dp4=u&Atqj!G_M%1B20R#Ud*mn8?M-h zF)_lVMVLf*VbU(A!_1HVEqles#KOeDA zUQS*Sm=kz7Kt{uq!raZs33e|`_}w{uWA>EwI!rtqe4>1cFjYJpLfk^)Fz3Kb1nLEO z2Bz2f$Mf&@*H+pv0#(Zislimk{0LNy>;Uc$XC)UUiMxVSvkP&-RBu{5YqRY{&0?T1 z9}^!t%mGggSii9Ii+2Ov#V^7y2NMSB)e$m-=}j?UIP|>c$5}=$4n__}NoXiAz@&k~ zpdf@f_w&;A6Eq9rUW1I3=T|{8(p<;}rl%-1ClO>$aZz${Jcz*qA|QYp#$bRZ2QZ%v gAB7dW8x$zInXM>Wx{>js%%nIr+oVcQ;Q+eEZbr+L`{WI_^EYt~>5< z{^S2jy`Ohk6hm=kZW7R|3`MDF#Sl6t5kwakB^Pr8X-1x}E}?aWZt7bY7?N{Sa(IAZ Q99&#X%&ctOEbNS&0D3`w&;S4c diff --git a/.cache/clangd/index/hsm.h.ECC6854A1862F7DA.idx b/.cache/clangd/index/hsm.h.ECC6854A1862F7DA.idx deleted file mode 100644 index 77201dece3765e7c12a4f26a648ccd0374653e10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3672 zcmYL~2~btn8OIMV2W5GBkevrSfyY(Z1W_N$1p(P*6R1|yI*OtZL<3LUf?6@sRAp3B z5?taMiA%&pCe=huTw~q0R;*D8rfxWC5l5^RvEO&@eDm%Mf8PA>@9gJ(|ANf4w6Xme zOP-OrsJvwUG|m`vfj`Uq%GsA}81uAaY|)n81=n*|M!5d=W#{&FEh|!YeR!ufyRKqW z`KJG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iV2Y@|+*gr;fVNHh%l^8k_11ucg1G?@&*M!}5YP_W zp>Ip`wfQGo1PcQomAqhZPUk5m)>rRnR3%vHpRirV*_^DMRW{?u;E zlAwKxZOQ;C*d8AEB8xJ9y=?AnekRxm0Gzm!L5g+$O)q)=L9_8U!Mp%S;z=ec2xx~? z|9;)$wYT=Z5NsF#{dhlv6l)Lm)$N`8VtWDb1|Wb3C{hs6HaVkn^7|f3e%C9Q03epf znxr70-K5HrnU+%c5Gbu|>}5((xuKM@aggam)ts^kYz!u{DUra&I3k;J2y6@?vMGJQ z#^@oNG6!r79I`2Cz{Z#%oBrE6Xt^RcpE13f<(TD5C#YAmM`owfbA`hQwD*J0Yo+>57-zxbR#Hlz{ap4+OhMp*Un;(RGnTea4K-2M1To6 z6}r#_D2kvh<`A`|00JA+hir-+urYJUrmo>IF=Xg4DP(}ggdw`ian9|=Gqt}5+s@7o z0#19V71$UzWK+(7jUhvwP`ZGP(Ly$53fLGZWK)uWjWI$t};SCX%B@2*q9JRQ#62$xj;7ECD?Ba z0@^tW0-!Mkh^F!nHr9T!spx}^6`$D8QooCqpvdNtQE*NciY+$gVt z!F24D4$u=u1NB6i05%2!*^~reV+@c@UBjBN?$es6?gNcQpJ=M~U}LE#n`%7RSm4Q~ z$__S`b+YLLg(0zy(~z`eu(5uVP4yc(!QxGw&^He>R%@c^8UT%@n$DSOG}u_6sS~Qq zU}IS(o9Z#xSd7W0DhxK3V6v(9f{lfj?8=fk({Ol8<#daRKjKidCzgIdv2HE8oU{JQ Sg+v}7H!7CJTi=Yb{`@}-AU~G? diff --git a/.cache/clangd/index/key_manager.cpp.1A56188EEED4808D.idx b/.cache/clangd/index/key_manager.cpp.1A56188EEED4808D.idx deleted file mode 100644 index 5c78bf1aa0d3ed548c1078e2f050bd3426969da0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 332 zcmWIYbaQiIWMFVk@vO*AElFfyU|N8_!tkbcT*W{ezKJ@y@w0<+yUtH|Te$LrxJ?~am_OO$Vr58M2XG~0Zw(Ym-)9~Ih z)+w`Mk63{(1pcn@i7ZWop8#fC(BPRgIcZeDQ diff --git a/.cache/clangd/index/key_manager.h.FD9E9F7920C81D78.idx b/.cache/clangd/index/key_manager.h.FD9E9F7920C81D78.idx deleted file mode 100644 index 3c246ec99a975d471bb2ee1c4195dacf5dc8ab7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 478 zcmWIYbaT7L$iU#7;#rZKT9U}Zz`!63#Kk2=na6;16;Q5X&e91RS1}n1xPI2;-*VyD zhPPt;sT(&5isd-V9KU1ldQX=J@1vbch zWvpgu_kA#*K8Ghd-`Yn$wX&jqO5m}L zDYB=wWq#}Yx8?!g^64ks-9PM*_io&Lc)>fqyX`ZID|3?^fWBc{-XnaHF_(#lfg8vJ z0S*o}4p9b9CPoHk7DhJKc{|$9d|bzHjE8{>BG16V#>FNDR=~r`P?VZhTnvf@g2~7`Zr@IG7}%q6|vB4!i57yU$?c;b3E6NCW~nVGITa07DR) A&Hw-a diff --git a/.cache/clangd/index/logger.cpp.4BC27BCE16A51595.idx b/.cache/clangd/index/logger.cpp.4BC27BCE16A51595.idx deleted file mode 100644 index 5d91c695c2cddf11285442d1c85387ff36124ca4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4402 zcmZ8k3v^Re7R~1+ZJL|h*W@KHFKN?XJ`|xp3Te}{wDb>^(gad$i8gH^VhBOfiU@W& zI3iG~jDvi%{8Wm-{9^| zpEI6?J5Q{-cyr+8$C@9XwB^*sA8-BsVXh(4V?C3%vEl81HZQrm!Cp+g@7Z)^$-!+q zP0p?-u3gyv2T3?I-DbW#SU=j8vQ*-UCb}fC#gXdy&*2)0-uj%AqFEj(kV4B#~5{{Jegk zf8~kHQ%YLK6189BXK7Bw=|QdhWtc6Rc*psxI;07)v`J;+)lE5$-k&;+Zk^0RtSdAX zMmn8N=fJx6mBtr$w}&ShWG14P>*W^OZnRrLz5laMXKb~f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;S=}1rJ}M|GuTexESRra;0o355fbMCMoo8CWDT#~{eSpg_vA z2erradmn8)+PYpqV+Z5V0BHauNy32$Nx&vD2O!7*Aj!?q2Qq+1p5}l98Gs{CbF_gB zppmCJz(5ATh|GZnGJr*74k(ZTC?azpfeauKnF9#qCnQ^s)s!+lQ8d;vS{9a~u`Wrs z5&B4DeS$s-noaJ~^sY5`1^S}!ol#PVF zG>&89Sg05nC(YsjhswLJS&Y#x#Q-@rr_-4XUoSwO?2|(so`$PXx{CPf3xMeVr6fIA z(_es}tjm!PxWF|+%A*d6NypSW)0&Q{^`>xF%!tS5qys+%|Mh zJ8YxgtsB;npU*ic<*wTDaSuPgEI;0CxjF?slEFJ&= diff --git a/.cache/clangd/index/prime_tests.cpp.56193772442193D7.idx b/.cache/clangd/index/prime_tests.cpp.56193772442193D7.idx deleted file mode 100644 index 28a26754327caa40f49ba0c618798c701fc15a05..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5510 zcmZ8k30M?I7VeUM&CJj+7sm_@!!=wAB8Uf<#v>k^gKX50MB`!%A&Ix(ikPSgqS*if zX23*)$LEEtV8r9o;6?%%MHIzE(Qt?d5&=OGN63I|HCk5h&NuY*&wEw%>b<|-d-eA8 zDO1)sFwCTnrY9|mOPt3t45P(=35m-;Wrr|KEHF&c4|``WS|9}T=IF|eix2J@_ia(S zT6T2$7}>%R$v1xHc0@0m9A~+=<;SA#(=pR?1LOSn2I@MDQOVusuH+@HOpMTNZJN=M zQS;^(&z4?W-Ilh%y)mzQ)8goj^0noWPm4M?otgJA{NawrSxd^3uhgjxHvYXw)iJ8Q zHi792PY2y?zI(fMM%1Brrz7|8RwV}9of(*7)jXo{ll@y&#Wh7U#>f6^L#$>_Oi1$V z-NW`Id|lu_t+2Ssqm?hrnlf$JN2-vC3UBAEz+Y>u{`f41UyvpDZ2Nm*_4{AMPkK+0 zv2W|DWAN(H<;!#KayF+!de+zfIlL~*e0mx;0W`jGG^Sudd`k zPlsLh%n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/.cache/clangd/index/prime_tests.h.1B12341116CFBD8B.idx deleted file mode 100644 index 77827be4785644dac52fbe66eeb772fef5c30387..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 936 zcmWIYbaPw4%)sEB;#rZKT9U}Zz`!63#Kk2=ne2=V4AD#s3>9;hPCT1+*g&A=dti;h z!p4A$K~*0#RrY=f%etIB;Ysh_6jjS#nx)S7_Ld!3y6~l{Eoa)6`EHvFCdTI5eKu12k9gne+;u|jfs7jelwzJ;C#FCB z6n(k1Nw-S*akski%%u3ljt#2EoH#C8H6NPreyQN$nk$z|9`QzB>d8*uC34bCb>+g5Igo+fTl$d!hPH_?E|{huo#bx1<<~ zD|3@B0mJ2@{CnNY9_7qD3_=VHyxnY^-E1=49Go0744f>C46N*o+^pZ0TSq$llZZ=jn351fO)U@JEU`)e&#>ffr574t9U}AfO z>qcdi2rCaas~M{e+)i#bLpF1`@!TAy9M&)sc(^$&Iql&d;1;zNb%q5Bj0V~Q4ibnZ z46pzJ3WI|IDx5C*lhtZRRyhaIaurq`B+KR5)Df1mtFY_9OyJ?>VBp|DIE6!*LmR>4 zWZ>jLIE+)BQy;+-)fP2|IS(cZbPqVpq3(e>04NL&XQ(jDB|u?t*g}QXl=a&+{B(aa xa&a?qFiJv285oLEa}q(E;-chYWe|f0L_h#{5X+iX(Z@VKFmdrPaKS_w7yzA43_Jh; diff --git a/.cache/clangd/index/return_codes.h.A6CABDD08505CCAB.idx b/.cache/clangd/index/return_codes.h.A6CABDD08505CCAB.idx deleted file mode 100644 index 9ed8bf2fe41dc6ce2c66947282a648ff8bbf70d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 428 zcmWIYbaPw6$iU#7;#rZKT9U}Zz`!63#Kk2=nGrxb6o@P4upTtzYf#`}aEMDO4|g;7 zjo?h0sy1cPExv#Eb_;CZv%DbqxG2Lc1E$G!tq(;uMpZZ+a@(3LGB3|$Uh|D=!@vcB zyW=^!o>>)5<-WhPR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LFCP7&M diff --git a/.cache/clangd/index/temp_hsm.h.70D71B76F185F0B6.idx b/.cache/clangd/index/temp_hsm.h.70D71B76F185F0B6.idx deleted file mode 100644 index becca23ed4b089613110e644994116a25a33587b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7052 zcmZWu30PD|w(iqj^)}q5H>jqe7r+J@8W4mAK|uu?)Tk`cD8i_KMie26_!J`;ml#Dy zA7jL5a6wIQd2XXKI_^dj2pTnt3aBp{HHj~35|_LfojBD^pRPOa_4iSA|66rWRh{$K zIj4%;AsHEq{UwsLi9_a;O{y&9Boc{+{>`kcn9=|e$x!-YPQxc}o}PL)T6wj}yK~&= zZJBAyHSg5h-VbiO@!4a$2J3gm2caQJnjAOxXeHM37BfH*YY&fZ%wqQozqAl|_ zzEHdx^4^)5Rb@p#bdyLPJik0~sBw4?FR6u>kgLF71%s=S@YI&{_u81LBS}v^mC``k zWixnf2BWLOF01~Uw|wN%+g?4TJtY$2)5AyZEF?0g03h8D+0CA-ua+x`v?rC}%lUdb z3;ez@bx7}Sf9qwEODJuKLaop{3+ML=5Bh!I*pJh~ilTnC}93J2j2-|cgxOglv_?M1uj zz4az%fz9z*pO4w{a6y$)8bq6$z@rItt_r(Ahkos_pD!;|N`q;aa%Fjlv%uz?-buD; z1)JXYk}7HQ4d{IXl3f*c+2g%^+TISsD!GL6hp5%+0B6D0@xu1;rK*pER(VNPR7NLQ zJE5F0C;UYz6=;`3AUg!Ut_r*4EiBVs@Q+&SB@L%tI$%HtWVkBq;?aEP z`fTaVMx`{AcG(T8-ISSK6?VCG{(Re~whNysr6$^C5!e<%imSpdJ64|!p7ZP7lS-+c zb_rF68l43;#|&M%=k~*gpLt1Tw7DJlc2Kw~?BZ!1RkEa|q**Bqpk4NZc0a_qD(tdp z`q8KVTr;*+DK*kANtUD}XMxSO%Vk5(ueyFwDGj5|I=RlrS-6|?hTc1Krr~>~)J&VJ zlvSb50-J9>ykA|qA>*}|)JmJLK=>7~xhm{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+WJ&JihDH(D7@a;B&2puY|Q$XPa}baHF*Z>GI_@ozX$zliS{)vJ>H!s#>6>XqHm%?MaoO=Loxf1OG?AYu zT4ob)O(0|D?F4ftgkf};F(>7szV-4y=|xYZEi#_jC0&)SM%gs=Qx&Rl!l-6yBQtN- zFstkZ1x@*xRStlHru?`QJzV#yxQ>cR(+VA4duB!P%-N0yddG@CEj~yje(aI{!wi3p of0ns^zW5-Kc(X?xdsMSW(rd}oefmrLf@Erqw~tom=kF`|7ahzQy8r+H diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 9d584953..00000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Debug", - "type": "cppdbg", - "request": "launch", - "program": "${workspaceFolder}/build/runTests", - "args": [], - "stopAtEntry": false, - "cwd": "${workspaceFolder}", - "environment": [], - "externalConsole": false, - "MIMode": "gdb", // השתמשי ב-"lldb" אם את משתמשת ב-LLDB - // "preLaunchTask": "build", - "miDebuggerPath": "/usr/bin/gdb", // נתיב ל-GDB - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ], - "internalConsoleOptions": "openOnSessionStart", - "logging": { "engineLogging": true }, - "launchCompleteCommand": "exec-run" - } - ] -} \ No newline at end of file diff --git a/hsm/.gitignore b/hsm/.gitignore index 81d156b9..80f22a15 100644 --- a/hsm/.gitignore +++ b/hsm/.gitignore @@ -13,6 +13,7 @@ # VS Code files .vscode/ +.devcontainer/ # binary files *.o diff --git a/hsm/CMakeLists.txt b/hsm/CMakeLists.txt index c967bd5b..c96ef4d3 100644 --- a/hsm/CMakeLists.txt +++ b/hsm/CMakeLists.txt @@ -58,7 +58,7 @@ include_directories(${Protobuf_INCLUDE_DIRS} ${GRPC_INCLUDE_DIRS}) file(GLOB LOGGER_SOURCES "logger/*.cpp") add_library(logger STATIC ${LOGGER_SOURCES}) # Add the executable -add_executable(grpc_server ${SOURCES} ${PROTO_SRCS}) +add_executable(grpc_server src/my_logger.cpp ${SOURCES} ${PROTO_SRCS}) # Link against protobuf, gRPC, GMP, and logger libraries target_link_libraries(grpc_server ${Protobuf_LIBRARIES} ${GMP_LIBRARY} ${GMPXX_LIBRARY} gRPC::grpc++ logger) # Ensure that protobuf and gRPC code generation is properly configured diff --git a/hsm/Dockerfile b/hsm/Dockerfile index d5aad03d..afb68efb 100644 --- a/hsm/Dockerfile +++ b/hsm/Dockerfile @@ -1,50 +1,52 @@ -FROM ubuntu:20.04 -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - build-essential \ - cmake \ - libgtest-dev \ - g++ \ - make \ - libgmp-dev \ - curl \ - libprotobuf-dev \ - protobuf-compiler \ - git \ - libtool \ - autoconf \ - ca-certificates \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* -# Clone gRPC and install it -RUN git config --global http.sslVerify false && \ - git clone -b v1.41.1 --recursive https://github.com/grpc/grpc /grpc && \ - cd /grpc && \ - mkdir -p cmake/build && cd cmake/build && \ - cmake ../.. && \ - make && make install -# התקן protobuf -RUN git clone https://github.com/protocolbuffers/protobuf.git && \ - cd protobuf && \ - git checkout v3.18.1 && \ - git submodule update --init --recursive && \ - ./autogen.sh && \ - ./configure && \ - make && \ - make install && \ - ldconfig -# הגדר את תיקיית העבודה בתוך הקונטיינר -WORKDIR /app -# העתק את תוכן התיקייה הנוכחית לתוך הקונטיינר בכתובת /app -COPY . . -# צור תיקיית build -RUN rm -rf build && mkdir build -# שנה לתיקיית build -WORKDIR /app/build -# התקן את Google Test -RUN cd /usr/src/gtest && cmake CMakeLists.txt && make && \ - find /usr/src/gtest -name "*.a" -exec cp {} /usr/lib \; -# בנה את הפרויקט באמצעות CMake ו-Make -RUN cmake .. -DUSE_SYCL=OFF -DUSE_DEBUG=OFF -RUN make -# פקודה להריץ את השרת (אופציונלי) -CMD ["./grpc_server"] \ No newline at end of file +FROM ubuntu:20.04 +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ + build-essential \ + cmake \ + libgtest-dev \ + g++ \ + make \ + libgmp-dev \ + curl \ + libprotobuf-dev \ + protobuf-compiler \ + git \ + libtool \ + autoconf \ + ca-certificates \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* +# Clone gRPC and install it +RUN git config --global http.sslVerify false && \ + git clone -b v1.41.1 --recursive https://github.com/grpc/grpc /grpc && \ + cd /grpc && \ + mkdir -p cmake/build && cd cmake/build && \ + cmake ../.. && \ + make && make install +# התקן protobuf +RUN git clone https://github.com/protocolbuffers/protobuf.git && \ + cd protobuf && \ + git checkout v3.18.1 && \ + git submodule update --init --recursive && \ + ./autogen.sh && \ + ./configure && \ + make && \ + make install && \ + ldconfig +# הגדר את תיקיית העבודה בתוך הקונטיינר +WORKDIR /app +# העתק את תוכן התיקייה הנוכחית לתוך הקונטיינר בכתובת /app +COPY . . +# צור תיקיית build +RUN rm -rf build && mkdir build +# שנה לתיקיית build +WORKDIR /app/build +# התקן את Google Test +RUN cd /usr/src/gtest && cmake CMakeLists.txt && make && \ + find /usr/src/gtest -name "*.a" -exec cp {} /usr/lib \; +# בנה את הפרויקט באמצעות CMake ו-Make +RUN cmake .. -DUSE_SYCL=OFF -DUSE_DEBUG=OFF +RUN make +WORKDIR /app +EXPOSE 50051 +# פקודה להריץ את השרת (אופציונלי) +CMD ["./build/grpc_server"] \ No newline at end of file diff --git a/hsm/HSM_Communication.txt b/hsm/HSM_Communication.txt new file mode 100644 index 00000000..20c0d2ac --- /dev/null +++ b/hsm/HSM_Communication.txt @@ -0,0 +1,40 @@ +[1728830880712433005ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 217288308803, total packets: 1 Success Data: 0x0802120210101a0c323137323838333038383033 +[1728830880712992662ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 217288308803, total packets: 1 Success Data: 0x +[1728830880715112671ns] [INFO] SRC 3 DST 1 received packet number: 1, of messageId: 317288308803, total packets: 1 Success Data: 0x0803120210101a0c333137323838333038383033 +[1728830880715305028ns] [INFO] SRC 1 DST 3 sending packet number: 1, of messageId: 317288308803, total packets: 1 Success Data: 0x +[1728830880828687977ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 2172883088024, total packets: 1 Success Data: 0x08021080081801220d32313732383833303838303234 +[1728830880828779927ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 22172883088024211 Success Data: 0x089009 +[1728830880829372920ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 2172883088024, total packets: 1 Success Data: 0x0802108008220d32313732383833303838303234 +[1728830880829435314ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 22172883088024211 Success Data: 0x089008 +[1728830880829949892ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 2172883088024, total packets: 1 Success Data: 0x0802109404220d32313732383833303838303234 +[1728830880830018854ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 22172883088024211 Success Data: 0x08a004 +[1728830880830601697ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 217288308807, total packets: 1 Success Data: 0x0802220c323137323838333038383037 +[1728830880830668768ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 22172883088076, total packets: 1 Success Data: 0x088001 +[1728830880831628663ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 2172883088026, total packets: 3 Success Data: 0x41414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141 +[1728830880914013949ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 21728830880261, total packets: 3 Success Data: 0x28381dc779eff330b15f34ad6fd53203def4d28751ebb6a27d5d4f176aafd4bb9db473f07374bde89cfdac6722c3e295123a344d3f2661554ca7546f13ba4183420974fd45353509e6a917b6ca568344cb3994a5a375c03d3d50e9be95329accf33627d2ccf16a4ee04b586ce42f491bbab39795cff6c5f1fd94295e30b433a1b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e30143db63ee66b0cdff9f69917680151e +[1728830880915517480ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 2172883088026, total packets: 3 Success Data: 0x41414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141 +[1728830880931844452ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 21728830880261, total packets: 3 Success Data: 0xb49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e30143db63ee66b0cdff9f69917680151e +[1728830880932878683ns] [INFO] SRC 2 DST 1 received packet number: 2, of messageId: 2172883088026, total packets: 3 Success Data: 0x41414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141 +[1728830889226746624ns] [INFO] SRC 1 DST 2 sending packet number: 2, of messageId: 21728830880261, total packets: 3 Success Data: 0xb49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e370738c3eb7f6cbf97acbb54878be46c6 +[1728830889228654413ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 3172883088924, total packets: 1 Success Data: 0x0802108008220d33313732383833303838393234 +[1728830889228849039ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 23172883088924211 Success Data: 0x089008 +[1728830889229579359ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 3172883088924, total packets: 1 Success Data: 0x08021080081801220d33313732383833303838393234 +[1728830889229715522ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 23172883088924211 Success Data: 0x089009 +[1728830889230684692ns] [INFO] SRC 3 DST 1 received packet number: 1, of messageId: 317288308897, total packets: 1 Success Data: 0x0803220c333137323838333038383937 +[1728830889230763523ns] [INFO] SRC 1 DST 3 sending packet number: 1, of messageId: 33172883088976, total packets: 1 Success Data: 0x088001 +[1728830889231463197ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 3172883088925, total packets: 1 Success Data: 0x08021090081801220d33313732383833303838393235 +[1728830889231573900ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 317288308892522, total packets: 1 Success Data: 0x089007 +[1728830889232243116ns] [INFO] SRC 3 DST 1 received packet number: 1, of messageId: 317288308897, total packets: 1 Success Data: 0x0803220c333137323838333038383937 +[1728830889232322418ns] [INFO] SRC 1 DST 3 sending packet number: 1, of messageId: 33172883088976, total packets: 1 Success Data: 0x088001 +[1728830889232970512ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 3172883088925, total packets: 1 Success Data: 0x08021090071801220d33313732383833303838393235 +[1728830889233040008ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 317288308892522, total packets: 1 Success Data: 0x089006 +[1728830889233686216ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 3172883088924, total packets: 1 Success Data: 0x080210a005220d33313732383833303838393234 +[1728830889233766839ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 23172883088924211 Success Data: 0x08b005 +[1728830889234353075ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 3172883088924, total packets: 1 Success Data: 0x0802108008220d33313732383833303838393234 +[1728830889234458497ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 23172883088924211 Success Data: 0x089008 +[1728830889235240585ns] [INFO] SRC 3 DST 1 received packet number: 1, of messageId: 317288308897, total packets: 1 Success Data: 0x0803220c333137323838333038383937 +[1728830889235332335ns] [INFO] SRC 1 DST 3 sending packet number: 1, of messageId: 33172883088976, total packets: 1 Success Data: 0x088001 +[1728830889235977599ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 3172883088924, total packets: 1 Success Data: 0x08021080081801220d33313732383833303838393234 +[1728830889236051716ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 23172883088924211 Success Data: 0x089009 +[1728830889236936680ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 31728830889, total packets: 3 Success Data: 0x28381dc779eff330b15f34ad6fd53203def4d28751ebb6a27d5d4f176aafd4bb9db473f07374bde89cfdac6722c3e295123a344d3f2661554ca7546f13ba4183420974fd45353509e6a917b6ca568344cb3994a5a375c03d3d50e9be95329accf33627d2ccf16a4ee04b586ce42f491bbab39795cff6c5f1fd94295e30b433a1b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e30143db63ee66b0cdff9f69917680151e +[1728830889237289346ns] [INFO] SRC 2 DST 1 received packet number: 0, of messageId: 21728830889, total packets: 1 Success Data: 0x28381dc779eff330b15f34ad6fd53203def4d28751ebb6a27d5d4f176aafd4bb9db473f07374bde89cfdac6722c3e295123a344d3f2661554ca7546f13ba4183420974fd45353509e6a917b6ca568344cb3994a5a375c03d3d50e9be95329accf33627d2ccf16a4ee04b586ce42f491bbab39795cff6c5f1fd94295e30b433a1b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e30143db63ee66b0cdff9f69917680151e diff --git a/hsm/docker-compose.yml b/hsm/docker-compose.yml new file mode 100644 index 00000000..70640d10 --- /dev/null +++ b/hsm/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.8' + +services: + grpc_server: + build: + context: . + dockerfile: Dockerfile + ports: + - "50051:50051" + volumes: + - .:/app + networks: + - grpc_network + +networks: + grpc_network: + external: true # Use the external network created diff --git a/hsm/include/crypto_api.h b/hsm/include/crypto_api.h index f5589d2c..7e65350c 100644 --- a/hsm/include/crypto_api.h +++ b/hsm/include/crypto_api.h @@ -12,7 +12,9 @@ #include "general.h" #include "sha256.h" - +int getCountFromEncryptions(int userID); +int getCountFromDecryptions(int userID); +int getCountFromHashing(int userID); CK_RV bootSystem( const std::map> &usersIdspermissions); // generate key pair to each coponnet cinfigure the diff --git a/hsm/include/crypto_service.h b/hsm/include/crypto_service.h index 33f0af65..f5e82d39 100644 --- a/hsm/include/crypto_service.h +++ b/hsm/include/crypto_service.h @@ -7,6 +7,7 @@ class CryptoServiceServer final : public crypto::CryptoService::Service { public: + grpc::Status bootSystem(grpc::ServerContext* context, const crypto::BootSystemRequest* request, crypto::Empty* response) override; grpc::Status addProccess(grpc::ServerContext* context, const crypto::AddProcessRequest* request, crypto::Empty* response) override; grpc::Status configure(grpc::ServerContext* context, const crypto::ConfigureRequest* request, crypto::Empty* response) override; @@ -40,4 +41,7 @@ class CryptoServiceServer final : public crypto::CryptoService::Service { grpc::Status signFinalize(grpc::ServerContext* context, const crypto::SignRequest* request, crypto::SignResponse* response) override; grpc::Status verifyUpdate(grpc::ServerContext* context, const crypto::VerifyRequest* request, crypto::VerifyResponse* response) override; grpc::Status verifyFinalize(grpc::ServerContext* context, const crypto::VerifyRequest* request, crypto::VerifyResponse* response) override; + private: + static const size_t HSM_ID = 1; + }; \ No newline at end of file diff --git a/hsm/include/my_logger.h b/hsm/include/my_logger.h new file mode 100644 index 00000000..cbe1ca13 --- /dev/null +++ b/hsm/include/my_logger.h @@ -0,0 +1,12 @@ +#ifndef MY_LOGGER_H +#define MY_LOGGER_H + +#include +#include +#include "../logger/logger.h" + + void log(logger::LogLevel loglevel, const std::string& hsm_id, const std::string& user_id, const std::string& message); + std::string dataToHex(const unsigned char* data, size_t size); + + +#endif // LOGGER_H diff --git a/hsm/include/temp_hsm.h b/hsm/include/temp_hsm.h index 17940e20..a3bf4eda 100644 --- a/hsm/include/temp_hsm.h +++ b/hsm/include/temp_hsm.h @@ -2,15 +2,16 @@ #define __TEMP_HSM_H__ #include "aes.h" +#include "debug_utils.h" #include "ecc.h" #include "general.h" #include "rsa.h" +#include #include #include #include #include #include - constexpr size_t RSA_KEY_SIZE = 1024; const std::string AES_KEY_ID = "AESKey"; @@ -173,8 +174,15 @@ class TempHsm { } CryptoConfig getUserConfig(int userId) { - return usersConfig[userId]; + // Check if the user exists in the configuration map + if (usersConfig.find(userId) != usersConfig.end()) { + return usersConfig[userId]; // Return user config if found + } else { + log(logger::LogLevel::ERROR, "User ID " + std::to_string(userId) + " not found in configuration."); + throw std::runtime_error("User config not found for user ID: " + std::to_string(userId)); + } } + AsymmetricFunction getAssymetricFunctionByUserId(int userId) { return usersConfig[userId].asymmetricFunction; @@ -219,5 +227,4 @@ class TempHsm { std::unordered_map eccPublicKeys; std::unordered_map eccPrivateKeys; }; - #endif // __TEMP_HSM_H__ \ No newline at end of file diff --git a/hsm/logger/logger.cpp b/hsm/logger/logger.cpp index a31e5614..ec9bff7b 100644 --- a/hsm/logger/logger.cpp +++ b/hsm/logger/logger.cpp @@ -2,118 +2,118 @@ std::string logger::logFileName; std::mutex logger::logMutex; -std::chrono::system_clock::time_point logger::initTime=std::chrono::system_clock::now(); +std::chrono::system_clock::time_point logger::initTime = + std::chrono::system_clock::now(); std::string logger::componentName = "out"; -logger::logger(std::string componentName) -{ - logger::componentName=componentName; +logger::logger(std::string componentName) { + logger::componentName = componentName; } - -void logger::initializeLogFile() -{ - if (isInitialized) return; - - auto time = std::chrono::system_clock::to_time_t(initTime); - std::tm tm = *std::localtime(&time); - - std::ostringstream oss; - oss << "" << std::put_time(&tm, "%Y_%m_%d_%H_%M_%S") << "_" << componentName << ".log"; - logFileName = oss.str(); - - std::ofstream sharedFile(sharedLogFileName, std::ios::out | std::ios::trunc); - if (sharedFile) { - sharedFile << logFileName; - } else { - std::cerr << logLevelToString(LogLevel::ERROR) << "Failed to open shared log file name file" << std::endl; - } - - isInitialized = true; +void logger::initializeLogFile() { + if (isInitialized) + return; + + auto time = std::chrono::system_clock::to_time_t(initTime); + std::tm tm = *std::localtime(&time); + + std::ostringstream oss; + oss << "" << std::put_time(&tm, "%Y_%m_%d_%H_%M_%S") << "_" << componentName + << ".log"; + logFileName = oss.str(); + + std::ofstream sharedFile(sharedLogFileName, std::ios::out | std::ios::trunc); + if (sharedFile) { + sharedFile << logFileName; + } else { + std::cerr << logLevelToString(LogLevel::ERROR) + << "Failed to open shared log file name file" << std::endl; + } + + isInitialized = true; } -std::string logger::getLogFileName() -{ +std::string logger::getLogFileName() { + if (!isInitialized) { if (!isInitialized) { - if (!isInitialized) { - std::ifstream sharedFile(sharedLogFileName); - if (sharedFile) { - std::getline(sharedFile, logFileName); - } - if (logFileName.empty()) { - initializeLogFile(); - } - } + std::ifstream sharedFile(sharedLogFileName); + if (sharedFile) { + std::getline(sharedFile, logFileName); + } + if (logFileName.empty()) { + initializeLogFile(); + } } + } - return logFileName; -} - -void logger::cleanUp() -{ - std::remove(sharedLogFileName.c_str()); + return logFileName; } -std::string logger::logLevelToString(LogLevel level) -{ - switch (level) { - case LogLevel::ERROR: return "[ERROR]"; - case LogLevel::INFO: return "[INFO]"; - case LogLevel::DEBUG: return "[DEBUG]"; - default: return "[UNKNOWN]"; - } +void logger::cleanUp() { std::remove(sharedLogFileName.c_str()); } + +std::string logger::logLevelToString(LogLevel level) { + switch (level) { + case LogLevel::ERROR: + return "[ERROR]"; + case LogLevel::INFO: + return "[INFO]"; + case LogLevel::DEBUG: + return "[DEBUG]"; + default: + return "[UNKNOWN]"; + } } -bool logger::shouldLog(LogLevel level) -{ - switch (LOG_LEVEL) { - case LogLevel::ERROR: - return level == LogLevel::ERROR; - case LogLevel::INFO: - return level == LogLevel::ERROR || level == LogLevel::INFO; - case LogLevel::DEBUG: - return true; - default: - return false; - } +bool logger::shouldLog(LogLevel level) { + switch (LOG_LEVEL) { + case LogLevel::ERROR: + return level == LogLevel::ERROR; + case LogLevel::INFO: + return level == LogLevel::ERROR || level == LogLevel::INFO; + case LogLevel::DEBUG: + return true; + default: + return false; + } } -std::string logger::getElapsedTime() -{ - auto now = std::chrono::system_clock::now(); - auto elapsed = std::chrono::duration_cast(now - initTime).count(); - return std::to_string(elapsed) + "ns"; +std::string logger::getElapsedTime() { + auto now = std::chrono::system_clock::now(); + auto elapsed = + std::chrono::duration_cast(now - initTime) + .count(); + return std::to_string(elapsed) + "ns"; } -void logger::logMessage(LogLevel level, std::string src, std::string dst, const std::string &message) -{ - if (!shouldLog(level)) return; - - std::lock_guard guard(logMutex); - std::ofstream logFile(getLogFileName(), std::ios_base::app); - if (!logFile) { - std::cerr << logLevelToString(LogLevel::ERROR) << "Failed to open log file" << std::endl; - return; - } - logFile << "[" << getElapsedTime() << "] " - << logLevelToString(level) << " " - << "SRC " << src << " " - << "DST " << dst << " " - << message << std::endl; +void logger::logMessage(LogLevel level, std::string src, std::string dst, + const std::string &message) { + if (!shouldLog(level)) + return; + + std::lock_guard guard(logMutex); + std::ofstream logFile(getLogFileName(), std::ios_base::app); + if (!logFile) { + std::cerr << logLevelToString(LogLevel::ERROR) << "Failed to open log file" + << std::endl; + return; + } + logFile << "[" << getElapsedTime() << "] " << logLevelToString(level) << " " + << "SRC " << src << " " + << "DST " << dst << " " << message << std::endl; } -void logger::logMessage(LogLevel level, const std::string &message) -{ - if (!shouldLog(level)) return; +void logger::logMessage(LogLevel level, const std::string &message) { + if (!shouldLog(level)) + return; - std::lock_guard guard(logMutex); + std::lock_guard guard(logMutex); - std::ofstream logFile(getLogFileName(), std::ios_base::app); - if (!logFile) { - std::cerr << logLevelToString(LogLevel::ERROR) << "Failed to open log file" << std::endl; - return; - } + std::ofstream logFile(getLogFileName(), std::ios_base::app); + if (!logFile) { + std::cerr << logLevelToString(LogLevel::ERROR) << "Failed to open log file" + << std::endl; + return; + } - logFile << "[" << getElapsedTime() << "] " - << logLevelToString(level) << " " - << message << std::endl; + logFile << "[" << getElapsedTime() << "] " << logLevelToString(level) << " " + << message << std::endl; } \ No newline at end of file diff --git a/hsm/logger/logger.h b/hsm/logger/logger.h index ab79ee59..918d249f 100644 --- a/hsm/logger/logger.h +++ b/hsm/logger/logger.h @@ -1,13 +1,13 @@ #ifndef LOGGER_H #define LOGGER_H -#include #include -#include -#include #include +#include #include #include +#include +#include #ifndef LOG_LEVEL #define LOG_LEVEL logger::LogLevel::INFO @@ -15,28 +15,30 @@ class logger { public: - enum class LogLevel { - ERROR, - INFO, - DEBUG, - }; - logger(){} - logger(std::string componentName); - void logMessage(LogLevel level, const std::string &message); - void logMessage(LogLevel level, std::string src, std::string dst, const std::string &message); - void initializeLogFile(); - std::string getLogFileName(); - std::string sharedLogFileName = "shared_log_file_name.txt"; - void cleanUp(); + enum class LogLevel { + ERROR, + INFO, + DEBUG, + }; + logger() {} + logger(std::string componentName); + void logMessage(LogLevel level, const std::string &message); + void logMessage(LogLevel level, std::string src, std::string dst, + const std::string &message); + void initializeLogFile(); + std::string getLogFileName(); + std::string sharedLogFileName = "shared_log_file_name.txt"; + void cleanUp(); + private: - static std::string logLevelToString(LogLevel level); - static bool shouldLog(LogLevel level); - static std::string getElapsedTime(); - static std::string componentName; - static std::string logFileName; - bool isInitialized = false; - static std::mutex logMutex; - static std::chrono::system_clock::time_point initTime; + static std::string logLevelToString(LogLevel level); + static bool shouldLog(LogLevel level); + static std::string getElapsedTime(); + static std::string componentName; + static std::string logFileName; + bool isInitialized = false; + static std::mutex logMutex; + static std::chrono::system_clock::time_point initTime; }; #endif // LOGGER_H \ No newline at end of file diff --git a/hsm/proto/encryption.pb.cc b/hsm/proto/encryption.pb.cc index 020b5b7b..c473c957 100644 --- a/hsm/proto/encryption.pb.cc +++ b/hsm/proto/encryption.pb.cc @@ -21,6 +21,7 @@ constexpr AsymetricEncryptRequest::AsymetricEncryptRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : keyid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , senderid_(0){} struct AsymetricEncryptRequestDefaultTypeInternal { constexpr AsymetricEncryptRequestDefaultTypeInternal() @@ -33,7 +34,7 @@ struct AsymetricEncryptRequestDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AsymetricEncryptRequestDefaultTypeInternal _AsymetricEncryptRequest_default_instance_; constexpr AsymetricEncryptResponse::AsymetricEncryptResponse( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : encrypted_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} + : encrypteddata_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct AsymetricEncryptResponseDefaultTypeInternal { constexpr AsymetricEncryptResponseDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -47,6 +48,8 @@ constexpr AsymetricDecryptRequest::AsymetricDecryptRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : keyid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , senderid_(0) , receiverid_(0){} struct AsymetricDecryptRequestDefaultTypeInternal { constexpr AsymetricDecryptRequestDefaultTypeInternal() @@ -59,7 +62,9 @@ struct AsymetricDecryptRequestDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AsymetricDecryptRequestDefaultTypeInternal _AsymetricDecryptRequest_default_instance_; constexpr GetHashLengthRequest::GetHashLengthRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : func_(0) + : messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , senderid_(0) + , func_(0) , datalen_(0){} struct GetHashLengthRequestDefaultTypeInternal { @@ -73,7 +78,9 @@ struct GetHashLengthRequestDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetHashLengthRequestDefaultTypeInternal _GetHashLengthRequest_default_instance_; constexpr GetAESLengthRequest::GetAESLengthRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : datalen_(0) + : messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , senderid_(0) + , datalen_(0) , isfirst_(false) , chainingmode_(0) {} @@ -88,7 +95,7 @@ struct GetAESLengthRequestDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetAESLengthRequestDefaultTypeInternal _GetAESLengthRequest_default_instance_; constexpr AsymetricDecryptResponse::AsymetricDecryptResponse( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : decrypted_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} + : decrypteddata_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct AsymetricDecryptResponseDefaultTypeInternal { constexpr AsymetricDecryptResponseDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -100,7 +107,9 @@ struct AsymetricDecryptResponseDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AsymetricDecryptResponseDefaultTypeInternal _AsymetricDecryptResponse_default_instance_; constexpr GetLengthRequest::GetLengthRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : in_len_(0){} + : messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , senderid_(0) + , inlen_(0){} struct GetLengthRequestDefaultTypeInternal { constexpr GetLengthRequestDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -124,7 +133,8 @@ struct GetLengthResponseDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetLengthResponseDefaultTypeInternal _GetLengthResponse_default_instance_; constexpr GetWholeLength::GetWholeLength( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : senderid_(0) + : messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , senderid_(0) , inlen_(0) , isfirst_(false){} struct GetWholeLengthDefaultTypeInternal { @@ -140,7 +150,8 @@ constexpr GenerateAESKeyRequest::GenerateAESKeyRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : permissions_() , _permissions_cached_byte_size_(0) - , user_id_(0) + , messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , userid_(0) , keylength_(0) , destuserid_(0){} @@ -155,7 +166,7 @@ struct GenerateAESKeyRequestDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GenerateAESKeyRequestDefaultTypeInternal _GenerateAESKeyRequest_default_instance_; constexpr GenerateAESKeyResponse::GenerateAESKeyResponse( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : aes_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} + : aeskey_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct GenerateAESKeyResponseDefaultTypeInternal { constexpr GenerateAESKeyResponseDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -169,7 +180,8 @@ constexpr GenerateKeyPairRequest::GenerateKeyPairRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : permissions_() , _permissions_cached_byte_size_(0) - , user_id_(0){} + , messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , userid_(0){} struct GenerateKeyPairRequestDefaultTypeInternal { constexpr GenerateKeyPairRequestDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -181,8 +193,8 @@ struct GenerateKeyPairRequestDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GenerateKeyPairRequestDefaultTypeInternal _GenerateKeyPairRequest_default_instance_; constexpr GenerateKeyPairResponse::GenerateKeyPairResponse( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : public_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , private_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} + : publickey_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , privatekey_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct GenerateKeyPairResponseDefaultTypeInternal { constexpr GenerateKeyPairResponseDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -195,9 +207,10 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GenerateKeyPairResponseDefaultT constexpr SignRequest::SignRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , key_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , sender_id_(0) - , hash_func_(0) + , keyid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , senderid_(0) + , hashfunc_(0) , counter_(int64_t{0}){} struct SignRequestDefaultTypeInternal { @@ -225,10 +238,11 @@ constexpr VerifyRequest::VerifyRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , signature_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , key_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , sender_id_(0) - , receiver_id_(0) - , hash_func_(0) + , keyid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , senderid_(0) + , receiverid_(0) + , hashfunc_(0) , counter_(0){} struct VerifyRequestDefaultTypeInternal { @@ -255,7 +269,9 @@ struct VerifyResponseDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT VerifyResponseDefaultTypeInternal _VerifyResponse_default_instance_; constexpr KeyRequest::KeyRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : user_id_(0){} + : messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , senderid_(0) + , userid_(0){} struct KeyRequestDefaultTypeInternal { constexpr KeyRequestDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -293,7 +309,8 @@ struct UserKeyPermissionsDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UserKeyPermissionsDefaultTypeInternal _UserKeyPermissions_default_instance_; constexpr BootSystemRequest::BootSystemRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : usersidspermissions_(){} + : usersidspermissions_() + , messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct BootSystemRequestDefaultTypeInternal { constexpr BootSystemRequestDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -316,7 +333,8 @@ struct EmptyDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EmptyDefaultTypeInternal _Empty_default_instance_; constexpr CryptoConfig::CryptoConfig( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : hashfunction_(0) + : messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , hashfunction_(0) , aeskeylength_(0) @@ -335,7 +353,8 @@ struct CryptoConfigDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT CryptoConfigDefaultTypeInternal _CryptoConfig_default_instance_; constexpr ConfigureRequest::ConfigureRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : config_(nullptr) + : messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , config_(nullptr) , userid_(0){} struct ConfigureRequestDefaultTypeInternal { constexpr ConfigureRequestDefaultTypeInternal() @@ -350,6 +369,7 @@ constexpr AddProcessRequest::AddProcessRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : permissions_() , _permissions_cached_byte_size_(0) + , messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , userid_(0){} struct AddProcessRequestDefaultTypeInternal { constexpr AddProcessRequestDefaultTypeInternal() @@ -363,8 +383,9 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AddProcessRequestDefaultTypeInt constexpr EncryptRequest::EncryptRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , sender_id_(0) - , receiver_id_(0) + , messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , senderid_(0) + , receiverid_(0) , counter_(int64_t{0}) , isfirst_(false){} struct EncryptRequestDefaultTypeInternal { @@ -378,7 +399,7 @@ struct EncryptRequestDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EncryptRequestDefaultTypeInternal _EncryptRequest_default_instance_; constexpr EncryptResponse::EncryptResponse( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : encrypted_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + : encrypteddata_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , signature_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct EncryptResponseDefaultTypeInternal { constexpr EncryptResponseDefaultTypeInternal() @@ -391,10 +412,11 @@ struct EncryptResponseDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EncryptResponseDefaultTypeInternal _EncryptResponse_default_instance_; constexpr DecryptRequest::DecryptRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : encrypted_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + : encrypteddata_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , signature_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , sender_id_(0) - , receiver_id_(0) + , messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , senderid_(0) + , receiverid_(0) , counter_(int64_t{0}) , isfirst_(false){} struct DecryptRequestDefaultTypeInternal { @@ -408,7 +430,7 @@ struct DecryptRequestDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DecryptRequestDefaultTypeInternal _DecryptRequest_default_instance_; constexpr DecryptResponse::DecryptResponse( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : decrypted_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} + : decrypteddata_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct DecryptResponseDefaultTypeInternal { constexpr DecryptResponseDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -421,13 +443,14 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DecryptResponseDefaultTypeInter constexpr AESEncryptRequest::AESEncryptRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , key_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , sender_id_(0) - , receiver_id_(0) + , keyid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , senderid_(0) + , receiverid_(0) , counter_(int64_t{0}) , func_(0) - , key_length_(0) + , keylength_(0) , chainingmode_(0) @@ -443,7 +466,7 @@ struct AESEncryptRequestDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AESEncryptRequestDefaultTypeInternal _AESEncryptRequest_default_instance_; constexpr AESEncryptResponse::AESEncryptResponse( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : encrypted_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} + : encrypteddata_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct AESEncryptResponseDefaultTypeInternal { constexpr AESEncryptResponseDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -455,15 +478,16 @@ struct AESEncryptResponseDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AESEncryptResponseDefaultTypeInternal _AESEncryptResponse_default_instance_; constexpr AESDecryptRequest::AESDecryptRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : data_in_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , data_out_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , key_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , sender_id_(0) - , receiver_id_(0) - , in_len_(0) + : datain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , dataout_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , keyid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , senderid_(0) + , receiverid_(0) + , inlen_(0) , func_(0) - , key_length_(0) + , keylength_(0) , chainingmode_(0) @@ -480,7 +504,7 @@ struct AESDecryptRequestDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AESDecryptRequestDefaultTypeInternal _AESDecryptRequest_default_instance_; constexpr AESDecryptResponse::AESDecryptResponse( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : decrypted_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} + : decrypteddata_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct AESDecryptResponseDefaultTypeInternal { constexpr AESDecryptResponseDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -505,53 +529,62 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::of PROTOBUF_FIELD_OFFSET(::crypto::AsymetricEncryptRequest, senderid_), PROTOBUF_FIELD_OFFSET(::crypto::AsymetricEncryptRequest, keyid_), PROTOBUF_FIELD_OFFSET(::crypto::AsymetricEncryptRequest, data_), + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricEncryptRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::AsymetricEncryptResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::AsymetricEncryptResponse, encrypted_data_), + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricEncryptResponse, encrypteddata_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptRequest, senderid_), PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptRequest, receiverid_), PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptRequest, keyid_), PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptRequest, data_), + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::GetHashLengthRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::GetHashLengthRequest, senderid_), PROTOBUF_FIELD_OFFSET(::crypto::GetHashLengthRequest, func_), PROTOBUF_FIELD_OFFSET(::crypto::GetHashLengthRequest, datalen_), + PROTOBUF_FIELD_OFFSET(::crypto::GetHashLengthRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::GetAESLengthRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::crypto::GetAESLengthRequest, senderid_), PROTOBUF_FIELD_OFFSET(::crypto::GetAESLengthRequest, datalen_), PROTOBUF_FIELD_OFFSET(::crypto::GetAESLengthRequest, isfirst_), PROTOBUF_FIELD_OFFSET(::crypto::GetAESLengthRequest, chainingmode_), + PROTOBUF_FIELD_OFFSET(::crypto::GetAESLengthRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptResponse, decrypted_data_), + PROTOBUF_FIELD_OFFSET(::crypto::AsymetricDecryptResponse, decrypteddata_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::GetLengthRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::GetLengthRequest, in_len_), + PROTOBUF_FIELD_OFFSET(::crypto::GetLengthRequest, senderid_), + PROTOBUF_FIELD_OFFSET(::crypto::GetLengthRequest, inlen_), + PROTOBUF_FIELD_OFFSET(::crypto::GetLengthRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::GetLengthResponse, _internal_metadata_), ~0u, // no _extensions_ @@ -568,50 +601,54 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::of PROTOBUF_FIELD_OFFSET(::crypto::GetWholeLength, senderid_), PROTOBUF_FIELD_OFFSET(::crypto::GetWholeLength, inlen_), PROTOBUF_FIELD_OFFSET(::crypto::GetWholeLength, isfirst_), + PROTOBUF_FIELD_OFFSET(::crypto::GetWholeLength, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyRequest, user_id_), + PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyRequest, userid_), PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyRequest, permissions_), PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyRequest, keylength_), PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyRequest, destuserid_), + PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyResponse, aes_key_), + PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyResponse, aeskey_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairRequest, user_id_), + PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairRequest, userid_), PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairRequest, permissions_), + PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairResponse, public_key_), - PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairResponse, private_key_), + PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairResponse, publickey_), + PROTOBUF_FIELD_OFFSET(::crypto::GenerateKeyPairResponse, privatekey_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, sender_id_), + PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, senderid_), PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, data_), - PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, hash_func_), + PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, hashfunc_), PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, counter_), - PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, key_id_), + PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, keyid_), + PROTOBUF_FIELD_OFFSET(::crypto::SignRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::SignResponse, _internal_metadata_), ~0u, // no _extensions_ @@ -625,13 +662,14 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::of ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, sender_id_), - PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, receiver_id_), + PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, senderid_), + PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, receiverid_), PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, data_), PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, signature_), - PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, hash_func_), - PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, key_id_), + PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, hashfunc_), + PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, keyid_), PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, counter_), + PROTOBUF_FIELD_OFFSET(::crypto::VerifyRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::VerifyResponse, _internal_metadata_), ~0u, // no _extensions_ @@ -646,7 +684,9 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::of ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::KeyRequest, user_id_), + PROTOBUF_FIELD_OFFSET(::crypto::KeyRequest, senderid_), + PROTOBUF_FIELD_OFFSET(::crypto::KeyRequest, userid_), + PROTOBUF_FIELD_OFFSET(::crypto::KeyRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::KeyResponse, _internal_metadata_), ~0u, // no _extensions_ @@ -669,6 +709,7 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::of ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::crypto::BootSystemRequest, usersidspermissions_), + PROTOBUF_FIELD_OFFSET(::crypto::BootSystemRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::Empty, _internal_metadata_), ~0u, // no _extensions_ @@ -685,6 +726,7 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::of PROTOBUF_FIELD_OFFSET(::crypto::CryptoConfig, aeskeylength_), PROTOBUF_FIELD_OFFSET(::crypto::CryptoConfig, aeschainingmode_), PROTOBUF_FIELD_OFFSET(::crypto::CryptoConfig, asymmetricfunction_), + PROTOBUF_FIELD_OFFSET(::crypto::CryptoConfig, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::ConfigureRequest, _internal_metadata_), ~0u, // no _extensions_ @@ -693,6 +735,7 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::of ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::crypto::ConfigureRequest, userid_), PROTOBUF_FIELD_OFFSET(::crypto::ConfigureRequest, config_), + PROTOBUF_FIELD_OFFSET(::crypto::ConfigureRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::AddProcessRequest, _internal_metadata_), ~0u, // no _extensions_ @@ -701,24 +744,26 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::of ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::crypto::AddProcessRequest, userid_), PROTOBUF_FIELD_OFFSET(::crypto::AddProcessRequest, permissions_), + PROTOBUF_FIELD_OFFSET(::crypto::AddProcessRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, sender_id_), - PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, receiver_id_), + PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, senderid_), + PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, receiverid_), PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, data_), PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, counter_), PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, isfirst_), + PROTOBUF_FIELD_OFFSET(::crypto::EncryptRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::EncryptResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::EncryptResponse, encrypted_data_), + PROTOBUF_FIELD_OFFSET(::crypto::EncryptResponse, encrypteddata_), PROTOBUF_FIELD_OFFSET(::crypto::EncryptResponse, signature_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, _internal_metadata_), @@ -726,100 +771,103 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::of ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, sender_id_), - PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, receiver_id_), - PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, encrypted_data_), + PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, senderid_), + PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, receiverid_), + PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, encrypteddata_), PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, counter_), PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, signature_), PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, isfirst_), + PROTOBUF_FIELD_OFFSET(::crypto::DecryptRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::DecryptResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::DecryptResponse, decrypted_data_), + PROTOBUF_FIELD_OFFSET(::crypto::DecryptResponse, decrypteddata_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, sender_id_), - PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, receiver_id_), + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, senderid_), + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, receiverid_), PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, data_), PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, func_), PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, counter_), - PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, key_id_), - PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, key_length_), + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, keyid_), + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, keylength_), PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, chainingmode_), PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, isfirst_), + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptResponse, encrypted_data_), + PROTOBUF_FIELD_OFFSET(::crypto::AESEncryptResponse, encrypteddata_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, sender_id_), - PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, receiver_id_), - PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, data_in_), - PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, in_len_), - PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, data_out_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, senderid_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, receiverid_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, datain_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, inlen_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, dataout_), PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, func_), - PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, key_length_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, keylength_), PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, chainingmode_), PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, counter_), - PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, key_id_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, keyid_), PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, isfirst_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptResponse, decrypted_data_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptResponse, decrypteddata_), }; static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, -1, sizeof(::crypto::AsymetricEncryptRequest)}, - { 9, -1, -1, sizeof(::crypto::AsymetricEncryptResponse)}, - { 16, -1, -1, sizeof(::crypto::AsymetricDecryptRequest)}, - { 25, -1, -1, sizeof(::crypto::GetHashLengthRequest)}, - { 33, -1, -1, sizeof(::crypto::GetAESLengthRequest)}, - { 42, -1, -1, sizeof(::crypto::AsymetricDecryptResponse)}, - { 49, -1, -1, sizeof(::crypto::GetLengthRequest)}, - { 56, -1, -1, sizeof(::crypto::GetLengthResponse)}, - { 63, -1, -1, sizeof(::crypto::GetWholeLength)}, - { 72, -1, -1, sizeof(::crypto::GenerateAESKeyRequest)}, - { 82, -1, -1, sizeof(::crypto::GenerateAESKeyResponse)}, - { 89, -1, -1, sizeof(::crypto::GenerateKeyPairRequest)}, - { 97, -1, -1, sizeof(::crypto::GenerateKeyPairResponse)}, - { 105, -1, -1, sizeof(::crypto::SignRequest)}, - { 116, -1, -1, sizeof(::crypto::SignResponse)}, - { 123, -1, -1, sizeof(::crypto::VerifyRequest)}, - { 136, -1, -1, sizeof(::crypto::VerifyResponse)}, - { 144, -1, -1, sizeof(::crypto::KeyRequest)}, - { 151, -1, -1, sizeof(::crypto::KeyResponse)}, - { 158, -1, -1, sizeof(::crypto::UserKeyPermissions)}, - { 166, -1, -1, sizeof(::crypto::BootSystemRequest)}, - { 173, -1, -1, sizeof(::crypto::Empty)}, - { 179, -1, -1, sizeof(::crypto::CryptoConfig)}, - { 189, -1, -1, sizeof(::crypto::ConfigureRequest)}, - { 197, -1, -1, sizeof(::crypto::AddProcessRequest)}, - { 205, -1, -1, sizeof(::crypto::EncryptRequest)}, - { 216, -1, -1, sizeof(::crypto::EncryptResponse)}, - { 224, -1, -1, sizeof(::crypto::DecryptRequest)}, - { 236, -1, -1, sizeof(::crypto::DecryptResponse)}, - { 243, -1, -1, sizeof(::crypto::AESEncryptRequest)}, - { 258, -1, -1, sizeof(::crypto::AESEncryptResponse)}, - { 265, -1, -1, sizeof(::crypto::AESDecryptRequest)}, - { 282, -1, -1, sizeof(::crypto::AESDecryptResponse)}, + { 10, -1, -1, sizeof(::crypto::AsymetricEncryptResponse)}, + { 17, -1, -1, sizeof(::crypto::AsymetricDecryptRequest)}, + { 28, -1, -1, sizeof(::crypto::GetHashLengthRequest)}, + { 38, -1, -1, sizeof(::crypto::GetAESLengthRequest)}, + { 49, -1, -1, sizeof(::crypto::AsymetricDecryptResponse)}, + { 56, -1, -1, sizeof(::crypto::GetLengthRequest)}, + { 65, -1, -1, sizeof(::crypto::GetLengthResponse)}, + { 72, -1, -1, sizeof(::crypto::GetWholeLength)}, + { 82, -1, -1, sizeof(::crypto::GenerateAESKeyRequest)}, + { 93, -1, -1, sizeof(::crypto::GenerateAESKeyResponse)}, + { 100, -1, -1, sizeof(::crypto::GenerateKeyPairRequest)}, + { 109, -1, -1, sizeof(::crypto::GenerateKeyPairResponse)}, + { 117, -1, -1, sizeof(::crypto::SignRequest)}, + { 129, -1, -1, sizeof(::crypto::SignResponse)}, + { 136, -1, -1, sizeof(::crypto::VerifyRequest)}, + { 150, -1, -1, sizeof(::crypto::VerifyResponse)}, + { 158, -1, -1, sizeof(::crypto::KeyRequest)}, + { 167, -1, -1, sizeof(::crypto::KeyResponse)}, + { 174, -1, -1, sizeof(::crypto::UserKeyPermissions)}, + { 182, -1, -1, sizeof(::crypto::BootSystemRequest)}, + { 190, -1, -1, sizeof(::crypto::Empty)}, + { 196, -1, -1, sizeof(::crypto::CryptoConfig)}, + { 207, -1, -1, sizeof(::crypto::ConfigureRequest)}, + { 216, -1, -1, sizeof(::crypto::AddProcessRequest)}, + { 225, -1, -1, sizeof(::crypto::EncryptRequest)}, + { 237, -1, -1, sizeof(::crypto::EncryptResponse)}, + { 245, -1, -1, sizeof(::crypto::DecryptRequest)}, + { 258, -1, -1, sizeof(::crypto::DecryptResponse)}, + { 265, -1, -1, sizeof(::crypto::AESEncryptRequest)}, + { 281, -1, -1, sizeof(::crypto::AESEncryptResponse)}, + { 288, -1, -1, sizeof(::crypto::AESDecryptRequest)}, + { 306, -1, -1, sizeof(::crypto::AESDecryptResponse)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { @@ -859,145 +907,156 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = }; const char descriptor_table_protodef_proto_2fencryption_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\026proto/encryption.proto\022\006crypto\"H\n\027Asym" + "\n\026proto/encryption.proto\022\006crypto\"[\n\027Asym" "etricEncryptRequest\022\020\n\010senderId\030\001 \001(\005\022\r\n" - "\005keyId\030\002 \001(\t\022\014\n\004data\030\003 \001(\014\"2\n\030AsymetricE" - "ncryptResponse\022\026\n\016encrypted_data\030\001 \001(\014\"J" - "\n\027AsymetricDecryptRequest\022\022\n\nreceiverId\030" - "\001 \001(\005\022\r\n\005keyId\030\002 \001(\t\022\014\n\004data\030\003 \001(\014\"K\n\024Ge" - "tHashLengthRequest\022\"\n\004func\030\001 \001(\0162\024.crypt" - "o.SHAAlgorithm\022\017\n\007dataLen\030\002 \001(\005\"f\n\023GetAE" - "SLengthRequest\022\017\n\007dataLen\030\001 \001(\005\022\017\n\007isFir" - "st\030\002 \001(\010\022-\n\014chainingMode\030\003 \001(\0162\027.crypto." - "AESChainingMode\"2\n\030AsymetricDecryptRespo" - "nse\022\026\n\016decrypted_data\030\001 \001(\014\"\"\n\020GetLength" - "Request\022\016\n\006in_len\030\001 \001(\005\" \n\021GetLengthResp" - "onse\022\013\n\003len\030\001 \001(\005\"B\n\016GetWholeLength\022\020\n\010s" - "enderId\030\001 \001(\005\022\r\n\005inLen\030\002 \001(\005\022\017\n\007isFirst\030" - "\003 \001(\010\"\221\001\n\025GenerateAESKeyRequest\022\017\n\007user_" - "id\030\001 \001(\005\022*\n\013permissions\030\002 \003(\0162\025.crypto.K" - "eyPermission\022\'\n\tkeyLength\030\003 \001(\0162\024.crypto" - ".AESKeyLength\022\022\n\ndestUserId\030\004 \001(\005\")\n\026Gen" - "erateAESKeyResponse\022\017\n\007aes_key\030\001 \001(\t\"U\n\026" - "GenerateKeyPairRequest\022\017\n\007user_id\030\001 \001(\005\022" + "\005keyId\030\002 \001(\t\022\014\n\004data\030\003 \001(\014\022\021\n\tmessageId\030" + "\004 \001(\t\"1\n\030AsymetricEncryptResponse\022\025\n\renc" + "ryptedData\030\001 \001(\014\"o\n\027AsymetricDecryptRequ" + "est\022\020\n\010senderId\030\001 \001(\005\022\022\n\nreceiverId\030\002 \001(" + "\005\022\r\n\005keyId\030\003 \001(\t\022\014\n\004data\030\004 \001(\014\022\021\n\tmessag" + "eId\030\005 \001(\t\"p\n\024GetHashLengthRequest\022\020\n\010sen" + "derId\030\001 \001(\005\022\"\n\004func\030\002 \001(\0162\024.crypto.SHAAl" + "gorithm\022\017\n\007dataLen\030\003 \001(\005\022\021\n\tmessageId\030\004 " + "\001(\t\"\213\001\n\023GetAESLengthRequest\022\020\n\010senderId\030" + "\001 \001(\005\022\017\n\007dataLen\030\002 \001(\005\022\017\n\007isFirst\030\003 \001(\010\022" + "-\n\014chainingMode\030\004 \001(\0162\027.crypto.AESChaini" + "ngMode\022\021\n\tmessageId\030\005 \001(\t\"1\n\030AsymetricDe" + "cryptResponse\022\025\n\rdecryptedData\030\001 \001(\014\"F\n\020" + "GetLengthRequest\022\020\n\010senderId\030\001 \001(\005\022\r\n\005in" + "Len\030\002 \001(\005\022\021\n\tmessageId\030\003 \001(\t\" \n\021GetLengt" + "hResponse\022\013\n\003len\030\001 \001(\005\"U\n\016GetWholeLength" + "\022\020\n\010senderId\030\001 \001(\005\022\r\n\005inLen\030\002 \001(\005\022\017\n\007isF" + "irst\030\003 \001(\010\022\021\n\tmessageId\030\004 \001(\t\"\243\001\n\025Genera" + "teAESKeyRequest\022\016\n\006userId\030\001 \001(\005\022*\n\013permi" + "ssions\030\002 \003(\0162\025.crypto.KeyPermission\022\'\n\tk" + "eyLength\030\003 \001(\0162\024.crypto.AESKeyLength\022\022\n\n" + "destUserId\030\004 \001(\005\022\021\n\tmessageId\030\005 \001(\t\"(\n\026G" + "enerateAESKeyResponse\022\016\n\006aesKey\030\001 \001(\t\"g\n" + "\026GenerateKeyPairRequest\022\016\n\006userId\030\001 \001(\005\022" "*\n\013permissions\030\002 \003(\0162\025.crypto.KeyPermiss" - "ion\"B\n\027GenerateKeyPairResponse\022\022\n\npublic" - "_key\030\001 \001(\t\022\023\n\013private_key\030\002 \001(\t\"x\n\013SignR" - "equest\022\021\n\tsender_id\030\001 \001(\005\022\014\n\004data\030\002 \001(\014\022" - "\'\n\thash_func\030\003 \001(\0162\024.crypto.SHAAlgorithm" - "\022\017\n\007counter\030\005 \001(\003\022\016\n\006key_id\030\006 \001(\t\"!\n\014Sig" - "nResponse\022\021\n\tsignature\030\001 \001(\014\"\242\001\n\rVerifyR" - "equest\022\021\n\tsender_id\030\001 \001(\005\022\023\n\013receiver_id" - "\030\002 \001(\005\022\014\n\004data\030\003 \001(\014\022\021\n\tsignature\030\004 \001(\014\022" - "\'\n\thash_func\030\005 \001(\0162\024.crypto.SHAAlgorithm" - "\022\016\n\006key_id\030\006 \001(\t\022\017\n\007counter\030\007 \001(\005\",\n\016Ver" - "ifyResponse\022\r\n\005valid\030\001 \001(\010\022\013\n\003out\030\002 \001(\014\"" - "\035\n\nKeyRequest\022\017\n\007user_id\030\001 \001(\005\"\032\n\013KeyRes" - "ponse\022\013\n\003key\030\001 \001(\t\"P\n\022UserKeyPermissions" - "\022\016\n\006userId\030\001 \001(\005\022*\n\013permissions\030\002 \003(\0162\025." - "crypto.KeyPermission\"L\n\021BootSystemReques" - "t\0227\n\023usersIdsPermissions\030\001 \003(\0132\032.crypto." - "UserKeyPermissions\"\007\n\005Empty\"\320\001\n\014CryptoCo" - "nfig\022*\n\014hashFunction\030\001 \001(\0162\024.crypto.SHAA" - "lgorithm\022*\n\014aesKeyLength\030\002 \001(\0162\024.crypto." - "AESKeyLength\0220\n\017aesChainingMode\030\003 \001(\0162\027." - "crypto.AESChainingMode\0226\n\022asymmetricFunc" - "tion\030\004 \001(\0162\032.crypto.AsymmetricFunction\"H" - "\n\020ConfigureRequest\022\016\n\006userId\030\001 \001(\005\022$\n\006co" - "nfig\030\002 \001(\0132\024.crypto.CryptoConfig\"O\n\021AddP" - "rocessRequest\022\016\n\006userId\030\001 \001(\005\022*\n\013permiss" - "ions\030\002 \003(\0162\025.crypto.KeyPermission\"h\n\016Enc" - "ryptRequest\022\021\n\tsender_id\030\001 \001(\005\022\023\n\013receiv" - "er_id\030\002 \001(\005\022\014\n\004data\030\003 \001(\014\022\017\n\007counter\030\004 \001" - "(\003\022\017\n\007isFirst\030\005 \001(\010\"<\n\017EncryptResponse\022\026" - "\n\016encrypted_data\030\001 \001(\014\022\021\n\tsignature\030\002 \001(" - "\014\"\205\001\n\016DecryptRequest\022\021\n\tsender_id\030\001 \001(\005\022" - "\023\n\013receiver_id\030\002 \001(\005\022\026\n\016encrypted_data\030\003" - " \001(\014\022\017\n\007counter\030\004 \001(\003\022\021\n\tsignature\030\005 \001(\014" - "\022\017\n\007isFirst\030\006 \001(\010\")\n\017DecryptResponse\022\026\n\016" - "decrypted_data\030\001 \001(\014\"\376\001\n\021AESEncryptReque" - "st\022\021\n\tsender_id\030\001 \001(\005\022\023\n\013receiver_id\030\002 \001" - "(\005\022\014\n\004data\030\003 \001(\014\022(\n\004func\030\004 \001(\0162\032.crypto." - "AsymmetricFunction\022\017\n\007counter\030\005 \001(\003\022\016\n\006k" - "ey_id\030\006 \001(\t\022(\n\nkey_length\030\007 \001(\0162\024.crypto" - ".AESKeyLength\022-\n\014chainingMode\030\010 \001(\0162\027.cr" - "ypto.AESChainingMode\022\017\n\007isFirst\030\t \001(\010\",\n" - "\022AESEncryptResponse\022\026\n\016encrypted_data\030\001 " - "\001(\014\"\243\002\n\021AESDecryptRequest\022\021\n\tsender_id\030\001" - " \001(\005\022\023\n\013receiver_id\030\002 \001(\005\022\017\n\007data_in\030\003 \001" - "(\014\022\016\n\006in_len\030\004 \001(\005\022\020\n\010data_out\030\005 \001(\014\022(\n\004" - "func\030\006 \001(\0162\032.crypto.AsymmetricFunction\022(" - "\n\nkey_length\030\007 \001(\0162\024.crypto.AESKeyLength" + "ion\022\021\n\tmessageId\030\003 \001(\t\"@\n\027GenerateKeyPai" + "rResponse\022\021\n\tpublicKey\030\001 \001(\t\022\022\n\nprivateK" + "ey\030\002 \001(\t\"\210\001\n\013SignRequest\022\020\n\010senderId\030\001 \001" + "(\005\022\014\n\004data\030\002 \001(\014\022&\n\010hashFunc\030\003 \001(\0162\024.cry" + "pto.SHAAlgorithm\022\017\n\007counter\030\005 \001(\003\022\r\n\005key" + "Id\030\006 \001(\t\022\021\n\tmessageId\030\007 \001(\t\"!\n\014SignRespo" + "nse\022\021\n\tsignature\030\001 \001(\014\"\261\001\n\rVerifyRequest" + "\022\020\n\010senderId\030\001 \001(\005\022\022\n\nreceiverId\030\002 \001(\005\022\014" + "\n\004data\030\003 \001(\014\022\021\n\tsignature\030\004 \001(\014\022&\n\010hashF" + "unc\030\005 \001(\0162\024.crypto.SHAAlgorithm\022\r\n\005keyId" + "\030\006 \001(\t\022\017\n\007counter\030\007 \001(\005\022\021\n\tmessageId\030\010 \001" + "(\t\",\n\016VerifyResponse\022\r\n\005valid\030\001 \001(\010\022\013\n\003o" + "ut\030\002 \001(\014\"A\n\nKeyRequest\022\020\n\010senderId\030\001 \001(\005" + "\022\016\n\006userId\030\002 \001(\005\022\021\n\tmessageId\030\003 \001(\t\"\032\n\013K" + "eyResponse\022\013\n\003key\030\001 \001(\t\"P\n\022UserKeyPermis" + "sions\022\016\n\006userId\030\001 \001(\005\022*\n\013permissions\030\002 \003" + "(\0162\025.crypto.KeyPermission\"_\n\021BootSystemR" + "equest\0227\n\023usersIdsPermissions\030\001 \003(\0132\032.cr" + "ypto.UserKeyPermissions\022\021\n\tmessageId\030\005 \001" + "(\t\"\007\n\005Empty\"\343\001\n\014CryptoConfig\022*\n\014hashFunc" + "tion\030\001 \001(\0162\024.crypto.SHAAlgorithm\022*\n\014aesK" + "eyLength\030\002 \001(\0162\024.crypto.AESKeyLength\0220\n\017" + "aesChainingMode\030\003 \001(\0162\027.crypto.AESChaini" + "ngMode\0226\n\022asymmetricFunction\030\004 \001(\0162\032.cry" + "pto.AsymmetricFunction\022\021\n\tmessageId\030\005 \001(" + "\t\"[\n\020ConfigureRequest\022\016\n\006userId\030\001 \001(\005\022$\n" + "\006config\030\002 \001(\0132\024.crypto.CryptoConfig\022\021\n\tm" + "essageId\030\003 \001(\t\"b\n\021AddProcessRequest\022\016\n\006u" + "serId\030\001 \001(\005\022*\n\013permissions\030\002 \003(\0162\025.crypt" + "o.KeyPermission\022\021\n\tmessageId\030\004 \001(\t\"y\n\016En" + "cryptRequest\022\020\n\010senderId\030\001 \001(\005\022\022\n\nreceiv" + "erId\030\002 \001(\005\022\014\n\004data\030\003 \001(\014\022\017\n\007counter\030\004 \001(" + "\003\022\017\n\007isFirst\030\005 \001(\010\022\021\n\tmessageId\030\006 \001(\t\";\n" + "\017EncryptResponse\022\025\n\rencryptedData\030\001 \001(\014\022" + "\021\n\tsignature\030\002 \001(\014\"\225\001\n\016DecryptRequest\022\020\n" + "\010senderId\030\001 \001(\005\022\022\n\nreceiverId\030\002 \001(\005\022\025\n\re" + "ncryptedData\030\003 \001(\014\022\017\n\007counter\030\004 \001(\003\022\021\n\ts" + "ignature\030\005 \001(\014\022\017\n\007isFirst\030\006 \001(\010\022\021\n\tmessa" + "geId\030\007 \001(\t\"(\n\017DecryptResponse\022\025\n\rdecrypt" + "edData\030\001 \001(\014\"\215\002\n\021AESEncryptRequest\022\020\n\010se" + "nderId\030\001 \001(\005\022\022\n\nreceiverId\030\002 \001(\005\022\014\n\004data" + "\030\003 \001(\014\022(\n\004func\030\004 \001(\0162\032.crypto.Asymmetric" + "Function\022\017\n\007counter\030\005 \001(\003\022\r\n\005keyId\030\006 \001(\t" + "\022\'\n\tkeyLength\030\007 \001(\0162\024.crypto.AESKeyLengt" + "h\022-\n\014chainingMode\030\010 \001(\0162\027.crypto.AESChai" + "ningMode\022\017\n\007isFirst\030\t \001(\010\022\021\n\tmessageId\030\n" + " \001(\t\"+\n\022AESEncryptResponse\022\025\n\rencryptedD" + "ata\030\001 \001(\014\"\257\002\n\021AESDecryptRequest\022\020\n\010sende" + "rId\030\001 \001(\005\022\022\n\nreceiverId\030\002 \001(\005\022\016\n\006dataIn\030" + "\003 \001(\014\022\r\n\005inLen\030\004 \001(\005\022\017\n\007dataOut\030\005 \001(\014\022(\n" + "\004func\030\006 \001(\0162\032.crypto.AsymmetricFunction\022" + "\'\n\tkeyLength\030\007 \001(\0162\024.crypto.AESKeyLength" "\022-\n\014chainingMode\030\010 \001(\0162\027.crypto.AESChain" - "ingMode\022\017\n\007counter\030\t \001(\003\022\016\n\006key_id\030\n \001(\t" - "\022\017\n\007isFirst\030\013 \001(\010\",\n\022AESDecryptResponse\022" - "\026\n\016decrypted_data\030\001 \001(\014*O\n\rKeyPermission" - "\022\n\n\006VERIFY\020\000\022\010\n\004SIGN\020\001\022\013\n\007ENCRYPT\020\002\022\013\n\007D" - "ECRYPT\020\003\022\016\n\nEXPORTABLE\020\004*>\n\017AESChainingM" - "ode\022\007\n\003ECB\020\000\022\007\n\003CBC\020\001\022\007\n\003CFB\020\002\022\007\n\003OFB\020\003\022" - "\007\n\003CTR\020\004*&\n\022AsymmetricFunction\022\007\n\003RSA\020\000\022" - "\007\n\003ECC\020\001*(\n\014SHAAlgorithm\022\n\n\006SHA256\020\000\022\014\n\010" - "SHA3_512\020\001*5\n\014AESKeyLength\022\013\n\007AES_128\020\000\022" - "\013\n\007AES_192\020\001\022\013\n\007AES_256\020\0022\231\021\n\rCryptoServ" - "ice\0226\n\nbootSystem\022\031.crypto.BootSystemReq" - "uest\032\r.crypto.Empty\0227\n\013addProccess\022\031.cry" - "pto.AddProcessRequest\032\r.crypto.Empty\0224\n\t" - "configure\022\030.crypto.ConfigureRequest\032\r.cr" - "ypto.Empty\022O\n\016generateAESKey\022\035.crypto.Ge" - "nerateAESKeyRequest\032\036.crypto.GenerateAES" - "KeyResponse\022U\n\022generateRSAKeyPair\022\036.cryp" - "to.GenerateKeyPairRequest\032\037.crypto.Gener" - "ateKeyPairResponse\022U\n\022generateECCKeyPair" - "\022\036.crypto.GenerateKeyPairRequest\032\037.crypt" - "o.GenerateKeyPairResponse\022N\n\023getSignedDa" - "taLength\022\034.crypto.GetHashLengthRequest\032\031" - ".crypto.GetLengthResponse\022L\n\025getECCencry" - "ptedLength\022\030.crypto.GetLengthRequest\032\031.c" - "rypto.GetLengthResponse\022L\n\025getECCDecrypt" - "edLength\022\030.crypto.GetLengthRequest\032\031.cry" - "pto.GetLengthResponse\022L\n\025getRSAencrypted" - "Length\022\030.crypto.GetLengthRequest\032\031.crypt" - "o.GetLengthResponse\022L\n\025getRSAdecryptedLe" - "ngth\022\030.crypto.GetLengthRequest\032\031.crypto." - "GetLengthResponse\022O\n\025getAESencryptedLeng" - "th\022\033.crypto.GetAESLengthRequest\032\031.crypto" - ".GetLengthResponse\022O\n\025getAESdecryptedLen" - "gth\022\033.crypto.GetAESLengthRequest\032\031.crypt" - "o.GetLengthResponse\022D\n\017getEncryptedLen\022\026" - ".crypto.GetWholeLength\032\031.crypto.GetLengt" - "hResponse\022D\n\017getDecryptedLen\022\026.crypto.Ge" - "tWholeLength\032\031.crypto.GetLengthResponse\022" - "1\n\004sign\022\023.crypto.SignRequest\032\024.crypto.Si" - "gnResponse\0227\n\006verify\022\025.crypto.VerifyRequ" - "est\032\026.crypto.VerifyResponse\022B\n\027getPublic" - "ECCKeyByUserId\022\022.crypto.KeyRequest\032\023.cry" - "pto.KeyResponse\022B\n\027getPublicRSAKeyByUser" - "Id\022\022.crypto.KeyRequest\032\023.crypto.KeyRespo" - "nse\022O\n\nECCencrypt\022\037.crypto.AsymetricEncr" - "yptRequest\032 .crypto.AsymetricEncryptResp" - "onse\022O\n\nECCdecrypt\022\037.crypto.AsymetricDec" - "ryptRequest\032 .crypto.AsymetricDecryptRes" - "ponse\022O\n\nRSAencrypt\022\037.crypto.AsymetricEn" - "cryptRequest\032 .crypto.AsymetricEncryptRe" - "sponse\022O\n\nRSAdecrypt\022\037.crypto.AsymetricD" - "ecryptRequest\032 .crypto.AsymetricDecryptR" - "esponse\022C\n\nAESencrypt\022\031.crypto.AESEncryp" - "tRequest\032\032.crypto.AESEncryptResponse\022C\n\n" - "AESdecrypt\022\031.crypto.AESDecryptRequest\032\032." - "crypto.AESDecryptResponse\022:\n\007encrypt\022\026.c" - "rypto.EncryptRequest\032\027.crypto.EncryptRes" - "ponse\022:\n\007decrypt\022\026.crypto.DecryptRequest" - "\032\027.crypto.DecryptResponse\0227\n\nsignUpdate\022" - "\023.crypto.SignRequest\032\024.crypto.SignRespon" - "se\0229\n\014signFinalize\022\023.crypto.SignRequest\032" - "\024.crypto.SignResponse\022=\n\014verifyUpdate\022\025." + "ingMode\022\017\n\007counter\030\t \001(\003\022\r\n\005keyId\030\n \001(\t\022" + "\017\n\007isFirst\030\013 \001(\010\022\021\n\tmessageId\030\014 \001(\t\"+\n\022A" + "ESDecryptResponse\022\025\n\rdecrypteddata\030\001 \001(\014" + "*O\n\rKeyPermission\022\n\n\006VERIFY\020\000\022\010\n\004SIGN\020\001\022" + "\013\n\007ENCRYPT\020\002\022\013\n\007DECRYPT\020\003\022\016\n\nEXPORTABLE\020" + "\004*>\n\017AESChainingMode\022\007\n\003ECB\020\000\022\007\n\003CBC\020\001\022\007" + "\n\003CFB\020\002\022\007\n\003OFB\020\003\022\007\n\003CTR\020\004*&\n\022AsymmetricF" + "unction\022\007\n\003RSA\020\000\022\007\n\003ECC\020\001*(\n\014SHAAlgorith" + "m\022\n\n\006SHA256\020\000\022\014\n\010SHA3_512\020\001*5\n\014AESKeyLen" + "gth\022\013\n\007AES_128\020\000\022\013\n\007AES_192\020\001\022\013\n\007AES_256" + "\020\0022\231\021\n\rCryptoService\0226\n\nbootSystem\022\031.cry" + "pto.BootSystemRequest\032\r.crypto.Empty\0227\n\013" + "addProccess\022\031.crypto.AddProcessRequest\032\r" + ".crypto.Empty\0224\n\tconfigure\022\030.crypto.Conf" + "igureRequest\032\r.crypto.Empty\022O\n\016generateA" + "ESKey\022\035.crypto.GenerateAESKeyRequest\032\036.c" + "rypto.GenerateAESKeyResponse\022U\n\022generate" + "RSAKeyPair\022\036.crypto.GenerateKeyPairReque" + "st\032\037.crypto.GenerateKeyPairResponse\022U\n\022g" + "enerateECCKeyPair\022\036.crypto.GenerateKeyPa" + "irRequest\032\037.crypto.GenerateKeyPairRespon" + "se\022N\n\023getSignedDataLength\022\034.crypto.GetHa" + "shLengthRequest\032\031.crypto.GetLengthRespon" + "se\022L\n\025getECCencryptedLength\022\030.crypto.Get" + "LengthRequest\032\031.crypto.GetLengthResponse" + "\022L\n\025getECCDecryptedLength\022\030.crypto.GetLe" + "ngthRequest\032\031.crypto.GetLengthResponse\022L" + "\n\025getRSAencryptedLength\022\030.crypto.GetLeng" + "thRequest\032\031.crypto.GetLengthResponse\022L\n\025" + "getRSAdecryptedLength\022\030.crypto.GetLength" + "Request\032\031.crypto.GetLengthResponse\022O\n\025ge" + "tAESencryptedLength\022\033.crypto.GetAESLengt" + "hRequest\032\031.crypto.GetLengthResponse\022O\n\025g" + "etAESdecryptedLength\022\033.crypto.GetAESLeng" + "thRequest\032\031.crypto.GetLengthResponse\022D\n\017" + "getEncryptedLen\022\026.crypto.GetWholeLength\032" + "\031.crypto.GetLengthResponse\022D\n\017getDecrypt" + "edLen\022\026.crypto.GetWholeLength\032\031.crypto.G" + "etLengthResponse\0221\n\004sign\022\023.crypto.SignRe" + "quest\032\024.crypto.SignResponse\0227\n\006verify\022\025." "crypto.VerifyRequest\032\026.crypto.VerifyResp" - "onse\022\?\n\016verifyFinalize\022\025.crypto.VerifyRe" - "quest\032\026.crypto.VerifyResponseb\006proto3" + "onse\022B\n\027getPublicECCKeyByUserId\022\022.crypto" + ".KeyRequest\032\023.crypto.KeyResponse\022B\n\027getP" + "ublicRSAKeyByUserId\022\022.crypto.KeyRequest\032" + "\023.crypto.KeyResponse\022O\n\nECCencrypt\022\037.cry" + "pto.AsymetricEncryptRequest\032 .crypto.Asy" + "metricEncryptResponse\022O\n\nECCdecrypt\022\037.cr" + "ypto.AsymetricDecryptRequest\032 .crypto.As" + "ymetricDecryptResponse\022O\n\nRSAencrypt\022\037.c" + "rypto.AsymetricEncryptRequest\032 .crypto.A" + "symetricEncryptResponse\022O\n\nRSAdecrypt\022\037." + "crypto.AsymetricDecryptRequest\032 .crypto." + "AsymetricDecryptResponse\022C\n\nAESencrypt\022\031" + ".crypto.AESEncryptRequest\032\032.crypto.AESEn" + "cryptResponse\022C\n\nAESdecrypt\022\031.crypto.AES" + "DecryptRequest\032\032.crypto.AESDecryptRespon" + "se\022:\n\007encrypt\022\026.crypto.EncryptRequest\032\027." + "crypto.EncryptResponse\022:\n\007decrypt\022\026.cryp" + "to.DecryptRequest\032\027.crypto.DecryptRespon" + "se\0227\n\nsignUpdate\022\023.crypto.SignRequest\032\024." + "crypto.SignResponse\0229\n\014signFinalize\022\023.cr" + "ypto.SignRequest\032\024.crypto.SignResponse\022=" + "\n\014verifyUpdate\022\025.crypto.VerifyRequest\032\026." + "crypto.VerifyResponse\022\?\n\016verifyFinalize\022" + "\025.crypto.VerifyRequest\032\026.crypto.VerifyRe" + "sponseb\006proto3" ; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_proto_2fencryption_2eproto_once; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_proto_2fencryption_2eproto = { - false, false, 5397, descriptor_table_protodef_proto_2fencryption_2eproto, "proto/encryption.proto", + false, false, 5814, descriptor_table_protodef_proto_2fencryption_2eproto, "proto/encryption.proto", &descriptor_table_proto_2fencryption_2eproto_once, nullptr, 0, 33, schemas, file_default_instances, TableStruct_proto_2fencryption_2eproto::offsets, file_level_metadata_proto_2fencryption_2eproto, file_level_enum_descriptors_proto_2fencryption_2eproto, file_level_service_descriptors_proto_2fencryption_2eproto, @@ -1115,6 +1174,11 @@ AsymetricEncryptRequest::AsymetricEncryptRequest(const AsymetricEncryptRequest& data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data(), GetArenaForAllocation()); } + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } senderid_ = from.senderid_; // @@protoc_insertion_point(copy_constructor:crypto.AsymetricEncryptRequest) } @@ -1122,6 +1186,7 @@ AsymetricEncryptRequest::AsymetricEncryptRequest(const AsymetricEncryptRequest& void AsymetricEncryptRequest::SharedCtor() { keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); senderid_ = 0; } @@ -1136,6 +1201,7 @@ inline void AsymetricEncryptRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); keyid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void AsymetricEncryptRequest::ArenaDtor(void* object) { @@ -1156,6 +1222,7 @@ void AsymetricEncryptRequest::Clear() { keyid_.ClearToEmpty(); data_.ClearToEmpty(); + messageid_.ClearToEmpty(); senderid_ = 0; _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -1193,6 +1260,16 @@ const char* AsymetricEncryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_ } else goto handle_unusual; continue; + // string messageId = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.AsymetricEncryptRequest.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -1244,6 +1321,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AsymetricEncryptRequest::_InternalSerialize( 3, this->_internal_data(), target); } + // string messageId = 4; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.AsymetricEncryptRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_messageid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -1274,6 +1361,13 @@ size_t AsymetricEncryptRequest::ByteSizeLong() const { this->_internal_data()); } + // string messageId = 4; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); + } + // int32 senderId = 1; if (this->_internal_senderid() != 0) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); @@ -1307,6 +1401,9 @@ void AsymetricEncryptRequest::MergeFrom(const AsymetricEncryptRequest& from) { if (!from._internal_data().empty()) { _internal_set_data(from._internal_data()); } + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } if (from._internal_senderid() != 0) { _internal_set_senderid(from._internal_senderid()); } @@ -1339,6 +1436,11 @@ void AsymetricEncryptRequest::InternalSwap(AsymetricEncryptRequest* other) { &data_, lhs_arena, &other->data_, rhs_arena ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); swap(senderid_, other->senderid_); } @@ -1366,16 +1468,16 @@ AsymetricEncryptResponse::AsymetricEncryptResponse(::PROTOBUF_NAMESPACE_ID::Aren AsymetricEncryptResponse::AsymetricEncryptResponse(const AsymetricEncryptResponse& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_encrypted_data().empty()) { - encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_encrypted_data(), + encrypteddata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_encrypteddata().empty()) { + encrypteddata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_encrypteddata(), GetArenaForAllocation()); } // @@protoc_insertion_point(copy_constructor:crypto.AsymetricEncryptResponse) } void AsymetricEncryptResponse::SharedCtor() { -encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +encrypteddata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } AsymetricEncryptResponse::~AsymetricEncryptResponse() { @@ -1387,7 +1489,7 @@ AsymetricEncryptResponse::~AsymetricEncryptResponse() { inline void AsymetricEncryptResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - encrypted_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + encrypteddata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void AsymetricEncryptResponse::ArenaDtor(void* object) { @@ -1406,7 +1508,7 @@ void AsymetricEncryptResponse::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - encrypted_data_.ClearToEmpty(); + encrypteddata_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -1416,10 +1518,10 @@ const char* AsymetricEncryptResponse::_InternalParse(const char* ptr, ::PROTOBUF ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // bytes encrypted_data = 1; + // bytes encryptedData = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_encrypted_data(); + auto str = _internal_mutable_encrypteddata(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); } else @@ -1454,10 +1556,10 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AsymetricEncryptResponse::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // bytes encrypted_data = 1; - if (!this->_internal_encrypted_data().empty()) { + // bytes encryptedData = 1; + if (!this->_internal_encrypteddata().empty()) { target = stream->WriteBytesMaybeAliased( - 1, this->_internal_encrypted_data(), target); + 1, this->_internal_encrypteddata(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -1476,11 +1578,11 @@ size_t AsymetricEncryptResponse::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bytes encrypted_data = 1; - if (!this->_internal_encrypted_data().empty()) { + // bytes encryptedData = 1; + if (!this->_internal_encrypteddata().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_encrypted_data()); + this->_internal_encrypteddata()); } return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); @@ -1505,8 +1607,8 @@ void AsymetricEncryptResponse::MergeFrom(const AsymetricEncryptResponse& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_encrypted_data().empty()) { - _internal_set_encrypted_data(from._internal_encrypted_data()); + if (!from._internal_encrypteddata().empty()) { + _internal_set_encrypteddata(from._internal_encrypteddata()); } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -1529,8 +1631,8 @@ void AsymetricEncryptResponse::InternalSwap(AsymetricEncryptResponse* other) { _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &encrypted_data_, lhs_arena, - &other->encrypted_data_, rhs_arena + &encrypteddata_, lhs_arena, + &other->encrypteddata_, rhs_arena ); } @@ -1568,14 +1670,25 @@ AsymetricDecryptRequest::AsymetricDecryptRequest(const AsymetricDecryptRequest& data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data(), GetArenaForAllocation()); } - receiverid_ = from.receiverid_; + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } + ::memcpy(&senderid_, &from.senderid_, + static_cast(reinterpret_cast(&receiverid_) - + reinterpret_cast(&senderid_)) + sizeof(receiverid_)); // @@protoc_insertion_point(copy_constructor:crypto.AsymetricDecryptRequest) } void AsymetricDecryptRequest::SharedCtor() { keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -receiverid_ = 0; +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&senderid_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&receiverid_) - + reinterpret_cast(&senderid_)) + sizeof(receiverid_)); } AsymetricDecryptRequest::~AsymetricDecryptRequest() { @@ -1589,6 +1702,7 @@ inline void AsymetricDecryptRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); keyid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void AsymetricDecryptRequest::ArenaDtor(void* object) { @@ -1609,7 +1723,10 @@ void AsymetricDecryptRequest::Clear() { keyid_.ClearToEmpty(); data_.ClearToEmpty(); - receiverid_ = 0; + messageid_.ClearToEmpty(); + ::memset(&senderid_, 0, static_cast( + reinterpret_cast(&receiverid_) - + reinterpret_cast(&senderid_)) + sizeof(receiverid_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -1619,17 +1736,25 @@ const char* AsymetricDecryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_ ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // int32 receiverId = 1; + // int32 senderId = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - receiverid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + senderid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // string keyId = 2; + // int32 receiverId = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + receiverid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string keyId = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { auto str = _internal_mutable_keyid(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.AsymetricDecryptRequest.keyId")); @@ -1637,15 +1762,25 @@ const char* AsymetricDecryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_ } else goto handle_unusual; continue; - // bytes data = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + // bytes data = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { auto str = _internal_mutable_data(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); } else goto handle_unusual; continue; + // string messageId = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.AsymetricDecryptRequest.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -1675,26 +1810,42 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AsymetricDecryptRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // int32 receiverId = 1; + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_senderid(), target); + } + + // int32 receiverId = 2; if (this->_internal_receiverid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_receiverid(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiverid(), target); } - // string keyId = 2; + // string keyId = 3; if (!this->_internal_keyid().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_keyid().data(), static_cast(this->_internal_keyid().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "crypto.AsymetricDecryptRequest.keyId"); target = stream->WriteStringMaybeAliased( - 2, this->_internal_keyid(), target); + 3, this->_internal_keyid(), target); } - // bytes data = 3; + // bytes data = 4; if (!this->_internal_data().empty()) { target = stream->WriteBytesMaybeAliased( - 3, this->_internal_data(), target); + 4, this->_internal_data(), target); + } + + // string messageId = 5; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.AsymetricDecryptRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_messageid(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -1713,21 +1864,33 @@ size_t AsymetricDecryptRequest::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string keyId = 2; + // string keyId = 3; if (!this->_internal_keyid().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_keyid()); } - // bytes data = 3; + // bytes data = 4; if (!this->_internal_data().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( this->_internal_data()); } - // int32 receiverId = 1; + // string messageId = 5; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); + } + + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); + } + + // int32 receiverId = 2; if (this->_internal_receiverid() != 0) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiverid()); } @@ -1760,6 +1923,12 @@ void AsymetricDecryptRequest::MergeFrom(const AsymetricDecryptRequest& from) { if (!from._internal_data().empty()) { _internal_set_data(from._internal_data()); } + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } + if (from._internal_senderid() != 0) { + _internal_set_senderid(from._internal_senderid()); + } if (from._internal_receiverid() != 0) { _internal_set_receiverid(from._internal_receiverid()); } @@ -1792,7 +1961,17 @@ void AsymetricDecryptRequest::InternalSwap(AsymetricDecryptRequest* other) { &data_, lhs_arena, &other->data_, rhs_arena ); - swap(receiverid_, other->receiverid_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(AsymetricDecryptRequest, receiverid_) + + sizeof(AsymetricDecryptRequest::receiverid_) + - PROTOBUF_FIELD_OFFSET(AsymetricDecryptRequest, senderid_)>( + reinterpret_cast(&senderid_), + reinterpret_cast(&other->senderid_)); } ::PROTOBUF_NAMESPACE_ID::Metadata AsymetricDecryptRequest::GetMetadata() const { @@ -1819,17 +1998,23 @@ GetHashLengthRequest::GetHashLengthRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena GetHashLengthRequest::GetHashLengthRequest(const GetHashLengthRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&func_, &from.func_, + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } + ::memcpy(&senderid_, &from.senderid_, static_cast(reinterpret_cast(&datalen_) - - reinterpret_cast(&func_)) + sizeof(datalen_)); + reinterpret_cast(&senderid_)) + sizeof(datalen_)); // @@protoc_insertion_point(copy_constructor:crypto.GetHashLengthRequest) } void GetHashLengthRequest::SharedCtor() { +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( - reinterpret_cast(&func_) - reinterpret_cast(this)), + reinterpret_cast(&senderid_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&datalen_) - - reinterpret_cast(&func_)) + sizeof(datalen_)); + reinterpret_cast(&senderid_)) + sizeof(datalen_)); } GetHashLengthRequest::~GetHashLengthRequest() { @@ -1841,6 +2026,7 @@ GetHashLengthRequest::~GetHashLengthRequest() { inline void GetHashLengthRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void GetHashLengthRequest::ArenaDtor(void* object) { @@ -1859,9 +2045,10 @@ void GetHashLengthRequest::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&func_, 0, static_cast( + messageid_.ClearToEmpty(); + ::memset(&senderid_, 0, static_cast( reinterpret_cast(&datalen_) - - reinterpret_cast(&func_)) + sizeof(datalen_)); + reinterpret_cast(&senderid_)) + sizeof(datalen_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -1871,23 +2058,41 @@ const char* GetHashLengthRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAM ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // .crypto.SHAAlgorithm func = 1; + // int32 senderId = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + senderid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - _internal_set_func(static_cast<::crypto::SHAAlgorithm>(val)); } else goto handle_unusual; continue; - // int32 dataLen = 2; + // .crypto.SHAAlgorithm func = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_func(static_cast<::crypto::SHAAlgorithm>(val)); + } else + goto handle_unusual; + continue; + // int32 dataLen = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { datalen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; + // string messageId = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GetHashLengthRequest.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -1917,17 +2122,33 @@ ::PROTOBUF_NAMESPACE_ID::uint8* GetHashLengthRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .crypto.SHAAlgorithm func = 1; + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_senderid(), target); + } + + // .crypto.SHAAlgorithm func = 2; if (this->_internal_func() != 0) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 1, this->_internal_func(), target); + 2, this->_internal_func(), target); } - // int32 dataLen = 2; + // int32 dataLen = 3; if (this->_internal_datalen() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_datalen(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_datalen(), target); + } + + // string messageId = 4; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.GetHashLengthRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_messageid(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -1946,13 +2167,25 @@ size_t GetHashLengthRequest::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // .crypto.SHAAlgorithm func = 1; + // string messageId = 4; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); + } + + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); + } + + // .crypto.SHAAlgorithm func = 2; if (this->_internal_func() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_func()); } - // int32 dataLen = 2; + // int32 dataLen = 3; if (this->_internal_datalen() != 0) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_datalen()); } @@ -1979,6 +2212,12 @@ void GetHashLengthRequest::MergeFrom(const GetHashLengthRequest& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } + if (from._internal_senderid() != 0) { + _internal_set_senderid(from._internal_senderid()); + } if (from._internal_func() != 0) { _internal_set_func(from._internal_func()); } @@ -2001,13 +2240,20 @@ bool GetHashLengthRequest::IsInitialized() const { void GetHashLengthRequest::InternalSwap(GetHashLengthRequest* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(GetHashLengthRequest, datalen_) + sizeof(GetHashLengthRequest::datalen_) - - PROTOBUF_FIELD_OFFSET(GetHashLengthRequest, func_)>( - reinterpret_cast(&func_), - reinterpret_cast(&other->func_)); + - PROTOBUF_FIELD_OFFSET(GetHashLengthRequest, senderid_)>( + reinterpret_cast(&senderid_), + reinterpret_cast(&other->senderid_)); } ::PROTOBUF_NAMESPACE_ID::Metadata GetHashLengthRequest::GetMetadata() const { @@ -2034,17 +2280,23 @@ GetAESLengthRequest::GetAESLengthRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, GetAESLengthRequest::GetAESLengthRequest(const GetAESLengthRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&datalen_, &from.datalen_, + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } + ::memcpy(&senderid_, &from.senderid_, static_cast(reinterpret_cast(&chainingmode_) - - reinterpret_cast(&datalen_)) + sizeof(chainingmode_)); + reinterpret_cast(&senderid_)) + sizeof(chainingmode_)); // @@protoc_insertion_point(copy_constructor:crypto.GetAESLengthRequest) } void GetAESLengthRequest::SharedCtor() { +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( - reinterpret_cast(&datalen_) - reinterpret_cast(this)), + reinterpret_cast(&senderid_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&chainingmode_) - - reinterpret_cast(&datalen_)) + sizeof(chainingmode_)); + reinterpret_cast(&senderid_)) + sizeof(chainingmode_)); } GetAESLengthRequest::~GetAESLengthRequest() { @@ -2056,6 +2308,7 @@ GetAESLengthRequest::~GetAESLengthRequest() { inline void GetAESLengthRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void GetAESLengthRequest::ArenaDtor(void* object) { @@ -2074,9 +2327,10 @@ void GetAESLengthRequest::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&datalen_, 0, static_cast( + messageid_.ClearToEmpty(); + ::memset(&senderid_, 0, static_cast( reinterpret_cast(&chainingmode_) - - reinterpret_cast(&datalen_)) + sizeof(chainingmode_)); + reinterpret_cast(&senderid_)) + sizeof(chainingmode_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -2086,31 +2340,49 @@ const char* GetAESLengthRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAME ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // int32 dataLen = 1; + // int32 senderId = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - datalen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + senderid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool isFirst = 2; + // int32 dataLen = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - isfirst_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + datalen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .crypto.AESChainingMode chainingMode = 3; + // bool isFirst = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + isfirst_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .crypto.AESChainingMode chainingMode = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); _internal_set_chainingmode(static_cast<::crypto::AESChainingMode>(val)); } else goto handle_unusual; continue; + // string messageId = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GetAESLengthRequest.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -2140,23 +2412,39 @@ ::PROTOBUF_NAMESPACE_ID::uint8* GetAESLengthRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // int32 dataLen = 1; + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_senderid(), target); + } + + // int32 dataLen = 2; if (this->_internal_datalen() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_datalen(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_datalen(), target); } - // bool isFirst = 2; + // bool isFirst = 3; if (this->_internal_isfirst() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_isfirst(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_isfirst(), target); } - // .crypto.AESChainingMode chainingMode = 3; + // .crypto.AESChainingMode chainingMode = 4; if (this->_internal_chainingmode() != 0) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 3, this->_internal_chainingmode(), target); + 4, this->_internal_chainingmode(), target); + } + + // string messageId = 5; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.GetAESLengthRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_messageid(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -2175,17 +2463,29 @@ size_t GetAESLengthRequest::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // int32 dataLen = 1; + // string messageId = 5; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); + } + + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); + } + + // int32 dataLen = 2; if (this->_internal_datalen() != 0) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_datalen()); } - // bool isFirst = 2; + // bool isFirst = 3; if (this->_internal_isfirst() != 0) { total_size += 1 + 1; } - // .crypto.AESChainingMode chainingMode = 3; + // .crypto.AESChainingMode chainingMode = 4; if (this->_internal_chainingmode() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_chainingmode()); @@ -2213,6 +2513,12 @@ void GetAESLengthRequest::MergeFrom(const GetAESLengthRequest& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } + if (from._internal_senderid() != 0) { + _internal_set_senderid(from._internal_senderid()); + } if (from._internal_datalen() != 0) { _internal_set_datalen(from._internal_datalen()); } @@ -2238,13 +2544,20 @@ bool GetAESLengthRequest::IsInitialized() const { void GetAESLengthRequest::InternalSwap(GetAESLengthRequest* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(GetAESLengthRequest, chainingmode_) + sizeof(GetAESLengthRequest::chainingmode_) - - PROTOBUF_FIELD_OFFSET(GetAESLengthRequest, datalen_)>( - reinterpret_cast(&datalen_), - reinterpret_cast(&other->datalen_)); + - PROTOBUF_FIELD_OFFSET(GetAESLengthRequest, senderid_)>( + reinterpret_cast(&senderid_), + reinterpret_cast(&other->senderid_)); } ::PROTOBUF_NAMESPACE_ID::Metadata GetAESLengthRequest::GetMetadata() const { @@ -2271,16 +2584,16 @@ AsymetricDecryptResponse::AsymetricDecryptResponse(::PROTOBUF_NAMESPACE_ID::Aren AsymetricDecryptResponse::AsymetricDecryptResponse(const AsymetricDecryptResponse& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - decrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_decrypted_data().empty()) { - decrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_decrypted_data(), + decrypteddata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_decrypteddata().empty()) { + decrypteddata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_decrypteddata(), GetArenaForAllocation()); } // @@protoc_insertion_point(copy_constructor:crypto.AsymetricDecryptResponse) } void AsymetricDecryptResponse::SharedCtor() { -decrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +decrypteddata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } AsymetricDecryptResponse::~AsymetricDecryptResponse() { @@ -2292,7 +2605,7 @@ AsymetricDecryptResponse::~AsymetricDecryptResponse() { inline void AsymetricDecryptResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - decrypted_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + decrypteddata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void AsymetricDecryptResponse::ArenaDtor(void* object) { @@ -2311,7 +2624,7 @@ void AsymetricDecryptResponse::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - decrypted_data_.ClearToEmpty(); + decrypteddata_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -2321,10 +2634,10 @@ const char* AsymetricDecryptResponse::_InternalParse(const char* ptr, ::PROTOBUF ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // bytes decrypted_data = 1; + // bytes decryptedData = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_decrypted_data(); + auto str = _internal_mutable_decrypteddata(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); } else @@ -2359,10 +2672,10 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AsymetricDecryptResponse::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // bytes decrypted_data = 1; - if (!this->_internal_decrypted_data().empty()) { + // bytes decryptedData = 1; + if (!this->_internal_decrypteddata().empty()) { target = stream->WriteBytesMaybeAliased( - 1, this->_internal_decrypted_data(), target); + 1, this->_internal_decrypteddata(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -2381,11 +2694,11 @@ size_t AsymetricDecryptResponse::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bytes decrypted_data = 1; - if (!this->_internal_decrypted_data().empty()) { + // bytes decryptedData = 1; + if (!this->_internal_decrypteddata().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_decrypted_data()); + this->_internal_decrypteddata()); } return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); @@ -2410,8 +2723,8 @@ void AsymetricDecryptResponse::MergeFrom(const AsymetricDecryptResponse& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_decrypted_data().empty()) { - _internal_set_decrypted_data(from._internal_decrypted_data()); + if (!from._internal_decrypteddata().empty()) { + _internal_set_decrypteddata(from._internal_decrypteddata()); } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -2434,8 +2747,8 @@ void AsymetricDecryptResponse::InternalSwap(AsymetricDecryptResponse* other) { _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &decrypted_data_, lhs_arena, - &other->decrypted_data_, rhs_arena + &decrypteddata_, lhs_arena, + &other->decrypteddata_, rhs_arena ); } @@ -2463,12 +2776,23 @@ GetLengthRequest::GetLengthRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, GetLengthRequest::GetLengthRequest(const GetLengthRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - in_len_ = from.in_len_; + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } + ::memcpy(&senderid_, &from.senderid_, + static_cast(reinterpret_cast(&inlen_) - + reinterpret_cast(&senderid_)) + sizeof(inlen_)); // @@protoc_insertion_point(copy_constructor:crypto.GetLengthRequest) } void GetLengthRequest::SharedCtor() { -in_len_ = 0; +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&senderid_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&inlen_) - + reinterpret_cast(&senderid_)) + sizeof(inlen_)); } GetLengthRequest::~GetLengthRequest() { @@ -2480,6 +2804,7 @@ GetLengthRequest::~GetLengthRequest() { inline void GetLengthRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void GetLengthRequest::ArenaDtor(void* object) { @@ -2498,7 +2823,10 @@ void GetLengthRequest::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - in_len_ = 0; + messageid_.ClearToEmpty(); + ::memset(&senderid_, 0, static_cast( + reinterpret_cast(&inlen_) - + reinterpret_cast(&senderid_)) + sizeof(inlen_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -2508,10 +2836,28 @@ const char* GetLengthRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPA ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // int32 in_len = 1; + // int32 senderId = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - in_len_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + senderid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 inLen = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + inlen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string messageId = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GetLengthRequest.messageId")); CHK_(ptr); } else goto handle_unusual; @@ -2545,10 +2891,26 @@ ::PROTOBUF_NAMESPACE_ID::uint8* GetLengthRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // int32 in_len = 1; - if (this->_internal_in_len() != 0) { + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_senderid(), target); + } + + // int32 inLen = 2; + if (this->_internal_inlen() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_in_len(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_inlen(), target); + } + + // string messageId = 3; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.GetLengthRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_messageid(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -2567,9 +2929,21 @@ size_t GetLengthRequest::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // int32 in_len = 1; - if (this->_internal_in_len() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_in_len()); + // string messageId = 3; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); + } + + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); + } + + // int32 inLen = 2; + if (this->_internal_inlen() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_inlen()); } return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); @@ -2594,8 +2968,14 @@ void GetLengthRequest::MergeFrom(const GetLengthRequest& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_in_len() != 0) { - _internal_set_in_len(from._internal_in_len()); + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } + if (from._internal_senderid() != 0) { + _internal_set_senderid(from._internal_senderid()); + } + if (from._internal_inlen() != 0) { + _internal_set_inlen(from._internal_inlen()); } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -2613,8 +2993,20 @@ bool GetLengthRequest::IsInitialized() const { void GetLengthRequest::InternalSwap(GetLengthRequest* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(in_len_, other->in_len_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(GetLengthRequest, inlen_) + + sizeof(GetLengthRequest::inlen_) + - PROTOBUF_FIELD_OFFSET(GetLengthRequest, senderid_)>( + reinterpret_cast(&senderid_), + reinterpret_cast(&other->senderid_)); } ::PROTOBUF_NAMESPACE_ID::Metadata GetLengthRequest::GetMetadata() const { @@ -2819,6 +3211,11 @@ GetWholeLength::GetWholeLength(::PROTOBUF_NAMESPACE_ID::Arena* arena, GetWholeLength::GetWholeLength(const GetWholeLength& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } ::memcpy(&senderid_, &from.senderid_, static_cast(reinterpret_cast(&isfirst_) - reinterpret_cast(&senderid_)) + sizeof(isfirst_)); @@ -2826,6 +3223,7 @@ GetWholeLength::GetWholeLength(const GetWholeLength& from) } void GetWholeLength::SharedCtor() { +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&senderid_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&isfirst_) - @@ -2841,6 +3239,7 @@ GetWholeLength::~GetWholeLength() { inline void GetWholeLength::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void GetWholeLength::ArenaDtor(void* object) { @@ -2859,6 +3258,7 @@ void GetWholeLength::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + messageid_.ClearToEmpty(); ::memset(&senderid_, 0, static_cast( reinterpret_cast(&isfirst_) - reinterpret_cast(&senderid_)) + sizeof(isfirst_)); @@ -2895,6 +3295,16 @@ const char* GetWholeLength::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE } else goto handle_unusual; continue; + // string messageId = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GetWholeLength.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -2942,6 +3352,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* GetWholeLength::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_isfirst(), target); } + // string messageId = 4; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.GetWholeLength.messageId"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_messageid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -2958,6 +3378,13 @@ size_t GetWholeLength::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + // string messageId = 4; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); + } + // int32 senderId = 1; if (this->_internal_senderid() != 0) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); @@ -2995,6 +3422,9 @@ void GetWholeLength::MergeFrom(const GetWholeLength& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } if (from._internal_senderid() != 0) { _internal_set_senderid(from._internal_senderid()); } @@ -3020,7 +3450,14 @@ bool GetWholeLength::IsInitialized() const { void GetWholeLength::InternalSwap(GetWholeLength* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(GetWholeLength, isfirst_) + sizeof(GetWholeLength::isfirst_) @@ -3055,17 +3492,23 @@ GenerateAESKeyRequest::GenerateAESKeyRequest(const GenerateAESKeyRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message(), permissions_(from.permissions_) { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&user_id_, &from.user_id_, + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } + ::memcpy(&userid_, &from.userid_, static_cast(reinterpret_cast(&destuserid_) - - reinterpret_cast(&user_id_)) + sizeof(destuserid_)); + reinterpret_cast(&userid_)) + sizeof(destuserid_)); // @@protoc_insertion_point(copy_constructor:crypto.GenerateAESKeyRequest) } void GenerateAESKeyRequest::SharedCtor() { +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( - reinterpret_cast(&user_id_) - reinterpret_cast(this)), + reinterpret_cast(&userid_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&destuserid_) - - reinterpret_cast(&user_id_)) + sizeof(destuserid_)); + reinterpret_cast(&userid_)) + sizeof(destuserid_)); } GenerateAESKeyRequest::~GenerateAESKeyRequest() { @@ -3077,6 +3520,7 @@ GenerateAESKeyRequest::~GenerateAESKeyRequest() { inline void GenerateAESKeyRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void GenerateAESKeyRequest::ArenaDtor(void* object) { @@ -3096,9 +3540,10 @@ void GenerateAESKeyRequest::Clear() { (void) cached_has_bits; permissions_.Clear(); - ::memset(&user_id_, 0, static_cast( + messageid_.ClearToEmpty(); + ::memset(&userid_, 0, static_cast( reinterpret_cast(&destuserid_) - - reinterpret_cast(&user_id_)) + sizeof(destuserid_)); + reinterpret_cast(&userid_)) + sizeof(destuserid_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -3108,10 +3553,10 @@ const char* GenerateAESKeyRequest::_InternalParse(const char* ptr, ::PROTOBUF_NA ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // int32 user_id = 1; + // int32 userId = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - user_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + userid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; @@ -3145,6 +3590,16 @@ const char* GenerateAESKeyRequest::_InternalParse(const char* ptr, ::PROTOBUF_NA } else goto handle_unusual; continue; + // string messageId = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GenerateAESKeyRequest.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -3174,10 +3629,10 @@ ::PROTOBUF_NAMESPACE_ID::uint8* GenerateAESKeyRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // int32 user_id = 1; - if (this->_internal_user_id() != 0) { + // int32 userId = 1; + if (this->_internal_userid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_user_id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_userid(), target); } // repeated .crypto.KeyPermission permissions = 2; @@ -3202,6 +3657,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* GenerateAESKeyRequest::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_destuserid(), target); } + // string messageId = 5; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.GenerateAESKeyRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_messageid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -3236,9 +3701,16 @@ size_t GenerateAESKeyRequest::ByteSizeLong() const { total_size += data_size; } - // int32 user_id = 1; - if (this->_internal_user_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_user_id()); + // string messageId = 5; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); + } + + // int32 userId = 1; + if (this->_internal_userid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_userid()); } // .crypto.AESKeyLength keyLength = 3; @@ -3275,8 +3747,11 @@ void GenerateAESKeyRequest::MergeFrom(const GenerateAESKeyRequest& from) { (void) cached_has_bits; permissions_.MergeFrom(from.permissions_); - if (from._internal_user_id() != 0) { - _internal_set_user_id(from._internal_user_id()); + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } + if (from._internal_userid() != 0) { + _internal_set_userid(from._internal_userid()); } if (from._internal_keylength() != 0) { _internal_set_keylength(from._internal_keylength()); @@ -3300,14 +3775,21 @@ bool GenerateAESKeyRequest::IsInitialized() const { void GenerateAESKeyRequest::InternalSwap(GenerateAESKeyRequest* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); permissions_.InternalSwap(&other->permissions_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(GenerateAESKeyRequest, destuserid_) + sizeof(GenerateAESKeyRequest::destuserid_) - - PROTOBUF_FIELD_OFFSET(GenerateAESKeyRequest, user_id_)>( - reinterpret_cast(&user_id_), - reinterpret_cast(&other->user_id_)); + - PROTOBUF_FIELD_OFFSET(GenerateAESKeyRequest, userid_)>( + reinterpret_cast(&userid_), + reinterpret_cast(&other->userid_)); } ::PROTOBUF_NAMESPACE_ID::Metadata GenerateAESKeyRequest::GetMetadata() const { @@ -3334,16 +3816,16 @@ GenerateAESKeyResponse::GenerateAESKeyResponse(::PROTOBUF_NAMESPACE_ID::Arena* a GenerateAESKeyResponse::GenerateAESKeyResponse(const GenerateAESKeyResponse& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - aes_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_aes_key().empty()) { - aes_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_aes_key(), + aeskey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_aeskey().empty()) { + aeskey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_aeskey(), GetArenaForAllocation()); } // @@protoc_insertion_point(copy_constructor:crypto.GenerateAESKeyResponse) } void GenerateAESKeyResponse::SharedCtor() { -aes_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +aeskey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } GenerateAESKeyResponse::~GenerateAESKeyResponse() { @@ -3355,7 +3837,7 @@ GenerateAESKeyResponse::~GenerateAESKeyResponse() { inline void GenerateAESKeyResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - aes_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + aeskey_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void GenerateAESKeyResponse::ArenaDtor(void* object) { @@ -3374,7 +3856,7 @@ void GenerateAESKeyResponse::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - aes_key_.ClearToEmpty(); + aeskey_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -3384,12 +3866,12 @@ const char* GenerateAESKeyResponse::_InternalParse(const char* ptr, ::PROTOBUF_N ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // string aes_key = 1; + // string aesKey = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_aes_key(); + auto str = _internal_mutable_aeskey(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GenerateAESKeyResponse.aes_key")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GenerateAESKeyResponse.aesKey")); CHK_(ptr); } else goto handle_unusual; @@ -3423,14 +3905,14 @@ ::PROTOBUF_NAMESPACE_ID::uint8* GenerateAESKeyResponse::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // string aes_key = 1; - if (!this->_internal_aes_key().empty()) { + // string aesKey = 1; + if (!this->_internal_aeskey().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_aes_key().data(), static_cast(this->_internal_aes_key().length()), + this->_internal_aeskey().data(), static_cast(this->_internal_aeskey().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "crypto.GenerateAESKeyResponse.aes_key"); + "crypto.GenerateAESKeyResponse.aesKey"); target = stream->WriteStringMaybeAliased( - 1, this->_internal_aes_key(), target); + 1, this->_internal_aeskey(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -3449,11 +3931,11 @@ size_t GenerateAESKeyResponse::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string aes_key = 1; - if (!this->_internal_aes_key().empty()) { + // string aesKey = 1; + if (!this->_internal_aeskey().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_aes_key()); + this->_internal_aeskey()); } return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); @@ -3478,8 +3960,8 @@ void GenerateAESKeyResponse::MergeFrom(const GenerateAESKeyResponse& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_aes_key().empty()) { - _internal_set_aes_key(from._internal_aes_key()); + if (!from._internal_aeskey().empty()) { + _internal_set_aeskey(from._internal_aeskey()); } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -3502,8 +3984,8 @@ void GenerateAESKeyResponse::InternalSwap(GenerateAESKeyResponse* other) { _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &aes_key_, lhs_arena, - &other->aes_key_, rhs_arena + &aeskey_, lhs_arena, + &other->aeskey_, rhs_arena ); } @@ -3533,12 +4015,18 @@ GenerateKeyPairRequest::GenerateKeyPairRequest(const GenerateKeyPairRequest& fro : ::PROTOBUF_NAMESPACE_ID::Message(), permissions_(from.permissions_) { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - user_id_ = from.user_id_; + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } + userid_ = from.userid_; // @@protoc_insertion_point(copy_constructor:crypto.GenerateKeyPairRequest) } void GenerateKeyPairRequest::SharedCtor() { -user_id_ = 0; +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +userid_ = 0; } GenerateKeyPairRequest::~GenerateKeyPairRequest() { @@ -3550,6 +4038,7 @@ GenerateKeyPairRequest::~GenerateKeyPairRequest() { inline void GenerateKeyPairRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void GenerateKeyPairRequest::ArenaDtor(void* object) { @@ -3569,7 +4058,8 @@ void GenerateKeyPairRequest::Clear() { (void) cached_has_bits; permissions_.Clear(); - user_id_ = 0; + messageid_.ClearToEmpty(); + userid_ = 0; _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -3579,10 +4069,10 @@ const char* GenerateKeyPairRequest::_InternalParse(const char* ptr, ::PROTOBUF_N ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // int32 user_id = 1; + // int32 userId = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - user_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + userid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; @@ -3599,6 +4089,16 @@ const char* GenerateKeyPairRequest::_InternalParse(const char* ptr, ::PROTOBUF_N } else goto handle_unusual; continue; + // string messageId = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GenerateKeyPairRequest.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -3628,10 +4128,10 @@ ::PROTOBUF_NAMESPACE_ID::uint8* GenerateKeyPairRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // int32 user_id = 1; - if (this->_internal_user_id() != 0) { + // int32 userId = 1; + if (this->_internal_userid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_user_id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_userid(), target); } // repeated .crypto.KeyPermission permissions = 2; @@ -3643,6 +4143,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* GenerateKeyPairRequest::_InternalSerialize( } } + // string messageId = 3; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.GenerateKeyPairRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_messageid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -3677,9 +4187,16 @@ size_t GenerateKeyPairRequest::ByteSizeLong() const { total_size += data_size; } - // int32 user_id = 1; - if (this->_internal_user_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_user_id()); + // string messageId = 3; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); + } + + // int32 userId = 1; + if (this->_internal_userid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_userid()); } return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); @@ -3705,8 +4222,11 @@ void GenerateKeyPairRequest::MergeFrom(const GenerateKeyPairRequest& from) { (void) cached_has_bits; permissions_.MergeFrom(from.permissions_); - if (from._internal_user_id() != 0) { - _internal_set_user_id(from._internal_user_id()); + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } + if (from._internal_userid() != 0) { + _internal_set_userid(from._internal_userid()); } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -3724,9 +4244,16 @@ bool GenerateKeyPairRequest::IsInitialized() const { void GenerateKeyPairRequest::InternalSwap(GenerateKeyPairRequest* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); permissions_.InternalSwap(&other->permissions_); - swap(user_id_, other->user_id_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); + swap(userid_, other->userid_); } ::PROTOBUF_NAMESPACE_ID::Metadata GenerateKeyPairRequest::GetMetadata() const { @@ -3753,22 +4280,22 @@ GenerateKeyPairResponse::GenerateKeyPairResponse(::PROTOBUF_NAMESPACE_ID::Arena* GenerateKeyPairResponse::GenerateKeyPairResponse(const GenerateKeyPairResponse& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - public_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_public_key().empty()) { - public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_public_key(), + publickey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_publickey().empty()) { + publickey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_publickey(), GetArenaForAllocation()); } - private_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_private_key().empty()) { - private_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_private_key(), + privatekey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_privatekey().empty()) { + privatekey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_privatekey(), GetArenaForAllocation()); } // @@protoc_insertion_point(copy_constructor:crypto.GenerateKeyPairResponse) } void GenerateKeyPairResponse::SharedCtor() { -public_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -private_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +publickey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +privatekey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } GenerateKeyPairResponse::~GenerateKeyPairResponse() { @@ -3780,8 +4307,8 @@ GenerateKeyPairResponse::~GenerateKeyPairResponse() { inline void GenerateKeyPairResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - public_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - private_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + publickey_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + privatekey_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void GenerateKeyPairResponse::ArenaDtor(void* object) { @@ -3800,8 +4327,8 @@ void GenerateKeyPairResponse::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - public_key_.ClearToEmpty(); - private_key_.ClearToEmpty(); + publickey_.ClearToEmpty(); + privatekey_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -3811,22 +4338,22 @@ const char* GenerateKeyPairResponse::_InternalParse(const char* ptr, ::PROTOBUF_ ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // string public_key = 1; + // string publicKey = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_public_key(); + auto str = _internal_mutable_publickey(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GenerateKeyPairResponse.public_key")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GenerateKeyPairResponse.publicKey")); CHK_(ptr); } else goto handle_unusual; continue; - // string private_key = 2; + // string privateKey = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_private_key(); + auto str = _internal_mutable_privatekey(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GenerateKeyPairResponse.private_key")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.GenerateKeyPairResponse.privateKey")); CHK_(ptr); } else goto handle_unusual; @@ -3860,24 +4387,24 @@ ::PROTOBUF_NAMESPACE_ID::uint8* GenerateKeyPairResponse::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // string public_key = 1; - if (!this->_internal_public_key().empty()) { + // string publicKey = 1; + if (!this->_internal_publickey().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_public_key().data(), static_cast(this->_internal_public_key().length()), + this->_internal_publickey().data(), static_cast(this->_internal_publickey().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "crypto.GenerateKeyPairResponse.public_key"); + "crypto.GenerateKeyPairResponse.publicKey"); target = stream->WriteStringMaybeAliased( - 1, this->_internal_public_key(), target); + 1, this->_internal_publickey(), target); } - // string private_key = 2; - if (!this->_internal_private_key().empty()) { + // string privateKey = 2; + if (!this->_internal_privatekey().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_private_key().data(), static_cast(this->_internal_private_key().length()), + this->_internal_privatekey().data(), static_cast(this->_internal_privatekey().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "crypto.GenerateKeyPairResponse.private_key"); + "crypto.GenerateKeyPairResponse.privateKey"); target = stream->WriteStringMaybeAliased( - 2, this->_internal_private_key(), target); + 2, this->_internal_privatekey(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -3896,18 +4423,18 @@ size_t GenerateKeyPairResponse::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string public_key = 1; - if (!this->_internal_public_key().empty()) { + // string publicKey = 1; + if (!this->_internal_publickey().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_public_key()); + this->_internal_publickey()); } - // string private_key = 2; - if (!this->_internal_private_key().empty()) { + // string privateKey = 2; + if (!this->_internal_privatekey().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_private_key()); + this->_internal_privatekey()); } return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); @@ -3932,11 +4459,11 @@ void GenerateKeyPairResponse::MergeFrom(const GenerateKeyPairResponse& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_public_key().empty()) { - _internal_set_public_key(from._internal_public_key()); + if (!from._internal_publickey().empty()) { + _internal_set_publickey(from._internal_publickey()); } - if (!from._internal_private_key().empty()) { - _internal_set_private_key(from._internal_private_key()); + if (!from._internal_privatekey().empty()) { + _internal_set_privatekey(from._internal_privatekey()); } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -3959,13 +4486,13 @@ void GenerateKeyPairResponse::InternalSwap(GenerateKeyPairResponse* other) { _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &public_key_, lhs_arena, - &other->public_key_, rhs_arena + &publickey_, lhs_arena, + &other->publickey_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &private_key_, lhs_arena, - &other->private_key_, rhs_arena + &privatekey_, lhs_arena, + &other->privatekey_, rhs_arena ); } @@ -3998,24 +4525,30 @@ SignRequest::SignRequest(const SignRequest& from) data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data(), GetArenaForAllocation()); } - key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_key_id().empty()) { - key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_key_id(), + keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_keyid().empty()) { + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_keyid(), + GetArenaForAllocation()); + } + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), GetArenaForAllocation()); } - ::memcpy(&sender_id_, &from.sender_id_, + ::memcpy(&senderid_, &from.senderid_, static_cast(reinterpret_cast(&counter_) - - reinterpret_cast(&sender_id_)) + sizeof(counter_)); + reinterpret_cast(&senderid_)) + sizeof(counter_)); // @@protoc_insertion_point(copy_constructor:crypto.SignRequest) } void SignRequest::SharedCtor() { data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( - reinterpret_cast(&sender_id_) - reinterpret_cast(this)), + reinterpret_cast(&senderid_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&counter_) - - reinterpret_cast(&sender_id_)) + sizeof(counter_)); + reinterpret_cast(&senderid_)) + sizeof(counter_)); } SignRequest::~SignRequest() { @@ -4028,7 +4561,8 @@ SignRequest::~SignRequest() { inline void SignRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - key_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + keyid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void SignRequest::ArenaDtor(void* object) { @@ -4048,10 +4582,11 @@ void SignRequest::Clear() { (void) cached_has_bits; data_.ClearToEmpty(); - key_id_.ClearToEmpty(); - ::memset(&sender_id_, 0, static_cast( + keyid_.ClearToEmpty(); + messageid_.ClearToEmpty(); + ::memset(&senderid_, 0, static_cast( reinterpret_cast(&counter_) - - reinterpret_cast(&sender_id_)) + sizeof(counter_)); + reinterpret_cast(&senderid_)) + sizeof(counter_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -4061,10 +4596,10 @@ const char* SignRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // int32 sender_id = 1; + // int32 senderId = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - sender_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + senderid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; @@ -4078,12 +4613,12 @@ const char* SignRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID } else goto handle_unusual; continue; - // .crypto.SHAAlgorithm hash_func = 3; + // .crypto.SHAAlgorithm hashFunc = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - _internal_set_hash_func(static_cast<::crypto::SHAAlgorithm>(val)); + _internal_set_hashfunc(static_cast<::crypto::SHAAlgorithm>(val)); } else goto handle_unusual; continue; @@ -4095,12 +4630,22 @@ const char* SignRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID } else goto handle_unusual; continue; - // string key_id = 6; + // string keyId = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { - auto str = _internal_mutable_key_id(); + auto str = _internal_mutable_keyid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.SignRequest.keyId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string messageId = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { + auto str = _internal_mutable_messageid(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.SignRequest.key_id")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.SignRequest.messageId")); CHK_(ptr); } else goto handle_unusual; @@ -4134,10 +4679,10 @@ ::PROTOBUF_NAMESPACE_ID::uint8* SignRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // int32 sender_id = 1; - if (this->_internal_sender_id() != 0) { + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_sender_id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_senderid(), target); } // bytes data = 2; @@ -4146,11 +4691,11 @@ ::PROTOBUF_NAMESPACE_ID::uint8* SignRequest::_InternalSerialize( 2, this->_internal_data(), target); } - // .crypto.SHAAlgorithm hash_func = 3; - if (this->_internal_hash_func() != 0) { + // .crypto.SHAAlgorithm hashFunc = 3; + if (this->_internal_hashfunc() != 0) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 3, this->_internal_hash_func(), target); + 3, this->_internal_hashfunc(), target); } // int64 counter = 5; @@ -4159,14 +4704,24 @@ ::PROTOBUF_NAMESPACE_ID::uint8* SignRequest::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->_internal_counter(), target); } - // string key_id = 6; - if (!this->_internal_key_id().empty()) { + // string keyId = 6; + if (!this->_internal_keyid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_keyid().data(), static_cast(this->_internal_keyid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.SignRequest.keyId"); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_keyid(), target); + } + + // string messageId = 7; + if (!this->_internal_messageid().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_key_id().data(), static_cast(this->_internal_key_id().length()), + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "crypto.SignRequest.key_id"); + "crypto.SignRequest.messageId"); target = stream->WriteStringMaybeAliased( - 6, this->_internal_key_id(), target); + 7, this->_internal_messageid(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -4192,22 +4747,29 @@ size_t SignRequest::ByteSizeLong() const { this->_internal_data()); } - // string key_id = 6; - if (!this->_internal_key_id().empty()) { + // string keyId = 6; + if (!this->_internal_keyid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_keyid()); + } + + // string messageId = 7; + if (!this->_internal_messageid().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_key_id()); + this->_internal_messageid()); } - // int32 sender_id = 1; - if (this->_internal_sender_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sender_id()); + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); } - // .crypto.SHAAlgorithm hash_func = 3; - if (this->_internal_hash_func() != 0) { + // .crypto.SHAAlgorithm hashFunc = 3; + if (this->_internal_hashfunc() != 0) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_hash_func()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_hashfunc()); } // int64 counter = 5; @@ -4240,14 +4802,17 @@ void SignRequest::MergeFrom(const SignRequest& from) { if (!from._internal_data().empty()) { _internal_set_data(from._internal_data()); } - if (!from._internal_key_id().empty()) { - _internal_set_key_id(from._internal_key_id()); + if (!from._internal_keyid().empty()) { + _internal_set_keyid(from._internal_keyid()); + } + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); } - if (from._internal_sender_id() != 0) { - _internal_set_sender_id(from._internal_sender_id()); + if (from._internal_senderid() != 0) { + _internal_set_senderid(from._internal_senderid()); } - if (from._internal_hash_func() != 0) { - _internal_set_hash_func(from._internal_hash_func()); + if (from._internal_hashfunc() != 0) { + _internal_set_hashfunc(from._internal_hashfunc()); } if (from._internal_counter() != 0) { _internal_set_counter(from._internal_counter()); @@ -4278,15 +4843,20 @@ void SignRequest::InternalSwap(SignRequest* other) { ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &key_id_, lhs_arena, - &other->key_id_, rhs_arena + &keyid_, lhs_arena, + &other->keyid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(SignRequest, counter_) + sizeof(SignRequest::counter_) - - PROTOBUF_FIELD_OFFSET(SignRequest, sender_id_)>( - reinterpret_cast(&sender_id_), - reinterpret_cast(&other->sender_id_)); + - PROTOBUF_FIELD_OFFSET(SignRequest, senderid_)>( + reinterpret_cast(&senderid_), + reinterpret_cast(&other->senderid_)); } ::PROTOBUF_NAMESPACE_ID::Metadata SignRequest::GetMetadata() const { @@ -4515,25 +5085,31 @@ VerifyRequest::VerifyRequest(const VerifyRequest& from) signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_signature(), GetArenaForAllocation()); } - key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_key_id().empty()) { - key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_key_id(), + keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_keyid().empty()) { + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_keyid(), + GetArenaForAllocation()); + } + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), GetArenaForAllocation()); } - ::memcpy(&sender_id_, &from.sender_id_, + ::memcpy(&senderid_, &from.senderid_, static_cast(reinterpret_cast(&counter_) - - reinterpret_cast(&sender_id_)) + sizeof(counter_)); + reinterpret_cast(&senderid_)) + sizeof(counter_)); // @@protoc_insertion_point(copy_constructor:crypto.VerifyRequest) } void VerifyRequest::SharedCtor() { data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( - reinterpret_cast(&sender_id_) - reinterpret_cast(this)), + reinterpret_cast(&senderid_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&counter_) - - reinterpret_cast(&sender_id_)) + sizeof(counter_)); + reinterpret_cast(&senderid_)) + sizeof(counter_)); } VerifyRequest::~VerifyRequest() { @@ -4547,7 +5123,8 @@ inline void VerifyRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); signature_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - key_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + keyid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void VerifyRequest::ArenaDtor(void* object) { @@ -4568,10 +5145,11 @@ void VerifyRequest::Clear() { data_.ClearToEmpty(); signature_.ClearToEmpty(); - key_id_.ClearToEmpty(); - ::memset(&sender_id_, 0, static_cast( + keyid_.ClearToEmpty(); + messageid_.ClearToEmpty(); + ::memset(&senderid_, 0, static_cast( reinterpret_cast(&counter_) - - reinterpret_cast(&sender_id_)) + sizeof(counter_)); + reinterpret_cast(&senderid_)) + sizeof(counter_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -4581,18 +5159,18 @@ const char* VerifyRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // int32 sender_id = 1; + // int32 senderId = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - sender_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + senderid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // int32 receiver_id = 2; + // int32 receiverId = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - receiver_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + receiverid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; @@ -4615,21 +5193,21 @@ const char* VerifyRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ } else goto handle_unusual; continue; - // .crypto.SHAAlgorithm hash_func = 5; + // .crypto.SHAAlgorithm hashFunc = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - _internal_set_hash_func(static_cast<::crypto::SHAAlgorithm>(val)); + _internal_set_hashfunc(static_cast<::crypto::SHAAlgorithm>(val)); } else goto handle_unusual; continue; - // string key_id = 6; + // string keyId = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { - auto str = _internal_mutable_key_id(); + auto str = _internal_mutable_keyid(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.VerifyRequest.key_id")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.VerifyRequest.keyId")); CHK_(ptr); } else goto handle_unusual; @@ -4642,6 +5220,16 @@ const char* VerifyRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ } else goto handle_unusual; continue; + // string messageId = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.VerifyRequest.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -4671,16 +5259,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* VerifyRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // int32 sender_id = 1; - if (this->_internal_sender_id() != 0) { + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_sender_id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_senderid(), target); } - // int32 receiver_id = 2; - if (this->_internal_receiver_id() != 0) { + // int32 receiverId = 2; + if (this->_internal_receiverid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiver_id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiverid(), target); } // bytes data = 3; @@ -4695,21 +5283,21 @@ ::PROTOBUF_NAMESPACE_ID::uint8* VerifyRequest::_InternalSerialize( 4, this->_internal_signature(), target); } - // .crypto.SHAAlgorithm hash_func = 5; - if (this->_internal_hash_func() != 0) { + // .crypto.SHAAlgorithm hashFunc = 5; + if (this->_internal_hashfunc() != 0) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 5, this->_internal_hash_func(), target); + 5, this->_internal_hashfunc(), target); } - // string key_id = 6; - if (!this->_internal_key_id().empty()) { + // string keyId = 6; + if (!this->_internal_keyid().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_key_id().data(), static_cast(this->_internal_key_id().length()), + this->_internal_keyid().data(), static_cast(this->_internal_keyid().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "crypto.VerifyRequest.key_id"); + "crypto.VerifyRequest.keyId"); target = stream->WriteStringMaybeAliased( - 6, this->_internal_key_id(), target); + 6, this->_internal_keyid(), target); } // int32 counter = 7; @@ -4718,6 +5306,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* VerifyRequest::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_counter(), target); } + // string messageId = 8; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.VerifyRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 8, this->_internal_messageid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -4748,27 +5346,34 @@ size_t VerifyRequest::ByteSizeLong() const { this->_internal_signature()); } - // string key_id = 6; - if (!this->_internal_key_id().empty()) { + // string keyId = 6; + if (!this->_internal_keyid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_keyid()); + } + + // string messageId = 8; + if (!this->_internal_messageid().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_key_id()); + this->_internal_messageid()); } - // int32 sender_id = 1; - if (this->_internal_sender_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sender_id()); + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); } - // int32 receiver_id = 2; - if (this->_internal_receiver_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiver_id()); + // int32 receiverId = 2; + if (this->_internal_receiverid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiverid()); } - // .crypto.SHAAlgorithm hash_func = 5; - if (this->_internal_hash_func() != 0) { + // .crypto.SHAAlgorithm hashFunc = 5; + if (this->_internal_hashfunc() != 0) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_hash_func()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_hashfunc()); } // int32 counter = 7; @@ -4804,17 +5409,20 @@ void VerifyRequest::MergeFrom(const VerifyRequest& from) { if (!from._internal_signature().empty()) { _internal_set_signature(from._internal_signature()); } - if (!from._internal_key_id().empty()) { - _internal_set_key_id(from._internal_key_id()); + if (!from._internal_keyid().empty()) { + _internal_set_keyid(from._internal_keyid()); + } + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); } - if (from._internal_sender_id() != 0) { - _internal_set_sender_id(from._internal_sender_id()); + if (from._internal_senderid() != 0) { + _internal_set_senderid(from._internal_senderid()); } - if (from._internal_receiver_id() != 0) { - _internal_set_receiver_id(from._internal_receiver_id()); + if (from._internal_receiverid() != 0) { + _internal_set_receiverid(from._internal_receiverid()); } - if (from._internal_hash_func() != 0) { - _internal_set_hash_func(from._internal_hash_func()); + if (from._internal_hashfunc() != 0) { + _internal_set_hashfunc(from._internal_hashfunc()); } if (from._internal_counter() != 0) { _internal_set_counter(from._internal_counter()); @@ -4850,15 +5458,20 @@ void VerifyRequest::InternalSwap(VerifyRequest* other) { ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &key_id_, lhs_arena, - &other->key_id_, rhs_arena + &keyid_, lhs_arena, + &other->keyid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(VerifyRequest, counter_) + sizeof(VerifyRequest::counter_) - - PROTOBUF_FIELD_OFFSET(VerifyRequest, sender_id_)>( - reinterpret_cast(&sender_id_), - reinterpret_cast(&other->sender_id_)); + - PROTOBUF_FIELD_OFFSET(VerifyRequest, senderid_)>( + reinterpret_cast(&senderid_), + reinterpret_cast(&other->senderid_)); } ::PROTOBUF_NAMESPACE_ID::Metadata VerifyRequest::GetMetadata() const { @@ -5103,12 +5716,23 @@ KeyRequest::KeyRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, KeyRequest::KeyRequest(const KeyRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - user_id_ = from.user_id_; + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } + ::memcpy(&senderid_, &from.senderid_, + static_cast(reinterpret_cast(&userid_) - + reinterpret_cast(&senderid_)) + sizeof(userid_)); // @@protoc_insertion_point(copy_constructor:crypto.KeyRequest) } void KeyRequest::SharedCtor() { -user_id_ = 0; +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&senderid_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&userid_) - + reinterpret_cast(&senderid_)) + sizeof(userid_)); } KeyRequest::~KeyRequest() { @@ -5120,6 +5744,7 @@ KeyRequest::~KeyRequest() { inline void KeyRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void KeyRequest::ArenaDtor(void* object) { @@ -5138,7 +5763,10 @@ void KeyRequest::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - user_id_ = 0; + messageid_.ClearToEmpty(); + ::memset(&senderid_, 0, static_cast( + reinterpret_cast(&userid_) - + reinterpret_cast(&senderid_)) + sizeof(userid_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -5148,10 +5776,28 @@ const char* KeyRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // int32 user_id = 1; + // int32 senderId = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - user_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + senderid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 userId = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + userid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string messageId = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.KeyRequest.messageId")); CHK_(ptr); } else goto handle_unusual; @@ -5185,14 +5831,30 @@ ::PROTOBUF_NAMESPACE_ID::uint8* KeyRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // int32 user_id = 1; - if (this->_internal_user_id() != 0) { + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_user_id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_senderid(), target); } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + // int32 userId = 2; + if (this->_internal_userid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_userid(), target); + } + + // string messageId = 3; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.KeyRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_messageid(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:crypto.KeyRequest) @@ -5207,9 +5869,21 @@ size_t KeyRequest::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // int32 user_id = 1; - if (this->_internal_user_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_user_id()); + // string messageId = 3; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); + } + + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); + } + + // int32 userId = 2; + if (this->_internal_userid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_userid()); } return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); @@ -5234,8 +5908,14 @@ void KeyRequest::MergeFrom(const KeyRequest& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_user_id() != 0) { - _internal_set_user_id(from._internal_user_id()); + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } + if (from._internal_senderid() != 0) { + _internal_set_senderid(from._internal_senderid()); + } + if (from._internal_userid() != 0) { + _internal_set_userid(from._internal_userid()); } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -5253,8 +5933,20 @@ bool KeyRequest::IsInitialized() const { void KeyRequest::InternalSwap(KeyRequest* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(user_id_, other->user_id_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(KeyRequest, userid_) + + sizeof(KeyRequest::userid_) + - PROTOBUF_FIELD_OFFSET(KeyRequest, senderid_)>( + reinterpret_cast(&senderid_), + reinterpret_cast(&other->senderid_)); } ::PROTOBUF_NAMESPACE_ID::Metadata KeyRequest::GetMetadata() const { @@ -5702,10 +6394,16 @@ BootSystemRequest::BootSystemRequest(const BootSystemRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message(), usersidspermissions_(from.usersidspermissions_) { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } // @@protoc_insertion_point(copy_constructor:crypto.BootSystemRequest) } void BootSystemRequest::SharedCtor() { +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } BootSystemRequest::~BootSystemRequest() { @@ -5717,6 +6415,7 @@ BootSystemRequest::~BootSystemRequest() { inline void BootSystemRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void BootSystemRequest::ArenaDtor(void* object) { @@ -5736,6 +6435,7 @@ void BootSystemRequest::Clear() { (void) cached_has_bits; usersidspermissions_.Clear(); + messageid_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -5758,6 +6458,16 @@ const char* BootSystemRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP } else goto handle_unusual; continue; + // string messageId = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.BootSystemRequest.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -5795,6 +6505,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* BootSystemRequest::_InternalSerialize( InternalWriteMessage(1, this->_internal_usersidspermissions(i), target, stream); } + // string messageId = 5; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.BootSystemRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_messageid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -5818,6 +6538,13 @@ size_t BootSystemRequest::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } + // string messageId = 5; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); } @@ -5841,6 +6568,9 @@ void BootSystemRequest::MergeFrom(const BootSystemRequest& from) { (void) cached_has_bits; usersidspermissions_.MergeFrom(from.usersidspermissions_); + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -5857,8 +6587,15 @@ bool BootSystemRequest::IsInitialized() const { void BootSystemRequest::InternalSwap(BootSystemRequest* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); usersidspermissions_.InternalSwap(&other->usersidspermissions_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); } ::PROTOBUF_NAMESPACE_ID::Metadata BootSystemRequest::GetMetadata() const { @@ -5924,6 +6661,11 @@ CryptoConfig::CryptoConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena, CryptoConfig::CryptoConfig(const CryptoConfig& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } ::memcpy(&hashfunction_, &from.hashfunction_, static_cast(reinterpret_cast(&asymmetricfunction_) - reinterpret_cast(&hashfunction_)) + sizeof(asymmetricfunction_)); @@ -5931,6 +6673,7 @@ CryptoConfig::CryptoConfig(const CryptoConfig& from) } void CryptoConfig::SharedCtor() { +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&hashfunction_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&asymmetricfunction_) - @@ -5946,6 +6689,7 @@ CryptoConfig::~CryptoConfig() { inline void CryptoConfig::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void CryptoConfig::ArenaDtor(void* object) { @@ -5964,6 +6708,7 @@ void CryptoConfig::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + messageid_.ClearToEmpty(); ::memset(&hashfunction_, 0, static_cast( reinterpret_cast(&asymmetricfunction_) - reinterpret_cast(&hashfunction_)) + sizeof(asymmetricfunction_)); @@ -6012,6 +6757,16 @@ const char* CryptoConfig::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I } else goto handle_unusual; continue; + // string messageId = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.CryptoConfig.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -6069,6 +6824,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* CryptoConfig::_InternalSerialize( 4, this->_internal_asymmetricfunction(), target); } + // string messageId = 5; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.CryptoConfig.messageId"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_messageid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -6085,6 +6850,13 @@ size_t CryptoConfig::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + // string messageId = 5; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); + } + // .crypto.SHAAlgorithm hashFunction = 1; if (this->_internal_hashfunction() != 0) { total_size += 1 + @@ -6131,6 +6903,9 @@ void CryptoConfig::MergeFrom(const CryptoConfig& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } if (from._internal_hashfunction() != 0) { _internal_set_hashfunction(from._internal_hashfunction()); } @@ -6159,7 +6934,14 @@ bool CryptoConfig::IsInitialized() const { void CryptoConfig::InternalSwap(CryptoConfig* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(CryptoConfig, asymmetricfunction_) + sizeof(CryptoConfig::asymmetricfunction_) @@ -6197,6 +6979,11 @@ ConfigureRequest::ConfigureRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, ConfigureRequest::ConfigureRequest(const ConfigureRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } if (from._internal_has_config()) { config_ = new ::crypto::CryptoConfig(*from.config_); } else { @@ -6207,6 +6994,7 @@ ConfigureRequest::ConfigureRequest(const ConfigureRequest& from) } void ConfigureRequest::SharedCtor() { +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&config_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&userid_) - @@ -6222,6 +7010,7 @@ ConfigureRequest::~ConfigureRequest() { inline void ConfigureRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete config_; } @@ -6241,6 +7030,7 @@ void ConfigureRequest::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + messageid_.ClearToEmpty(); if (GetArenaForAllocation() == nullptr && config_ != nullptr) { delete config_; } @@ -6271,6 +7061,16 @@ const char* ConfigureRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPA } else goto handle_unusual; continue; + // string messageId = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.ConfigureRequest.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -6314,6 +7114,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* ConfigureRequest::_InternalSerialize( 2, _Internal::config(this), target, stream); } + // string messageId = 3; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.ConfigureRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_messageid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -6330,6 +7140,13 @@ size_t ConfigureRequest::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + // string messageId = 3; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); + } + // .crypto.CryptoConfig config = 2; if (this->_internal_has_config()) { total_size += 1 + @@ -6364,6 +7181,9 @@ void ConfigureRequest::MergeFrom(const ConfigureRequest& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } if (from._internal_has_config()) { _internal_mutable_config()->::crypto::CryptoConfig::MergeFrom(from._internal_config()); } @@ -6386,7 +7206,14 @@ bool ConfigureRequest::IsInitialized() const { void ConfigureRequest::InternalSwap(ConfigureRequest* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(ConfigureRequest, userid_) + sizeof(ConfigureRequest::userid_) @@ -6421,11 +7248,17 @@ AddProcessRequest::AddProcessRequest(const AddProcessRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message(), permissions_(from.permissions_) { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } userid_ = from.userid_; // @@protoc_insertion_point(copy_constructor:crypto.AddProcessRequest) } void AddProcessRequest::SharedCtor() { +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); userid_ = 0; } @@ -6438,6 +7271,7 @@ AddProcessRequest::~AddProcessRequest() { inline void AddProcessRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void AddProcessRequest::ArenaDtor(void* object) { @@ -6457,6 +7291,7 @@ void AddProcessRequest::Clear() { (void) cached_has_bits; permissions_.Clear(); + messageid_.ClearToEmpty(); userid_ = 0; _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -6487,6 +7322,16 @@ const char* AddProcessRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP } else goto handle_unusual; continue; + // string messageId = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.AddProcessRequest.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -6531,6 +7376,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AddProcessRequest::_InternalSerialize( } } + // string messageId = 4; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.AddProcessRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_messageid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -6565,6 +7420,13 @@ size_t AddProcessRequest::ByteSizeLong() const { total_size += data_size; } + // string messageId = 4; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); + } + // int32 userId = 1; if (this->_internal_userid() != 0) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_userid()); @@ -6593,6 +7455,9 @@ void AddProcessRequest::MergeFrom(const AddProcessRequest& from) { (void) cached_has_bits; permissions_.MergeFrom(from.permissions_); + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } if (from._internal_userid() != 0) { _internal_set_userid(from._internal_userid()); } @@ -6612,8 +7477,15 @@ bool AddProcessRequest::IsInitialized() const { void AddProcessRequest::InternalSwap(AddProcessRequest* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); permissions_.InternalSwap(&other->permissions_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); swap(userid_, other->userid_); } @@ -6646,18 +7518,24 @@ EncryptRequest::EncryptRequest(const EncryptRequest& from) data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data(), GetArenaForAllocation()); } - ::memcpy(&sender_id_, &from.sender_id_, + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } + ::memcpy(&senderid_, &from.senderid_, static_cast(reinterpret_cast(&isfirst_) - - reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); // @@protoc_insertion_point(copy_constructor:crypto.EncryptRequest) } void EncryptRequest::SharedCtor() { data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( - reinterpret_cast(&sender_id_) - reinterpret_cast(this)), + reinterpret_cast(&senderid_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&isfirst_) - - reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); } EncryptRequest::~EncryptRequest() { @@ -6670,6 +7548,7 @@ EncryptRequest::~EncryptRequest() { inline void EncryptRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void EncryptRequest::ArenaDtor(void* object) { @@ -6689,9 +7568,10 @@ void EncryptRequest::Clear() { (void) cached_has_bits; data_.ClearToEmpty(); - ::memset(&sender_id_, 0, static_cast( + messageid_.ClearToEmpty(); + ::memset(&senderid_, 0, static_cast( reinterpret_cast(&isfirst_) - - reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -6701,18 +7581,18 @@ const char* EncryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // int32 sender_id = 1; + // int32 senderId = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - sender_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + senderid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // int32 receiver_id = 2; + // int32 receiverId = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - receiver_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + receiverid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; @@ -6742,6 +7622,16 @@ const char* EncryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE } else goto handle_unusual; continue; + // string messageId = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.EncryptRequest.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -6771,16 +7661,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* EncryptRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // int32 sender_id = 1; - if (this->_internal_sender_id() != 0) { + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_sender_id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_senderid(), target); } - // int32 receiver_id = 2; - if (this->_internal_receiver_id() != 0) { + // int32 receiverId = 2; + if (this->_internal_receiverid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiver_id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiverid(), target); } // bytes data = 3; @@ -6801,6 +7691,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* EncryptRequest::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_isfirst(), target); } + // string messageId = 6; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.EncryptRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_messageid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -6824,14 +7724,21 @@ size_t EncryptRequest::ByteSizeLong() const { this->_internal_data()); } - // int32 sender_id = 1; - if (this->_internal_sender_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sender_id()); + // string messageId = 6; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); } - // int32 receiver_id = 2; - if (this->_internal_receiver_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiver_id()); + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); + } + + // int32 receiverId = 2; + if (this->_internal_receiverid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiverid()); } // int64 counter = 4; @@ -6869,11 +7776,14 @@ void EncryptRequest::MergeFrom(const EncryptRequest& from) { if (!from._internal_data().empty()) { _internal_set_data(from._internal_data()); } - if (from._internal_sender_id() != 0) { - _internal_set_sender_id(from._internal_sender_id()); + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } + if (from._internal_senderid() != 0) { + _internal_set_senderid(from._internal_senderid()); } - if (from._internal_receiver_id() != 0) { - _internal_set_receiver_id(from._internal_receiver_id()); + if (from._internal_receiverid() != 0) { + _internal_set_receiverid(from._internal_receiverid()); } if (from._internal_counter() != 0) { _internal_set_counter(from._internal_counter()); @@ -6905,12 +7815,17 @@ void EncryptRequest::InternalSwap(EncryptRequest* other) { &data_, lhs_arena, &other->data_, rhs_arena ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(EncryptRequest, isfirst_) + sizeof(EncryptRequest::isfirst_) - - PROTOBUF_FIELD_OFFSET(EncryptRequest, sender_id_)>( - reinterpret_cast(&sender_id_), - reinterpret_cast(&other->sender_id_)); + - PROTOBUF_FIELD_OFFSET(EncryptRequest, senderid_)>( + reinterpret_cast(&senderid_), + reinterpret_cast(&other->senderid_)); } ::PROTOBUF_NAMESPACE_ID::Metadata EncryptRequest::GetMetadata() const { @@ -6937,9 +7852,9 @@ EncryptResponse::EncryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, EncryptResponse::EncryptResponse(const EncryptResponse& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_encrypted_data().empty()) { - encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_encrypted_data(), + encrypteddata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_encrypteddata().empty()) { + encrypteddata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_encrypteddata(), GetArenaForAllocation()); } signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -6951,7 +7866,7 @@ EncryptResponse::EncryptResponse(const EncryptResponse& from) } void EncryptResponse::SharedCtor() { -encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +encrypteddata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } @@ -6964,7 +7879,7 @@ EncryptResponse::~EncryptResponse() { inline void EncryptResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - encrypted_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + encrypteddata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); signature_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } @@ -6984,7 +7899,7 @@ void EncryptResponse::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - encrypted_data_.ClearToEmpty(); + encrypteddata_.ClearToEmpty(); signature_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -6995,10 +7910,10 @@ const char* EncryptResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // bytes encrypted_data = 1; + // bytes encryptedData = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_encrypted_data(); + auto str = _internal_mutable_encrypteddata(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); } else @@ -7042,10 +7957,10 @@ ::PROTOBUF_NAMESPACE_ID::uint8* EncryptResponse::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // bytes encrypted_data = 1; - if (!this->_internal_encrypted_data().empty()) { + // bytes encryptedData = 1; + if (!this->_internal_encrypteddata().empty()) { target = stream->WriteBytesMaybeAliased( - 1, this->_internal_encrypted_data(), target); + 1, this->_internal_encrypteddata(), target); } // bytes signature = 2; @@ -7070,11 +7985,11 @@ size_t EncryptResponse::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bytes encrypted_data = 1; - if (!this->_internal_encrypted_data().empty()) { + // bytes encryptedData = 1; + if (!this->_internal_encrypteddata().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_encrypted_data()); + this->_internal_encrypteddata()); } // bytes signature = 2; @@ -7106,8 +8021,8 @@ void EncryptResponse::MergeFrom(const EncryptResponse& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_encrypted_data().empty()) { - _internal_set_encrypted_data(from._internal_encrypted_data()); + if (!from._internal_encrypteddata().empty()) { + _internal_set_encrypteddata(from._internal_encrypteddata()); } if (!from._internal_signature().empty()) { _internal_set_signature(from._internal_signature()); @@ -7133,8 +8048,8 @@ void EncryptResponse::InternalSwap(EncryptResponse* other) { _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &encrypted_data_, lhs_arena, - &other->encrypted_data_, rhs_arena + &encrypteddata_, lhs_arena, + &other->encrypteddata_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -7167,9 +8082,9 @@ DecryptRequest::DecryptRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, DecryptRequest::DecryptRequest(const DecryptRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_encrypted_data().empty()) { - encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_encrypted_data(), + encrypteddata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_encrypteddata().empty()) { + encrypteddata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_encrypteddata(), GetArenaForAllocation()); } signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -7177,19 +8092,25 @@ DecryptRequest::DecryptRequest(const DecryptRequest& from) signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_signature(), GetArenaForAllocation()); } - ::memcpy(&sender_id_, &from.sender_id_, + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } + ::memcpy(&senderid_, &from.senderid_, static_cast(reinterpret_cast(&isfirst_) - - reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); // @@protoc_insertion_point(copy_constructor:crypto.DecryptRequest) } void DecryptRequest::SharedCtor() { -encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +encrypteddata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( - reinterpret_cast(&sender_id_) - reinterpret_cast(this)), + reinterpret_cast(&senderid_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&isfirst_) - - reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); } DecryptRequest::~DecryptRequest() { @@ -7201,8 +8122,9 @@ DecryptRequest::~DecryptRequest() { inline void DecryptRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - encrypted_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + encrypteddata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); signature_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void DecryptRequest::ArenaDtor(void* object) { @@ -7221,11 +8143,12 @@ void DecryptRequest::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - encrypted_data_.ClearToEmpty(); + encrypteddata_.ClearToEmpty(); signature_.ClearToEmpty(); - ::memset(&sender_id_, 0, static_cast( + messageid_.ClearToEmpty(); + ::memset(&senderid_, 0, static_cast( reinterpret_cast(&isfirst_) - - reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -7235,26 +8158,26 @@ const char* DecryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // int32 sender_id = 1; + // int32 senderId = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - sender_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + senderid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // int32 receiver_id = 2; + // int32 receiverId = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - receiver_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + receiverid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bytes encrypted_data = 3; + // bytes encryptedData = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - auto str = _internal_mutable_encrypted_data(); + auto str = _internal_mutable_encrypteddata(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); } else @@ -7285,6 +8208,16 @@ const char* DecryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE } else goto handle_unusual; continue; + // string messageId = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.DecryptRequest.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -7314,22 +8247,22 @@ ::PROTOBUF_NAMESPACE_ID::uint8* DecryptRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // int32 sender_id = 1; - if (this->_internal_sender_id() != 0) { + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_sender_id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_senderid(), target); } - // int32 receiver_id = 2; - if (this->_internal_receiver_id() != 0) { + // int32 receiverId = 2; + if (this->_internal_receiverid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiver_id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiverid(), target); } - // bytes encrypted_data = 3; - if (!this->_internal_encrypted_data().empty()) { + // bytes encryptedData = 3; + if (!this->_internal_encrypteddata().empty()) { target = stream->WriteBytesMaybeAliased( - 3, this->_internal_encrypted_data(), target); + 3, this->_internal_encrypteddata(), target); } // int64 counter = 4; @@ -7350,6 +8283,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* DecryptRequest::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_isfirst(), target); } + // string messageId = 7; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.DecryptRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 7, this->_internal_messageid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -7366,11 +8309,11 @@ size_t DecryptRequest::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bytes encrypted_data = 3; - if (!this->_internal_encrypted_data().empty()) { + // bytes encryptedData = 3; + if (!this->_internal_encrypteddata().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_encrypted_data()); + this->_internal_encrypteddata()); } // bytes signature = 5; @@ -7380,14 +8323,21 @@ size_t DecryptRequest::ByteSizeLong() const { this->_internal_signature()); } - // int32 sender_id = 1; - if (this->_internal_sender_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sender_id()); + // string messageId = 7; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); } - // int32 receiver_id = 2; - if (this->_internal_receiver_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiver_id()); + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); + } + + // int32 receiverId = 2; + if (this->_internal_receiverid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiverid()); } // int64 counter = 4; @@ -7422,17 +8372,20 @@ void DecryptRequest::MergeFrom(const DecryptRequest& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_encrypted_data().empty()) { - _internal_set_encrypted_data(from._internal_encrypted_data()); + if (!from._internal_encrypteddata().empty()) { + _internal_set_encrypteddata(from._internal_encrypteddata()); } if (!from._internal_signature().empty()) { _internal_set_signature(from._internal_signature()); } - if (from._internal_sender_id() != 0) { - _internal_set_sender_id(from._internal_sender_id()); + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); + } + if (from._internal_senderid() != 0) { + _internal_set_senderid(from._internal_senderid()); } - if (from._internal_receiver_id() != 0) { - _internal_set_receiver_id(from._internal_receiver_id()); + if (from._internal_receiverid() != 0) { + _internal_set_receiverid(from._internal_receiverid()); } if (from._internal_counter() != 0) { _internal_set_counter(from._internal_counter()); @@ -7461,20 +8414,25 @@ void DecryptRequest::InternalSwap(DecryptRequest* other) { _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &encrypted_data_, lhs_arena, - &other->encrypted_data_, rhs_arena + &encrypteddata_, lhs_arena, + &other->encrypteddata_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), &signature_, lhs_arena, &other->signature_, rhs_arena ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena + ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(DecryptRequest, isfirst_) + sizeof(DecryptRequest::isfirst_) - - PROTOBUF_FIELD_OFFSET(DecryptRequest, sender_id_)>( - reinterpret_cast(&sender_id_), - reinterpret_cast(&other->sender_id_)); + - PROTOBUF_FIELD_OFFSET(DecryptRequest, senderid_)>( + reinterpret_cast(&senderid_), + reinterpret_cast(&other->senderid_)); } ::PROTOBUF_NAMESPACE_ID::Metadata DecryptRequest::GetMetadata() const { @@ -7501,16 +8459,16 @@ DecryptResponse::DecryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, DecryptResponse::DecryptResponse(const DecryptResponse& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - decrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_decrypted_data().empty()) { - decrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_decrypted_data(), + decrypteddata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_decrypteddata().empty()) { + decrypteddata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_decrypteddata(), GetArenaForAllocation()); } // @@protoc_insertion_point(copy_constructor:crypto.DecryptResponse) } void DecryptResponse::SharedCtor() { -decrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +decrypteddata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } DecryptResponse::~DecryptResponse() { @@ -7522,7 +8480,7 @@ DecryptResponse::~DecryptResponse() { inline void DecryptResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - decrypted_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + decrypteddata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void DecryptResponse::ArenaDtor(void* object) { @@ -7541,7 +8499,7 @@ void DecryptResponse::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - decrypted_data_.ClearToEmpty(); + decrypteddata_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -7551,10 +8509,10 @@ const char* DecryptResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // bytes decrypted_data = 1; + // bytes decryptedData = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_decrypted_data(); + auto str = _internal_mutable_decrypteddata(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); } else @@ -7589,10 +8547,10 @@ ::PROTOBUF_NAMESPACE_ID::uint8* DecryptResponse::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // bytes decrypted_data = 1; - if (!this->_internal_decrypted_data().empty()) { + // bytes decryptedData = 1; + if (!this->_internal_decrypteddata().empty()) { target = stream->WriteBytesMaybeAliased( - 1, this->_internal_decrypted_data(), target); + 1, this->_internal_decrypteddata(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -7611,11 +8569,11 @@ size_t DecryptResponse::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bytes decrypted_data = 1; - if (!this->_internal_decrypted_data().empty()) { + // bytes decryptedData = 1; + if (!this->_internal_decrypteddata().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_decrypted_data()); + this->_internal_decrypteddata()); } return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); @@ -7640,8 +8598,8 @@ void DecryptResponse::MergeFrom(const DecryptResponse& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_decrypted_data().empty()) { - _internal_set_decrypted_data(from._internal_decrypted_data()); + if (!from._internal_decrypteddata().empty()) { + _internal_set_decrypteddata(from._internal_decrypteddata()); } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -7664,8 +8622,8 @@ void DecryptResponse::InternalSwap(DecryptResponse* other) { _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &decrypted_data_, lhs_arena, - &other->decrypted_data_, rhs_arena + &decrypteddata_, lhs_arena, + &other->decrypteddata_, rhs_arena ); } @@ -7698,24 +8656,30 @@ AESEncryptRequest::AESEncryptRequest(const AESEncryptRequest& from) data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data(), GetArenaForAllocation()); } - key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_key_id().empty()) { - key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_key_id(), + keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_keyid().empty()) { + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_keyid(), + GetArenaForAllocation()); + } + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), GetArenaForAllocation()); } - ::memcpy(&sender_id_, &from.sender_id_, + ::memcpy(&senderid_, &from.senderid_, static_cast(reinterpret_cast(&isfirst_) - - reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); // @@protoc_insertion_point(copy_constructor:crypto.AESEncryptRequest) } void AESEncryptRequest::SharedCtor() { data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( - reinterpret_cast(&sender_id_) - reinterpret_cast(this)), + reinterpret_cast(&senderid_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&isfirst_) - - reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); } AESEncryptRequest::~AESEncryptRequest() { @@ -7728,7 +8692,8 @@ AESEncryptRequest::~AESEncryptRequest() { inline void AESEncryptRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - key_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + keyid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void AESEncryptRequest::ArenaDtor(void* object) { @@ -7748,10 +8713,11 @@ void AESEncryptRequest::Clear() { (void) cached_has_bits; data_.ClearToEmpty(); - key_id_.ClearToEmpty(); - ::memset(&sender_id_, 0, static_cast( + keyid_.ClearToEmpty(); + messageid_.ClearToEmpty(); + ::memset(&senderid_, 0, static_cast( reinterpret_cast(&isfirst_) - - reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -7761,18 +8727,18 @@ const char* AESEncryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // int32 sender_id = 1; + // int32 senderId = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - sender_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + senderid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // int32 receiver_id = 2; + // int32 receiverId = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - receiver_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + receiverid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; @@ -7803,22 +8769,22 @@ const char* AESEncryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP } else goto handle_unusual; continue; - // string key_id = 6; + // string keyId = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { - auto str = _internal_mutable_key_id(); + auto str = _internal_mutable_keyid(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.AESEncryptRequest.key_id")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.AESEncryptRequest.keyId")); CHK_(ptr); } else goto handle_unusual; continue; - // .crypto.AESKeyLength key_length = 7; + // .crypto.AESKeyLength keyLength = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - _internal_set_key_length(static_cast<::crypto::AESKeyLength>(val)); + _internal_set_keylength(static_cast<::crypto::AESKeyLength>(val)); } else goto handle_unusual; continue; @@ -7839,6 +8805,16 @@ const char* AESEncryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP } else goto handle_unusual; continue; + // string messageId = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.AESEncryptRequest.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -7868,16 +8844,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AESEncryptRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // int32 sender_id = 1; - if (this->_internal_sender_id() != 0) { + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_sender_id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_senderid(), target); } - // int32 receiver_id = 2; - if (this->_internal_receiver_id() != 0) { + // int32 receiverId = 2; + if (this->_internal_receiverid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiver_id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiverid(), target); } // bytes data = 3; @@ -7899,21 +8875,21 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AESEncryptRequest::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->_internal_counter(), target); } - // string key_id = 6; - if (!this->_internal_key_id().empty()) { + // string keyId = 6; + if (!this->_internal_keyid().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_key_id().data(), static_cast(this->_internal_key_id().length()), + this->_internal_keyid().data(), static_cast(this->_internal_keyid().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "crypto.AESEncryptRequest.key_id"); + "crypto.AESEncryptRequest.keyId"); target = stream->WriteStringMaybeAliased( - 6, this->_internal_key_id(), target); + 6, this->_internal_keyid(), target); } - // .crypto.AESKeyLength key_length = 7; - if (this->_internal_key_length() != 0) { + // .crypto.AESKeyLength keyLength = 7; + if (this->_internal_keylength() != 0) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 7, this->_internal_key_length(), target); + 7, this->_internal_keylength(), target); } // .crypto.AESChainingMode chainingMode = 8; @@ -7929,6 +8905,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AESEncryptRequest::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_isfirst(), target); } + // string messageId = 10; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.AESEncryptRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 10, this->_internal_messageid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -7952,21 +8938,28 @@ size_t AESEncryptRequest::ByteSizeLong() const { this->_internal_data()); } - // string key_id = 6; - if (!this->_internal_key_id().empty()) { + // string keyId = 6; + if (!this->_internal_keyid().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_key_id()); + this->_internal_keyid()); } - // int32 sender_id = 1; - if (this->_internal_sender_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sender_id()); + // string messageId = 10; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); } - // int32 receiver_id = 2; - if (this->_internal_receiver_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiver_id()); + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); + } + + // int32 receiverId = 2; + if (this->_internal_receiverid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiverid()); } // int64 counter = 5; @@ -7980,10 +8973,10 @@ size_t AESEncryptRequest::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_func()); } - // .crypto.AESKeyLength key_length = 7; - if (this->_internal_key_length() != 0) { + // .crypto.AESKeyLength keyLength = 7; + if (this->_internal_keylength() != 0) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_key_length()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_keylength()); } // .crypto.AESChainingMode chainingMode = 8; @@ -8022,14 +9015,17 @@ void AESEncryptRequest::MergeFrom(const AESEncryptRequest& from) { if (!from._internal_data().empty()) { _internal_set_data(from._internal_data()); } - if (!from._internal_key_id().empty()) { - _internal_set_key_id(from._internal_key_id()); + if (!from._internal_keyid().empty()) { + _internal_set_keyid(from._internal_keyid()); + } + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); } - if (from._internal_sender_id() != 0) { - _internal_set_sender_id(from._internal_sender_id()); + if (from._internal_senderid() != 0) { + _internal_set_senderid(from._internal_senderid()); } - if (from._internal_receiver_id() != 0) { - _internal_set_receiver_id(from._internal_receiver_id()); + if (from._internal_receiverid() != 0) { + _internal_set_receiverid(from._internal_receiverid()); } if (from._internal_counter() != 0) { _internal_set_counter(from._internal_counter()); @@ -8037,8 +9033,8 @@ void AESEncryptRequest::MergeFrom(const AESEncryptRequest& from) { if (from._internal_func() != 0) { _internal_set_func(from._internal_func()); } - if (from._internal_key_length() != 0) { - _internal_set_key_length(from._internal_key_length()); + if (from._internal_keylength() != 0) { + _internal_set_keylength(from._internal_keylength()); } if (from._internal_chainingmode() != 0) { _internal_set_chainingmode(from._internal_chainingmode()); @@ -8072,15 +9068,20 @@ void AESEncryptRequest::InternalSwap(AESEncryptRequest* other) { ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &key_id_, lhs_arena, - &other->key_id_, rhs_arena + &keyid_, lhs_arena, + &other->keyid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(AESEncryptRequest, isfirst_) + sizeof(AESEncryptRequest::isfirst_) - - PROTOBUF_FIELD_OFFSET(AESEncryptRequest, sender_id_)>( - reinterpret_cast(&sender_id_), - reinterpret_cast(&other->sender_id_)); + - PROTOBUF_FIELD_OFFSET(AESEncryptRequest, senderid_)>( + reinterpret_cast(&senderid_), + reinterpret_cast(&other->senderid_)); } ::PROTOBUF_NAMESPACE_ID::Metadata AESEncryptRequest::GetMetadata() const { @@ -8107,16 +9108,16 @@ AESEncryptResponse::AESEncryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, AESEncryptResponse::AESEncryptResponse(const AESEncryptResponse& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_encrypted_data().empty()) { - encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_encrypted_data(), + encrypteddata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_encrypteddata().empty()) { + encrypteddata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_encrypteddata(), GetArenaForAllocation()); } // @@protoc_insertion_point(copy_constructor:crypto.AESEncryptResponse) } void AESEncryptResponse::SharedCtor() { -encrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +encrypteddata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } AESEncryptResponse::~AESEncryptResponse() { @@ -8128,7 +9129,7 @@ AESEncryptResponse::~AESEncryptResponse() { inline void AESEncryptResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - encrypted_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + encrypteddata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void AESEncryptResponse::ArenaDtor(void* object) { @@ -8147,7 +9148,7 @@ void AESEncryptResponse::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - encrypted_data_.ClearToEmpty(); + encrypteddata_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -8157,10 +9158,10 @@ const char* AESEncryptResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMES ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // bytes encrypted_data = 1; + // bytes encryptedData = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_encrypted_data(); + auto str = _internal_mutable_encrypteddata(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); } else @@ -8195,10 +9196,10 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AESEncryptResponse::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // bytes encrypted_data = 1; - if (!this->_internal_encrypted_data().empty()) { + // bytes encryptedData = 1; + if (!this->_internal_encrypteddata().empty()) { target = stream->WriteBytesMaybeAliased( - 1, this->_internal_encrypted_data(), target); + 1, this->_internal_encrypteddata(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -8217,11 +9218,11 @@ size_t AESEncryptResponse::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bytes encrypted_data = 1; - if (!this->_internal_encrypted_data().empty()) { + // bytes encryptedData = 1; + if (!this->_internal_encrypteddata().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_encrypted_data()); + this->_internal_encrypteddata()); } return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); @@ -8246,8 +9247,8 @@ void AESEncryptResponse::MergeFrom(const AESEncryptResponse& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_encrypted_data().empty()) { - _internal_set_encrypted_data(from._internal_encrypted_data()); + if (!from._internal_encrypteddata().empty()) { + _internal_set_encrypteddata(from._internal_encrypteddata()); } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -8270,8 +9271,8 @@ void AESEncryptResponse::InternalSwap(AESEncryptResponse* other) { _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &encrypted_data_, lhs_arena, - &other->encrypted_data_, rhs_arena + &encrypteddata_, lhs_arena, + &other->encrypteddata_, rhs_arena ); } @@ -8299,35 +9300,41 @@ AESDecryptRequest::AESDecryptRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, AESDecryptRequest::AESDecryptRequest(const AESDecryptRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - data_in_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_data_in().empty()) { - data_in_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data_in(), + datain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_datain().empty()) { + datain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_datain(), GetArenaForAllocation()); } - data_out_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_data_out().empty()) { - data_out_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data_out(), + dataout_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_dataout().empty()) { + dataout_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_dataout(), GetArenaForAllocation()); } - key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_key_id().empty()) { - key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_key_id(), + keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_keyid().empty()) { + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_keyid(), GetArenaForAllocation()); } - ::memcpy(&sender_id_, &from.sender_id_, + messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_messageid().empty()) { + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), + GetArenaForAllocation()); + } + ::memcpy(&senderid_, &from.senderid_, static_cast(reinterpret_cast(&isfirst_) - - reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); // @@protoc_insertion_point(copy_constructor:crypto.AESDecryptRequest) } void AESDecryptRequest::SharedCtor() { -data_in_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -data_out_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +datain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +dataout_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( - reinterpret_cast(&sender_id_) - reinterpret_cast(this)), + reinterpret_cast(&senderid_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&isfirst_) - - reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); } AESDecryptRequest::~AESDecryptRequest() { @@ -8339,9 +9346,10 @@ AESDecryptRequest::~AESDecryptRequest() { inline void AESDecryptRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - data_in_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - data_out_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - key_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + datain_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + dataout_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + keyid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void AESDecryptRequest::ArenaDtor(void* object) { @@ -8360,12 +9368,13 @@ void AESDecryptRequest::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - data_in_.ClearToEmpty(); - data_out_.ClearToEmpty(); - key_id_.ClearToEmpty(); - ::memset(&sender_id_, 0, static_cast( + datain_.ClearToEmpty(); + dataout_.ClearToEmpty(); + keyid_.ClearToEmpty(); + messageid_.ClearToEmpty(); + ::memset(&senderid_, 0, static_cast( reinterpret_cast(&isfirst_) - - reinterpret_cast(&sender_id_)) + sizeof(isfirst_)); + reinterpret_cast(&senderid_)) + sizeof(isfirst_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -8375,43 +9384,43 @@ const char* AESDecryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // int32 sender_id = 1; + // int32 senderId = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - sender_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + senderid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // int32 receiver_id = 2; + // int32 receiverId = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - receiver_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + receiverid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bytes data_in = 3; + // bytes dataIn = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - auto str = _internal_mutable_data_in(); + auto str = _internal_mutable_datain(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); } else goto handle_unusual; continue; - // int32 in_len = 4; + // int32 inLen = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - in_len_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + inlen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bytes data_out = 5; + // bytes dataOut = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { - auto str = _internal_mutable_data_out(); + auto str = _internal_mutable_dataout(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); } else @@ -8426,12 +9435,12 @@ const char* AESDecryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP } else goto handle_unusual; continue; - // .crypto.AESKeyLength key_length = 7; + // .crypto.AESKeyLength keyLength = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - _internal_set_key_length(static_cast<::crypto::AESKeyLength>(val)); + _internal_set_keylength(static_cast<::crypto::AESKeyLength>(val)); } else goto handle_unusual; continue; @@ -8452,12 +9461,12 @@ const char* AESDecryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP } else goto handle_unusual; continue; - // string key_id = 10; + // string keyId = 10; case 10: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) { - auto str = _internal_mutable_key_id(); + auto str = _internal_mutable_keyid(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.AESDecryptRequest.key_id")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.AESDecryptRequest.keyId")); CHK_(ptr); } else goto handle_unusual; @@ -8470,6 +9479,16 @@ const char* AESDecryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP } else goto handle_unusual; continue; + // string messageId = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) { + auto str = _internal_mutable_messageid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "crypto.AESDecryptRequest.messageId")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -8499,34 +9518,34 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AESDecryptRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // int32 sender_id = 1; - if (this->_internal_sender_id() != 0) { + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_sender_id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_senderid(), target); } - // int32 receiver_id = 2; - if (this->_internal_receiver_id() != 0) { + // int32 receiverId = 2; + if (this->_internal_receiverid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiver_id(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiverid(), target); } - // bytes data_in = 3; - if (!this->_internal_data_in().empty()) { + // bytes dataIn = 3; + if (!this->_internal_datain().empty()) { target = stream->WriteBytesMaybeAliased( - 3, this->_internal_data_in(), target); + 3, this->_internal_datain(), target); } - // int32 in_len = 4; - if (this->_internal_in_len() != 0) { + // int32 inLen = 4; + if (this->_internal_inlen() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_in_len(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_inlen(), target); } - // bytes data_out = 5; - if (!this->_internal_data_out().empty()) { + // bytes dataOut = 5; + if (!this->_internal_dataout().empty()) { target = stream->WriteBytesMaybeAliased( - 5, this->_internal_data_out(), target); + 5, this->_internal_dataout(), target); } // .crypto.AsymmetricFunction func = 6; @@ -8536,11 +9555,11 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AESDecryptRequest::_InternalSerialize( 6, this->_internal_func(), target); } - // .crypto.AESKeyLength key_length = 7; - if (this->_internal_key_length() != 0) { + // .crypto.AESKeyLength keyLength = 7; + if (this->_internal_keylength() != 0) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 7, this->_internal_key_length(), target); + 7, this->_internal_keylength(), target); } // .crypto.AESChainingMode chainingMode = 8; @@ -8556,14 +9575,14 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AESDecryptRequest::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(9, this->_internal_counter(), target); } - // string key_id = 10; - if (!this->_internal_key_id().empty()) { + // string keyId = 10; + if (!this->_internal_keyid().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_key_id().data(), static_cast(this->_internal_key_id().length()), + this->_internal_keyid().data(), static_cast(this->_internal_keyid().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "crypto.AESDecryptRequest.key_id"); + "crypto.AESDecryptRequest.keyId"); target = stream->WriteStringMaybeAliased( - 10, this->_internal_key_id(), target); + 10, this->_internal_keyid(), target); } // bool isFirst = 11; @@ -8572,6 +9591,16 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AESDecryptRequest::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_isfirst(), target); } + // string messageId = 12; + if (!this->_internal_messageid().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "crypto.AESDecryptRequest.messageId"); + target = stream->WriteStringMaybeAliased( + 12, this->_internal_messageid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -8588,40 +9617,47 @@ size_t AESDecryptRequest::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bytes data_in = 3; - if (!this->_internal_data_in().empty()) { + // bytes dataIn = 3; + if (!this->_internal_datain().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_data_in()); + this->_internal_datain()); } - // bytes data_out = 5; - if (!this->_internal_data_out().empty()) { + // bytes dataOut = 5; + if (!this->_internal_dataout().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_data_out()); + this->_internal_dataout()); } - // string key_id = 10; - if (!this->_internal_key_id().empty()) { + // string keyId = 10; + if (!this->_internal_keyid().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_key_id()); + this->_internal_keyid()); } - // int32 sender_id = 1; - if (this->_internal_sender_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sender_id()); + // string messageId = 12; + if (!this->_internal_messageid().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_messageid()); } - // int32 receiver_id = 2; - if (this->_internal_receiver_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiver_id()); + // int32 senderId = 1; + if (this->_internal_senderid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_senderid()); } - // int32 in_len = 4; - if (this->_internal_in_len() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_in_len()); + // int32 receiverId = 2; + if (this->_internal_receiverid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receiverid()); + } + + // int32 inLen = 4; + if (this->_internal_inlen() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_inlen()); } // .crypto.AsymmetricFunction func = 6; @@ -8630,10 +9666,10 @@ size_t AESDecryptRequest::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_func()); } - // .crypto.AESKeyLength key_length = 7; - if (this->_internal_key_length() != 0) { + // .crypto.AESKeyLength keyLength = 7; + if (this->_internal_keylength() != 0) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_key_length()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_keylength()); } // .crypto.AESChainingMode chainingMode = 8; @@ -8674,29 +9710,32 @@ void AESDecryptRequest::MergeFrom(const AESDecryptRequest& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_data_in().empty()) { - _internal_set_data_in(from._internal_data_in()); + if (!from._internal_datain().empty()) { + _internal_set_datain(from._internal_datain()); } - if (!from._internal_data_out().empty()) { - _internal_set_data_out(from._internal_data_out()); + if (!from._internal_dataout().empty()) { + _internal_set_dataout(from._internal_dataout()); } - if (!from._internal_key_id().empty()) { - _internal_set_key_id(from._internal_key_id()); + if (!from._internal_keyid().empty()) { + _internal_set_keyid(from._internal_keyid()); } - if (from._internal_sender_id() != 0) { - _internal_set_sender_id(from._internal_sender_id()); + if (!from._internal_messageid().empty()) { + _internal_set_messageid(from._internal_messageid()); } - if (from._internal_receiver_id() != 0) { - _internal_set_receiver_id(from._internal_receiver_id()); + if (from._internal_senderid() != 0) { + _internal_set_senderid(from._internal_senderid()); + } + if (from._internal_receiverid() != 0) { + _internal_set_receiverid(from._internal_receiverid()); } - if (from._internal_in_len() != 0) { - _internal_set_in_len(from._internal_in_len()); + if (from._internal_inlen() != 0) { + _internal_set_inlen(from._internal_inlen()); } if (from._internal_func() != 0) { _internal_set_func(from._internal_func()); } - if (from._internal_key_length() != 0) { - _internal_set_key_length(from._internal_key_length()); + if (from._internal_keylength() != 0) { + _internal_set_keylength(from._internal_keylength()); } if (from._internal_chainingmode() != 0) { _internal_set_chainingmode(from._internal_chainingmode()); @@ -8728,25 +9767,30 @@ void AESDecryptRequest::InternalSwap(AESDecryptRequest* other) { _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &data_in_, lhs_arena, - &other->data_in_, rhs_arena + &datain_, lhs_arena, + &other->datain_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &data_out_, lhs_arena, - &other->data_out_, rhs_arena + &dataout_, lhs_arena, + &other->dataout_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &key_id_, lhs_arena, - &other->key_id_, rhs_arena + &keyid_, lhs_arena, + &other->keyid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &messageid_, lhs_arena, + &other->messageid_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(AESDecryptRequest, isfirst_) + sizeof(AESDecryptRequest::isfirst_) - - PROTOBUF_FIELD_OFFSET(AESDecryptRequest, sender_id_)>( - reinterpret_cast(&sender_id_), - reinterpret_cast(&other->sender_id_)); + - PROTOBUF_FIELD_OFFSET(AESDecryptRequest, senderid_)>( + reinterpret_cast(&senderid_), + reinterpret_cast(&other->senderid_)); } ::PROTOBUF_NAMESPACE_ID::Metadata AESDecryptRequest::GetMetadata() const { @@ -8773,16 +9817,16 @@ AESDecryptResponse::AESDecryptResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, AESDecryptResponse::AESDecryptResponse(const AESDecryptResponse& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - decrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_decrypted_data().empty()) { - decrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_decrypted_data(), + decrypteddata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_decrypteddata().empty()) { + decrypteddata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_decrypteddata(), GetArenaForAllocation()); } // @@protoc_insertion_point(copy_constructor:crypto.AESDecryptResponse) } void AESDecryptResponse::SharedCtor() { -decrypted_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +decrypteddata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } AESDecryptResponse::~AESDecryptResponse() { @@ -8794,7 +9838,7 @@ AESDecryptResponse::~AESDecryptResponse() { inline void AESDecryptResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - decrypted_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + decrypteddata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void AESDecryptResponse::ArenaDtor(void* object) { @@ -8813,7 +9857,7 @@ void AESDecryptResponse::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - decrypted_data_.ClearToEmpty(); + decrypteddata_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -8823,10 +9867,10 @@ const char* AESDecryptResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMES ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // bytes decrypted_data = 1; + // bytes decrypteddata = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_decrypted_data(); + auto str = _internal_mutable_decrypteddata(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); } else @@ -8861,10 +9905,10 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AESDecryptResponse::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // bytes decrypted_data = 1; - if (!this->_internal_decrypted_data().empty()) { + // bytes decrypteddata = 1; + if (!this->_internal_decrypteddata().empty()) { target = stream->WriteBytesMaybeAliased( - 1, this->_internal_decrypted_data(), target); + 1, this->_internal_decrypteddata(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -8883,11 +9927,11 @@ size_t AESDecryptResponse::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bytes decrypted_data = 1; - if (!this->_internal_decrypted_data().empty()) { + // bytes decrypteddata = 1; + if (!this->_internal_decrypteddata().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_decrypted_data()); + this->_internal_decrypteddata()); } return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); @@ -8912,8 +9956,8 @@ void AESDecryptResponse::MergeFrom(const AESDecryptResponse& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_decrypted_data().empty()) { - _internal_set_decrypted_data(from._internal_decrypted_data()); + if (!from._internal_decrypteddata().empty()) { + _internal_set_decrypteddata(from._internal_decrypteddata()); } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -8936,8 +9980,8 @@ void AESDecryptResponse::InternalSwap(AESDecryptResponse* other) { _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &decrypted_data_, lhs_arena, - &other->decrypted_data_, rhs_arena + &decrypteddata_, lhs_arena, + &other->decrypteddata_, rhs_arena ); } diff --git a/hsm/proto/encryption.pb.h b/hsm/proto/encryption.pb.h index 141822eb..52fdf2e8 100644 --- a/hsm/proto/encryption.pb.h +++ b/hsm/proto/encryption.pb.h @@ -448,6 +448,7 @@ class AsymetricEncryptRequest final : enum : int { kKeyIdFieldNumber = 2, kDataFieldNumber = 3, + kMessageIdFieldNumber = 4, kSenderIdFieldNumber = 1, }; // string keyId = 2; @@ -478,6 +479,20 @@ class AsymetricEncryptRequest final : std::string* _internal_mutable_data(); public: + // string messageId = 4; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + // int32 senderId = 1; void clear_senderid(); ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; @@ -496,6 +511,7 @@ class AsymetricEncryptRequest final : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr keyid_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; ::PROTOBUF_NAMESPACE_ID::int32 senderid_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; @@ -623,18 +639,18 @@ class AsymetricEncryptResponse final : enum : int { kEncryptedDataFieldNumber = 1, }; - // bytes encrypted_data = 1; - void clear_encrypted_data(); - const std::string& encrypted_data() const; + // bytes encryptedData = 1; + void clear_encrypteddata(); + const std::string& encrypteddata() const; template - void set_encrypted_data(ArgT0&& arg0, ArgT... args); - std::string* mutable_encrypted_data(); - PROTOBUF_MUST_USE_RESULT std::string* release_encrypted_data(); - void set_allocated_encrypted_data(std::string* encrypted_data); + void set_encrypteddata(ArgT0&& arg0, ArgT... args); + std::string* mutable_encrypteddata(); + PROTOBUF_MUST_USE_RESULT std::string* release_encrypteddata(); + void set_allocated_encrypteddata(std::string* encrypteddata); private: - const std::string& _internal_encrypted_data() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_encrypted_data(const std::string& value); - std::string* _internal_mutable_encrypted_data(); + const std::string& _internal_encrypteddata() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_encrypteddata(const std::string& value); + std::string* _internal_mutable_encrypteddata(); public: // @@protoc_insertion_point(class_scope:crypto.AsymetricEncryptResponse) @@ -644,7 +660,7 @@ class AsymetricEncryptResponse final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encrypted_data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encrypteddata_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -769,11 +785,13 @@ class AsymetricDecryptRequest final : // accessors ------------------------------------------------------- enum : int { - kKeyIdFieldNumber = 2, - kDataFieldNumber = 3, - kReceiverIdFieldNumber = 1, + kKeyIdFieldNumber = 3, + kDataFieldNumber = 4, + kMessageIdFieldNumber = 5, + kSenderIdFieldNumber = 1, + kReceiverIdFieldNumber = 2, }; - // string keyId = 2; + // string keyId = 3; void clear_keyid(); const std::string& keyid() const; template @@ -787,7 +805,7 @@ class AsymetricDecryptRequest final : std::string* _internal_mutable_keyid(); public: - // bytes data = 3; + // bytes data = 4; void clear_data(); const std::string& data() const; template @@ -801,7 +819,30 @@ class AsymetricDecryptRequest final : std::string* _internal_mutable_data(); public: - // int32 receiverId = 1; + // string messageId = 5; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + + // int32 senderId = 1; + void clear_senderid(); + ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; + void set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_senderid() const; + void _internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 receiverId = 2; void clear_receiverid(); ::PROTOBUF_NAMESPACE_ID::int32 receiverid() const; void set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value); @@ -819,6 +860,8 @@ class AsymetricDecryptRequest final : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr keyid_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; + ::PROTOBUF_NAMESPACE_ID::int32 senderid_; ::PROTOBUF_NAMESPACE_ID::int32 receiverid_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; @@ -944,10 +987,35 @@ class GetHashLengthRequest final : // accessors ------------------------------------------------------- enum : int { - kFuncFieldNumber = 1, - kDataLenFieldNumber = 2, + kMessageIdFieldNumber = 4, + kSenderIdFieldNumber = 1, + kFuncFieldNumber = 2, + kDataLenFieldNumber = 3, }; - // .crypto.SHAAlgorithm func = 1; + // string messageId = 4; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + + // int32 senderId = 1; + void clear_senderid(); + ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; + void set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_senderid() const; + void _internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // .crypto.SHAAlgorithm func = 2; void clear_func(); ::crypto::SHAAlgorithm func() const; void set_func(::crypto::SHAAlgorithm value); @@ -956,7 +1024,7 @@ class GetHashLengthRequest final : void _internal_set_func(::crypto::SHAAlgorithm value); public: - // int32 dataLen = 2; + // int32 dataLen = 3; void clear_datalen(); ::PROTOBUF_NAMESPACE_ID::int32 datalen() const; void set_datalen(::PROTOBUF_NAMESPACE_ID::int32 value); @@ -972,6 +1040,8 @@ class GetHashLengthRequest final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; + ::PROTOBUF_NAMESPACE_ID::int32 senderid_; int func_; ::PROTOBUF_NAMESPACE_ID::int32 datalen_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -1098,11 +1168,36 @@ class GetAESLengthRequest final : // accessors ------------------------------------------------------- enum : int { - kDataLenFieldNumber = 1, - kIsFirstFieldNumber = 2, - kChainingModeFieldNumber = 3, + kMessageIdFieldNumber = 5, + kSenderIdFieldNumber = 1, + kDataLenFieldNumber = 2, + kIsFirstFieldNumber = 3, + kChainingModeFieldNumber = 4, }; - // int32 dataLen = 1; + // string messageId = 5; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + + // int32 senderId = 1; + void clear_senderid(); + ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; + void set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_senderid() const; + void _internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 dataLen = 2; void clear_datalen(); ::PROTOBUF_NAMESPACE_ID::int32 datalen() const; void set_datalen(::PROTOBUF_NAMESPACE_ID::int32 value); @@ -1111,7 +1206,7 @@ class GetAESLengthRequest final : void _internal_set_datalen(::PROTOBUF_NAMESPACE_ID::int32 value); public: - // bool isFirst = 2; + // bool isFirst = 3; void clear_isfirst(); bool isfirst() const; void set_isfirst(bool value); @@ -1120,7 +1215,7 @@ class GetAESLengthRequest final : void _internal_set_isfirst(bool value); public: - // .crypto.AESChainingMode chainingMode = 3; + // .crypto.AESChainingMode chainingMode = 4; void clear_chainingmode(); ::crypto::AESChainingMode chainingmode() const; void set_chainingmode(::crypto::AESChainingMode value); @@ -1136,6 +1231,8 @@ class GetAESLengthRequest final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; + ::PROTOBUF_NAMESPACE_ID::int32 senderid_; ::PROTOBUF_NAMESPACE_ID::int32 datalen_; bool isfirst_; int chainingmode_; @@ -1265,18 +1362,18 @@ class AsymetricDecryptResponse final : enum : int { kDecryptedDataFieldNumber = 1, }; - // bytes decrypted_data = 1; - void clear_decrypted_data(); - const std::string& decrypted_data() const; + // bytes decryptedData = 1; + void clear_decrypteddata(); + const std::string& decrypteddata() const; template - void set_decrypted_data(ArgT0&& arg0, ArgT... args); - std::string* mutable_decrypted_data(); - PROTOBUF_MUST_USE_RESULT std::string* release_decrypted_data(); - void set_allocated_decrypted_data(std::string* decrypted_data); + void set_decrypteddata(ArgT0&& arg0, ArgT... args); + std::string* mutable_decrypteddata(); + PROTOBUF_MUST_USE_RESULT std::string* release_decrypteddata(); + void set_allocated_decrypteddata(std::string* decrypteddata); private: - const std::string& _internal_decrypted_data() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_decrypted_data(const std::string& value); - std::string* _internal_mutable_decrypted_data(); + const std::string& _internal_decrypteddata() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_decrypteddata(const std::string& value); + std::string* _internal_mutable_decrypteddata(); public: // @@protoc_insertion_point(class_scope:crypto.AsymetricDecryptResponse) @@ -1286,7 +1383,7 @@ class AsymetricDecryptResponse final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr decrypted_data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr decrypteddata_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -1411,15 +1508,40 @@ class GetLengthRequest final : // accessors ------------------------------------------------------- enum : int { - kInLenFieldNumber = 1, + kMessageIdFieldNumber = 3, + kSenderIdFieldNumber = 1, + kInLenFieldNumber = 2, }; - // int32 in_len = 1; - void clear_in_len(); - ::PROTOBUF_NAMESPACE_ID::int32 in_len() const; - void set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value); + // string messageId = 3; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + + // int32 senderId = 1; + void clear_senderid(); + ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; + void set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_senderid() const; + void _internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 inLen = 2; + void clear_inlen(); + ::PROTOBUF_NAMESPACE_ID::int32 inlen() const; + void set_inlen(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_in_len() const; - void _internal_set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_inlen() const; + void _internal_set_inlen(::PROTOBUF_NAMESPACE_ID::int32 value); public: // @@protoc_insertion_point(class_scope:crypto.GetLengthRequest) @@ -1429,7 +1551,9 @@ class GetLengthRequest final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::int32 in_len_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; + ::PROTOBUF_NAMESPACE_ID::int32 senderid_; + ::PROTOBUF_NAMESPACE_ID::int32 inlen_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -1697,10 +1821,25 @@ class GetWholeLength final : // accessors ------------------------------------------------------- enum : int { + kMessageIdFieldNumber = 4, kSenderIdFieldNumber = 1, kInLenFieldNumber = 2, kIsFirstFieldNumber = 3, }; + // string messageId = 4; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + // int32 senderId = 1; void clear_senderid(); ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; @@ -1735,6 +1874,7 @@ class GetWholeLength final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; ::PROTOBUF_NAMESPACE_ID::int32 senderid_; ::PROTOBUF_NAMESPACE_ID::int32 inlen_; bool isfirst_; @@ -1863,6 +2003,7 @@ class GenerateAESKeyRequest final : enum : int { kPermissionsFieldNumber = 2, + kMessageIdFieldNumber = 5, kUserIdFieldNumber = 1, kKeyLengthFieldNumber = 3, kDestUserIdFieldNumber = 4, @@ -1884,13 +2025,27 @@ class GenerateAESKeyRequest final : const ::PROTOBUF_NAMESPACE_ID::RepeatedField& permissions() const; ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_permissions(); - // int32 user_id = 1; - void clear_user_id(); - ::PROTOBUF_NAMESPACE_ID::int32 user_id() const; - void set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value); + // string messageId = 5; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + + // int32 userId = 1; + void clear_userid(); + ::PROTOBUF_NAMESPACE_ID::int32 userid() const; + void set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_user_id() const; - void _internal_set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_userid() const; + void _internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); public: // .crypto.AESKeyLength keyLength = 3; @@ -1920,7 +2075,8 @@ class GenerateAESKeyRequest final : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::RepeatedField permissions_; mutable std::atomic _permissions_cached_byte_size_; - ::PROTOBUF_NAMESPACE_ID::int32 user_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; + ::PROTOBUF_NAMESPACE_ID::int32 userid_; int keylength_; ::PROTOBUF_NAMESPACE_ID::int32 destuserid_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -2049,18 +2205,18 @@ class GenerateAESKeyResponse final : enum : int { kAesKeyFieldNumber = 1, }; - // string aes_key = 1; - void clear_aes_key(); - const std::string& aes_key() const; + // string aesKey = 1; + void clear_aeskey(); + const std::string& aeskey() const; template - void set_aes_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_aes_key(); - PROTOBUF_MUST_USE_RESULT std::string* release_aes_key(); - void set_allocated_aes_key(std::string* aes_key); + void set_aeskey(ArgT0&& arg0, ArgT... args); + std::string* mutable_aeskey(); + PROTOBUF_MUST_USE_RESULT std::string* release_aeskey(); + void set_allocated_aeskey(std::string* aeskey); private: - const std::string& _internal_aes_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_aes_key(const std::string& value); - std::string* _internal_mutable_aes_key(); + const std::string& _internal_aeskey() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_aeskey(const std::string& value); + std::string* _internal_mutable_aeskey(); public: // @@protoc_insertion_point(class_scope:crypto.GenerateAESKeyResponse) @@ -2070,7 +2226,7 @@ class GenerateAESKeyResponse final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr aes_key_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr aeskey_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -2196,6 +2352,7 @@ class GenerateKeyPairRequest final : enum : int { kPermissionsFieldNumber = 2, + kMessageIdFieldNumber = 3, kUserIdFieldNumber = 1, }; // repeated .crypto.KeyPermission permissions = 2; @@ -2215,13 +2372,27 @@ class GenerateKeyPairRequest final : const ::PROTOBUF_NAMESPACE_ID::RepeatedField& permissions() const; ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_permissions(); - // int32 user_id = 1; - void clear_user_id(); - ::PROTOBUF_NAMESPACE_ID::int32 user_id() const; - void set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value); + // string messageId = 3; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + + // int32 userId = 1; + void clear_userid(); + ::PROTOBUF_NAMESPACE_ID::int32 userid() const; + void set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_user_id() const; - void _internal_set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_userid() const; + void _internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); public: // @@protoc_insertion_point(class_scope:crypto.GenerateKeyPairRequest) @@ -2233,7 +2404,8 @@ class GenerateKeyPairRequest final : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::RepeatedField permissions_; mutable std::atomic _permissions_cached_byte_size_; - ::PROTOBUF_NAMESPACE_ID::int32 user_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; + ::PROTOBUF_NAMESPACE_ID::int32 userid_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -2361,32 +2533,32 @@ class GenerateKeyPairResponse final : kPublicKeyFieldNumber = 1, kPrivateKeyFieldNumber = 2, }; - // string public_key = 1; - void clear_public_key(); - const std::string& public_key() const; + // string publicKey = 1; + void clear_publickey(); + const std::string& publickey() const; template - void set_public_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_public_key(); - PROTOBUF_MUST_USE_RESULT std::string* release_public_key(); - void set_allocated_public_key(std::string* public_key); + void set_publickey(ArgT0&& arg0, ArgT... args); + std::string* mutable_publickey(); + PROTOBUF_MUST_USE_RESULT std::string* release_publickey(); + void set_allocated_publickey(std::string* publickey); private: - const std::string& _internal_public_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_public_key(const std::string& value); - std::string* _internal_mutable_public_key(); + const std::string& _internal_publickey() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_publickey(const std::string& value); + std::string* _internal_mutable_publickey(); public: - // string private_key = 2; - void clear_private_key(); - const std::string& private_key() const; + // string privateKey = 2; + void clear_privatekey(); + const std::string& privatekey() const; template - void set_private_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_private_key(); - PROTOBUF_MUST_USE_RESULT std::string* release_private_key(); - void set_allocated_private_key(std::string* private_key); + void set_privatekey(ArgT0&& arg0, ArgT... args); + std::string* mutable_privatekey(); + PROTOBUF_MUST_USE_RESULT std::string* release_privatekey(); + void set_allocated_privatekey(std::string* privatekey); private: - const std::string& _internal_private_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_private_key(const std::string& value); - std::string* _internal_mutable_private_key(); + const std::string& _internal_privatekey() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_privatekey(const std::string& value); + std::string* _internal_mutable_privatekey(); public: // @@protoc_insertion_point(class_scope:crypto.GenerateKeyPairResponse) @@ -2396,8 +2568,8 @@ class GenerateKeyPairResponse final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr public_key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr private_key_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr publickey_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr privatekey_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -2524,6 +2696,7 @@ class SignRequest final : enum : int { kDataFieldNumber = 2, kKeyIdFieldNumber = 6, + kMessageIdFieldNumber = 7, kSenderIdFieldNumber = 1, kHashFuncFieldNumber = 3, kCounterFieldNumber = 5, @@ -2542,36 +2715,50 @@ class SignRequest final : std::string* _internal_mutable_data(); public: - // string key_id = 6; - void clear_key_id(); - const std::string& key_id() const; + // string keyId = 6; + void clear_keyid(); + const std::string& keyid() const; + template + void set_keyid(ArgT0&& arg0, ArgT... args); + std::string* mutable_keyid(); + PROTOBUF_MUST_USE_RESULT std::string* release_keyid(); + void set_allocated_keyid(std::string* keyid); + private: + const std::string& _internal_keyid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_keyid(const std::string& value); + std::string* _internal_mutable_keyid(); + public: + + // string messageId = 7; + void clear_messageid(); + const std::string& messageid() const; template - void set_key_id(ArgT0&& arg0, ArgT... args); - std::string* mutable_key_id(); - PROTOBUF_MUST_USE_RESULT std::string* release_key_id(); - void set_allocated_key_id(std::string* key_id); + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); private: - const std::string& _internal_key_id() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_key_id(const std::string& value); - std::string* _internal_mutable_key_id(); + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); public: - // int32 sender_id = 1; - void clear_sender_id(); - ::PROTOBUF_NAMESPACE_ID::int32 sender_id() const; - void set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + // int32 senderId = 1; + void clear_senderid(); + ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; + void set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_sender_id() const; - void _internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_senderid() const; + void _internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); public: - // .crypto.SHAAlgorithm hash_func = 3; - void clear_hash_func(); - ::crypto::SHAAlgorithm hash_func() const; - void set_hash_func(::crypto::SHAAlgorithm value); + // .crypto.SHAAlgorithm hashFunc = 3; + void clear_hashfunc(); + ::crypto::SHAAlgorithm hashfunc() const; + void set_hashfunc(::crypto::SHAAlgorithm value); private: - ::crypto::SHAAlgorithm _internal_hash_func() const; - void _internal_set_hash_func(::crypto::SHAAlgorithm value); + ::crypto::SHAAlgorithm _internal_hashfunc() const; + void _internal_set_hashfunc(::crypto::SHAAlgorithm value); public: // int64 counter = 5; @@ -2591,9 +2778,10 @@ class SignRequest final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_id_; - ::PROTOBUF_NAMESPACE_ID::int32 sender_id_; - int hash_func_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr keyid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; + ::PROTOBUF_NAMESPACE_ID::int32 senderid_; + int hashfunc_; ::PROTOBUF_NAMESPACE_ID::int64 counter_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; @@ -2870,6 +3058,7 @@ class VerifyRequest final : kDataFieldNumber = 3, kSignatureFieldNumber = 4, kKeyIdFieldNumber = 6, + kMessageIdFieldNumber = 8, kSenderIdFieldNumber = 1, kReceiverIdFieldNumber = 2, kHashFuncFieldNumber = 5, @@ -2903,45 +3092,59 @@ class VerifyRequest final : std::string* _internal_mutable_signature(); public: - // string key_id = 6; - void clear_key_id(); - const std::string& key_id() const; + // string keyId = 6; + void clear_keyid(); + const std::string& keyid() const; + template + void set_keyid(ArgT0&& arg0, ArgT... args); + std::string* mutable_keyid(); + PROTOBUF_MUST_USE_RESULT std::string* release_keyid(); + void set_allocated_keyid(std::string* keyid); + private: + const std::string& _internal_keyid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_keyid(const std::string& value); + std::string* _internal_mutable_keyid(); + public: + + // string messageId = 8; + void clear_messageid(); + const std::string& messageid() const; template - void set_key_id(ArgT0&& arg0, ArgT... args); - std::string* mutable_key_id(); - PROTOBUF_MUST_USE_RESULT std::string* release_key_id(); - void set_allocated_key_id(std::string* key_id); + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); private: - const std::string& _internal_key_id() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_key_id(const std::string& value); - std::string* _internal_mutable_key_id(); + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); public: - // int32 sender_id = 1; - void clear_sender_id(); - ::PROTOBUF_NAMESPACE_ID::int32 sender_id() const; - void set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + // int32 senderId = 1; + void clear_senderid(); + ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; + void set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_sender_id() const; - void _internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_senderid() const; + void _internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); public: - // int32 receiver_id = 2; - void clear_receiver_id(); - ::PROTOBUF_NAMESPACE_ID::int32 receiver_id() const; - void set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + // int32 receiverId = 2; + void clear_receiverid(); + ::PROTOBUF_NAMESPACE_ID::int32 receiverid() const; + void set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiver_id() const; - void _internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiverid() const; + void _internal_set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value); public: - // .crypto.SHAAlgorithm hash_func = 5; - void clear_hash_func(); - ::crypto::SHAAlgorithm hash_func() const; - void set_hash_func(::crypto::SHAAlgorithm value); + // .crypto.SHAAlgorithm hashFunc = 5; + void clear_hashfunc(); + ::crypto::SHAAlgorithm hashfunc() const; + void set_hashfunc(::crypto::SHAAlgorithm value); private: - ::crypto::SHAAlgorithm _internal_hash_func() const; - void _internal_set_hash_func(::crypto::SHAAlgorithm value); + ::crypto::SHAAlgorithm _internal_hashfunc() const; + void _internal_set_hashfunc(::crypto::SHAAlgorithm value); public: // int32 counter = 7; @@ -2962,10 +3165,11 @@ class VerifyRequest final : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_id_; - ::PROTOBUF_NAMESPACE_ID::int32 sender_id_; - ::PROTOBUF_NAMESPACE_ID::int32 receiver_id_; - int hash_func_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr keyid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; + ::PROTOBUF_NAMESPACE_ID::int32 senderid_; + ::PROTOBUF_NAMESPACE_ID::int32 receiverid_; + int hashfunc_; ::PROTOBUF_NAMESPACE_ID::int32 counter_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; @@ -3250,15 +3454,40 @@ class KeyRequest final : // accessors ------------------------------------------------------- enum : int { - kUserIdFieldNumber = 1, + kMessageIdFieldNumber = 3, + kSenderIdFieldNumber = 1, + kUserIdFieldNumber = 2, }; - // int32 user_id = 1; - void clear_user_id(); - ::PROTOBUF_NAMESPACE_ID::int32 user_id() const; - void set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value); + // string messageId = 3; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_user_id() const; - void _internal_set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value); + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + + // int32 senderId = 1; + void clear_senderid(); + ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; + void set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_senderid() const; + void _internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 userId = 2; + void clear_userid(); + ::PROTOBUF_NAMESPACE_ID::int32 userid() const; + void set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_userid() const; + void _internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); public: // @@protoc_insertion_point(class_scope:crypto.KeyRequest) @@ -3268,7 +3497,9 @@ class KeyRequest final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::int32 user_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; + ::PROTOBUF_NAMESPACE_ID::int32 senderid_; + ::PROTOBUF_NAMESPACE_ID::int32 userid_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -3705,6 +3936,7 @@ class BootSystemRequest final : enum : int { kUsersIdsPermissionsFieldNumber = 1, + kMessageIdFieldNumber = 5, }; // repeated .crypto.UserKeyPermissions usersIdsPermissions = 1; int usersidspermissions_size() const; @@ -3724,6 +3956,20 @@ class BootSystemRequest final : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::crypto::UserKeyPermissions >& usersidspermissions() const; + // string messageId = 5; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + // @@protoc_insertion_point(class_scope:crypto.BootSystemRequest) private: class _Internal; @@ -3732,6 +3978,7 @@ class BootSystemRequest final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::crypto::UserKeyPermissions > usersidspermissions_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -3971,11 +4218,26 @@ class CryptoConfig final : // accessors ------------------------------------------------------- enum : int { + kMessageIdFieldNumber = 5, kHashFunctionFieldNumber = 1, kAesKeyLengthFieldNumber = 2, kAesChainingModeFieldNumber = 3, kAsymmetricFunctionFieldNumber = 4, }; + // string messageId = 5; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + // .crypto.SHAAlgorithm hashFunction = 1; void clear_hashfunction(); ::crypto::SHAAlgorithm hashfunction() const; @@ -4019,6 +4281,7 @@ class CryptoConfig final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; int hashfunction_; int aeskeylength_; int aeschainingmode_; @@ -4147,9 +4410,24 @@ class ConfigureRequest final : // accessors ------------------------------------------------------- enum : int { + kMessageIdFieldNumber = 3, kConfigFieldNumber = 2, kUserIdFieldNumber = 1, }; + // string messageId = 3; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + // .crypto.CryptoConfig config = 2; bool has_config() const; private: @@ -4184,6 +4462,7 @@ class ConfigureRequest final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; ::crypto::CryptoConfig* config_; ::PROTOBUF_NAMESPACE_ID::int32 userid_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -4311,6 +4590,7 @@ class AddProcessRequest final : enum : int { kPermissionsFieldNumber = 2, + kMessageIdFieldNumber = 4, kUserIdFieldNumber = 1, }; // repeated .crypto.KeyPermission permissions = 2; @@ -4330,6 +4610,20 @@ class AddProcessRequest final : const ::PROTOBUF_NAMESPACE_ID::RepeatedField& permissions() const; ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_permissions(); + // string messageId = 4; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + // int32 userId = 1; void clear_userid(); ::PROTOBUF_NAMESPACE_ID::int32 userid() const; @@ -4348,6 +4642,7 @@ class AddProcessRequest final : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::RepeatedField permissions_; mutable std::atomic _permissions_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; ::PROTOBUF_NAMESPACE_ID::int32 userid_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; @@ -4474,6 +4769,7 @@ class EncryptRequest final : enum : int { kDataFieldNumber = 3, + kMessageIdFieldNumber = 6, kSenderIdFieldNumber = 1, kReceiverIdFieldNumber = 2, kCounterFieldNumber = 4, @@ -4493,22 +4789,36 @@ class EncryptRequest final : std::string* _internal_mutable_data(); public: - // int32 sender_id = 1; - void clear_sender_id(); - ::PROTOBUF_NAMESPACE_ID::int32 sender_id() const; - void set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + // string messageId = 6; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + + // int32 senderId = 1; + void clear_senderid(); + ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; + void set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_sender_id() const; - void _internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_senderid() const; + void _internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); public: - // int32 receiver_id = 2; - void clear_receiver_id(); - ::PROTOBUF_NAMESPACE_ID::int32 receiver_id() const; - void set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + // int32 receiverId = 2; + void clear_receiverid(); + ::PROTOBUF_NAMESPACE_ID::int32 receiverid() const; + void set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiver_id() const; - void _internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiverid() const; + void _internal_set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value); public: // int64 counter = 4; @@ -4537,8 +4847,9 @@ class EncryptRequest final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; - ::PROTOBUF_NAMESPACE_ID::int32 sender_id_; - ::PROTOBUF_NAMESPACE_ID::int32 receiver_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; + ::PROTOBUF_NAMESPACE_ID::int32 senderid_; + ::PROTOBUF_NAMESPACE_ID::int32 receiverid_; ::PROTOBUF_NAMESPACE_ID::int64 counter_; bool isfirst_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -4668,18 +4979,18 @@ class EncryptResponse final : kEncryptedDataFieldNumber = 1, kSignatureFieldNumber = 2, }; - // bytes encrypted_data = 1; - void clear_encrypted_data(); - const std::string& encrypted_data() const; + // bytes encryptedData = 1; + void clear_encrypteddata(); + const std::string& encrypteddata() const; template - void set_encrypted_data(ArgT0&& arg0, ArgT... args); - std::string* mutable_encrypted_data(); - PROTOBUF_MUST_USE_RESULT std::string* release_encrypted_data(); - void set_allocated_encrypted_data(std::string* encrypted_data); + void set_encrypteddata(ArgT0&& arg0, ArgT... args); + std::string* mutable_encrypteddata(); + PROTOBUF_MUST_USE_RESULT std::string* release_encrypteddata(); + void set_allocated_encrypteddata(std::string* encrypteddata); private: - const std::string& _internal_encrypted_data() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_encrypted_data(const std::string& value); - std::string* _internal_mutable_encrypted_data(); + const std::string& _internal_encrypteddata() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_encrypteddata(const std::string& value); + std::string* _internal_mutable_encrypteddata(); public: // bytes signature = 2; @@ -4703,7 +5014,7 @@ class EncryptResponse final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encrypted_data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encrypteddata_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; @@ -4831,23 +5142,24 @@ class DecryptRequest final : enum : int { kEncryptedDataFieldNumber = 3, kSignatureFieldNumber = 5, + kMessageIdFieldNumber = 7, kSenderIdFieldNumber = 1, kReceiverIdFieldNumber = 2, kCounterFieldNumber = 4, kIsFirstFieldNumber = 6, }; - // bytes encrypted_data = 3; - void clear_encrypted_data(); - const std::string& encrypted_data() const; + // bytes encryptedData = 3; + void clear_encrypteddata(); + const std::string& encrypteddata() const; template - void set_encrypted_data(ArgT0&& arg0, ArgT... args); - std::string* mutable_encrypted_data(); - PROTOBUF_MUST_USE_RESULT std::string* release_encrypted_data(); - void set_allocated_encrypted_data(std::string* encrypted_data); + void set_encrypteddata(ArgT0&& arg0, ArgT... args); + std::string* mutable_encrypteddata(); + PROTOBUF_MUST_USE_RESULT std::string* release_encrypteddata(); + void set_allocated_encrypteddata(std::string* encrypteddata); private: - const std::string& _internal_encrypted_data() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_encrypted_data(const std::string& value); - std::string* _internal_mutable_encrypted_data(); + const std::string& _internal_encrypteddata() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_encrypteddata(const std::string& value); + std::string* _internal_mutable_encrypteddata(); public: // bytes signature = 5; @@ -4864,22 +5176,36 @@ class DecryptRequest final : std::string* _internal_mutable_signature(); public: - // int32 sender_id = 1; - void clear_sender_id(); - ::PROTOBUF_NAMESPACE_ID::int32 sender_id() const; - void set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + // string messageId = 7; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); + public: + + // int32 senderId = 1; + void clear_senderid(); + ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; + void set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_sender_id() const; - void _internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_senderid() const; + void _internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); public: - // int32 receiver_id = 2; - void clear_receiver_id(); - ::PROTOBUF_NAMESPACE_ID::int32 receiver_id() const; - void set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + // int32 receiverId = 2; + void clear_receiverid(); + ::PROTOBUF_NAMESPACE_ID::int32 receiverid() const; + void set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiver_id() const; - void _internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiverid() const; + void _internal_set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value); public: // int64 counter = 4; @@ -4907,10 +5233,11 @@ class DecryptRequest final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encrypted_data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encrypteddata_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; - ::PROTOBUF_NAMESPACE_ID::int32 sender_id_; - ::PROTOBUF_NAMESPACE_ID::int32 receiver_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; + ::PROTOBUF_NAMESPACE_ID::int32 senderid_; + ::PROTOBUF_NAMESPACE_ID::int32 receiverid_; ::PROTOBUF_NAMESPACE_ID::int64 counter_; bool isfirst_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -5039,18 +5366,18 @@ class DecryptResponse final : enum : int { kDecryptedDataFieldNumber = 1, }; - // bytes decrypted_data = 1; - void clear_decrypted_data(); - const std::string& decrypted_data() const; + // bytes decryptedData = 1; + void clear_decrypteddata(); + const std::string& decrypteddata() const; template - void set_decrypted_data(ArgT0&& arg0, ArgT... args); - std::string* mutable_decrypted_data(); - PROTOBUF_MUST_USE_RESULT std::string* release_decrypted_data(); - void set_allocated_decrypted_data(std::string* decrypted_data); + void set_decrypteddata(ArgT0&& arg0, ArgT... args); + std::string* mutable_decrypteddata(); + PROTOBUF_MUST_USE_RESULT std::string* release_decrypteddata(); + void set_allocated_decrypteddata(std::string* decrypteddata); private: - const std::string& _internal_decrypted_data() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_decrypted_data(const std::string& value); - std::string* _internal_mutable_decrypted_data(); + const std::string& _internal_decrypteddata() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_decrypteddata(const std::string& value); + std::string* _internal_mutable_decrypteddata(); public: // @@protoc_insertion_point(class_scope:crypto.DecryptResponse) @@ -5060,7 +5387,7 @@ class DecryptResponse final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr decrypted_data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr decrypteddata_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -5187,6 +5514,7 @@ class AESEncryptRequest final : enum : int { kDataFieldNumber = 3, kKeyIdFieldNumber = 6, + kMessageIdFieldNumber = 10, kSenderIdFieldNumber = 1, kReceiverIdFieldNumber = 2, kCounterFieldNumber = 5, @@ -5209,36 +5537,50 @@ class AESEncryptRequest final : std::string* _internal_mutable_data(); public: - // string key_id = 6; - void clear_key_id(); - const std::string& key_id() const; + // string keyId = 6; + void clear_keyid(); + const std::string& keyid() const; + template + void set_keyid(ArgT0&& arg0, ArgT... args); + std::string* mutable_keyid(); + PROTOBUF_MUST_USE_RESULT std::string* release_keyid(); + void set_allocated_keyid(std::string* keyid); + private: + const std::string& _internal_keyid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_keyid(const std::string& value); + std::string* _internal_mutable_keyid(); + public: + + // string messageId = 10; + void clear_messageid(); + const std::string& messageid() const; template - void set_key_id(ArgT0&& arg0, ArgT... args); - std::string* mutable_key_id(); - PROTOBUF_MUST_USE_RESULT std::string* release_key_id(); - void set_allocated_key_id(std::string* key_id); + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); private: - const std::string& _internal_key_id() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_key_id(const std::string& value); - std::string* _internal_mutable_key_id(); + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); public: - // int32 sender_id = 1; - void clear_sender_id(); - ::PROTOBUF_NAMESPACE_ID::int32 sender_id() const; - void set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + // int32 senderId = 1; + void clear_senderid(); + ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; + void set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_sender_id() const; - void _internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_senderid() const; + void _internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); public: - // int32 receiver_id = 2; - void clear_receiver_id(); - ::PROTOBUF_NAMESPACE_ID::int32 receiver_id() const; - void set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + // int32 receiverId = 2; + void clear_receiverid(); + ::PROTOBUF_NAMESPACE_ID::int32 receiverid() const; + void set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiver_id() const; - void _internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiverid() const; + void _internal_set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value); public: // int64 counter = 5; @@ -5259,13 +5601,13 @@ class AESEncryptRequest final : void _internal_set_func(::crypto::AsymmetricFunction value); public: - // .crypto.AESKeyLength key_length = 7; - void clear_key_length(); - ::crypto::AESKeyLength key_length() const; - void set_key_length(::crypto::AESKeyLength value); + // .crypto.AESKeyLength keyLength = 7; + void clear_keylength(); + ::crypto::AESKeyLength keylength() const; + void set_keylength(::crypto::AESKeyLength value); private: - ::crypto::AESKeyLength _internal_key_length() const; - void _internal_set_key_length(::crypto::AESKeyLength value); + ::crypto::AESKeyLength _internal_keylength() const; + void _internal_set_keylength(::crypto::AESKeyLength value); public: // .crypto.AESChainingMode chainingMode = 8; @@ -5294,12 +5636,13 @@ class AESEncryptRequest final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_id_; - ::PROTOBUF_NAMESPACE_ID::int32 sender_id_; - ::PROTOBUF_NAMESPACE_ID::int32 receiver_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr keyid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; + ::PROTOBUF_NAMESPACE_ID::int32 senderid_; + ::PROTOBUF_NAMESPACE_ID::int32 receiverid_; ::PROTOBUF_NAMESPACE_ID::int64 counter_; int func_; - int key_length_; + int keylength_; int chainingmode_; bool isfirst_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -5428,18 +5771,18 @@ class AESEncryptResponse final : enum : int { kEncryptedDataFieldNumber = 1, }; - // bytes encrypted_data = 1; - void clear_encrypted_data(); - const std::string& encrypted_data() const; + // bytes encryptedData = 1; + void clear_encrypteddata(); + const std::string& encrypteddata() const; template - void set_encrypted_data(ArgT0&& arg0, ArgT... args); - std::string* mutable_encrypted_data(); - PROTOBUF_MUST_USE_RESULT std::string* release_encrypted_data(); - void set_allocated_encrypted_data(std::string* encrypted_data); + void set_encrypteddata(ArgT0&& arg0, ArgT... args); + std::string* mutable_encrypteddata(); + PROTOBUF_MUST_USE_RESULT std::string* release_encrypteddata(); + void set_allocated_encrypteddata(std::string* encrypteddata); private: - const std::string& _internal_encrypted_data() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_encrypted_data(const std::string& value); - std::string* _internal_mutable_encrypted_data(); + const std::string& _internal_encrypteddata() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_encrypteddata(const std::string& value); + std::string* _internal_mutable_encrypteddata(); public: // @@protoc_insertion_point(class_scope:crypto.AESEncryptResponse) @@ -5449,7 +5792,7 @@ class AESEncryptResponse final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encrypted_data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encrypteddata_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -5577,6 +5920,7 @@ class AESDecryptRequest final : kDataInFieldNumber = 3, kDataOutFieldNumber = 5, kKeyIdFieldNumber = 10, + kMessageIdFieldNumber = 12, kSenderIdFieldNumber = 1, kReceiverIdFieldNumber = 2, kInLenFieldNumber = 4, @@ -5586,73 +5930,87 @@ class AESDecryptRequest final : kCounterFieldNumber = 9, kIsFirstFieldNumber = 11, }; - // bytes data_in = 3; - void clear_data_in(); - const std::string& data_in() const; + // bytes dataIn = 3; + void clear_datain(); + const std::string& datain() const; template - void set_data_in(ArgT0&& arg0, ArgT... args); - std::string* mutable_data_in(); - PROTOBUF_MUST_USE_RESULT std::string* release_data_in(); - void set_allocated_data_in(std::string* data_in); + void set_datain(ArgT0&& arg0, ArgT... args); + std::string* mutable_datain(); + PROTOBUF_MUST_USE_RESULT std::string* release_datain(); + void set_allocated_datain(std::string* datain); private: - const std::string& _internal_data_in() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_data_in(const std::string& value); - std::string* _internal_mutable_data_in(); + const std::string& _internal_datain() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_datain(const std::string& value); + std::string* _internal_mutable_datain(); public: - // bytes data_out = 5; - void clear_data_out(); - const std::string& data_out() const; + // bytes dataOut = 5; + void clear_dataout(); + const std::string& dataout() const; template - void set_data_out(ArgT0&& arg0, ArgT... args); - std::string* mutable_data_out(); - PROTOBUF_MUST_USE_RESULT std::string* release_data_out(); - void set_allocated_data_out(std::string* data_out); + void set_dataout(ArgT0&& arg0, ArgT... args); + std::string* mutable_dataout(); + PROTOBUF_MUST_USE_RESULT std::string* release_dataout(); + void set_allocated_dataout(std::string* dataout); private: - const std::string& _internal_data_out() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_data_out(const std::string& value); - std::string* _internal_mutable_data_out(); + const std::string& _internal_dataout() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_dataout(const std::string& value); + std::string* _internal_mutable_dataout(); public: - // string key_id = 10; - void clear_key_id(); - const std::string& key_id() const; + // string keyId = 10; + void clear_keyid(); + const std::string& keyid() const; template - void set_key_id(ArgT0&& arg0, ArgT... args); - std::string* mutable_key_id(); - PROTOBUF_MUST_USE_RESULT std::string* release_key_id(); - void set_allocated_key_id(std::string* key_id); + void set_keyid(ArgT0&& arg0, ArgT... args); + std::string* mutable_keyid(); + PROTOBUF_MUST_USE_RESULT std::string* release_keyid(); + void set_allocated_keyid(std::string* keyid); private: - const std::string& _internal_key_id() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_key_id(const std::string& value); - std::string* _internal_mutable_key_id(); + const std::string& _internal_keyid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_keyid(const std::string& value); + std::string* _internal_mutable_keyid(); + public: + + // string messageId = 12; + void clear_messageid(); + const std::string& messageid() const; + template + void set_messageid(ArgT0&& arg0, ArgT... args); + std::string* mutable_messageid(); + PROTOBUF_MUST_USE_RESULT std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); + private: + const std::string& _internal_messageid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); public: - // int32 sender_id = 1; - void clear_sender_id(); - ::PROTOBUF_NAMESPACE_ID::int32 sender_id() const; - void set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + // int32 senderId = 1; + void clear_senderid(); + ::PROTOBUF_NAMESPACE_ID::int32 senderid() const; + void set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_sender_id() const; - void _internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_senderid() const; + void _internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value); public: - // int32 receiver_id = 2; - void clear_receiver_id(); - ::PROTOBUF_NAMESPACE_ID::int32 receiver_id() const; - void set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + // int32 receiverId = 2; + void clear_receiverid(); + ::PROTOBUF_NAMESPACE_ID::int32 receiverid() const; + void set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiver_id() const; - void _internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_receiverid() const; + void _internal_set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value); public: - // int32 in_len = 4; - void clear_in_len(); - ::PROTOBUF_NAMESPACE_ID::int32 in_len() const; - void set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value); + // int32 inLen = 4; + void clear_inlen(); + ::PROTOBUF_NAMESPACE_ID::int32 inlen() const; + void set_inlen(::PROTOBUF_NAMESPACE_ID::int32 value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_in_len() const; - void _internal_set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_inlen() const; + void _internal_set_inlen(::PROTOBUF_NAMESPACE_ID::int32 value); public: // .crypto.AsymmetricFunction func = 6; @@ -5664,13 +6022,13 @@ class AESDecryptRequest final : void _internal_set_func(::crypto::AsymmetricFunction value); public: - // .crypto.AESKeyLength key_length = 7; - void clear_key_length(); - ::crypto::AESKeyLength key_length() const; - void set_key_length(::crypto::AESKeyLength value); + // .crypto.AESKeyLength keyLength = 7; + void clear_keylength(); + ::crypto::AESKeyLength keylength() const; + void set_keylength(::crypto::AESKeyLength value); private: - ::crypto::AESKeyLength _internal_key_length() const; - void _internal_set_key_length(::crypto::AESKeyLength value); + ::crypto::AESKeyLength _internal_keylength() const; + void _internal_set_keylength(::crypto::AESKeyLength value); public: // .crypto.AESChainingMode chainingMode = 8; @@ -5707,14 +6065,15 @@ class AESDecryptRequest final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_in_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_out_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_id_; - ::PROTOBUF_NAMESPACE_ID::int32 sender_id_; - ::PROTOBUF_NAMESPACE_ID::int32 receiver_id_; - ::PROTOBUF_NAMESPACE_ID::int32 in_len_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr datain_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr dataout_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr keyid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; + ::PROTOBUF_NAMESPACE_ID::int32 senderid_; + ::PROTOBUF_NAMESPACE_ID::int32 receiverid_; + ::PROTOBUF_NAMESPACE_ID::int32 inlen_; int func_; - int key_length_; + int keylength_; int chainingmode_; ::PROTOBUF_NAMESPACE_ID::int64 counter_; bool isfirst_; @@ -5842,20 +6201,20 @@ class AESDecryptResponse final : // accessors ------------------------------------------------------- enum : int { - kDecryptedDataFieldNumber = 1, + kDecrypteddataFieldNumber = 1, }; - // bytes decrypted_data = 1; - void clear_decrypted_data(); - const std::string& decrypted_data() const; + // bytes decrypteddata = 1; + void clear_decrypteddata(); + const std::string& decrypteddata() const; template - void set_decrypted_data(ArgT0&& arg0, ArgT... args); - std::string* mutable_decrypted_data(); - PROTOBUF_MUST_USE_RESULT std::string* release_decrypted_data(); - void set_allocated_decrypted_data(std::string* decrypted_data); + void set_decrypteddata(ArgT0&& arg0, ArgT... args); + std::string* mutable_decrypteddata(); + PROTOBUF_MUST_USE_RESULT std::string* release_decrypteddata(); + void set_allocated_decrypteddata(std::string* decrypteddata); private: - const std::string& _internal_decrypted_data() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_decrypted_data(const std::string& value); - std::string* _internal_mutable_decrypted_data(); + const std::string& _internal_decrypteddata() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_decrypteddata(const std::string& value); + std::string* _internal_mutable_decrypteddata(); public: // @@protoc_insertion_point(class_scope:crypto.AESDecryptResponse) @@ -5865,7 +6224,7 @@ class AESDecryptResponse final : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr decrypted_data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr decrypteddata_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -5992,61 +6351,127 @@ inline void AsymetricEncryptRequest::set_allocated_data(std::string* data) { // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricEncryptRequest.data) } +// string messageId = 4; +inline void AsymetricEncryptRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& AsymetricEncryptRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.AsymetricEncryptRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AsymetricEncryptRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AsymetricEncryptRequest.messageId) +} +inline std::string* AsymetricEncryptRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.AsymetricEncryptRequest.messageId) + return _s; +} +inline const std::string& AsymetricEncryptRequest::_internal_messageid() const { + return messageid_.Get(); +} +inline void AsymetricEncryptRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AsymetricEncryptRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AsymetricEncryptRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.AsymetricEncryptRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AsymetricEncryptRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricEncryptRequest.messageId) +} + // ------------------------------------------------------------------- // AsymetricEncryptResponse -// bytes encrypted_data = 1; -inline void AsymetricEncryptResponse::clear_encrypted_data() { - encrypted_data_.ClearToEmpty(); +// bytes encryptedData = 1; +inline void AsymetricEncryptResponse::clear_encrypteddata() { + encrypteddata_.ClearToEmpty(); } -inline const std::string& AsymetricEncryptResponse::encrypted_data() const { - // @@protoc_insertion_point(field_get:crypto.AsymetricEncryptResponse.encrypted_data) - return _internal_encrypted_data(); +inline const std::string& AsymetricEncryptResponse::encrypteddata() const { + // @@protoc_insertion_point(field_get:crypto.AsymetricEncryptResponse.encryptedData) + return _internal_encrypteddata(); } template inline PROTOBUF_ALWAYS_INLINE -void AsymetricEncryptResponse::set_encrypted_data(ArgT0&& arg0, ArgT... args) { +void AsymetricEncryptResponse::set_encrypteddata(ArgT0&& arg0, ArgT... args) { - encrypted_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.AsymetricEncryptResponse.encrypted_data) + encrypteddata_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AsymetricEncryptResponse.encryptedData) } -inline std::string* AsymetricEncryptResponse::mutable_encrypted_data() { - std::string* _s = _internal_mutable_encrypted_data(); - // @@protoc_insertion_point(field_mutable:crypto.AsymetricEncryptResponse.encrypted_data) +inline std::string* AsymetricEncryptResponse::mutable_encrypteddata() { + std::string* _s = _internal_mutable_encrypteddata(); + // @@protoc_insertion_point(field_mutable:crypto.AsymetricEncryptResponse.encryptedData) return _s; } -inline const std::string& AsymetricEncryptResponse::_internal_encrypted_data() const { - return encrypted_data_.Get(); +inline const std::string& AsymetricEncryptResponse::_internal_encrypteddata() const { + return encrypteddata_.Get(); } -inline void AsymetricEncryptResponse::_internal_set_encrypted_data(const std::string& value) { +inline void AsymetricEncryptResponse::_internal_set_encrypteddata(const std::string& value) { - encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + encrypteddata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* AsymetricEncryptResponse::_internal_mutable_encrypted_data() { +inline std::string* AsymetricEncryptResponse::_internal_mutable_encrypteddata() { - return encrypted_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return encrypteddata_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* AsymetricEncryptResponse::release_encrypted_data() { - // @@protoc_insertion_point(field_release:crypto.AsymetricEncryptResponse.encrypted_data) - return encrypted_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* AsymetricEncryptResponse::release_encrypteddata() { + // @@protoc_insertion_point(field_release:crypto.AsymetricEncryptResponse.encryptedData) + return encrypteddata_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void AsymetricEncryptResponse::set_allocated_encrypted_data(std::string* encrypted_data) { - if (encrypted_data != nullptr) { +inline void AsymetricEncryptResponse::set_allocated_encrypteddata(std::string* encrypteddata) { + if (encrypteddata != nullptr) { } else { } - encrypted_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), encrypted_data, + encrypteddata_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), encrypteddata, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricEncryptResponse.encrypted_data) + // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricEncryptResponse.encryptedData) } // ------------------------------------------------------------------- // AsymetricDecryptRequest -// int32 receiverId = 1; +// int32 senderId = 1; +inline void AsymetricDecryptRequest::clear_senderid() { + senderid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AsymetricDecryptRequest::_internal_senderid() const { + return senderid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AsymetricDecryptRequest::senderid() const { + // @@protoc_insertion_point(field_get:crypto.AsymetricDecryptRequest.senderId) + return _internal_senderid(); +} +inline void AsymetricDecryptRequest::_internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + senderid_ = value; +} +inline void AsymetricDecryptRequest::set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_senderid(value); + // @@protoc_insertion_point(field_set:crypto.AsymetricDecryptRequest.senderId) +} + +// int32 receiverId = 2; inline void AsymetricDecryptRequest::clear_receiverid() { receiverid_ = 0; } @@ -6066,7 +6491,7 @@ inline void AsymetricDecryptRequest::set_receiverid(::PROTOBUF_NAMESPACE_ID::int // @@protoc_insertion_point(field_set:crypto.AsymetricDecryptRequest.receiverId) } -// string keyId = 2; +// string keyId = 3; inline void AsymetricDecryptRequest::clear_keyid() { keyid_.ClearToEmpty(); } @@ -6112,7 +6537,7 @@ inline void AsymetricDecryptRequest::set_allocated_keyid(std::string* keyid) { // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricDecryptRequest.keyId) } -// bytes data = 3; +// bytes data = 4; inline void AsymetricDecryptRequest::clear_data() { data_.ClearToEmpty(); } @@ -6158,11 +6583,77 @@ inline void AsymetricDecryptRequest::set_allocated_data(std::string* data) { // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricDecryptRequest.data) } +// string messageId = 5; +inline void AsymetricDecryptRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& AsymetricDecryptRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.AsymetricDecryptRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AsymetricDecryptRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AsymetricDecryptRequest.messageId) +} +inline std::string* AsymetricDecryptRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.AsymetricDecryptRequest.messageId) + return _s; +} +inline const std::string& AsymetricDecryptRequest::_internal_messageid() const { + return messageid_.Get(); +} +inline void AsymetricDecryptRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AsymetricDecryptRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AsymetricDecryptRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.AsymetricDecryptRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AsymetricDecryptRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricDecryptRequest.messageId) +} + // ------------------------------------------------------------------- // GetHashLengthRequest -// .crypto.SHAAlgorithm func = 1; +// int32 senderId = 1; +inline void GetHashLengthRequest::clear_senderid() { + senderid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetHashLengthRequest::_internal_senderid() const { + return senderid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetHashLengthRequest::senderid() const { + // @@protoc_insertion_point(field_get:crypto.GetHashLengthRequest.senderId) + return _internal_senderid(); +} +inline void GetHashLengthRequest::_internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + senderid_ = value; +} +inline void GetHashLengthRequest::set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_senderid(value); + // @@protoc_insertion_point(field_set:crypto.GetHashLengthRequest.senderId) +} + +// .crypto.SHAAlgorithm func = 2; inline void GetHashLengthRequest::clear_func() { func_ = 0; } @@ -6182,7 +6673,7 @@ inline void GetHashLengthRequest::set_func(::crypto::SHAAlgorithm value) { // @@protoc_insertion_point(field_set:crypto.GetHashLengthRequest.func) } -// int32 dataLen = 2; +// int32 dataLen = 3; inline void GetHashLengthRequest::clear_datalen() { datalen_ = 0; } @@ -6202,11 +6693,77 @@ inline void GetHashLengthRequest::set_datalen(::PROTOBUF_NAMESPACE_ID::int32 val // @@protoc_insertion_point(field_set:crypto.GetHashLengthRequest.dataLen) } +// string messageId = 4; +inline void GetHashLengthRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& GetHashLengthRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.GetHashLengthRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GetHashLengthRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.GetHashLengthRequest.messageId) +} +inline std::string* GetHashLengthRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.GetHashLengthRequest.messageId) + return _s; +} +inline const std::string& GetHashLengthRequest::_internal_messageid() const { + return messageid_.Get(); +} +inline void GetHashLengthRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GetHashLengthRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GetHashLengthRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.GetHashLengthRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void GetHashLengthRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.GetHashLengthRequest.messageId) +} + // ------------------------------------------------------------------- // GetAESLengthRequest -// int32 dataLen = 1; +// int32 senderId = 1; +inline void GetAESLengthRequest::clear_senderid() { + senderid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetAESLengthRequest::_internal_senderid() const { + return senderid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetAESLengthRequest::senderid() const { + // @@protoc_insertion_point(field_get:crypto.GetAESLengthRequest.senderId) + return _internal_senderid(); +} +inline void GetAESLengthRequest::_internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + senderid_ = value; +} +inline void GetAESLengthRequest::set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_senderid(value); + // @@protoc_insertion_point(field_set:crypto.GetAESLengthRequest.senderId) +} + +// int32 dataLen = 2; inline void GetAESLengthRequest::clear_datalen() { datalen_ = 0; } @@ -6226,7 +6783,7 @@ inline void GetAESLengthRequest::set_datalen(::PROTOBUF_NAMESPACE_ID::int32 valu // @@protoc_insertion_point(field_set:crypto.GetAESLengthRequest.dataLen) } -// bool isFirst = 2; +// bool isFirst = 3; inline void GetAESLengthRequest::clear_isfirst() { isfirst_ = false; } @@ -6246,7 +6803,7 @@ inline void GetAESLengthRequest::set_isfirst(bool value) { // @@protoc_insertion_point(field_set:crypto.GetAESLengthRequest.isFirst) } -// .crypto.AESChainingMode chainingMode = 3; +// .crypto.AESChainingMode chainingMode = 4; inline void GetAESLengthRequest::clear_chainingmode() { chainingmode_ = 0; } @@ -6266,78 +6823,190 @@ inline void GetAESLengthRequest::set_chainingmode(::crypto::AESChainingMode valu // @@protoc_insertion_point(field_set:crypto.GetAESLengthRequest.chainingMode) } +// string messageId = 5; +inline void GetAESLengthRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& GetAESLengthRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.GetAESLengthRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GetAESLengthRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.GetAESLengthRequest.messageId) +} +inline std::string* GetAESLengthRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.GetAESLengthRequest.messageId) + return _s; +} +inline const std::string& GetAESLengthRequest::_internal_messageid() const { + return messageid_.Get(); +} +inline void GetAESLengthRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GetAESLengthRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GetAESLengthRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.GetAESLengthRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void GetAESLengthRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.GetAESLengthRequest.messageId) +} + // ------------------------------------------------------------------- // AsymetricDecryptResponse -// bytes decrypted_data = 1; -inline void AsymetricDecryptResponse::clear_decrypted_data() { - decrypted_data_.ClearToEmpty(); +// bytes decryptedData = 1; +inline void AsymetricDecryptResponse::clear_decrypteddata() { + decrypteddata_.ClearToEmpty(); } -inline const std::string& AsymetricDecryptResponse::decrypted_data() const { - // @@protoc_insertion_point(field_get:crypto.AsymetricDecryptResponse.decrypted_data) - return _internal_decrypted_data(); +inline const std::string& AsymetricDecryptResponse::decrypteddata() const { + // @@protoc_insertion_point(field_get:crypto.AsymetricDecryptResponse.decryptedData) + return _internal_decrypteddata(); } template inline PROTOBUF_ALWAYS_INLINE -void AsymetricDecryptResponse::set_decrypted_data(ArgT0&& arg0, ArgT... args) { +void AsymetricDecryptResponse::set_decrypteddata(ArgT0&& arg0, ArgT... args) { - decrypted_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.AsymetricDecryptResponse.decrypted_data) + decrypteddata_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AsymetricDecryptResponse.decryptedData) } -inline std::string* AsymetricDecryptResponse::mutable_decrypted_data() { - std::string* _s = _internal_mutable_decrypted_data(); - // @@protoc_insertion_point(field_mutable:crypto.AsymetricDecryptResponse.decrypted_data) +inline std::string* AsymetricDecryptResponse::mutable_decrypteddata() { + std::string* _s = _internal_mutable_decrypteddata(); + // @@protoc_insertion_point(field_mutable:crypto.AsymetricDecryptResponse.decryptedData) return _s; } -inline const std::string& AsymetricDecryptResponse::_internal_decrypted_data() const { - return decrypted_data_.Get(); +inline const std::string& AsymetricDecryptResponse::_internal_decrypteddata() const { + return decrypteddata_.Get(); } -inline void AsymetricDecryptResponse::_internal_set_decrypted_data(const std::string& value) { +inline void AsymetricDecryptResponse::_internal_set_decrypteddata(const std::string& value) { - decrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + decrypteddata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* AsymetricDecryptResponse::_internal_mutable_decrypted_data() { +inline std::string* AsymetricDecryptResponse::_internal_mutable_decrypteddata() { - return decrypted_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return decrypteddata_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* AsymetricDecryptResponse::release_decrypted_data() { - // @@protoc_insertion_point(field_release:crypto.AsymetricDecryptResponse.decrypted_data) - return decrypted_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* AsymetricDecryptResponse::release_decrypteddata() { + // @@protoc_insertion_point(field_release:crypto.AsymetricDecryptResponse.decryptedData) + return decrypteddata_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void AsymetricDecryptResponse::set_allocated_decrypted_data(std::string* decrypted_data) { - if (decrypted_data != nullptr) { +inline void AsymetricDecryptResponse::set_allocated_decrypteddata(std::string* decrypteddata) { + if (decrypteddata != nullptr) { } else { } - decrypted_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), decrypted_data, + decrypteddata_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), decrypteddata, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricDecryptResponse.decrypted_data) + // @@protoc_insertion_point(field_set_allocated:crypto.AsymetricDecryptResponse.decryptedData) } // ------------------------------------------------------------------- // GetLengthRequest -// int32 in_len = 1; -inline void GetLengthRequest::clear_in_len() { - in_len_ = 0; +// int32 senderId = 1; +inline void GetLengthRequest::clear_senderid() { + senderid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetLengthRequest::_internal_senderid() const { + return senderid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetLengthRequest::senderid() const { + // @@protoc_insertion_point(field_get:crypto.GetLengthRequest.senderId) + return _internal_senderid(); +} +inline void GetLengthRequest::_internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + senderid_ = value; +} +inline void GetLengthRequest::set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_senderid(value); + // @@protoc_insertion_point(field_set:crypto.GetLengthRequest.senderId) +} + +// int32 inLen = 2; +inline void GetLengthRequest::clear_inlen() { + inlen_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetLengthRequest::_internal_inlen() const { + return inlen_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetLengthRequest::inlen() const { + // @@protoc_insertion_point(field_get:crypto.GetLengthRequest.inLen) + return _internal_inlen(); +} +inline void GetLengthRequest::_internal_set_inlen(::PROTOBUF_NAMESPACE_ID::int32 value) { + + inlen_ = value; +} +inline void GetLengthRequest::set_inlen(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_inlen(value); + // @@protoc_insertion_point(field_set:crypto.GetLengthRequest.inLen) +} + +// string messageId = 3; +inline void GetLengthRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& GetLengthRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.GetLengthRequest.messageId) + return _internal_messageid(); } -inline ::PROTOBUF_NAMESPACE_ID::int32 GetLengthRequest::_internal_in_len() const { - return in_len_; +template +inline PROTOBUF_ALWAYS_INLINE +void GetLengthRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.GetLengthRequest.messageId) +} +inline std::string* GetLengthRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.GetLengthRequest.messageId) + return _s; } -inline ::PROTOBUF_NAMESPACE_ID::int32 GetLengthRequest::in_len() const { - // @@protoc_insertion_point(field_get:crypto.GetLengthRequest.in_len) - return _internal_in_len(); +inline const std::string& GetLengthRequest::_internal_messageid() const { + return messageid_.Get(); } -inline void GetLengthRequest::_internal_set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void GetLengthRequest::_internal_set_messageid(const std::string& value) { - in_len_ = value; + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline void GetLengthRequest::set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_in_len(value); - // @@protoc_insertion_point(field_set:crypto.GetLengthRequest.in_len) +inline std::string* GetLengthRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GetLengthRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.GetLengthRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void GetLengthRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.GetLengthRequest.messageId) } // ------------------------------------------------------------------- @@ -6428,28 +7097,74 @@ inline void GetWholeLength::set_isfirst(bool value) { // @@protoc_insertion_point(field_set:crypto.GetWholeLength.isFirst) } +// string messageId = 4; +inline void GetWholeLength::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& GetWholeLength::messageid() const { + // @@protoc_insertion_point(field_get:crypto.GetWholeLength.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GetWholeLength::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.GetWholeLength.messageId) +} +inline std::string* GetWholeLength::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.GetWholeLength.messageId) + return _s; +} +inline const std::string& GetWholeLength::_internal_messageid() const { + return messageid_.Get(); +} +inline void GetWholeLength::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GetWholeLength::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GetWholeLength::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.GetWholeLength.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void GetWholeLength::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.GetWholeLength.messageId) +} + // ------------------------------------------------------------------- // GenerateAESKeyRequest -// int32 user_id = 1; -inline void GenerateAESKeyRequest::clear_user_id() { - user_id_ = 0; +// int32 userId = 1; +inline void GenerateAESKeyRequest::clear_userid() { + userid_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 GenerateAESKeyRequest::_internal_user_id() const { - return user_id_; +inline ::PROTOBUF_NAMESPACE_ID::int32 GenerateAESKeyRequest::_internal_userid() const { + return userid_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 GenerateAESKeyRequest::user_id() const { - // @@protoc_insertion_point(field_get:crypto.GenerateAESKeyRequest.user_id) - return _internal_user_id(); +inline ::PROTOBUF_NAMESPACE_ID::int32 GenerateAESKeyRequest::userid() const { + // @@protoc_insertion_point(field_get:crypto.GenerateAESKeyRequest.userId) + return _internal_userid(); } -inline void GenerateAESKeyRequest::_internal_set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void GenerateAESKeyRequest::_internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { - user_id_ = value; + userid_ = value; } -inline void GenerateAESKeyRequest::set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_user_id(value); - // @@protoc_insertion_point(field_set:crypto.GenerateAESKeyRequest.user_id) +inline void GenerateAESKeyRequest::set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_userid(value); + // @@protoc_insertion_point(field_set:crypto.GenerateAESKeyRequest.userId) } // repeated .crypto.KeyPermission permissions = 2; @@ -6535,78 +7250,124 @@ inline void GenerateAESKeyRequest::set_destuserid(::PROTOBUF_NAMESPACE_ID::int32 // @@protoc_insertion_point(field_set:crypto.GenerateAESKeyRequest.destUserId) } +// string messageId = 5; +inline void GenerateAESKeyRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& GenerateAESKeyRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.GenerateAESKeyRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GenerateAESKeyRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.GenerateAESKeyRequest.messageId) +} +inline std::string* GenerateAESKeyRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.GenerateAESKeyRequest.messageId) + return _s; +} +inline const std::string& GenerateAESKeyRequest::_internal_messageid() const { + return messageid_.Get(); +} +inline void GenerateAESKeyRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GenerateAESKeyRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GenerateAESKeyRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.GenerateAESKeyRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void GenerateAESKeyRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.GenerateAESKeyRequest.messageId) +} + // ------------------------------------------------------------------- // GenerateAESKeyResponse -// string aes_key = 1; -inline void GenerateAESKeyResponse::clear_aes_key() { - aes_key_.ClearToEmpty(); +// string aesKey = 1; +inline void GenerateAESKeyResponse::clear_aeskey() { + aeskey_.ClearToEmpty(); } -inline const std::string& GenerateAESKeyResponse::aes_key() const { - // @@protoc_insertion_point(field_get:crypto.GenerateAESKeyResponse.aes_key) - return _internal_aes_key(); +inline const std::string& GenerateAESKeyResponse::aeskey() const { + // @@protoc_insertion_point(field_get:crypto.GenerateAESKeyResponse.aesKey) + return _internal_aeskey(); } template inline PROTOBUF_ALWAYS_INLINE -void GenerateAESKeyResponse::set_aes_key(ArgT0&& arg0, ArgT... args) { +void GenerateAESKeyResponse::set_aeskey(ArgT0&& arg0, ArgT... args) { - aes_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.GenerateAESKeyResponse.aes_key) + aeskey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.GenerateAESKeyResponse.aesKey) } -inline std::string* GenerateAESKeyResponse::mutable_aes_key() { - std::string* _s = _internal_mutable_aes_key(); - // @@protoc_insertion_point(field_mutable:crypto.GenerateAESKeyResponse.aes_key) +inline std::string* GenerateAESKeyResponse::mutable_aeskey() { + std::string* _s = _internal_mutable_aeskey(); + // @@protoc_insertion_point(field_mutable:crypto.GenerateAESKeyResponse.aesKey) return _s; } -inline const std::string& GenerateAESKeyResponse::_internal_aes_key() const { - return aes_key_.Get(); +inline const std::string& GenerateAESKeyResponse::_internal_aeskey() const { + return aeskey_.Get(); } -inline void GenerateAESKeyResponse::_internal_set_aes_key(const std::string& value) { +inline void GenerateAESKeyResponse::_internal_set_aeskey(const std::string& value) { - aes_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + aeskey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* GenerateAESKeyResponse::_internal_mutable_aes_key() { +inline std::string* GenerateAESKeyResponse::_internal_mutable_aeskey() { - return aes_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return aeskey_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* GenerateAESKeyResponse::release_aes_key() { - // @@protoc_insertion_point(field_release:crypto.GenerateAESKeyResponse.aes_key) - return aes_key_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* GenerateAESKeyResponse::release_aeskey() { + // @@protoc_insertion_point(field_release:crypto.GenerateAESKeyResponse.aesKey) + return aeskey_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void GenerateAESKeyResponse::set_allocated_aes_key(std::string* aes_key) { - if (aes_key != nullptr) { +inline void GenerateAESKeyResponse::set_allocated_aeskey(std::string* aeskey) { + if (aeskey != nullptr) { } else { } - aes_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), aes_key, + aeskey_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), aeskey, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.GenerateAESKeyResponse.aes_key) + // @@protoc_insertion_point(field_set_allocated:crypto.GenerateAESKeyResponse.aesKey) } // ------------------------------------------------------------------- // GenerateKeyPairRequest -// int32 user_id = 1; -inline void GenerateKeyPairRequest::clear_user_id() { - user_id_ = 0; +// int32 userId = 1; +inline void GenerateKeyPairRequest::clear_userid() { + userid_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 GenerateKeyPairRequest::_internal_user_id() const { - return user_id_; +inline ::PROTOBUF_NAMESPACE_ID::int32 GenerateKeyPairRequest::_internal_userid() const { + return userid_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 GenerateKeyPairRequest::user_id() const { - // @@protoc_insertion_point(field_get:crypto.GenerateKeyPairRequest.user_id) - return _internal_user_id(); +inline ::PROTOBUF_NAMESPACE_ID::int32 GenerateKeyPairRequest::userid() const { + // @@protoc_insertion_point(field_get:crypto.GenerateKeyPairRequest.userId) + return _internal_userid(); } -inline void GenerateKeyPairRequest::_internal_set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void GenerateKeyPairRequest::_internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { - user_id_ = value; + userid_ = value; } -inline void GenerateKeyPairRequest::set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_user_id(value); - // @@protoc_insertion_point(field_set:crypto.GenerateKeyPairRequest.user_id) +inline void GenerateKeyPairRequest::set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_userid(value); + // @@protoc_insertion_point(field_set:crypto.GenerateKeyPairRequest.userId) } // repeated .crypto.KeyPermission permissions = 2; @@ -6652,124 +7413,170 @@ GenerateKeyPairRequest::mutable_permissions() { return _internal_mutable_permissions(); } +// string messageId = 3; +inline void GenerateKeyPairRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& GenerateKeyPairRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.GenerateKeyPairRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GenerateKeyPairRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.GenerateKeyPairRequest.messageId) +} +inline std::string* GenerateKeyPairRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.GenerateKeyPairRequest.messageId) + return _s; +} +inline const std::string& GenerateKeyPairRequest::_internal_messageid() const { + return messageid_.Get(); +} +inline void GenerateKeyPairRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GenerateKeyPairRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GenerateKeyPairRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.GenerateKeyPairRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void GenerateKeyPairRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.GenerateKeyPairRequest.messageId) +} + // ------------------------------------------------------------------- // GenerateKeyPairResponse -// string public_key = 1; -inline void GenerateKeyPairResponse::clear_public_key() { - public_key_.ClearToEmpty(); +// string publicKey = 1; +inline void GenerateKeyPairResponse::clear_publickey() { + publickey_.ClearToEmpty(); } -inline const std::string& GenerateKeyPairResponse::public_key() const { - // @@protoc_insertion_point(field_get:crypto.GenerateKeyPairResponse.public_key) - return _internal_public_key(); +inline const std::string& GenerateKeyPairResponse::publickey() const { + // @@protoc_insertion_point(field_get:crypto.GenerateKeyPairResponse.publicKey) + return _internal_publickey(); } template inline PROTOBUF_ALWAYS_INLINE -void GenerateKeyPairResponse::set_public_key(ArgT0&& arg0, ArgT... args) { +void GenerateKeyPairResponse::set_publickey(ArgT0&& arg0, ArgT... args) { - public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.GenerateKeyPairResponse.public_key) + publickey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.GenerateKeyPairResponse.publicKey) } -inline std::string* GenerateKeyPairResponse::mutable_public_key() { - std::string* _s = _internal_mutable_public_key(); - // @@protoc_insertion_point(field_mutable:crypto.GenerateKeyPairResponse.public_key) +inline std::string* GenerateKeyPairResponse::mutable_publickey() { + std::string* _s = _internal_mutable_publickey(); + // @@protoc_insertion_point(field_mutable:crypto.GenerateKeyPairResponse.publicKey) return _s; } -inline const std::string& GenerateKeyPairResponse::_internal_public_key() const { - return public_key_.Get(); +inline const std::string& GenerateKeyPairResponse::_internal_publickey() const { + return publickey_.Get(); } -inline void GenerateKeyPairResponse::_internal_set_public_key(const std::string& value) { +inline void GenerateKeyPairResponse::_internal_set_publickey(const std::string& value) { - public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + publickey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* GenerateKeyPairResponse::_internal_mutable_public_key() { +inline std::string* GenerateKeyPairResponse::_internal_mutable_publickey() { - return public_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return publickey_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* GenerateKeyPairResponse::release_public_key() { - // @@protoc_insertion_point(field_release:crypto.GenerateKeyPairResponse.public_key) - return public_key_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* GenerateKeyPairResponse::release_publickey() { + // @@protoc_insertion_point(field_release:crypto.GenerateKeyPairResponse.publicKey) + return publickey_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void GenerateKeyPairResponse::set_allocated_public_key(std::string* public_key) { - if (public_key != nullptr) { +inline void GenerateKeyPairResponse::set_allocated_publickey(std::string* publickey) { + if (publickey != nullptr) { } else { } - public_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), public_key, + publickey_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), publickey, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.GenerateKeyPairResponse.public_key) + // @@protoc_insertion_point(field_set_allocated:crypto.GenerateKeyPairResponse.publicKey) } -// string private_key = 2; -inline void GenerateKeyPairResponse::clear_private_key() { - private_key_.ClearToEmpty(); +// string privateKey = 2; +inline void GenerateKeyPairResponse::clear_privatekey() { + privatekey_.ClearToEmpty(); } -inline const std::string& GenerateKeyPairResponse::private_key() const { - // @@protoc_insertion_point(field_get:crypto.GenerateKeyPairResponse.private_key) - return _internal_private_key(); +inline const std::string& GenerateKeyPairResponse::privatekey() const { + // @@protoc_insertion_point(field_get:crypto.GenerateKeyPairResponse.privateKey) + return _internal_privatekey(); } template inline PROTOBUF_ALWAYS_INLINE -void GenerateKeyPairResponse::set_private_key(ArgT0&& arg0, ArgT... args) { +void GenerateKeyPairResponse::set_privatekey(ArgT0&& arg0, ArgT... args) { - private_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.GenerateKeyPairResponse.private_key) + privatekey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.GenerateKeyPairResponse.privateKey) } -inline std::string* GenerateKeyPairResponse::mutable_private_key() { - std::string* _s = _internal_mutable_private_key(); - // @@protoc_insertion_point(field_mutable:crypto.GenerateKeyPairResponse.private_key) +inline std::string* GenerateKeyPairResponse::mutable_privatekey() { + std::string* _s = _internal_mutable_privatekey(); + // @@protoc_insertion_point(field_mutable:crypto.GenerateKeyPairResponse.privateKey) return _s; } -inline const std::string& GenerateKeyPairResponse::_internal_private_key() const { - return private_key_.Get(); +inline const std::string& GenerateKeyPairResponse::_internal_privatekey() const { + return privatekey_.Get(); } -inline void GenerateKeyPairResponse::_internal_set_private_key(const std::string& value) { +inline void GenerateKeyPairResponse::_internal_set_privatekey(const std::string& value) { - private_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + privatekey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* GenerateKeyPairResponse::_internal_mutable_private_key() { +inline std::string* GenerateKeyPairResponse::_internal_mutable_privatekey() { - return private_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return privatekey_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* GenerateKeyPairResponse::release_private_key() { - // @@protoc_insertion_point(field_release:crypto.GenerateKeyPairResponse.private_key) - return private_key_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* GenerateKeyPairResponse::release_privatekey() { + // @@protoc_insertion_point(field_release:crypto.GenerateKeyPairResponse.privateKey) + return privatekey_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void GenerateKeyPairResponse::set_allocated_private_key(std::string* private_key) { - if (private_key != nullptr) { +inline void GenerateKeyPairResponse::set_allocated_privatekey(std::string* privatekey) { + if (privatekey != nullptr) { } else { } - private_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), private_key, + privatekey_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), privatekey, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.GenerateKeyPairResponse.private_key) + // @@protoc_insertion_point(field_set_allocated:crypto.GenerateKeyPairResponse.privateKey) } // ------------------------------------------------------------------- // SignRequest -// int32 sender_id = 1; -inline void SignRequest::clear_sender_id() { - sender_id_ = 0; +// int32 senderId = 1; +inline void SignRequest::clear_senderid() { + senderid_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 SignRequest::_internal_sender_id() const { - return sender_id_; +inline ::PROTOBUF_NAMESPACE_ID::int32 SignRequest::_internal_senderid() const { + return senderid_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 SignRequest::sender_id() const { - // @@protoc_insertion_point(field_get:crypto.SignRequest.sender_id) - return _internal_sender_id(); +inline ::PROTOBUF_NAMESPACE_ID::int32 SignRequest::senderid() const { + // @@protoc_insertion_point(field_get:crypto.SignRequest.senderId) + return _internal_senderid(); } -inline void SignRequest::_internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void SignRequest::_internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { - sender_id_ = value; + senderid_ = value; } -inline void SignRequest::set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_sender_id(value); - // @@protoc_insertion_point(field_set:crypto.SignRequest.sender_id) +inline void SignRequest::set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_senderid(value); + // @@protoc_insertion_point(field_set:crypto.SignRequest.senderId) } // bytes data = 2; @@ -6818,24 +7625,24 @@ inline void SignRequest::set_allocated_data(std::string* data) { // @@protoc_insertion_point(field_set_allocated:crypto.SignRequest.data) } -// .crypto.SHAAlgorithm hash_func = 3; -inline void SignRequest::clear_hash_func() { - hash_func_ = 0; +// .crypto.SHAAlgorithm hashFunc = 3; +inline void SignRequest::clear_hashfunc() { + hashfunc_ = 0; } -inline ::crypto::SHAAlgorithm SignRequest::_internal_hash_func() const { - return static_cast< ::crypto::SHAAlgorithm >(hash_func_); +inline ::crypto::SHAAlgorithm SignRequest::_internal_hashfunc() const { + return static_cast< ::crypto::SHAAlgorithm >(hashfunc_); } -inline ::crypto::SHAAlgorithm SignRequest::hash_func() const { - // @@protoc_insertion_point(field_get:crypto.SignRequest.hash_func) - return _internal_hash_func(); +inline ::crypto::SHAAlgorithm SignRequest::hashfunc() const { + // @@protoc_insertion_point(field_get:crypto.SignRequest.hashFunc) + return _internal_hashfunc(); } -inline void SignRequest::_internal_set_hash_func(::crypto::SHAAlgorithm value) { +inline void SignRequest::_internal_set_hashfunc(::crypto::SHAAlgorithm value) { - hash_func_ = value; + hashfunc_ = value; } -inline void SignRequest::set_hash_func(::crypto::SHAAlgorithm value) { - _internal_set_hash_func(value); - // @@protoc_insertion_point(field_set:crypto.SignRequest.hash_func) +inline void SignRequest::set_hashfunc(::crypto::SHAAlgorithm value) { + _internal_set_hashfunc(value); + // @@protoc_insertion_point(field_set:crypto.SignRequest.hashFunc) } // int64 counter = 5; @@ -6858,50 +7665,96 @@ inline void SignRequest::set_counter(::PROTOBUF_NAMESPACE_ID::int64 value) { // @@protoc_insertion_point(field_set:crypto.SignRequest.counter) } -// string key_id = 6; -inline void SignRequest::clear_key_id() { - key_id_.ClearToEmpty(); +// string keyId = 6; +inline void SignRequest::clear_keyid() { + keyid_.ClearToEmpty(); } -inline const std::string& SignRequest::key_id() const { - // @@protoc_insertion_point(field_get:crypto.SignRequest.key_id) - return _internal_key_id(); +inline const std::string& SignRequest::keyid() const { + // @@protoc_insertion_point(field_get:crypto.SignRequest.keyId) + return _internal_keyid(); } template inline PROTOBUF_ALWAYS_INLINE -void SignRequest::set_key_id(ArgT0&& arg0, ArgT... args) { +void SignRequest::set_keyid(ArgT0&& arg0, ArgT... args) { - key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.SignRequest.key_id) + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.SignRequest.keyId) } -inline std::string* SignRequest::mutable_key_id() { - std::string* _s = _internal_mutable_key_id(); - // @@protoc_insertion_point(field_mutable:crypto.SignRequest.key_id) +inline std::string* SignRequest::mutable_keyid() { + std::string* _s = _internal_mutable_keyid(); + // @@protoc_insertion_point(field_mutable:crypto.SignRequest.keyId) return _s; } -inline const std::string& SignRequest::_internal_key_id() const { - return key_id_.Get(); +inline const std::string& SignRequest::_internal_keyid() const { + return keyid_.Get(); +} +inline void SignRequest::_internal_set_keyid(const std::string& value) { + + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SignRequest::_internal_mutable_keyid() { + + return keyid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SignRequest::release_keyid() { + // @@protoc_insertion_point(field_release:crypto.SignRequest.keyId) + return keyid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void SignRequest::set_allocated_keyid(std::string* keyid) { + if (keyid != nullptr) { + + } else { + + } + keyid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), keyid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.SignRequest.keyId) +} + +// string messageId = 7; +inline void SignRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& SignRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.SignRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SignRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.SignRequest.messageId) +} +inline std::string* SignRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.SignRequest.messageId) + return _s; +} +inline const std::string& SignRequest::_internal_messageid() const { + return messageid_.Get(); } -inline void SignRequest::_internal_set_key_id(const std::string& value) { +inline void SignRequest::_internal_set_messageid(const std::string& value) { - key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* SignRequest::_internal_mutable_key_id() { +inline std::string* SignRequest::_internal_mutable_messageid() { - return key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* SignRequest::release_key_id() { - // @@protoc_insertion_point(field_release:crypto.SignRequest.key_id) - return key_id_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* SignRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.SignRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void SignRequest::set_allocated_key_id(std::string* key_id) { - if (key_id != nullptr) { +inline void SignRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { } else { } - key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key_id, + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.SignRequest.key_id) + // @@protoc_insertion_point(field_set_allocated:crypto.SignRequest.messageId) } // ------------------------------------------------------------------- @@ -6958,44 +7811,44 @@ inline void SignResponse::set_allocated_signature(std::string* signature) { // VerifyRequest -// int32 sender_id = 1; -inline void VerifyRequest::clear_sender_id() { - sender_id_ = 0; +// int32 senderId = 1; +inline void VerifyRequest::clear_senderid() { + senderid_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 VerifyRequest::_internal_sender_id() const { - return sender_id_; +inline ::PROTOBUF_NAMESPACE_ID::int32 VerifyRequest::_internal_senderid() const { + return senderid_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 VerifyRequest::sender_id() const { - // @@protoc_insertion_point(field_get:crypto.VerifyRequest.sender_id) - return _internal_sender_id(); +inline ::PROTOBUF_NAMESPACE_ID::int32 VerifyRequest::senderid() const { + // @@protoc_insertion_point(field_get:crypto.VerifyRequest.senderId) + return _internal_senderid(); } -inline void VerifyRequest::_internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void VerifyRequest::_internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { - sender_id_ = value; + senderid_ = value; } -inline void VerifyRequest::set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_sender_id(value); - // @@protoc_insertion_point(field_set:crypto.VerifyRequest.sender_id) +inline void VerifyRequest::set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_senderid(value); + // @@protoc_insertion_point(field_set:crypto.VerifyRequest.senderId) } -// int32 receiver_id = 2; -inline void VerifyRequest::clear_receiver_id() { - receiver_id_ = 0; +// int32 receiverId = 2; +inline void VerifyRequest::clear_receiverid() { + receiverid_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 VerifyRequest::_internal_receiver_id() const { - return receiver_id_; +inline ::PROTOBUF_NAMESPACE_ID::int32 VerifyRequest::_internal_receiverid() const { + return receiverid_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 VerifyRequest::receiver_id() const { - // @@protoc_insertion_point(field_get:crypto.VerifyRequest.receiver_id) - return _internal_receiver_id(); +inline ::PROTOBUF_NAMESPACE_ID::int32 VerifyRequest::receiverid() const { + // @@protoc_insertion_point(field_get:crypto.VerifyRequest.receiverId) + return _internal_receiverid(); } -inline void VerifyRequest::_internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void VerifyRequest::_internal_set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value) { - receiver_id_ = value; + receiverid_ = value; } -inline void VerifyRequest::set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_receiver_id(value); - // @@protoc_insertion_point(field_set:crypto.VerifyRequest.receiver_id) +inline void VerifyRequest::set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_receiverid(value); + // @@protoc_insertion_point(field_set:crypto.VerifyRequest.receiverId) } // bytes data = 3; @@ -7090,70 +7943,70 @@ inline void VerifyRequest::set_allocated_signature(std::string* signature) { // @@protoc_insertion_point(field_set_allocated:crypto.VerifyRequest.signature) } -// .crypto.SHAAlgorithm hash_func = 5; -inline void VerifyRequest::clear_hash_func() { - hash_func_ = 0; +// .crypto.SHAAlgorithm hashFunc = 5; +inline void VerifyRequest::clear_hashfunc() { + hashfunc_ = 0; } -inline ::crypto::SHAAlgorithm VerifyRequest::_internal_hash_func() const { - return static_cast< ::crypto::SHAAlgorithm >(hash_func_); +inline ::crypto::SHAAlgorithm VerifyRequest::_internal_hashfunc() const { + return static_cast< ::crypto::SHAAlgorithm >(hashfunc_); } -inline ::crypto::SHAAlgorithm VerifyRequest::hash_func() const { - // @@protoc_insertion_point(field_get:crypto.VerifyRequest.hash_func) - return _internal_hash_func(); +inline ::crypto::SHAAlgorithm VerifyRequest::hashfunc() const { + // @@protoc_insertion_point(field_get:crypto.VerifyRequest.hashFunc) + return _internal_hashfunc(); } -inline void VerifyRequest::_internal_set_hash_func(::crypto::SHAAlgorithm value) { +inline void VerifyRequest::_internal_set_hashfunc(::crypto::SHAAlgorithm value) { - hash_func_ = value; + hashfunc_ = value; } -inline void VerifyRequest::set_hash_func(::crypto::SHAAlgorithm value) { - _internal_set_hash_func(value); - // @@protoc_insertion_point(field_set:crypto.VerifyRequest.hash_func) +inline void VerifyRequest::set_hashfunc(::crypto::SHAAlgorithm value) { + _internal_set_hashfunc(value); + // @@protoc_insertion_point(field_set:crypto.VerifyRequest.hashFunc) } -// string key_id = 6; -inline void VerifyRequest::clear_key_id() { - key_id_.ClearToEmpty(); +// string keyId = 6; +inline void VerifyRequest::clear_keyid() { + keyid_.ClearToEmpty(); } -inline const std::string& VerifyRequest::key_id() const { - // @@protoc_insertion_point(field_get:crypto.VerifyRequest.key_id) - return _internal_key_id(); +inline const std::string& VerifyRequest::keyid() const { + // @@protoc_insertion_point(field_get:crypto.VerifyRequest.keyId) + return _internal_keyid(); } template inline PROTOBUF_ALWAYS_INLINE -void VerifyRequest::set_key_id(ArgT0&& arg0, ArgT... args) { +void VerifyRequest::set_keyid(ArgT0&& arg0, ArgT... args) { - key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.VerifyRequest.key_id) + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.VerifyRequest.keyId) } -inline std::string* VerifyRequest::mutable_key_id() { - std::string* _s = _internal_mutable_key_id(); - // @@protoc_insertion_point(field_mutable:crypto.VerifyRequest.key_id) +inline std::string* VerifyRequest::mutable_keyid() { + std::string* _s = _internal_mutable_keyid(); + // @@protoc_insertion_point(field_mutable:crypto.VerifyRequest.keyId) return _s; } -inline const std::string& VerifyRequest::_internal_key_id() const { - return key_id_.Get(); +inline const std::string& VerifyRequest::_internal_keyid() const { + return keyid_.Get(); } -inline void VerifyRequest::_internal_set_key_id(const std::string& value) { +inline void VerifyRequest::_internal_set_keyid(const std::string& value) { - key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* VerifyRequest::_internal_mutable_key_id() { +inline std::string* VerifyRequest::_internal_mutable_keyid() { - return key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return keyid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* VerifyRequest::release_key_id() { - // @@protoc_insertion_point(field_release:crypto.VerifyRequest.key_id) - return key_id_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* VerifyRequest::release_keyid() { + // @@protoc_insertion_point(field_release:crypto.VerifyRequest.keyId) + return keyid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void VerifyRequest::set_allocated_key_id(std::string* key_id) { - if (key_id != nullptr) { +inline void VerifyRequest::set_allocated_keyid(std::string* keyid) { + if (keyid != nullptr) { } else { } - key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key_id, + keyid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), keyid, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.VerifyRequest.key_id) + // @@protoc_insertion_point(field_set_allocated:crypto.VerifyRequest.keyId) } // int32 counter = 7; @@ -7176,6 +8029,52 @@ inline void VerifyRequest::set_counter(::PROTOBUF_NAMESPACE_ID::int32 value) { // @@protoc_insertion_point(field_set:crypto.VerifyRequest.counter) } +// string messageId = 8; +inline void VerifyRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& VerifyRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.VerifyRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void VerifyRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.VerifyRequest.messageId) +} +inline std::string* VerifyRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.VerifyRequest.messageId) + return _s; +} +inline const std::string& VerifyRequest::_internal_messageid() const { + return messageid_.Get(); +} +inline void VerifyRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* VerifyRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* VerifyRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.VerifyRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void VerifyRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.VerifyRequest.messageId) +} + // ------------------------------------------------------------------- // VerifyResponse @@ -7250,24 +8149,90 @@ inline void VerifyResponse::set_allocated_out(std::string* out) { // KeyRequest -// int32 user_id = 1; -inline void KeyRequest::clear_user_id() { - user_id_ = 0; +// int32 senderId = 1; +inline void KeyRequest::clear_senderid() { + senderid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 KeyRequest::_internal_senderid() const { + return senderid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 KeyRequest::senderid() const { + // @@protoc_insertion_point(field_get:crypto.KeyRequest.senderId) + return _internal_senderid(); +} +inline void KeyRequest::_internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + senderid_ = value; +} +inline void KeyRequest::set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_senderid(value); + // @@protoc_insertion_point(field_set:crypto.KeyRequest.senderId) +} + +// int32 userId = 2; +inline void KeyRequest::clear_userid() { + userid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 KeyRequest::_internal_userid() const { + return userid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 KeyRequest::userid() const { + // @@protoc_insertion_point(field_get:crypto.KeyRequest.userId) + return _internal_userid(); +} +inline void KeyRequest::_internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + userid_ = value; +} +inline void KeyRequest::set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_userid(value); + // @@protoc_insertion_point(field_set:crypto.KeyRequest.userId) +} + +// string messageId = 3; +inline void KeyRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& KeyRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.KeyRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void KeyRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.KeyRequest.messageId) } -inline ::PROTOBUF_NAMESPACE_ID::int32 KeyRequest::_internal_user_id() const { - return user_id_; +inline std::string* KeyRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.KeyRequest.messageId) + return _s; +} +inline const std::string& KeyRequest::_internal_messageid() const { + return messageid_.Get(); } -inline ::PROTOBUF_NAMESPACE_ID::int32 KeyRequest::user_id() const { - // @@protoc_insertion_point(field_get:crypto.KeyRequest.user_id) - return _internal_user_id(); +inline void KeyRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline void KeyRequest::_internal_set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline std::string* KeyRequest::_internal_mutable_messageid() { - user_id_ = value; + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* KeyRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.KeyRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void KeyRequest::set_user_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_user_id(value); - // @@protoc_insertion_point(field_set:crypto.KeyRequest.user_id) +inline void KeyRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.KeyRequest.messageId) } // ------------------------------------------------------------------- @@ -7431,6 +8396,52 @@ BootSystemRequest::usersidspermissions() const { return usersidspermissions_; } +// string messageId = 5; +inline void BootSystemRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& BootSystemRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.BootSystemRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BootSystemRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.BootSystemRequest.messageId) +} +inline std::string* BootSystemRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.BootSystemRequest.messageId) + return _s; +} +inline const std::string& BootSystemRequest::_internal_messageid() const { + return messageid_.Get(); +} +inline void BootSystemRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* BootSystemRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* BootSystemRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.BootSystemRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void BootSystemRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.BootSystemRequest.messageId) +} + // ------------------------------------------------------------------- // Empty @@ -7519,6 +8530,52 @@ inline void CryptoConfig::set_asymmetricfunction(::crypto::AsymmetricFunction va // @@protoc_insertion_point(field_set:crypto.CryptoConfig.asymmetricFunction) } +// string messageId = 5; +inline void CryptoConfig::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& CryptoConfig::messageid() const { + // @@protoc_insertion_point(field_get:crypto.CryptoConfig.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CryptoConfig::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.CryptoConfig.messageId) +} +inline std::string* CryptoConfig::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.CryptoConfig.messageId) + return _s; +} +inline const std::string& CryptoConfig::_internal_messageid() const { + return messageid_.Get(); +} +inline void CryptoConfig::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* CryptoConfig::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* CryptoConfig::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.CryptoConfig.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void CryptoConfig::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.CryptoConfig.messageId) +} + // ------------------------------------------------------------------- // ConfigureRequest @@ -7633,6 +8690,52 @@ inline void ConfigureRequest::set_allocated_config(::crypto::CryptoConfig* confi // @@protoc_insertion_point(field_set_allocated:crypto.ConfigureRequest.config) } +// string messageId = 3; +inline void ConfigureRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& ConfigureRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.ConfigureRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConfigureRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.ConfigureRequest.messageId) +} +inline std::string* ConfigureRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.ConfigureRequest.messageId) + return _s; +} +inline const std::string& ConfigureRequest::_internal_messageid() const { + return messageid_.Get(); +} +inline void ConfigureRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConfigureRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConfigureRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.ConfigureRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void ConfigureRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.ConfigureRequest.messageId) +} + // ------------------------------------------------------------------- // AddProcessRequest @@ -7700,48 +8803,94 @@ AddProcessRequest::mutable_permissions() { return _internal_mutable_permissions(); } +// string messageId = 4; +inline void AddProcessRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& AddProcessRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.AddProcessRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AddProcessRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AddProcessRequest.messageId) +} +inline std::string* AddProcessRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.AddProcessRequest.messageId) + return _s; +} +inline const std::string& AddProcessRequest::_internal_messageid() const { + return messageid_.Get(); +} +inline void AddProcessRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AddProcessRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AddProcessRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.AddProcessRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AddProcessRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AddProcessRequest.messageId) +} + // ------------------------------------------------------------------- // EncryptRequest -// int32 sender_id = 1; -inline void EncryptRequest::clear_sender_id() { - sender_id_ = 0; +// int32 senderId = 1; +inline void EncryptRequest::clear_senderid() { + senderid_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 EncryptRequest::_internal_sender_id() const { - return sender_id_; +inline ::PROTOBUF_NAMESPACE_ID::int32 EncryptRequest::_internal_senderid() const { + return senderid_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 EncryptRequest::sender_id() const { - // @@protoc_insertion_point(field_get:crypto.EncryptRequest.sender_id) - return _internal_sender_id(); +inline ::PROTOBUF_NAMESPACE_ID::int32 EncryptRequest::senderid() const { + // @@protoc_insertion_point(field_get:crypto.EncryptRequest.senderId) + return _internal_senderid(); } -inline void EncryptRequest::_internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void EncryptRequest::_internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { - sender_id_ = value; + senderid_ = value; } -inline void EncryptRequest::set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_sender_id(value); - // @@protoc_insertion_point(field_set:crypto.EncryptRequest.sender_id) +inline void EncryptRequest::set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_senderid(value); + // @@protoc_insertion_point(field_set:crypto.EncryptRequest.senderId) } -// int32 receiver_id = 2; -inline void EncryptRequest::clear_receiver_id() { - receiver_id_ = 0; +// int32 receiverId = 2; +inline void EncryptRequest::clear_receiverid() { + receiverid_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 EncryptRequest::_internal_receiver_id() const { - return receiver_id_; +inline ::PROTOBUF_NAMESPACE_ID::int32 EncryptRequest::_internal_receiverid() const { + return receiverid_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 EncryptRequest::receiver_id() const { - // @@protoc_insertion_point(field_get:crypto.EncryptRequest.receiver_id) - return _internal_receiver_id(); +inline ::PROTOBUF_NAMESPACE_ID::int32 EncryptRequest::receiverid() const { + // @@protoc_insertion_point(field_get:crypto.EncryptRequest.receiverId) + return _internal_receiverid(); } -inline void EncryptRequest::_internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void EncryptRequest::_internal_set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value) { - receiver_id_ = value; + receiverid_ = value; } -inline void EncryptRequest::set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_receiver_id(value); - // @@protoc_insertion_point(field_set:crypto.EncryptRequest.receiver_id) +inline void EncryptRequest::set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_receiverid(value); + // @@protoc_insertion_point(field_set:crypto.EncryptRequest.receiverId) } // bytes data = 3; @@ -7830,54 +8979,100 @@ inline void EncryptRequest::set_isfirst(bool value) { // @@protoc_insertion_point(field_set:crypto.EncryptRequest.isFirst) } +// string messageId = 6; +inline void EncryptRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& EncryptRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.EncryptRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EncryptRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.EncryptRequest.messageId) +} +inline std::string* EncryptRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.EncryptRequest.messageId) + return _s; +} +inline const std::string& EncryptRequest::_internal_messageid() const { + return messageid_.Get(); +} +inline void EncryptRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* EncryptRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* EncryptRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.EncryptRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void EncryptRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.EncryptRequest.messageId) +} + // ------------------------------------------------------------------- // EncryptResponse -// bytes encrypted_data = 1; -inline void EncryptResponse::clear_encrypted_data() { - encrypted_data_.ClearToEmpty(); +// bytes encryptedData = 1; +inline void EncryptResponse::clear_encrypteddata() { + encrypteddata_.ClearToEmpty(); } -inline const std::string& EncryptResponse::encrypted_data() const { - // @@protoc_insertion_point(field_get:crypto.EncryptResponse.encrypted_data) - return _internal_encrypted_data(); +inline const std::string& EncryptResponse::encrypteddata() const { + // @@protoc_insertion_point(field_get:crypto.EncryptResponse.encryptedData) + return _internal_encrypteddata(); } template inline PROTOBUF_ALWAYS_INLINE -void EncryptResponse::set_encrypted_data(ArgT0&& arg0, ArgT... args) { +void EncryptResponse::set_encrypteddata(ArgT0&& arg0, ArgT... args) { - encrypted_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.EncryptResponse.encrypted_data) + encrypteddata_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.EncryptResponse.encryptedData) } -inline std::string* EncryptResponse::mutable_encrypted_data() { - std::string* _s = _internal_mutable_encrypted_data(); - // @@protoc_insertion_point(field_mutable:crypto.EncryptResponse.encrypted_data) +inline std::string* EncryptResponse::mutable_encrypteddata() { + std::string* _s = _internal_mutable_encrypteddata(); + // @@protoc_insertion_point(field_mutable:crypto.EncryptResponse.encryptedData) return _s; } -inline const std::string& EncryptResponse::_internal_encrypted_data() const { - return encrypted_data_.Get(); +inline const std::string& EncryptResponse::_internal_encrypteddata() const { + return encrypteddata_.Get(); } -inline void EncryptResponse::_internal_set_encrypted_data(const std::string& value) { +inline void EncryptResponse::_internal_set_encrypteddata(const std::string& value) { - encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + encrypteddata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* EncryptResponse::_internal_mutable_encrypted_data() { +inline std::string* EncryptResponse::_internal_mutable_encrypteddata() { - return encrypted_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return encrypteddata_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* EncryptResponse::release_encrypted_data() { - // @@protoc_insertion_point(field_release:crypto.EncryptResponse.encrypted_data) - return encrypted_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* EncryptResponse::release_encrypteddata() { + // @@protoc_insertion_point(field_release:crypto.EncryptResponse.encryptedData) + return encrypteddata_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void EncryptResponse::set_allocated_encrypted_data(std::string* encrypted_data) { - if (encrypted_data != nullptr) { +inline void EncryptResponse::set_allocated_encrypteddata(std::string* encrypteddata) { + if (encrypteddata != nullptr) { } else { } - encrypted_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), encrypted_data, + encrypteddata_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), encrypteddata, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.EncryptResponse.encrypted_data) + // @@protoc_insertion_point(field_set_allocated:crypto.EncryptResponse.encryptedData) } // bytes signature = 2; @@ -7930,90 +9125,90 @@ inline void EncryptResponse::set_allocated_signature(std::string* signature) { // DecryptRequest -// int32 sender_id = 1; -inline void DecryptRequest::clear_sender_id() { - sender_id_ = 0; +// int32 senderId = 1; +inline void DecryptRequest::clear_senderid() { + senderid_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 DecryptRequest::_internal_sender_id() const { - return sender_id_; +inline ::PROTOBUF_NAMESPACE_ID::int32 DecryptRequest::_internal_senderid() const { + return senderid_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 DecryptRequest::sender_id() const { - // @@protoc_insertion_point(field_get:crypto.DecryptRequest.sender_id) - return _internal_sender_id(); +inline ::PROTOBUF_NAMESPACE_ID::int32 DecryptRequest::senderid() const { + // @@protoc_insertion_point(field_get:crypto.DecryptRequest.senderId) + return _internal_senderid(); } -inline void DecryptRequest::_internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void DecryptRequest::_internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { - sender_id_ = value; + senderid_ = value; } -inline void DecryptRequest::set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_sender_id(value); - // @@protoc_insertion_point(field_set:crypto.DecryptRequest.sender_id) +inline void DecryptRequest::set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_senderid(value); + // @@protoc_insertion_point(field_set:crypto.DecryptRequest.senderId) } -// int32 receiver_id = 2; -inline void DecryptRequest::clear_receiver_id() { - receiver_id_ = 0; +// int32 receiverId = 2; +inline void DecryptRequest::clear_receiverid() { + receiverid_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 DecryptRequest::_internal_receiver_id() const { - return receiver_id_; +inline ::PROTOBUF_NAMESPACE_ID::int32 DecryptRequest::_internal_receiverid() const { + return receiverid_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 DecryptRequest::receiver_id() const { - // @@protoc_insertion_point(field_get:crypto.DecryptRequest.receiver_id) - return _internal_receiver_id(); +inline ::PROTOBUF_NAMESPACE_ID::int32 DecryptRequest::receiverid() const { + // @@protoc_insertion_point(field_get:crypto.DecryptRequest.receiverId) + return _internal_receiverid(); } -inline void DecryptRequest::_internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void DecryptRequest::_internal_set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value) { - receiver_id_ = value; + receiverid_ = value; } -inline void DecryptRequest::set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_receiver_id(value); - // @@protoc_insertion_point(field_set:crypto.DecryptRequest.receiver_id) +inline void DecryptRequest::set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_receiverid(value); + // @@protoc_insertion_point(field_set:crypto.DecryptRequest.receiverId) } -// bytes encrypted_data = 3; -inline void DecryptRequest::clear_encrypted_data() { - encrypted_data_.ClearToEmpty(); +// bytes encryptedData = 3; +inline void DecryptRequest::clear_encrypteddata() { + encrypteddata_.ClearToEmpty(); } -inline const std::string& DecryptRequest::encrypted_data() const { - // @@protoc_insertion_point(field_get:crypto.DecryptRequest.encrypted_data) - return _internal_encrypted_data(); +inline const std::string& DecryptRequest::encrypteddata() const { + // @@protoc_insertion_point(field_get:crypto.DecryptRequest.encryptedData) + return _internal_encrypteddata(); } template inline PROTOBUF_ALWAYS_INLINE -void DecryptRequest::set_encrypted_data(ArgT0&& arg0, ArgT... args) { +void DecryptRequest::set_encrypteddata(ArgT0&& arg0, ArgT... args) { - encrypted_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.DecryptRequest.encrypted_data) + encrypteddata_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.DecryptRequest.encryptedData) } -inline std::string* DecryptRequest::mutable_encrypted_data() { - std::string* _s = _internal_mutable_encrypted_data(); - // @@protoc_insertion_point(field_mutable:crypto.DecryptRequest.encrypted_data) +inline std::string* DecryptRequest::mutable_encrypteddata() { + std::string* _s = _internal_mutable_encrypteddata(); + // @@protoc_insertion_point(field_mutable:crypto.DecryptRequest.encryptedData) return _s; } -inline const std::string& DecryptRequest::_internal_encrypted_data() const { - return encrypted_data_.Get(); +inline const std::string& DecryptRequest::_internal_encrypteddata() const { + return encrypteddata_.Get(); } -inline void DecryptRequest::_internal_set_encrypted_data(const std::string& value) { +inline void DecryptRequest::_internal_set_encrypteddata(const std::string& value) { - encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + encrypteddata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* DecryptRequest::_internal_mutable_encrypted_data() { +inline std::string* DecryptRequest::_internal_mutable_encrypteddata() { - return encrypted_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return encrypteddata_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* DecryptRequest::release_encrypted_data() { - // @@protoc_insertion_point(field_release:crypto.DecryptRequest.encrypted_data) - return encrypted_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* DecryptRequest::release_encrypteddata() { + // @@protoc_insertion_point(field_release:crypto.DecryptRequest.encryptedData) + return encrypteddata_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void DecryptRequest::set_allocated_encrypted_data(std::string* encrypted_data) { - if (encrypted_data != nullptr) { +inline void DecryptRequest::set_allocated_encrypteddata(std::string* encrypteddata) { + if (encrypteddata != nullptr) { } else { } - encrypted_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), encrypted_data, + encrypteddata_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), encrypteddata, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.DecryptRequest.encrypted_data) + // @@protoc_insertion_point(field_set_allocated:crypto.DecryptRequest.encryptedData) } // int64 counter = 4; @@ -8102,98 +9297,144 @@ inline void DecryptRequest::set_isfirst(bool value) { // @@protoc_insertion_point(field_set:crypto.DecryptRequest.isFirst) } +// string messageId = 7; +inline void DecryptRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& DecryptRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.DecryptRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DecryptRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.DecryptRequest.messageId) +} +inline std::string* DecryptRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.DecryptRequest.messageId) + return _s; +} +inline const std::string& DecryptRequest::_internal_messageid() const { + return messageid_.Get(); +} +inline void DecryptRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DecryptRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DecryptRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.DecryptRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void DecryptRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.DecryptRequest.messageId) +} + // ------------------------------------------------------------------- // DecryptResponse -// bytes decrypted_data = 1; -inline void DecryptResponse::clear_decrypted_data() { - decrypted_data_.ClearToEmpty(); +// bytes decryptedData = 1; +inline void DecryptResponse::clear_decrypteddata() { + decrypteddata_.ClearToEmpty(); } -inline const std::string& DecryptResponse::decrypted_data() const { - // @@protoc_insertion_point(field_get:crypto.DecryptResponse.decrypted_data) - return _internal_decrypted_data(); +inline const std::string& DecryptResponse::decrypteddata() const { + // @@protoc_insertion_point(field_get:crypto.DecryptResponse.decryptedData) + return _internal_decrypteddata(); } template inline PROTOBUF_ALWAYS_INLINE -void DecryptResponse::set_decrypted_data(ArgT0&& arg0, ArgT... args) { +void DecryptResponse::set_decrypteddata(ArgT0&& arg0, ArgT... args) { - decrypted_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.DecryptResponse.decrypted_data) + decrypteddata_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.DecryptResponse.decryptedData) } -inline std::string* DecryptResponse::mutable_decrypted_data() { - std::string* _s = _internal_mutable_decrypted_data(); - // @@protoc_insertion_point(field_mutable:crypto.DecryptResponse.decrypted_data) +inline std::string* DecryptResponse::mutable_decrypteddata() { + std::string* _s = _internal_mutable_decrypteddata(); + // @@protoc_insertion_point(field_mutable:crypto.DecryptResponse.decryptedData) return _s; } -inline const std::string& DecryptResponse::_internal_decrypted_data() const { - return decrypted_data_.Get(); +inline const std::string& DecryptResponse::_internal_decrypteddata() const { + return decrypteddata_.Get(); } -inline void DecryptResponse::_internal_set_decrypted_data(const std::string& value) { +inline void DecryptResponse::_internal_set_decrypteddata(const std::string& value) { - decrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + decrypteddata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* DecryptResponse::_internal_mutable_decrypted_data() { +inline std::string* DecryptResponse::_internal_mutable_decrypteddata() { - return decrypted_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return decrypteddata_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* DecryptResponse::release_decrypted_data() { - // @@protoc_insertion_point(field_release:crypto.DecryptResponse.decrypted_data) - return decrypted_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* DecryptResponse::release_decrypteddata() { + // @@protoc_insertion_point(field_release:crypto.DecryptResponse.decryptedData) + return decrypteddata_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void DecryptResponse::set_allocated_decrypted_data(std::string* decrypted_data) { - if (decrypted_data != nullptr) { +inline void DecryptResponse::set_allocated_decrypteddata(std::string* decrypteddata) { + if (decrypteddata != nullptr) { } else { } - decrypted_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), decrypted_data, + decrypteddata_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), decrypteddata, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.DecryptResponse.decrypted_data) + // @@protoc_insertion_point(field_set_allocated:crypto.DecryptResponse.decryptedData) } // ------------------------------------------------------------------- // AESEncryptRequest -// int32 sender_id = 1; -inline void AESEncryptRequest::clear_sender_id() { - sender_id_ = 0; +// int32 senderId = 1; +inline void AESEncryptRequest::clear_senderid() { + senderid_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 AESEncryptRequest::_internal_sender_id() const { - return sender_id_; +inline ::PROTOBUF_NAMESPACE_ID::int32 AESEncryptRequest::_internal_senderid() const { + return senderid_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 AESEncryptRequest::sender_id() const { - // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.sender_id) - return _internal_sender_id(); +inline ::PROTOBUF_NAMESPACE_ID::int32 AESEncryptRequest::senderid() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.senderId) + return _internal_senderid(); } -inline void AESEncryptRequest::_internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void AESEncryptRequest::_internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { - sender_id_ = value; + senderid_ = value; } -inline void AESEncryptRequest::set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_sender_id(value); - // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.sender_id) +inline void AESEncryptRequest::set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_senderid(value); + // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.senderId) } -// int32 receiver_id = 2; -inline void AESEncryptRequest::clear_receiver_id() { - receiver_id_ = 0; +// int32 receiverId = 2; +inline void AESEncryptRequest::clear_receiverid() { + receiverid_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 AESEncryptRequest::_internal_receiver_id() const { - return receiver_id_; +inline ::PROTOBUF_NAMESPACE_ID::int32 AESEncryptRequest::_internal_receiverid() const { + return receiverid_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 AESEncryptRequest::receiver_id() const { - // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.receiver_id) - return _internal_receiver_id(); +inline ::PROTOBUF_NAMESPACE_ID::int32 AESEncryptRequest::receiverid() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.receiverId) + return _internal_receiverid(); } -inline void AESEncryptRequest::_internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void AESEncryptRequest::_internal_set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value) { - receiver_id_ = value; + receiverid_ = value; } -inline void AESEncryptRequest::set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_receiver_id(value); - // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.receiver_id) +inline void AESEncryptRequest::set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_receiverid(value); + // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.receiverId) } // bytes data = 3; @@ -8282,70 +9523,70 @@ inline void AESEncryptRequest::set_counter(::PROTOBUF_NAMESPACE_ID::int64 value) // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.counter) } -// string key_id = 6; -inline void AESEncryptRequest::clear_key_id() { - key_id_.ClearToEmpty(); +// string keyId = 6; +inline void AESEncryptRequest::clear_keyid() { + keyid_.ClearToEmpty(); } -inline const std::string& AESEncryptRequest::key_id() const { - // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.key_id) - return _internal_key_id(); +inline const std::string& AESEncryptRequest::keyid() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.keyId) + return _internal_keyid(); } template inline PROTOBUF_ALWAYS_INLINE -void AESEncryptRequest::set_key_id(ArgT0&& arg0, ArgT... args) { +void AESEncryptRequest::set_keyid(ArgT0&& arg0, ArgT... args) { - key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.key_id) + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.keyId) } -inline std::string* AESEncryptRequest::mutable_key_id() { - std::string* _s = _internal_mutable_key_id(); - // @@protoc_insertion_point(field_mutable:crypto.AESEncryptRequest.key_id) +inline std::string* AESEncryptRequest::mutable_keyid() { + std::string* _s = _internal_mutable_keyid(); + // @@protoc_insertion_point(field_mutable:crypto.AESEncryptRequest.keyId) return _s; } -inline const std::string& AESEncryptRequest::_internal_key_id() const { - return key_id_.Get(); +inline const std::string& AESEncryptRequest::_internal_keyid() const { + return keyid_.Get(); } -inline void AESEncryptRequest::_internal_set_key_id(const std::string& value) { +inline void AESEncryptRequest::_internal_set_keyid(const std::string& value) { - key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* AESEncryptRequest::_internal_mutable_key_id() { +inline std::string* AESEncryptRequest::_internal_mutable_keyid() { - return key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return keyid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* AESEncryptRequest::release_key_id() { - // @@protoc_insertion_point(field_release:crypto.AESEncryptRequest.key_id) - return key_id_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* AESEncryptRequest::release_keyid() { + // @@protoc_insertion_point(field_release:crypto.AESEncryptRequest.keyId) + return keyid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void AESEncryptRequest::set_allocated_key_id(std::string* key_id) { - if (key_id != nullptr) { +inline void AESEncryptRequest::set_allocated_keyid(std::string* keyid) { + if (keyid != nullptr) { } else { } - key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key_id, + keyid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), keyid, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.AESEncryptRequest.key_id) + // @@protoc_insertion_point(field_set_allocated:crypto.AESEncryptRequest.keyId) } -// .crypto.AESKeyLength key_length = 7; -inline void AESEncryptRequest::clear_key_length() { - key_length_ = 0; +// .crypto.AESKeyLength keyLength = 7; +inline void AESEncryptRequest::clear_keylength() { + keylength_ = 0; } -inline ::crypto::AESKeyLength AESEncryptRequest::_internal_key_length() const { - return static_cast< ::crypto::AESKeyLength >(key_length_); +inline ::crypto::AESKeyLength AESEncryptRequest::_internal_keylength() const { + return static_cast< ::crypto::AESKeyLength >(keylength_); } -inline ::crypto::AESKeyLength AESEncryptRequest::key_length() const { - // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.key_length) - return _internal_key_length(); +inline ::crypto::AESKeyLength AESEncryptRequest::keylength() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.keyLength) + return _internal_keylength(); } -inline void AESEncryptRequest::_internal_set_key_length(::crypto::AESKeyLength value) { +inline void AESEncryptRequest::_internal_set_keylength(::crypto::AESKeyLength value) { - key_length_ = value; + keylength_ = value; } -inline void AESEncryptRequest::set_key_length(::crypto::AESKeyLength value) { - _internal_set_key_length(value); - // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.key_length) +inline void AESEncryptRequest::set_keylength(::crypto::AESKeyLength value) { + _internal_set_keylength(value); + // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.keyLength) } // .crypto.AESChainingMode chainingMode = 8; @@ -8388,210 +9629,256 @@ inline void AESEncryptRequest::set_isfirst(bool value) { // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.isFirst) } +// string messageId = 10; +inline void AESEncryptRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& AESEncryptRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AESEncryptRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESEncryptRequest.messageId) +} +inline std::string* AESEncryptRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.AESEncryptRequest.messageId) + return _s; +} +inline const std::string& AESEncryptRequest::_internal_messageid() const { + return messageid_.Get(); +} +inline void AESEncryptRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AESEncryptRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AESEncryptRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.AESEncryptRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AESEncryptRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AESEncryptRequest.messageId) +} + // ------------------------------------------------------------------- // AESEncryptResponse -// bytes encrypted_data = 1; -inline void AESEncryptResponse::clear_encrypted_data() { - encrypted_data_.ClearToEmpty(); +// bytes encryptedData = 1; +inline void AESEncryptResponse::clear_encrypteddata() { + encrypteddata_.ClearToEmpty(); } -inline const std::string& AESEncryptResponse::encrypted_data() const { - // @@protoc_insertion_point(field_get:crypto.AESEncryptResponse.encrypted_data) - return _internal_encrypted_data(); +inline const std::string& AESEncryptResponse::encrypteddata() const { + // @@protoc_insertion_point(field_get:crypto.AESEncryptResponse.encryptedData) + return _internal_encrypteddata(); } template inline PROTOBUF_ALWAYS_INLINE -void AESEncryptResponse::set_encrypted_data(ArgT0&& arg0, ArgT... args) { +void AESEncryptResponse::set_encrypteddata(ArgT0&& arg0, ArgT... args) { - encrypted_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.AESEncryptResponse.encrypted_data) + encrypteddata_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESEncryptResponse.encryptedData) } -inline std::string* AESEncryptResponse::mutable_encrypted_data() { - std::string* _s = _internal_mutable_encrypted_data(); - // @@protoc_insertion_point(field_mutable:crypto.AESEncryptResponse.encrypted_data) +inline std::string* AESEncryptResponse::mutable_encrypteddata() { + std::string* _s = _internal_mutable_encrypteddata(); + // @@protoc_insertion_point(field_mutable:crypto.AESEncryptResponse.encryptedData) return _s; } -inline const std::string& AESEncryptResponse::_internal_encrypted_data() const { - return encrypted_data_.Get(); +inline const std::string& AESEncryptResponse::_internal_encrypteddata() const { + return encrypteddata_.Get(); } -inline void AESEncryptResponse::_internal_set_encrypted_data(const std::string& value) { +inline void AESEncryptResponse::_internal_set_encrypteddata(const std::string& value) { - encrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + encrypteddata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* AESEncryptResponse::_internal_mutable_encrypted_data() { +inline std::string* AESEncryptResponse::_internal_mutable_encrypteddata() { - return encrypted_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return encrypteddata_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* AESEncryptResponse::release_encrypted_data() { - // @@protoc_insertion_point(field_release:crypto.AESEncryptResponse.encrypted_data) - return encrypted_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* AESEncryptResponse::release_encrypteddata() { + // @@protoc_insertion_point(field_release:crypto.AESEncryptResponse.encryptedData) + return encrypteddata_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void AESEncryptResponse::set_allocated_encrypted_data(std::string* encrypted_data) { - if (encrypted_data != nullptr) { +inline void AESEncryptResponse::set_allocated_encrypteddata(std::string* encrypteddata) { + if (encrypteddata != nullptr) { } else { } - encrypted_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), encrypted_data, + encrypteddata_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), encrypteddata, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.AESEncryptResponse.encrypted_data) + // @@protoc_insertion_point(field_set_allocated:crypto.AESEncryptResponse.encryptedData) } // ------------------------------------------------------------------- // AESDecryptRequest -// int32 sender_id = 1; -inline void AESDecryptRequest::clear_sender_id() { - sender_id_ = 0; +// int32 senderId = 1; +inline void AESDecryptRequest::clear_senderid() { + senderid_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::_internal_sender_id() const { - return sender_id_; +inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::_internal_senderid() const { + return senderid_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::sender_id() const { - // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.sender_id) - return _internal_sender_id(); +inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::senderid() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.senderId) + return _internal_senderid(); } -inline void AESDecryptRequest::_internal_set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void AESDecryptRequest::_internal_set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { - sender_id_ = value; + senderid_ = value; } -inline void AESDecryptRequest::set_sender_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_sender_id(value); - // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.sender_id) +inline void AESDecryptRequest::set_senderid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_senderid(value); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.senderId) } -// int32 receiver_id = 2; -inline void AESDecryptRequest::clear_receiver_id() { - receiver_id_ = 0; +// int32 receiverId = 2; +inline void AESDecryptRequest::clear_receiverid() { + receiverid_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::_internal_receiver_id() const { - return receiver_id_; +inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::_internal_receiverid() const { + return receiverid_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::receiver_id() const { - // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.receiver_id) - return _internal_receiver_id(); +inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::receiverid() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.receiverId) + return _internal_receiverid(); } -inline void AESDecryptRequest::_internal_set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void AESDecryptRequest::_internal_set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value) { - receiver_id_ = value; + receiverid_ = value; } -inline void AESDecryptRequest::set_receiver_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_receiver_id(value); - // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.receiver_id) +inline void AESDecryptRequest::set_receiverid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_receiverid(value); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.receiverId) } -// bytes data_in = 3; -inline void AESDecryptRequest::clear_data_in() { - data_in_.ClearToEmpty(); +// bytes dataIn = 3; +inline void AESDecryptRequest::clear_datain() { + datain_.ClearToEmpty(); } -inline const std::string& AESDecryptRequest::data_in() const { - // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.data_in) - return _internal_data_in(); +inline const std::string& AESDecryptRequest::datain() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.dataIn) + return _internal_datain(); } template inline PROTOBUF_ALWAYS_INLINE -void AESDecryptRequest::set_data_in(ArgT0&& arg0, ArgT... args) { +void AESDecryptRequest::set_datain(ArgT0&& arg0, ArgT... args) { - data_in_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.data_in) + datain_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.dataIn) } -inline std::string* AESDecryptRequest::mutable_data_in() { - std::string* _s = _internal_mutable_data_in(); - // @@protoc_insertion_point(field_mutable:crypto.AESDecryptRequest.data_in) +inline std::string* AESDecryptRequest::mutable_datain() { + std::string* _s = _internal_mutable_datain(); + // @@protoc_insertion_point(field_mutable:crypto.AESDecryptRequest.dataIn) return _s; } -inline const std::string& AESDecryptRequest::_internal_data_in() const { - return data_in_.Get(); +inline const std::string& AESDecryptRequest::_internal_datain() const { + return datain_.Get(); } -inline void AESDecryptRequest::_internal_set_data_in(const std::string& value) { +inline void AESDecryptRequest::_internal_set_datain(const std::string& value) { - data_in_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + datain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* AESDecryptRequest::_internal_mutable_data_in() { +inline std::string* AESDecryptRequest::_internal_mutable_datain() { - return data_in_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return datain_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* AESDecryptRequest::release_data_in() { - // @@protoc_insertion_point(field_release:crypto.AESDecryptRequest.data_in) - return data_in_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* AESDecryptRequest::release_datain() { + // @@protoc_insertion_point(field_release:crypto.AESDecryptRequest.dataIn) + return datain_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void AESDecryptRequest::set_allocated_data_in(std::string* data_in) { - if (data_in != nullptr) { +inline void AESDecryptRequest::set_allocated_datain(std::string* datain) { + if (datain != nullptr) { } else { } - data_in_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data_in, + datain_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), datain, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptRequest.data_in) + // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptRequest.dataIn) } -// int32 in_len = 4; -inline void AESDecryptRequest::clear_in_len() { - in_len_ = 0; +// int32 inLen = 4; +inline void AESDecryptRequest::clear_inlen() { + inlen_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::_internal_in_len() const { - return in_len_; +inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::_internal_inlen() const { + return inlen_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::in_len() const { - // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.in_len) - return _internal_in_len(); +inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::inlen() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.inLen) + return _internal_inlen(); } -inline void AESDecryptRequest::_internal_set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void AESDecryptRequest::_internal_set_inlen(::PROTOBUF_NAMESPACE_ID::int32 value) { - in_len_ = value; + inlen_ = value; } -inline void AESDecryptRequest::set_in_len(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_in_len(value); - // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.in_len) +inline void AESDecryptRequest::set_inlen(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_inlen(value); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.inLen) } -// bytes data_out = 5; -inline void AESDecryptRequest::clear_data_out() { - data_out_.ClearToEmpty(); +// bytes dataOut = 5; +inline void AESDecryptRequest::clear_dataout() { + dataout_.ClearToEmpty(); } -inline const std::string& AESDecryptRequest::data_out() const { - // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.data_out) - return _internal_data_out(); +inline const std::string& AESDecryptRequest::dataout() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.dataOut) + return _internal_dataout(); } template inline PROTOBUF_ALWAYS_INLINE -void AESDecryptRequest::set_data_out(ArgT0&& arg0, ArgT... args) { +void AESDecryptRequest::set_dataout(ArgT0&& arg0, ArgT... args) { - data_out_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.data_out) + dataout_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.dataOut) } -inline std::string* AESDecryptRequest::mutable_data_out() { - std::string* _s = _internal_mutable_data_out(); - // @@protoc_insertion_point(field_mutable:crypto.AESDecryptRequest.data_out) +inline std::string* AESDecryptRequest::mutable_dataout() { + std::string* _s = _internal_mutable_dataout(); + // @@protoc_insertion_point(field_mutable:crypto.AESDecryptRequest.dataOut) return _s; } -inline const std::string& AESDecryptRequest::_internal_data_out() const { - return data_out_.Get(); +inline const std::string& AESDecryptRequest::_internal_dataout() const { + return dataout_.Get(); } -inline void AESDecryptRequest::_internal_set_data_out(const std::string& value) { +inline void AESDecryptRequest::_internal_set_dataout(const std::string& value) { - data_out_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + dataout_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* AESDecryptRequest::_internal_mutable_data_out() { +inline std::string* AESDecryptRequest::_internal_mutable_dataout() { - return data_out_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return dataout_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* AESDecryptRequest::release_data_out() { - // @@protoc_insertion_point(field_release:crypto.AESDecryptRequest.data_out) - return data_out_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* AESDecryptRequest::release_dataout() { + // @@protoc_insertion_point(field_release:crypto.AESDecryptRequest.dataOut) + return dataout_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void AESDecryptRequest::set_allocated_data_out(std::string* data_out) { - if (data_out != nullptr) { +inline void AESDecryptRequest::set_allocated_dataout(std::string* dataout) { + if (dataout != nullptr) { } else { } - data_out_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), data_out, + dataout_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), dataout, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptRequest.data_out) + // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptRequest.dataOut) } // .crypto.AsymmetricFunction func = 6; @@ -8614,24 +9901,24 @@ inline void AESDecryptRequest::set_func(::crypto::AsymmetricFunction value) { // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.func) } -// .crypto.AESKeyLength key_length = 7; -inline void AESDecryptRequest::clear_key_length() { - key_length_ = 0; +// .crypto.AESKeyLength keyLength = 7; +inline void AESDecryptRequest::clear_keylength() { + keylength_ = 0; } -inline ::crypto::AESKeyLength AESDecryptRequest::_internal_key_length() const { - return static_cast< ::crypto::AESKeyLength >(key_length_); +inline ::crypto::AESKeyLength AESDecryptRequest::_internal_keylength() const { + return static_cast< ::crypto::AESKeyLength >(keylength_); } -inline ::crypto::AESKeyLength AESDecryptRequest::key_length() const { - // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.key_length) - return _internal_key_length(); +inline ::crypto::AESKeyLength AESDecryptRequest::keylength() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.keyLength) + return _internal_keylength(); } -inline void AESDecryptRequest::_internal_set_key_length(::crypto::AESKeyLength value) { +inline void AESDecryptRequest::_internal_set_keylength(::crypto::AESKeyLength value) { - key_length_ = value; + keylength_ = value; } -inline void AESDecryptRequest::set_key_length(::crypto::AESKeyLength value) { - _internal_set_key_length(value); - // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.key_length) +inline void AESDecryptRequest::set_keylength(::crypto::AESKeyLength value) { + _internal_set_keylength(value); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.keyLength) } // .crypto.AESChainingMode chainingMode = 8; @@ -8674,50 +9961,50 @@ inline void AESDecryptRequest::set_counter(::PROTOBUF_NAMESPACE_ID::int64 value) // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.counter) } -// string key_id = 10; -inline void AESDecryptRequest::clear_key_id() { - key_id_.ClearToEmpty(); +// string keyId = 10; +inline void AESDecryptRequest::clear_keyid() { + keyid_.ClearToEmpty(); } -inline const std::string& AESDecryptRequest::key_id() const { - // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.key_id) - return _internal_key_id(); +inline const std::string& AESDecryptRequest::keyid() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.keyId) + return _internal_keyid(); } template inline PROTOBUF_ALWAYS_INLINE -void AESDecryptRequest::set_key_id(ArgT0&& arg0, ArgT... args) { +void AESDecryptRequest::set_keyid(ArgT0&& arg0, ArgT... args) { - key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.key_id) + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.keyId) } -inline std::string* AESDecryptRequest::mutable_key_id() { - std::string* _s = _internal_mutable_key_id(); - // @@protoc_insertion_point(field_mutable:crypto.AESDecryptRequest.key_id) +inline std::string* AESDecryptRequest::mutable_keyid() { + std::string* _s = _internal_mutable_keyid(); + // @@protoc_insertion_point(field_mutable:crypto.AESDecryptRequest.keyId) return _s; } -inline const std::string& AESDecryptRequest::_internal_key_id() const { - return key_id_.Get(); +inline const std::string& AESDecryptRequest::_internal_keyid() const { + return keyid_.Get(); } -inline void AESDecryptRequest::_internal_set_key_id(const std::string& value) { +inline void AESDecryptRequest::_internal_set_keyid(const std::string& value) { - key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + keyid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* AESDecryptRequest::_internal_mutable_key_id() { +inline std::string* AESDecryptRequest::_internal_mutable_keyid() { - return key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return keyid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* AESDecryptRequest::release_key_id() { - // @@protoc_insertion_point(field_release:crypto.AESDecryptRequest.key_id) - return key_id_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* AESDecryptRequest::release_keyid() { + // @@protoc_insertion_point(field_release:crypto.AESDecryptRequest.keyId) + return keyid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void AESDecryptRequest::set_allocated_key_id(std::string* key_id) { - if (key_id != nullptr) { +inline void AESDecryptRequest::set_allocated_keyid(std::string* keyid) { + if (keyid != nullptr) { } else { } - key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key_id, + keyid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), keyid, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptRequest.key_id) + // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptRequest.keyId) } // bool isFirst = 11; @@ -8740,54 +10027,100 @@ inline void AESDecryptRequest::set_isfirst(bool value) { // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.isFirst) } +// string messageId = 12; +inline void AESDecryptRequest::clear_messageid() { + messageid_.ClearToEmpty(); +} +inline const std::string& AESDecryptRequest::messageid() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.messageId) + return _internal_messageid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AESDecryptRequest::set_messageid(ArgT0&& arg0, ArgT... args) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.messageId) +} +inline std::string* AESDecryptRequest::mutable_messageid() { + std::string* _s = _internal_mutable_messageid(); + // @@protoc_insertion_point(field_mutable:crypto.AESDecryptRequest.messageId) + return _s; +} +inline const std::string& AESDecryptRequest::_internal_messageid() const { + return messageid_.Get(); +} +inline void AESDecryptRequest::_internal_set_messageid(const std::string& value) { + + messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AESDecryptRequest::_internal_mutable_messageid() { + + return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AESDecryptRequest::release_messageid() { + // @@protoc_insertion_point(field_release:crypto.AESDecryptRequest.messageId) + return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void AESDecryptRequest::set_allocated_messageid(std::string* messageid) { + if (messageid != nullptr) { + + } else { + + } + messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptRequest.messageId) +} + // ------------------------------------------------------------------- // AESDecryptResponse -// bytes decrypted_data = 1; -inline void AESDecryptResponse::clear_decrypted_data() { - decrypted_data_.ClearToEmpty(); +// bytes decrypteddata = 1; +inline void AESDecryptResponse::clear_decrypteddata() { + decrypteddata_.ClearToEmpty(); } -inline const std::string& AESDecryptResponse::decrypted_data() const { - // @@protoc_insertion_point(field_get:crypto.AESDecryptResponse.decrypted_data) - return _internal_decrypted_data(); +inline const std::string& AESDecryptResponse::decrypteddata() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptResponse.decrypteddata) + return _internal_decrypteddata(); } template inline PROTOBUF_ALWAYS_INLINE -void AESDecryptResponse::set_decrypted_data(ArgT0&& arg0, ArgT... args) { +void AESDecryptResponse::set_decrypteddata(ArgT0&& arg0, ArgT... args) { - decrypted_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:crypto.AESDecryptResponse.decrypted_data) + decrypteddata_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:crypto.AESDecryptResponse.decrypteddata) } -inline std::string* AESDecryptResponse::mutable_decrypted_data() { - std::string* _s = _internal_mutable_decrypted_data(); - // @@protoc_insertion_point(field_mutable:crypto.AESDecryptResponse.decrypted_data) +inline std::string* AESDecryptResponse::mutable_decrypteddata() { + std::string* _s = _internal_mutable_decrypteddata(); + // @@protoc_insertion_point(field_mutable:crypto.AESDecryptResponse.decrypteddata) return _s; } -inline const std::string& AESDecryptResponse::_internal_decrypted_data() const { - return decrypted_data_.Get(); +inline const std::string& AESDecryptResponse::_internal_decrypteddata() const { + return decrypteddata_.Get(); } -inline void AESDecryptResponse::_internal_set_decrypted_data(const std::string& value) { +inline void AESDecryptResponse::_internal_set_decrypteddata(const std::string& value) { - decrypted_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); + decrypteddata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } -inline std::string* AESDecryptResponse::_internal_mutable_decrypted_data() { +inline std::string* AESDecryptResponse::_internal_mutable_decrypteddata() { - return decrypted_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + return decrypteddata_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } -inline std::string* AESDecryptResponse::release_decrypted_data() { - // @@protoc_insertion_point(field_release:crypto.AESDecryptResponse.decrypted_data) - return decrypted_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +inline std::string* AESDecryptResponse::release_decrypteddata() { + // @@protoc_insertion_point(field_release:crypto.AESDecryptResponse.decrypteddata) + return decrypteddata_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } -inline void AESDecryptResponse::set_allocated_decrypted_data(std::string* decrypted_data) { - if (decrypted_data != nullptr) { +inline void AESDecryptResponse::set_allocated_decrypteddata(std::string* decrypteddata) { + if (decrypteddata != nullptr) { } else { } - decrypted_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), decrypted_data, + decrypteddata_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), decrypteddata, GetArenaForAllocation()); - // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptResponse.decrypted_data) + // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptResponse.decrypteddata) } #ifdef __GNUC__ diff --git a/hsm/proto/encryption.proto b/hsm/proto/encryption.proto index 4fab3eab..28ac2ce8 100644 --- a/hsm/proto/encryption.proto +++ b/hsm/proto/encryption.proto @@ -37,81 +37,106 @@ message AsymetricEncryptRequest{ int32 senderId = 1; string keyId = 2; bytes data = 3; + string messageId = 4; + } message AsymetricEncryptResponse{ - bytes encrypted_data = 1; + bytes encryptedData = 1; } message AsymetricDecryptRequest{ - int32 receiverId = 1; - string keyId = 2; - bytes data = 3; + int32 senderId = 1; + int32 receiverId = 2; + string keyId = 3; + bytes data = 4; + string messageId = 5; + } message GetHashLengthRequest{ - SHAAlgorithm func = 1; - int32 dataLen = 2; + int32 senderId = 1; + SHAAlgorithm func = 2; + int32 dataLen = 3; + string messageId = 4; + } message GetAESLengthRequest{ - int32 dataLen = 1; - bool isFirst = 2; - AESChainingMode chainingMode = 3; + int32 senderId = 1; + int32 dataLen = 2; + bool isFirst = 3; + AESChainingMode chainingMode = 4; + string messageId = 5; + } message AsymetricDecryptResponse{ - bytes decrypted_data = 1; + bytes decryptedData = 1; } message GetLengthRequest { - int32 in_len = 1; + int32 senderId = 1; + int32 inLen = 2; + string messageId = 3; + } message GetLengthResponse { int32 len = 1; } message GetWholeLength{ int32 senderId = 1; - int32 inLen = 2; - bool isFirst = 3; + int32 inLen = 2; + bool isFirst = 3; + string messageId = 4; } message GenerateAESKeyRequest { - int32 user_id = 1; + int32 userId = 1; repeated KeyPermission permissions = 2; AESKeyLength keyLength = 3; int32 destUserId = 4; + string messageId = 5; + } message GenerateAESKeyResponse { - string aes_key = 1; + string aesKey = 1; } message GenerateKeyPairRequest { - int32 user_id = 1; + int32 userId = 1; repeated KeyPermission permissions = 2; + string messageId = 3; + } message GenerateKeyPairResponse { - string public_key = 1; - string private_key = 2; + string publicKey = 1; + string privateKey = 2; } message SignRequest { - int32 sender_id = 1; + int32 senderId = 1; bytes data = 2; - SHAAlgorithm hash_func = 3; + SHAAlgorithm hashFunc = 3; int64 counter = 5; - string key_id = 6; + string keyId = 6; + string messageId = 7; + } message SignResponse { bytes signature = 1; } message VerifyRequest { - int32 sender_id = 1; - int32 receiver_id = 2; + int32 senderId = 1; + int32 receiverId = 2; bytes data = 3; bytes signature = 4; - SHAAlgorithm hash_func = 5; - string key_id = 6; + SHAAlgorithm hashFunc = 5; + string keyId = 6; int32 counter = 7; + string messageId = 8; + } message VerifyResponse { bool valid = 1; bytes out = 2; } message KeyRequest { - int32 user_id = 1; + int32 senderId = 1; + int32 userId = 2; + string messageId = 3; } message KeyResponse { string key = 1; @@ -122,74 +147,88 @@ message UserKeyPermissions { } message BootSystemRequest { repeated UserKeyPermissions usersIdsPermissions = 1; + string messageId = 5; + } message Empty{ } + message CryptoConfig { SHAAlgorithm hashFunction = 1; AESKeyLength aesKeyLength = 2; AESChainingMode aesChainingMode = 3; AsymmetricFunction asymmetricFunction = 4; + string messageId = 5; } message ConfigureRequest { int32 userId = 1; CryptoConfig config = 2; + string messageId = 3; + } message AddProcessRequest{ int32 userId = 1; repeated KeyPermission permissions = 2; + string messageId = 4; } message EncryptRequest { - int32 sender_id = 1; - int32 receiver_id = 2; + int32 senderId = 1; + int32 receiverId = 2; bytes data = 3; int64 counter = 4; bool isFirst = 5; + string messageId = 6; } message EncryptResponse { - bytes encrypted_data = 1; + bytes encryptedData = 1; bytes signature = 2; } message DecryptRequest { - int32 sender_id = 1; - int32 receiver_id = 2; - bytes encrypted_data = 3; + int32 senderId = 1; + int32 receiverId = 2; + bytes encryptedData = 3; int64 counter = 4; bytes signature = 5; bool isFirst = 6; + string messageId = 7; } message DecryptResponse { - bytes decrypted_data = 1; + bytes decryptedData = 1; } message AESEncryptRequest { - int32 sender_id = 1; - int32 receiver_id = 2; + int32 senderId = 1; + int32 receiverId = 2; bytes data = 3; AsymmetricFunction func = 4; int64 counter = 5; - string key_id = 6; - AESKeyLength key_length = 7; + string keyId = 6; + AESKeyLength keyLength = 7; AESChainingMode chainingMode = 8; bool isFirst = 9; + string messageId = 10; + } message AESEncryptResponse { - bytes encrypted_data = 1; + bytes encryptedData = 1; } message AESDecryptRequest { - int32 sender_id=1; - int32 receiver_id = 2; - bytes data_in = 3; - int32 in_len = 4; - bytes data_out = 5; + int32 senderId = 1; + int32 receiverId = 2; + bytes dataIn = 3; + int32 inLen=4; + bytes dataOut = 5; AsymmetricFunction func = 6; - AESKeyLength key_length = 7; + AESKeyLength keyLength = 7; AESChainingMode chainingMode=8; int64 counter = 9; - string key_id = 10; + string keyId = 10; bool isFirst = 11; + string messageId = 12; + + } message AESDecryptResponse { - bytes decrypted_data = 1; + bytes decrypteddata = 1; } enum KeyPermission { VERIFY = 0; diff --git a/hsm/shared_log_file_name.txt b/hsm/shared_log_file_name.txt deleted file mode 100644 index cedb53a6..00000000 --- a/hsm/shared_log_file_name.txt +++ /dev/null @@ -1 +0,0 @@ -2024_09_18_14_00_24_hsm.log \ No newline at end of file diff --git a/hsm/src/crypto_api.cpp b/hsm/src/crypto_api.cpp index 24b3d0f1..d19cba59 100644 --- a/hsm/src/crypto_api.cpp +++ b/hsm/src/crypto_api.cpp @@ -18,6 +18,31 @@ constexpr size_t BITS_IN_BYTE = 8; constexpr size_t ECC_CIPHER_LENGTH = 512; constexpr size_t ECC_MAX_DECRYPTED_LENGTH = 256; +int getCountFromEncryptions(int userID) +{ + auto it = mapToInMiddleEncryptions.find(userID); + if (it != mapToInMiddleEncryptions.end()) + return it->second.second; + + return 0; +} + +int getCountFromDecryptions(int userID) +{ + auto it = mapToInMiddleDecryptions.find(userID); + if (it != mapToInMiddleDecryptions.end()) + return it->second.second; + return 0; +} + +int getCountFromHashing(int userID) +{ + auto it = mapToInMiddleHashing.find(userID); + if (it != mapToInMiddleHashing.end()) + return it->second.second; + return 0; +} + std::string keyPermissionToString(KeyPermission permission) { switch (permission) { diff --git a/hsm/src/crypto_service.cpp b/hsm/src/crypto_service.cpp index 9f8b7092..a0b30c9c 100644 --- a/hsm/src/crypto_service.cpp +++ b/hsm/src/crypto_service.cpp @@ -2,6 +2,7 @@ #include "../include/general.h" #include "../include/crypto_api.h" #include "../include/debug_utils.h" +#include "../include/my_logger.h" #include #include @@ -10,7 +11,8 @@ #include #include #include -#include "../include/debug_utils.h" + + grpc::Status CryptoServiceServer::bootSystem(grpc::ServerContext* context, const crypto::BootSystemRequest* request, crypto::Empty* response) { @@ -23,22 +25,36 @@ grpc::Status CryptoServiceServer::bootSystem(grpc::ServerContext* context, const return grpc::Status::CANCELLED; } -grpc::Status CryptoServiceServer::addProccess(grpc::ServerContext* context, const crypto::AddProcessRequest* request, crypto::Empty* response){ - +grpc::Status CryptoServiceServer::addProccess(grpc::ServerContext* context, const crypto::AddProcessRequest* request, crypto::Empty* response) +{ + + log(logger::LogLevel::INFO, std::to_string(request->userid()), std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->permissions().data(), request->permissions().size())); std::vector permissions; for(auto permission: request->permissions()) permissions.push_back(static_cast(permission)); - if(::addProccess(request->userid(),permissions) == CKR_OK) + if(::addProccess(request->userid(),permissions) == CKR_OK){ + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->userid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + std::to_string(request->userid()) + + std::string(", total packets: ") + std::to_string(1) + " " + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); return grpc::Status::OK; + } return grpc::Status::CANCELLED; } + grpc::Status CryptoServiceServer::configure(grpc::ServerContext* context, const crypto::ConfigureRequest* request, crypto::Empty* response) { - CryptoConfig config(static_cast(request->config().hashfunction()),static_cast(request->config().aeskeylength()), + log(logger::LogLevel::INFO, std::to_string(request->userid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); + CryptoConfig config(static_cast(request->config().hashfunction()),static_cast(request->config().aeskeylength()), static_cast(request->config().aeschainingmode()),static_cast(request->config().asymmetricfunction())); - if(::configure(request->userid(),config) == CKR_OK) + if(::configure(request->userid(),config) == CKR_OK){ + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->userid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid()+ std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); return grpc::Status::OK; + } return grpc::Status::CANCELLED; } @@ -52,19 +68,27 @@ grpc::Status CryptoServiceServer::configure(grpc::ServerContext* context, const */ grpc::Status CryptoServiceServer::encrypt(grpc::ServerContext* context, const crypto::EncryptRequest* request, crypto::EncryptResponse* response) { + int packetNumber = getCountFromEncryptions(request->senderid()); + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + std::string(", of messageId: ") + + request->messageid() + + std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); std::string data = request->data(); - size_t outLen = ::getEncryptedLen(request->sender_id(), request->data().length(), request->isfirst()); + size_t outLen = ::getEncryptedLen(request->senderid(), request->data().length(), request->isfirst()); void *out = new uint8_t[outLen]; size_t signatureLen = ::getSignatureLength(); void* signature = new uint8_t[signatureLen]; - CK_RV status = ::encrypt(request->sender_id(), request->receiver_id(), static_cast(const_cast(request->data().data())), request->data().length(), out, outLen, signature, signatureLen, request->counter()); + CK_RV status = ::encrypt(request->senderid(), request->receiverid(), static_cast(const_cast(request->data().data())), request->data().length(), out, outLen, signature, signatureLen, request->counter()); if(status != CKR_OK) return grpc::Status::CANCELLED; char *charPtr = static_cast(out); - response->set_encrypted_data(out, outLen); + response->set_encrypteddata(out, outLen); response->set_signature(signature, signatureLen); - delete [] (uint8_t*)out; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + std::string(", of messageId: ") + + request->messageid()+ "1"+ std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->encrypteddata().data(), response->encrypteddata().size())); return grpc::Status::OK; @@ -80,13 +104,25 @@ grpc::Status CryptoServiceServer::encrypt(grpc::ServerContext* context, const cr */ grpc::Status CryptoServiceServer::decrypt(grpc::ServerContext* context, const crypto::DecryptRequest* request, crypto::DecryptResponse* response) { - size_t outLen = ::getDecryptedLen(request->sender_id(), request->encrypted_data().length(), request->isfirst()); + int packetNumber = getCountFromDecryptions(request->senderid()); + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber: 1) + std::string(", of messageId: ") + + request->messageid() + + std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)request->encrypteddata().data(), request->encrypteddata().size())); + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(packetNumber) + std::string(", of messageId: ") + std::to_string(request->senderid() )+ std::to_string(std::time(nullptr)) + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->encrypteddata().data(), + request->encrypteddata().size())); + size_t outLen = ::getDecryptedLen(request->senderid(), request->encrypteddata().length(), request->isfirst()); void* out = new uint8_t[outLen]; - CK_RV status = ::decrypt(request->sender_id(), request->receiver_id(), static_cast(const_cast(request->encrypted_data().data())), request->encrypted_data().length(), static_cast(const_cast(request->signature().data())), request->signature().length(), out, outLen, request->counter()); + CK_RV status = ::decrypt(request->senderid(), request->receiverid(), static_cast(const_cast(request->encrypteddata().data())), request->encrypteddata().length(), static_cast(const_cast(request->signature().data())), request->signature().length(), out, outLen, request->counter()); if(status != CKR_OK) return grpc::Status::CANCELLED; - response->set_decrypted_data(out, outLen); + response->set_decrypteddata(out, outLen); delete [] (uint8_t*)out; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + + std::string(", of messageId: ") + request->messageid()+ "2" + std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->decrypteddata().data(), response->decrypteddata().size())); + return grpc::Status::OK; } @@ -100,10 +136,14 @@ grpc::Status CryptoServiceServer::decrypt(grpc::ServerContext* context, const cr */ grpc::Status CryptoServiceServer::generateAESKey(grpc::ServerContext *context, const crypto::GenerateAESKeyRequest *request, crypto::GenerateAESKeyResponse *response) { + log(logger::LogLevel::INFO, std::to_string(request->userid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); std::vector permissions; for (auto permission : request->permissions()) permissions.push_back(static_cast(permission)); - response->set_aes_key(::generateAESKey(request->user_id(), static_cast(request->keylength()), permissions, request->destuserid())); + response->set_aeskey(::generateAESKey(request->userid(), static_cast(request->keylength()), permissions, request->destuserid())); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->userid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid()+ "3"+ std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), request->SerializeAsString().size())); + return grpc::Status::OK; } @@ -117,12 +157,16 @@ grpc::Status CryptoServiceServer::generateAESKey(grpc::ServerContext *context, c */ grpc::Status CryptoServiceServer::generateRSAKeyPair(grpc::ServerContext* context, const crypto::GenerateKeyPairRequest* request, crypto::GenerateKeyPairResponse* response) { + log(logger::LogLevel::INFO, std::to_string(request->userid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); std::vector permissions; for(auto permission: request->permissions()) permissions.push_back(static_cast(permission)); - std::pair pair = ::generateRSAKeyPair(request->user_id(), permissions); - response->set_private_key(pair.second); - response->set_public_key(pair.first); + std::pair pair = ::generateRSAKeyPair(request->userid(), permissions); + response->set_privatekey(pair.second); + response->set_publickey(pair.first); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->userid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid()+ "4"+ std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); + return grpc::Status::OK; } @@ -136,12 +180,16 @@ grpc::Status CryptoServiceServer::generateRSAKeyPair(grpc::ServerContext* contex */ grpc::Status CryptoServiceServer::generateECCKeyPair(grpc::ServerContext* context, const crypto::GenerateKeyPairRequest* request, crypto::GenerateKeyPairResponse* response) { + log(logger::LogLevel::INFO, std::to_string(request->userid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); std::vector permissions; for(auto permission: request->permissions()) permissions.push_back(static_cast(permission)); - std::pair pair = ::generateECCKeyPair(request->user_id(), permissions); - response->set_private_key(pair.second); - response->set_public_key(pair.first); + std::pair pair = ::generateECCKeyPair(request->userid(), permissions); + response->set_privatekey(pair.second); + response->set_publickey(pair.first); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->userid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid()+ "5"+ std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); + return grpc::Status::OK; } @@ -155,86 +203,124 @@ grpc::Status CryptoServiceServer::generateECCKeyPair(grpc::ServerContext* contex */ grpc::Status CryptoServiceServer::getSignedDataLength(grpc::ServerContext* context, const crypto::GetHashLengthRequest* request, crypto::GetLengthResponse* response) { + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); response->set_len(::getSignatureLength()); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + std::to_string(request->senderid()) + request->messageid() + "6" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); + return grpc::Status::OK; } -// gRPC server methods for cryptographic operations - // Retrieves the public ECC key associated with a given user ID. grpc::Status CryptoServiceServer::getPublicECCKeyByUserId(grpc::ServerContext* context, const crypto::KeyRequest* request, crypto::KeyResponse* response) { - response->set_key(::getPublicECCKeyByUserId(request->user_id())); + log(logger::LogLevel::INFO, std::to_string(request->userid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); + response->set_key(::getPublicECCKeyByUserId(request->userid())); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->userid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "7" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); + return grpc::Status::OK; } // Retrieves the public RSA key associated with a given user ID. grpc::Status CryptoServiceServer::getPublicRSAKeyByUserId(grpc::ServerContext* context, const crypto::KeyRequest* request, crypto::KeyResponse* response) { - response->set_key(::getPublicRSAKeyByUserId(request->user_id())); + log(logger::LogLevel::INFO, std::to_string(request->userid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); + response->set_key(::getPublicRSAKeyByUserId(request->userid())); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->userid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "8" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); + return grpc::Status::OK; } // Gets the length of the encrypted ECC data. grpc::Status CryptoServiceServer::getECCencryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) { + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); response->set_len(::getECCencryptedLength()); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "9" + std::to_string(std::time(nullptr))+ std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); + return grpc::Status::OK; } // Gets the length of the decrypted ECC data. grpc::Status CryptoServiceServer::getECCDecryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) { + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); response->set_len(::getECCdecryptedLength()); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "10" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); + return grpc::Status::OK; } // Encrypts data using ECC with the specified sender ID and key ID. grpc::Status CryptoServiceServer::ECCencrypt(grpc::ServerContext* context, const crypto::AsymetricEncryptRequest* request, crypto::AsymetricEncryptResponse* response) { + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); size_t outLen = ::getECCencryptedLength(); void* out = new uint8_t[outLen]; ::ECCencrypt(request->senderid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, outLen); - response->set_encrypted_data(out, outLen); + response->set_encrypteddata(out, outLen); delete [] (uint8_t*)out; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "11" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->encrypteddata().data(), response->encrypteddata().size())); + return grpc::Status::OK; } // Decrypts ECC-encrypted data using the specified receiver ID and key ID. grpc::Status CryptoServiceServer::ECCdecrypt(grpc::ServerContext* context, const crypto::AsymetricDecryptRequest* request, crypto::AsymetricDecryptResponse* response) { + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); size_t outLen = ::getECCdecryptedLength(); void* out = new uint8_t[outLen]; ::ECCdecrypt(request->receiverid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, outLen); - response->set_decrypted_data(out, outLen); + response->set_decrypteddata(out, outLen); delete [] (uint8_t*)out; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "12"+ std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->decrypteddata().data(), response->decrypteddata().size())); + return grpc::Status::OK; } // Gets the length of the encrypted RSA data. grpc::Status CryptoServiceServer::getRSAencryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) { + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); response->set_len(::getRSAencryptedLength()); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "13" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); + return grpc::Status::OK; } // Gets the length of the decrypted RSA data. grpc::Status CryptoServiceServer::getRSAdecryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) { + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); response->set_len(::getRSAdecryptedLength()); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: " + ) + request->messageid() + "14" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); + return grpc::Status::OK; } // Encrypts data using RSA with the specified sender ID and key ID. grpc::Status CryptoServiceServer::RSAencrypt(grpc::ServerContext* context, const crypto::AsymetricEncryptRequest* request, crypto::AsymetricEncryptResponse* response) { + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + std::to_string(request->senderid() )+ std::to_string(std::time(nullptr)) + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); size_t outLen = ::getRSAencryptedLength(); void* out = new uint8_t[outLen]; ::RSAencrypt(request->senderid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, outLen); - response->set_encrypted_data(out, outLen); + response->set_encrypteddata(out, outLen); delete [] (uint8_t*)out; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + "15" + request->messageid()+ std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->encrypteddata().data(), response->encrypteddata().size())); return grpc::Status::OK; } @@ -242,12 +328,15 @@ grpc::Status CryptoServiceServer::RSAencrypt(grpc::ServerContext* context, const // Decrypts RSA-encrypted data using the specified receiver ID and key ID. grpc::Status CryptoServiceServer::RSAdecrypt(grpc::ServerContext* context, const crypto::AsymetricDecryptRequest* request, crypto::AsymetricDecryptResponse* response) { + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); size_t outLen = ::getRSAdecryptedLength(); void* out = new uint8_t[outLen]; ::RSAdecrypt(request->receiverid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, &outLen); - response->set_decrypted_data(out, outLen); + response->set_decrypteddata(out, outLen); delete [] (uint8_t*)out; - + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "16" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->decrypteddata().data(), response->decrypteddata().size())); + return grpc::Status::OK; } @@ -265,11 +354,14 @@ grpc::Status CryptoServiceServer::getAESencryptedLength( grpc::ServerContext *context, const crypto::GetAESLengthRequest *request, crypto::GetLengthResponse *response) { - response->set_len(::getAESencryptedLength( + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + std::to_string(request->senderid() ) + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); + response->set_len(::getAESencryptedLength( request->datalen(), request->isfirst(), static_cast(request->chainingmode()))); - - return grpc::Status::OK; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "17" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); + + return grpc::Status::OK; } /** @@ -284,10 +376,13 @@ grpc::Status CryptoServiceServer::getAESdecryptedLength( grpc::ServerContext *context, const crypto::GetAESLengthRequest *request, crypto::GetLengthResponse *response) { - response->set_len( + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); + response->set_len( ::getAESdecryptedLength(request->datalen(), request->isfirst(), static_cast(request->chainingmode()))); - - return grpc::Status::OK; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "18" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); + + return grpc::Status::OK; } /** @@ -302,20 +397,28 @@ grpc::Status CryptoServiceServer::AESencrypt(grpc::ServerContext *context, const crypto::AESEncryptRequest *request, crypto::AESEncryptResponse *response) { + int packetNumber = getCountFromEncryptions(request->senderid()); + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1)+ std::string(", of messageId: ") + + request->messageid() + + std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); size_t outLen = ::getAESencryptedLength( request->data().length(), request->isfirst(), static_cast(request->chainingmode())); std::unique_ptr> out(new uint8_t[outLen]); - CK_RV status = ::AESencrypt(request->sender_id(), request->receiver_id(), + CK_RV status = ::AESencrypt(request->senderid(), request->receiverid(), (void *)request->data().data(), request->data().length(), out.get(), outLen, - static_cast(request->key_length()), + static_cast(request->keylength()), static_cast(request->chainingmode()), - request->counter(), request->key_id()); - response->set_encrypted_data(out.get(), outLen); - + request->counter(), request->keyid()); + response->set_encrypteddata(out.get(), outLen); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + std::string(", of messageId: ") + std::to_string(request->senderid() )+ request->messageid() + "19"+ std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->encrypteddata().data(), response->encrypteddata().size())); + return grpc::Status::OK; } @@ -332,17 +435,26 @@ grpc::Status CryptoServiceServer::AESdecrypt(grpc::ServerContext *context, const crypto::AESDecryptRequest *request, crypto::AESDecryptResponse *response) { - size_t outLen = ::getAESdecryptedLength(request->data_in().length(), request->isfirst(), static_cast(request->chainingmode())); + int packetNumber = getCountFromDecryptions(request->senderid()); + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + std::string(", of messageId: ") + + request->messageid() + + std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)request->datain().data(), request->datain().size())); + size_t outLen = ::getAESdecryptedLength(request->datain().length(), request->isfirst(), static_cast(request->chainingmode())); std::unique_ptr out(new uint8_t[outLen]); - CK_RV status = ::AESdecrypt(request->sender_id(), request->receiver_id(), - (void *)request->data_in().data(), request->data_in().length(), - out.get(), outLen, static_cast(request->key_length()), + CK_RV status = ::AESdecrypt(request->senderid(), request->receiverid(), + (void *)request->datain().data(), request->datain().length(), + out.get(), outLen, static_cast(request->keylength()), static_cast(request->chainingmode()), - request->counter(), request->key_id()); + request->counter(), request->keyid()); if(status != CKR_OK) return grpc::Status::CANCELLED; - response->set_decrypted_data(out.get(), outLen); + response->set_decrypteddata(out.get(), outLen); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + std::string(", of messageId: ") + request->messageid() + "20"+ std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->decrypteddata().data(), response->decrypteddata().size())); + return grpc::Status::OK; } @@ -356,7 +468,10 @@ grpc::Status CryptoServiceServer::AESdecrypt(grpc::ServerContext *context, */ grpc::Status CryptoServiceServer::getEncryptedLen(grpc::ServerContext* context, const crypto::GetWholeLength* request, crypto::GetLengthResponse* response) { + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); response->set_len(::getEncryptedLen(request->senderid(), request->inlen(), request->isfirst())); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + std::to_string(request->senderid() )+ request->messageid() + "21" + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); return grpc::Status::OK; } @@ -371,7 +486,10 @@ grpc::Status CryptoServiceServer::getEncryptedLen(grpc::ServerContext* context, */ grpc::Status CryptoServiceServer::getDecryptedLen(grpc::ServerContext* context, const crypto::GetWholeLength* request, crypto::GetLengthResponse* response) { + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); response->set_len(::getDecryptedLen(request->senderid(), request->inlen(), request->isfirst())); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "22" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); return grpc::Status::OK; } @@ -386,7 +504,14 @@ grpc::Status CryptoServiceServer::getDecryptedLen(grpc::ServerContext* context, */ grpc::Status CryptoServiceServer::signUpdate(grpc::ServerContext* context, const crypto::SignRequest* request, crypto::SignResponse* response) { - CK_RV status = ::signUpdate(request->sender_id(), (void*)request->data().data(), request->data().length(), static_cast(request->hash_func()), request->counter()); + int packetNumber = getCountFromHashing(request->senderid()); + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + std::string(", of messageId: ") + + request->messageid() + + std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); + CK_RV status = ::signUpdate(request->senderid(), (void*)request->data().data(), request->data().length(), static_cast(request->hashfunc()), request->counter()); + return status == CKR_OK ? grpc::Status::OK : grpc::Status::CANCELLED; } @@ -400,12 +525,19 @@ grpc::Status CryptoServiceServer::signUpdate(grpc::ServerContext* context, const */ grpc::Status CryptoServiceServer::signFinalize(grpc::ServerContext* context, const crypto::SignRequest* request, crypto::SignResponse* response) { + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + + std::to_string(request->counter()) + std::string(", of messageId: ") + + request->messageid() + + std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); size_t signatureLen = ::getSignatureLength(); void * signature = new uint8_t[signatureLen]; - if(CK_RV status = ::signFinalize(request->sender_id(), signature, signatureLen, static_cast(request->hash_func()), request->key_id()) != CKR_OK) + if(CK_RV status = ::signFinalize(request->senderid(), signature, signatureLen, static_cast(request->hashfunc()), request->keyid()) != CKR_OK) return grpc::Status::CANCELLED; response->set_signature(signature, getSignatureLength()); delete [] (uint8_t*)signature; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "23" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)response->signature().data(), response->signature().size())); return grpc::Status::OK; } @@ -420,8 +552,18 @@ grpc::Status CryptoServiceServer::signFinalize(grpc::ServerContext* context, con */ grpc::Status CryptoServiceServer::verifyUpdate(grpc::ServerContext* context, const crypto::VerifyRequest* request, crypto::VerifyResponse* response) { - if (::verifyUpdate(request->receiver_id(), (void*)request->data().data(), request->data().length(), static_cast(request->hash_func()), request->counter()) == CKR_OK) + int packetNumber = getCountFromHashing(request->senderid()); + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + std::string(", of messageId: ") + + request->messageid() + + std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); + if (::verifyUpdate(request->receiverid(), (void*)request->data().data(), request->data().length(), static_cast(request->hashfunc()), request->counter()) == CKR_OK){ + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + std::to_string(request->senderid() )+ request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + "0x01"); + return grpc::Status::OK; + } return grpc::Status::CANCELLED; } @@ -441,9 +583,16 @@ grpc::Status CryptoServiceServer::verifyUpdate(grpc::ServerContext* context, con // - grpc::Status::CANCELLED if the verification fails. grpc::Status CryptoServiceServer::verifyFinalize(grpc::ServerContext* context, const crypto::VerifyRequest* request, crypto::VerifyResponse* response) { - if(::verifyFinalize(request->receiver_id(), (void*)request->signature().data(),request->signature().length(), static_cast(request->hash_func()), request->key_id())!=CKR_OK) + log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + + std::to_string(request->counter()) + std::string(", of messageId: ") + + request->messageid() + std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); + if(::verifyFinalize(request->receiverid(), (void*)request->signature().data(),request->signature().length(), static_cast(request->hashfunc()), request->keyid())!=CKR_OK) return grpc::Status::CANCELLED; response->set_valid(true); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "24" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + + "Success Data: " + "0x01"); + return grpc::Status::OK; } diff --git a/hsm/src/general.cpp b/hsm/src/general.cpp index 69b5cf44..8cb2e0b9 100644 --- a/hsm/src/general.cpp +++ b/hsm/src/general.cpp @@ -1,7 +1,7 @@ #include "../include/general.h" void log(logger::LogLevel level, const std::string &message) { - static logger logInstance("HSM"); + logger logInstance("HSM"); logInstance.logMessage(level, message); } @@ -16,4 +16,7 @@ bool isValidAESKeyLength(AESKeyLength aesKeyLength) default: return false; } -} \ No newline at end of file +} + + + diff --git a/hsm/src/my_logger.cpp b/hsm/src/my_logger.cpp new file mode 100644 index 00000000..07be43dc --- /dev/null +++ b/hsm/src/my_logger.cpp @@ -0,0 +1,41 @@ +#include "../include/my_logger.h" +#include +#include +#include +#include +#include + + std::ofstream logFile("../HSM_Communication.txt", std::ios::app); + std::string getTimestamp() { + auto now = std::chrono::system_clock::now(); + auto now_ns = std::chrono::duration_cast(now.time_since_epoch()).count(); + return std::to_string(now_ns); + } + + std::string dataToHex(const unsigned char* data, size_t size) { + std::ostringstream oss; + oss << "0x"; + for (size_t i = 0; i < size; ++i) { + oss << std::hex << std::setw(2) << std::setfill('0') << static_cast(data[i]); + } + return oss.str(); + } + + void log(logger::LogLevel loglevel, const std::string& hsm_id, const std::string& user_id, const std::string& message) + { + std::string levelStr; + switch (loglevel) { + case logger::LogLevel::INFO: + levelStr = "INFO"; + break; + case logger::LogLevel::ERROR: + levelStr = "ERROR"; + break; + } + + std::string logMessage = "[" + getTimestamp() + "ns] [" + levelStr + "] SRC " + hsm_id + " DST " + user_id + " " + message; + + // Write to file + logFile << logMessage << std::endl; + } + diff --git a/hsm/src/shared_log_file_name.txt b/hsm/src/shared_log_file_name.txt deleted file mode 100644 index bdb54929..00000000 --- a/hsm/src/shared_log_file_name.txt +++ /dev/null @@ -1 +0,0 @@ -2024_09_15_14_23_37_HSM.log \ No newline at end of file From b384858d9df7bb48b7e149a35f090a969ec65c8f Mon Sep 17 00:00:00 2001 From: TehilaTheStudent Date: Sun, 13 Oct 2024 23:14:59 +0300 Subject: [PATCH 21/21] HSM: Change directory name for easier integration --- {hsm => hsm-server}/.gitignore | 2 +- {hsm => hsm-server}/CMakeLists.txt | 4 +- {hsm => hsm-server}/Dockerfile | 0 {hsm => hsm-server}/docker-compose.yml | 0 hsm-server/include/IHash.h | 15 + hsm-server/include/SHA3-512.h | 32 + {hsm => hsm-server}/include/aes.h | 11 +- {hsm => hsm-server}/include/aes_stream.h | 5 +- .../include/aes_stream_factory.h | 25 +- {hsm => hsm-server}/include/big_int10.h | 0 {hsm => hsm-server}/include/big_int64.h | 0 {hsm => hsm-server}/include/big_int_utils.h | 0 {hsm => hsm-server}/include/crypto_api.h | 35 +- hsm-server/include/crypto_service.h | 114 ++ hsm-server/include/debug_utils.h | 39 + {hsm => hsm-server}/include/ecc.h | 30 +- {hsm => hsm-server}/include/general.h | 59 +- hsm-server/include/hash_factory.h | 23 + hsm-server/include/my_logger.h | 13 + {hsm => hsm-server}/include/prime_tests.h | 0 {hsm => hsm-server}/include/rsa.h | 2 +- hsm-server/include/sha256.h | 39 + {hsm => hsm-server}/include/temp_hsm.h | 11 +- hsm-server/logger/logger.cpp | 136 +++ hsm-server/logger/logger.h | 45 + .../proto/encryption.grpc.pb.cc | 0 .../encryption.grpc.pb.cc:Zone.Identifier | 0 .../proto/encryption.grpc.pb.h | 0 .../encryption.grpc.pb.h:Zone.Identifier | 0 {hsm => hsm-server}/proto/encryption.pb.cc | 391 +++--- .../proto/encryption.pb.cc:Zone.Identifier | 0 {hsm => hsm-server}/proto/encryption.pb.h | 62 + .../proto/encryption.pb.h:Zone.Identifier | 0 {hsm => hsm-server}/proto/encryption.proto | 15 +- .../proto/encryption.proto:Zone.Identifier | 0 {hsm => hsm-server}/src/SHA3-512.cpp | 383 +++--- {hsm => hsm-server}/src/aes.cpp | 2 +- {hsm => hsm-server}/src/aes_cbc.cpp | 0 {hsm => hsm-server}/src/aes_cfb.cpp | 3 +- {hsm => hsm-server}/src/aes_ctr.cpp | 0 {hsm => hsm-server}/src/aes_ecb.cpp | 0 {hsm => hsm-server}/src/aes_ofb.cpp | 2 +- {hsm => hsm-server}/src/big_int10.cpp | 10 +- {hsm => hsm-server}/src/big_int64.cpp | 4 +- {hsm => hsm-server}/src/crypto_api.cpp | 206 ++-- hsm-server/src/crypto_service.cpp | 1051 +++++++++++++++++ hsm-server/src/debug_utils.cpp | 91 ++ {hsm => hsm-server}/src/ecc.cpp | 84 +- hsm-server/src/general.cpp | 36 + {hsm => hsm-server}/src/hash_factory.cpp | 36 +- hsm-server/src/my_logger.cpp | 45 + {hsm => hsm-server}/src/prime_tests.cpp | 0 {hsm => hsm-server}/src/rsa.cpp | 41 +- {hsm => hsm-server}/src/sha256.cpp | 107 +- {hsm => hsm-server}/tests/aes_tests.cpp | 4 +- .../tests/aes_tests.cpp:Zone.Identifier | 0 .../tests/crypto_api_tests.cpp | 6 +- .../crypto_api_tests.cpp:Zone.Identifier | 0 {hsm => hsm-server}/tests/ecc_tests.cpp | 4 +- .../tests/ecc_tests.cpp:Zone.Identifier | 0 {hsm => hsm-server}/tests/hash_tests.cpp | 102 +- .../tests/hash_tests.cpp:Zone.Identifier | 0 {hsm => hsm-server}/tests/keys_tests.cpp | 0 .../tests/keys_tests.cpp:Zone.Identifier | 0 {hsm => hsm-server}/tests/rsa_tests.cpp | 2 +- .../tests/rsa_tests.cpp:Zone.Identifier | 0 {hsm => hsm-server}/tests/sha256_tests.cpp | 0 .../tests/sha256_tests.cpp:Zone.Identifier | 0 hsm/HSM_Communication.txt | 40 - hsm/README.md | 1 - hsm/include/IHash.h | 15 - hsm/include/SHA3-512.h | 32 - hsm/include/crypto_service.h | 47 - hsm/include/debug_utils.h | 29 - hsm/include/hash_factory.h | 24 - hsm/include/my_logger.h | 12 - hsm/include/sha256.h | 39 - hsm/logger/logger.cpp | 119 -- hsm/logger/logger.h | 44 - hsm/src/crypto_service.cpp | 616 ---------- hsm/src/debug_utils.cpp | 55 - hsm/src/general.cpp | 22 - hsm/src/my_logger.cpp | 41 - 83 files changed, 2607 insertions(+), 1856 deletions(-) rename {hsm => hsm-server}/.gitignore (97%) rename {hsm => hsm-server}/CMakeLists.txt (97%) rename {hsm => hsm-server}/Dockerfile (100%) rename {hsm => hsm-server}/docker-compose.yml (100%) create mode 100644 hsm-server/include/IHash.h create mode 100644 hsm-server/include/SHA3-512.h rename {hsm => hsm-server}/include/aes.h (94%) rename {hsm => hsm-server}/include/aes_stream.h (98%) rename {hsm => hsm-server}/include/aes_stream_factory.h (64%) rename {hsm => hsm-server}/include/big_int10.h (100%) rename {hsm => hsm-server}/include/big_int64.h (100%) rename {hsm => hsm-server}/include/big_int_utils.h (100%) rename {hsm => hsm-server}/include/crypto_api.h (80%) create mode 100644 hsm-server/include/crypto_service.h create mode 100644 hsm-server/include/debug_utils.h rename {hsm => hsm-server}/include/ecc.h (68%) rename {hsm => hsm-server}/include/general.h (52%) create mode 100644 hsm-server/include/hash_factory.h create mode 100644 hsm-server/include/my_logger.h rename {hsm => hsm-server}/include/prime_tests.h (100%) rename {hsm => hsm-server}/include/rsa.h (97%) create mode 100644 hsm-server/include/sha256.h rename {hsm => hsm-server}/include/temp_hsm.h (97%) create mode 100644 hsm-server/logger/logger.cpp create mode 100644 hsm-server/logger/logger.h rename {hsm => hsm-server}/proto/encryption.grpc.pb.cc (100%) create mode 100644 hsm-server/proto/encryption.grpc.pb.cc:Zone.Identifier rename {hsm => hsm-server}/proto/encryption.grpc.pb.h (100%) create mode 100644 hsm-server/proto/encryption.grpc.pb.h:Zone.Identifier rename {hsm => hsm-server}/proto/encryption.pb.cc (96%) create mode 100644 hsm-server/proto/encryption.pb.cc:Zone.Identifier rename {hsm => hsm-server}/proto/encryption.pb.h (99%) create mode 100644 hsm-server/proto/encryption.pb.h:Zone.Identifier rename {hsm => hsm-server}/proto/encryption.proto (99%) create mode 100644 hsm-server/proto/encryption.proto:Zone.Identifier rename {hsm => hsm-server}/src/SHA3-512.cpp (50%) rename {hsm => hsm-server}/src/aes.cpp (99%) rename {hsm => hsm-server}/src/aes_cbc.cpp (100%) rename {hsm => hsm-server}/src/aes_cfb.cpp (99%) rename {hsm => hsm-server}/src/aes_ctr.cpp (100%) rename {hsm => hsm-server}/src/aes_ecb.cpp (100%) rename {hsm => hsm-server}/src/aes_ofb.cpp (98%) rename {hsm => hsm-server}/src/big_int10.cpp (98%) rename {hsm => hsm-server}/src/big_int64.cpp (99%) rename {hsm => hsm-server}/src/crypto_api.cpp (90%) create mode 100644 hsm-server/src/crypto_service.cpp create mode 100644 hsm-server/src/debug_utils.cpp rename {hsm => hsm-server}/src/ecc.cpp (85%) create mode 100644 hsm-server/src/general.cpp rename {hsm => hsm-server}/src/hash_factory.cpp (57%) create mode 100644 hsm-server/src/my_logger.cpp rename {hsm => hsm-server}/src/prime_tests.cpp (100%) rename {hsm => hsm-server}/src/rsa.cpp (92%) rename {hsm => hsm-server}/src/sha256.cpp (73%) rename {hsm => hsm-server}/tests/aes_tests.cpp (98%) create mode 100644 hsm-server/tests/aes_tests.cpp:Zone.Identifier rename {hsm => hsm-server}/tests/crypto_api_tests.cpp (99%) create mode 100644 hsm-server/tests/crypto_api_tests.cpp:Zone.Identifier rename {hsm => hsm-server}/tests/ecc_tests.cpp (82%) create mode 100644 hsm-server/tests/ecc_tests.cpp:Zone.Identifier rename {hsm => hsm-server}/tests/hash_tests.cpp (52%) create mode 100644 hsm-server/tests/hash_tests.cpp:Zone.Identifier rename {hsm => hsm-server}/tests/keys_tests.cpp (100%) create mode 100644 hsm-server/tests/keys_tests.cpp:Zone.Identifier rename {hsm => hsm-server}/tests/rsa_tests.cpp (99%) create mode 100644 hsm-server/tests/rsa_tests.cpp:Zone.Identifier rename {hsm => hsm-server}/tests/sha256_tests.cpp (100%) create mode 100644 hsm-server/tests/sha256_tests.cpp:Zone.Identifier delete mode 100644 hsm/HSM_Communication.txt delete mode 100644 hsm/README.md delete mode 100644 hsm/include/IHash.h delete mode 100644 hsm/include/SHA3-512.h delete mode 100644 hsm/include/crypto_service.h delete mode 100644 hsm/include/debug_utils.h delete mode 100644 hsm/include/hash_factory.h delete mode 100644 hsm/include/my_logger.h delete mode 100644 hsm/include/sha256.h delete mode 100644 hsm/logger/logger.cpp delete mode 100644 hsm/logger/logger.h delete mode 100644 hsm/src/crypto_service.cpp delete mode 100644 hsm/src/debug_utils.cpp delete mode 100644 hsm/src/general.cpp delete mode 100644 hsm/src/my_logger.cpp diff --git a/hsm/.gitignore b/hsm-server/.gitignore similarity index 97% rename from hsm/.gitignore rename to hsm-server/.gitignore index 80f22a15..0892e0c1 100644 --- a/hsm/.gitignore +++ b/hsm-server/.gitignore @@ -10,7 +10,7 @@ #clangd .cache - +.clang-format # VS Code files .vscode/ .devcontainer/ diff --git a/hsm/CMakeLists.txt b/hsm-server/CMakeLists.txt similarity index 97% rename from hsm/CMakeLists.txt rename to hsm-server/CMakeLists.txt index c96ef4d3..9629160c 100644 --- a/hsm/CMakeLists.txt +++ b/hsm-server/CMakeLists.txt @@ -10,7 +10,7 @@ if(NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARY OR NOT GMPXX_LIBRARY) endif() include_directories(${GMP_INCLUDE_DIR}) # Specify C++ standard -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) # Find Protobuf and gRPC packages find_package(Protobuf REQUIRED) @@ -72,4 +72,4 @@ add_dependencies(grpc_server proto_gen) set(CMAKE_BUILD_TYPE Debug) # Add debug flags set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") \ No newline at end of file +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") diff --git a/hsm/Dockerfile b/hsm-server/Dockerfile similarity index 100% rename from hsm/Dockerfile rename to hsm-server/Dockerfile diff --git a/hsm/docker-compose.yml b/hsm-server/docker-compose.yml similarity index 100% rename from hsm/docker-compose.yml rename to hsm-server/docker-compose.yml diff --git a/hsm-server/include/IHash.h b/hsm-server/include/IHash.h new file mode 100644 index 00000000..3fed2b57 --- /dev/null +++ b/hsm-server/include/IHash.h @@ -0,0 +1,15 @@ +#ifndef IHASH_H +#define IHASH_H +#include "general.h" +#include +#include + +class IHash { + public: + enum SHAAlgorithm { SHA256, SHA3_512 }; + virtual CK_RV update(const std::vector &data) = 0; + virtual CK_RV finalize(std::vector &output) = 0; + virtual ~IHash() = default; +}; + +#endif // IHASH_H \ No newline at end of file diff --git a/hsm-server/include/SHA3-512.h b/hsm-server/include/SHA3-512.h new file mode 100644 index 00000000..306fb167 --- /dev/null +++ b/hsm-server/include/SHA3-512.h @@ -0,0 +1,32 @@ +#ifndef SHA3_512_H +#define SHA3_512_H + +#include "IHash.h" +#include "general.h" +#include // For fixed-width integer types +#include // For std::ostringstream +#include +#include + +class SHA3_512 : public IHash { + public: + SHA3_512(); // Constructor to initialize the state + CK_RV update(const std::vector &data) + override; // Update the hash with more data + CK_RV finalize(std::vector &output) + override; // Finalize and get the hash value + + private: + uint64_t S[5][5]; // State matrix + uint8_t buffer[576]; // Buffer to hold input data + std::size_t buffer_length; // Current length of data in the buffer + + void round(uint64_t A[5][5], uint64_t RC); + void f_function(uint64_t A[5][5]); + void padding(uint8_t input[], std::size_t &in_len, int &absorb_times); + void assign_S_xor_p(uint64_t S[5][5], uint64_t *p); + void endianSwap(uint64_t &x); + std::vector hashPartToHexVector(uint64_t S[5][5]); +}; + +#endif // SHA3_512_H \ No newline at end of file diff --git a/hsm/include/aes.h b/hsm-server/include/aes.h similarity index 94% rename from hsm/include/aes.h rename to hsm-server/include/aes.h index e84be936..3b338f45 100644 --- a/hsm/include/aes.h +++ b/hsm-server/include/aes.h @@ -10,22 +10,22 @@ #define NUM_BLOCKS 4 #define BLOCK_BYTES_LEN (AES_STATE_ROWS * (NUM_BLOCKS) * sizeof(unsigned char)) - struct AESData { unsigned int numWord; unsigned int numRound; unsigned int keySize; }; - static std::map aesKeyLengthData = { {AESKeyLength::AES_128, {4, 10, 16}}, {AESKeyLength::AES_192, {6, 12, 24}}, {AESKeyLength::AES_256, {8, 14, 32}}}; unsigned int getPaddedLength(unsigned int originalLength); -void padMessage(unsigned char *originalMessage, unsigned int originalLength,unsigned char * paddedMessage); -unsigned int getUnpadMessageLength(unsigned char *message,unsigned int paddedLength); +void padMessage(unsigned char *originalMessage, unsigned int originalLength, + unsigned char *paddedMessage); +unsigned int getUnpadMessageLength(unsigned char *message, + unsigned int paddedLength); void addRoundKey(unsigned char state[AES_STATE_ROWS][NUM_BLOCKS], unsigned char *roundKey); void checkLength(unsigned int length); @@ -51,7 +51,8 @@ void xorBlocks(const unsigned char *a, const unsigned char *b, unsigned char *c, void generateRandomIV(unsigned char *iv); size_t calculatEncryptedLenAES(size_t inLen, bool isFirst, AESChainingMode chainingMode); -size_t calculatDecryptedLenAES(size_t inLen, bool isFirst,AESChainingMode chainingMode); +size_t calculatDecryptedLenAES(size_t inLen, bool isFirst, + AESChainingMode chainingMode); void generateKey(unsigned char *, AESKeyLength keyLength); /*Inverse S-Box*/ diff --git a/hsm/include/aes_stream.h b/hsm-server/include/aes_stream.h similarity index 98% rename from hsm/include/aes_stream.h rename to hsm-server/include/aes_stream.h index 61492139..d859d1ed 100644 --- a/hsm/include/aes_stream.h +++ b/hsm-server/include/aes_stream.h @@ -11,7 +11,10 @@ class StreamAES { unsigned char *key = nullptr; unsigned char *lastData = nullptr; - StreamAES() : iv(new unsigned char[16]), lastBlock(new unsigned char[16]), lastData(new unsigned char[16]){}; + StreamAES() + : iv(new unsigned char[16]), + lastBlock(new unsigned char[16]), + lastData(new unsigned char[16]){}; virtual ~StreamAES() { if (iv != nullptr) { diff --git a/hsm/include/aes_stream_factory.h b/hsm-server/include/aes_stream_factory.h similarity index 64% rename from hsm/include/aes_stream_factory.h rename to hsm-server/include/aes_stream_factory.h index 1366b09e..740997ef 100644 --- a/hsm/include/aes_stream_factory.h +++ b/hsm-server/include/aes_stream_factory.h @@ -6,15 +6,14 @@ /** * @brief Singleton class for managing StreamAESFactory instances. */ -class FactoryManager -{ +class FactoryManager { public: /** * @brief Gets the singleton instance of FactoryManager. * * @return The singleton instance of FactoryManager. */ - static FactoryManager& getInstance() + static FactoryManager &getInstance() { static FactoryManager instance; return instance; @@ -26,24 +25,22 @@ class FactoryManager * @param type The AES chaining mode. * @return A pointer to the newly created StreamAES object. */ - StreamAES* create(const AESChainingMode& type) const + StreamAES *create(const AESChainingMode &type) const { auto it = factories.find(type); - if (it != factories.end()) + if (it != factories.end()) return it->second; - + return nullptr; } private: - std::map factories = - { - {AESChainingMode::ECB, new AESEcb()}, - {AESChainingMode::CBC, new AESCbc()}, - {AESChainingMode::CFB, new AESCfb()}, - {AESChainingMode::OFB, new AESOfb()}, - {AESChainingMode::CTR, new AESCtr()} - }; + std::map factories = { + {AESChainingMode::ECB, new AESEcb()}, + {AESChainingMode::CBC, new AESCbc()}, + {AESChainingMode::CFB, new AESCfb()}, + {AESChainingMode::OFB, new AESOfb()}, + {AESChainingMode::CTR, new AESCtr()}}; /** * @brief Private constructor for singleton pattern. diff --git a/hsm/include/big_int10.h b/hsm-server/include/big_int10.h similarity index 100% rename from hsm/include/big_int10.h rename to hsm-server/include/big_int10.h diff --git a/hsm/include/big_int64.h b/hsm-server/include/big_int64.h similarity index 100% rename from hsm/include/big_int64.h rename to hsm-server/include/big_int64.h diff --git a/hsm/include/big_int_utils.h b/hsm-server/include/big_int_utils.h similarity index 100% rename from hsm/include/big_int_utils.h rename to hsm-server/include/big_int_utils.h diff --git a/hsm/include/crypto_api.h b/hsm-server/include/crypto_api.h similarity index 80% rename from hsm/include/crypto_api.h rename to hsm-server/include/crypto_api.h index 7e65350c..b0d75f7f 100644 --- a/hsm/include/crypto_api.h +++ b/hsm-server/include/crypto_api.h @@ -20,8 +20,7 @@ CK_RV bootSystem( // generate key pair to each coponnet cinfigure the //encrypt and decrypt behaviour for later -CK_RV addProccess( - int userId, std::vector &permissions); +CK_RV addProccess(int userId, std::vector &permissions); CK_RV configure(int userId, CryptoConfig config); @@ -80,7 +79,8 @@ CK_RV RSAdecrypt(int userId, std::string keyId, void *in, size_t inLen, size_t getAESencryptedLength(size_t dataLen, bool isFirst, AESChainingMode chainingMode); -size_t getAESdecryptedLength(size_t dataLen, bool isFirst,AESChainingMode chainingMode); +size_t getAESdecryptedLength(size_t dataLen, bool isFirst, + AESChainingMode chainingMode); CK_RV AESencrypt(int senderId, int receiverId, void *in, size_t inLen, void *out, size_t outLen, AESKeyLength keyLength, @@ -98,24 +98,29 @@ size_t getEncryptedLen(int senderId, size_t inLen, bool isFirst); size_t getDecryptedLen(int senderId, size_t inLen, bool isFirst); CK_RV encrypt(int senderId, int receiverId, void *in, size_t inLen, void *out, - size_t outLen,void * signature,size_t signatureLen, size_t counter); + size_t outLen, void *signature, size_t signatureLen, + size_t counter); -CK_RV decrypt(int senderId, int receiverId, void *in, size_t inLen,void * signature,size_t signatureLen, void *out, - size_t &outLen, size_t counter); +CK_RV decrypt(int senderId, int receiverId, void *in, size_t inLen, + void *signature, size_t signatureLen, void *out, size_t &outLen, + size_t counter); -template -void deleteFromMap(std::map& streamingMap, int userId) { +template +void deleteFromMap(std::map &streamingMap, int userId, + const std::string &mapName) +{ // Find the userId in the map auto it = streamingMap.find(userId); - + // Check if userId is found before attempting to erase if (it != streamingMap.end()) { streamingMap.erase(it); // Erase the user by iterator - log(logger::LogLevel::INFO, - "Deleted user: " + std::to_string(userId) + " from map."); - } else { - log(logger::LogLevel::INFO, - "User: " + std::to_string(userId) + " not found in map."); + log(logger::LogLevel::INFO, + "Deleted user: " + std::to_string(userId) + " from map " + mapName); + } + else { + log(logger::LogLevel::INFO, + "User: " + std::to_string(userId) + " not found in map " + mapName); } } -#endif // __CRYPTO_API_H__ \ No newline at end of file +#endif // __CRYPTO_API_H__ diff --git a/hsm-server/include/crypto_service.h b/hsm-server/include/crypto_service.h new file mode 100644 index 00000000..ecc53ecc --- /dev/null +++ b/hsm-server/include/crypto_service.h @@ -0,0 +1,114 @@ +#include +#include +#include +#include "../proto/encryption.pb.h" +#include "../proto/encryption.grpc.pb.h" +#include "general.h" + +class CryptoServiceServer final : public crypto::CryptoService::Service { + public: + grpc::Status bootSystem(grpc::ServerContext *context, + const crypto::BootSystemRequest *request, + crypto::Empty *response) override; + grpc::Status addProccess(grpc::ServerContext *context, + const crypto::AddProcessRequest *request, + crypto::Empty *response) override; + grpc::Status configure(grpc::ServerContext *context, + const crypto::ConfigureRequest *request, + crypto::Empty *response) override; + grpc::Status encrypt(grpc::ServerContext *context, + const crypto::EncryptRequest *request, + crypto::EncryptResponse *response) override; + grpc::Status decrypt(grpc::ServerContext *context, + const crypto::DecryptRequest *request, + crypto::DecryptResponse *response) override; + grpc::Status generateAESKey( + grpc::ServerContext *context, + const crypto::GenerateAESKeyRequest *request, + crypto::GenerateAESKeyResponse *response) override; + grpc::Status generateRSAKeyPair( + grpc::ServerContext *context, + const crypto::GenerateKeyPairRequest *request, + crypto::GenerateKeyPairResponse *response) override; + grpc::Status generateECCKeyPair( + grpc::ServerContext *context, + const crypto::GenerateKeyPairRequest *request, + crypto::GenerateKeyPairResponse *response) override; + grpc::Status getSignedDataLength( + grpc::ServerContext *context, + const crypto::GetHashLengthRequest *request, + crypto::GetLengthResponse *response) override; + grpc::Status getPublicECCKeyByUserId( + grpc::ServerContext *context, const crypto::KeyRequest *request, + crypto::KeyResponse *response) override; + grpc::Status getPublicRSAKeyByUserId( + grpc::ServerContext *context, const crypto::KeyRequest *request, + crypto::KeyResponse *response) override; + // ecc + grpc::Status getECCencryptedLength( + grpc::ServerContext *context, const crypto::GetLengthRequest *request, + crypto::GetLengthResponse *response) override; + grpc::Status getECCDecryptedLength( + grpc::ServerContext *context, const crypto::GetLengthRequest *request, + crypto::GetLengthResponse *response) override; + grpc::Status ECCencrypt( + grpc::ServerContext *context, + const crypto::AsymetricEncryptRequest *request, + crypto::AsymetricEncryptResponse *response) override; + grpc::Status ECCdecrypt( + grpc::ServerContext *context, + const crypto::AsymetricDecryptRequest *request, + crypto::AsymetricDecryptResponse *response) override; + // rsa + grpc::Status getRSAencryptedLength( + grpc::ServerContext *context, const crypto::GetLengthRequest *request, + crypto::GetLengthResponse *response) override; + grpc::Status getRSAdecryptedLength( + grpc::ServerContext *context, const crypto::GetLengthRequest *request, + crypto::GetLengthResponse *response) override; + grpc::Status RSAencrypt( + grpc::ServerContext *context, + const crypto::AsymetricEncryptRequest *request, + crypto::AsymetricEncryptResponse *response) override; + grpc::Status RSAdecrypt( + grpc::ServerContext *context, + const crypto::AsymetricDecryptRequest *request, + crypto::AsymetricDecryptResponse *response) override; + // aes + grpc::Status getAESencryptedLength( + grpc::ServerContext *context, + const crypto::GetAESLengthRequest *request, + crypto::GetLengthResponse *response) override; + grpc::Status getAESdecryptedLength( + grpc::ServerContext *context, + const crypto::GetAESLengthRequest *request, + crypto::GetLengthResponse *response) override; + grpc::Status AESencrypt(grpc::ServerContext *context, + const crypto::AESEncryptRequest *request, + crypto::AESEncryptResponse *response) override; + grpc::Status AESdecrypt(grpc::ServerContext *context, + const crypto::AESDecryptRequest *request, + crypto::AESDecryptResponse *response) override; + //sign - verify + grpc::Status getEncryptedLen(grpc::ServerContext *context, + const crypto::GetWholeLength *request, + crypto::GetLengthResponse *response) override; + grpc::Status getDecryptedLen(grpc::ServerContext *context, + const crypto::GetWholeLength *request, + crypto::GetLengthResponse *response) override; + grpc::Status signUpdate(grpc::ServerContext *context, + const crypto::SignRequest *request, + crypto::SignResponse *response) override; + grpc::Status signFinalize(grpc::ServerContext *context, + const crypto::SignRequest *request, + crypto::SignResponse *response) override; + grpc::Status verifyUpdate(grpc::ServerContext *context, + const crypto::VerifyRequest *request, + crypto::VerifyResponse *response) override; + grpc::Status verifyFinalize(grpc::ServerContext *context, + const crypto::VerifyRequest *request, + crypto::VerifyResponse *response) override; + + private: + static const size_t HSM_ID = 1; +}; \ No newline at end of file diff --git a/hsm-server/include/debug_utils.h b/hsm-server/include/debug_utils.h new file mode 100644 index 00000000..41043cb3 --- /dev/null +++ b/hsm-server/include/debug_utils.h @@ -0,0 +1,39 @@ +#ifndef __DEBUG_UTILS_H__ +#define __DEBUG_UTILS_H__ + +#include +#include +#include +#include "general.h" +#include "aes_stream.h" +#include "ecc.h" + +#define START_TIMER \ + auto start_timer = std::chrono::high_resolution_clock::now(); + +#define END_TIMER(message) \ + auto end_timer = std::chrono::high_resolution_clock::now(); \ + std::chrono::duration elapsed = end_timer - start_timer; \ + std::cout << message << " took " << elapsed.count() << " seconds\n"; + +void printBufferHexa(const uint8_t *buffer, size_t len, std::string message); + +void encryptStartPrintParams(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength); +void encryptContinuePrintParams(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen); +void printStreamAES(const StreamAES &obj, size_t blockSize, + std::string message); +void printEncryptedMessage(const EncryptedMessage &message); +//Declaration of the debugLog functionvoid +void debugLog(const std::string &message, + const std::string &functionName); // Macro for easier use +#define DEBUG_LOG(msg) debugLog(msg, __func__) +#define LOG_BUFFER_HEXA(buffer, len, message) \ + logBufferHexa(buffer, len, message, __func__, __LINE__) +void logBufferHexa(const void *voidBuffer, size_t len, + const std::string &message, const char *callingFunction, + int line); + +#endif // __DEBUG_UTILS_H__ diff --git a/hsm/include/ecc.h b/hsm-server/include/ecc.h similarity index 68% rename from hsm/include/ecc.h rename to hsm-server/include/ecc.h index cb47e8cf..3d648ed6 100644 --- a/hsm/include/ecc.h +++ b/hsm-server/include/ecc.h @@ -22,7 +22,9 @@ struct EncryptedMessage { mpz_class c2X; bool c2Y; EncryptedMessage(mpz_class c1X, bool c1Y, mpz_class c2X, bool c2Y) - : c1X(c1X), c1Y(c1Y), c2X(c2X), c2Y(c2Y) {} + : c1X(c1X), c1Y(c1Y), c2X(c2X), c2Y(c2Y) + { + } }; mpz_class generatePrivateKey(); @@ -31,16 +33,18 @@ mpz_class calculateY(mpz_class x); Point convertMessageToPoint(const std::string &text); std::string convertPointToMessage(const Point &point); EncryptedMessage encryptECC(std::vector message, Point publicKey); -std::vector decryptECC(EncryptedMessage ciphertext, mpz_class privateKey); +std::vector decryptECC(EncryptedMessage ciphertext, + mpz_class privateKey); mpz_class generateK(); -std::vector stringToUint8(const std::string& str); -std::string uint8ToString(const std::vector& uint8Vec); +std::vector stringToUint8(const std::string &str); +std::string uint8ToString(const std::vector &uint8Vec); Point multiply(Point P, mpz_class times); Point add(Point P, Point Q); mpz_class mod(mpz_class x); bool isOnCurve(Point P); mpz_class inverse(mpz_class base); -std::pair signMessageECC(const std::vector &message, const mpz_class &privateKey); +std::pair signMessageECC( + const std::vector &message, const mpz_class &privateKey); bool modularSqrt(mpz_t result, const mpz_t a, const mpz_t p); #else // ECC_NO_SYCL @@ -59,25 +63,29 @@ struct EncryptedMessage { mpz_class c2X; bool c2Y; EncryptedMessage(mpz_class c1X, bool c1Y, mpz_class c2X, bool c2Y) - : c1X(c1X), c1Y(c1Y), c2X(c2X), c2Y(c2Y) {} + : c1X(c1X), c1Y(c1Y), c2X(c2X), c2Y(c2Y) + { + } }; mpz_class generatePrivateKey(); Point generatePublicKey(mpz_class key); mpz_class calculateY(mpz_class x); -std::vector stringToUint8(const std::string& str); -std::string uint8ToString(const std::vector& uint8Vec); -Point convertMessageToPoint(const std::string& text); +std::vector stringToUint8(const std::string &str); +std::string uint8ToString(const std::vector &uint8Vec); +Point convertMessageToPoint(const std::string &text); std::string convertPointToMessage(const Point &point); EncryptedMessage encryptECC(std::vector message, Point publicKey); -std::vector decryptECC(EncryptedMessage ciphertext, mpz_class privateKey); +std::vector decryptECC(EncryptedMessage ciphertext, + mpz_class privateKey); mpz_class generateK(); Point multiply(Point P, mpz_class times); Point add(Point P, Point Q); mpz_class mod(mpz_class x); bool isOnCurve(Point P); mpz_class inverse(mpz_class base); -std::pair signMessageECC(const std::vector &message, const mpz_class &privateKey); +std::pair signMessageECC( + const std::vector &message, const mpz_class &privateKey); bool modularSqrt(mpz_t result, const mpz_t a, const mpz_t p); #endif // USE_SYCL \ No newline at end of file diff --git a/hsm/include/general.h b/hsm-server/include/general.h similarity index 52% rename from hsm/include/general.h rename to hsm-server/include/general.h index 131fec85..2292bf68 100644 --- a/hsm/include/general.h +++ b/hsm-server/include/general.h @@ -5,57 +5,62 @@ typedef unsigned long CK_RV; /* Successful operation */ -constexpr CK_RV CKR_OK = 0x00000000; // 0 +constexpr CK_RV CKR_OK = 0x00000000; // 0 /* General failure when a function could not complete its intended task */ -constexpr CK_RV CKR_FUNCTION_FAILED = 0x00000006; // 6 +constexpr CK_RV CKR_FUNCTION_FAILED = 0x00000006; // 6 /* Invalid arguments provided to the function (e.g., null pointers or invalid values) */ -constexpr CK_RV CKR_ARGUMENTS_BAD = 0x00000007; // 7 +constexpr CK_RV CKR_ARGUMENTS_BAD = 0x00000007; // 7 /* Key size is out of the allowed range (e.g., key length is too short or too long) */ -constexpr CK_RV CKR_KEY_SIZE_RANGE = 0x00000162; // 354 +constexpr CK_RV CKR_KEY_SIZE_RANGE = 0x00000162; // 354 /* Buffer provided by the user is too small to hold the required data (e.g., during encryption or decryption) */ -constexpr CK_RV CKR_BUFFER_TOO_SMALL = 0x00000150; // 336 +constexpr CK_RV CKR_BUFFER_TOO_SMALL = 0x00000150; // 336 /* The function attempted to generate a key, but key generation is not permitted or failed */ -constexpr CK_RV CKR_KEY_FUNCTION_NOT_PERMITTED = 0x00000068; // 104 +constexpr CK_RV CKR_KEY_FUNCTION_NOT_PERMITTED = 0x00000068; // 104 /* Decryption was attempted, but the decrypted data is invalid (e.g., data was corrupted) */ constexpr CK_RV CKR_DECRYPTED_DATA_INVALID = 0x00000064; // 100 /* Encrypted data has invalid padding (e.g., during decryption or when verifying padding) */ constexpr CK_RV CKR_ENCRYPTED_DATA_INVALID = 0x00000063; // 99 /* Data provided for encryption is too large for the RSA key */ -constexpr CK_RV CKR_DATA_TOO_LARGE = 0x00000080; // 128 +constexpr CK_RV CKR_DATA_TOO_LARGE = 0x00000080; // 128 /* User is not authorized to access or use the requested key */ -constexpr CK_RV CKR_USER_NOT_AUTHORIZED = 0x00000100; // 256 +constexpr CK_RV CKR_USER_NOT_AUTHORIZED = 0x00000100; // 256 /* Signature or hash did not match */ -constexpr CK_RV CKR_SIGNATURE_INVALID = 0x000000C0; // 192 +constexpr CK_RV CKR_SIGNATURE_INVALID = 0x000000C0; // 192 /*user sent an empty buffer to be encrypted or decrypted*/ -constexpr CK_RV CKR_EMPTY_BUFFER = 0x00000200; // 512 +constexpr CK_RV CKR_EMPTY_BUFFER = 0x00000200; // 512 /* User is not logged in or user does not exist */ -constexpr CK_RV CKR_USER_NOT_LOGGED_IN = 0x00000101; // 257 +constexpr CK_RV CKR_USER_NOT_LOGGED_IN = 0x00000101; // 257 enum KeyPermission { VERIFY, SIGN, ENCRYPT, DECRYPT, EXPORTABLE }; enum AsymmetricFunction { RSA, ECC }; enum SHAAlgorithm { SHA_256, SHA_3_512 }; enum AESChainingMode { - ECB, /*Electronic Codebook*/ - CBC, /*Cipher Block Chaining*/ - CFB, /*Cipher Feedback*/ - OFB, /*Output Feedback*/ - CTR /*Counter*/ + ECB, /*Electronic Codebook*/ + CBC, /*Cipher Block Chaining*/ + CFB, /*Cipher Feedback*/ + OFB, /*Output Feedback*/ + CTR /*Counter*/ }; enum AESKeyLength { AES_128 = 16, AES_192 = 24, AES_256 = 32 }; struct CryptoConfig { - SHAAlgorithm hashFunction; // Hash function algorithm - AESKeyLength aesKeyLength; // AES key length - AESChainingMode aesChainingMode; // AES chaining mode - AsymmetricFunction asymmetricFunction; // Asymmetric encryption function + SHAAlgorithm hashFunction; // Hash function algorithm + AESKeyLength aesKeyLength; // AES key length + AESChainingMode aesChainingMode; // AES chaining mode + AsymmetricFunction asymmetricFunction; // Asymmetric encryption function - CryptoConfig(SHAAlgorithm hashFunc, AESKeyLength aesLen, - AESChainingMode aesMode, AsymmetricFunction asymFunc) - : hashFunction(hashFunc), aesKeyLength(aesLen), aesChainingMode(aesMode), - asymmetricFunction(asymFunc) {} - CryptoConfig() {} -}; + CryptoConfig(SHAAlgorithm hashFunc, AESKeyLength aesLen, + AESChainingMode aesMode, AsymmetricFunction asymFunc) + : hashFunction(hashFunc), + aesKeyLength(aesLen), + aesChainingMode(aesMode), + asymmetricFunction(asymFunc) + { + } + CryptoConfig() {} +}; void log(logger::LogLevel level, const std::string &message); bool isValidAESKeyLength(AESKeyLength aesKeyLength); -#endif // __GENERAL_H__ \ No newline at end of file +void signalHandler(int signum); +#endif // __GENERAL_H__ diff --git a/hsm-server/include/hash_factory.h b/hsm-server/include/hash_factory.h new file mode 100644 index 00000000..bd23037c --- /dev/null +++ b/hsm-server/include/hash_factory.h @@ -0,0 +1,23 @@ +#ifndef FACTORY_MANAGER_H +#define FACTORY_MANAGER_H + +#include "IHash.h" +#include "SHA3-512.h" +#include "general.h" +#include "sha256.h" +#include +#include +#include + +class HashFactory { + public: + static HashFactory &getInstance(); + CK_RV create(const SHAAlgorithm &type, + std::unique_ptr &hashPtr) const; + + private: + std::map()>> factories; + HashFactory(); // Private constructor for singleton pattern. +}; + +#endif // FACTORY_MANAGER_H \ No newline at end of file diff --git a/hsm-server/include/my_logger.h b/hsm-server/include/my_logger.h new file mode 100644 index 00000000..1e3b3abb --- /dev/null +++ b/hsm-server/include/my_logger.h @@ -0,0 +1,13 @@ +#ifndef MY_LOGGER_H +#define MY_LOGGER_H + +#include +#include +#include +#include "../logger/logger.h" + +void log(logger::LogLevel loglevel, const std::string &hsm_id, + const std::string &user_id, const std::string &message); +std::string dataToHex(const unsigned char *data, size_t size); + +#endif // LOGGER_H diff --git a/hsm/include/prime_tests.h b/hsm-server/include/prime_tests.h similarity index 100% rename from hsm/include/prime_tests.h rename to hsm-server/include/prime_tests.h diff --git a/hsm/include/rsa.h b/hsm-server/include/rsa.h similarity index 97% rename from hsm/include/rsa.h rename to hsm-server/include/rsa.h index 9867b318..338cbdbb 100644 --- a/hsm/include/rsa.h +++ b/hsm-server/include/rsa.h @@ -17,4 +17,4 @@ size_t rsaGetDecryptedLen(size_t keySize); size_t rsaGetPublicKeyLen(size_t keySize); size_t rsaGetPrivateKeyLen(size_t keySize); -#endif // __RSA_H__ \ No newline at end of file +#endif // __RSA_H__ \ No newline at end of file diff --git a/hsm-server/include/sha256.h b/hsm-server/include/sha256.h new file mode 100644 index 00000000..565aa6d3 --- /dev/null +++ b/hsm-server/include/sha256.h @@ -0,0 +1,39 @@ +#ifndef SHA256_H +#define SHA256_H + +#include "../logger/logger.h" +#include "IHash.h" +#include "general.h" +#include +#include +#include + +class SHA256 : public IHash { + private: + uint32_t result[8]; + uint8_t message[64]; + size_t messageSize; + size_t bitLength; + const uint32_t bytes[64] = { + // SHA-256 constants + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, + 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, + 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, + 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, + 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, + 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2}; + CK_RV transform(); + void padding(); + + public: + SHA256(); + CK_RV update(const std::vector &data) override; + CK_RV finalize(std::vector &output) override; +}; + +#endif // SHA256_H \ No newline at end of file diff --git a/hsm/include/temp_hsm.h b/hsm-server/include/temp_hsm.h similarity index 97% rename from hsm/include/temp_hsm.h rename to hsm-server/include/temp_hsm.h index a3bf4eda..5bf93db7 100644 --- a/hsm/include/temp_hsm.h +++ b/hsm-server/include/temp_hsm.h @@ -136,7 +136,7 @@ class TempHsm { checkPermission(keyId, userId, usage); // If the usage is DECRYPT, delete it after returning a deep copy if (usage == KeyPermission::DECRYPT) { - // Get the original key and its length + // Get the original key and its length std::shared_ptr originalKey(aesKeys[keyId].first); int keyLength = aesKeys[keyId].second; @@ -177,9 +177,12 @@ class TempHsm { // Check if the user exists in the configuration map if (usersConfig.find(userId) != usersConfig.end()) { return usersConfig[userId]; // Return user config if found - } else { - log(logger::LogLevel::ERROR, "User ID " + std::to_string(userId) + " not found in configuration."); - throw std::runtime_error("User config not found for user ID: " + std::to_string(userId)); + } + else { + log(logger::LogLevel::ERROR, "User ID " + std::to_string(userId) + + " not found in configuration."); + throw std::runtime_error("User config not found for user ID: " + + std::to_string(userId)); } } diff --git a/hsm-server/logger/logger.cpp b/hsm-server/logger/logger.cpp new file mode 100644 index 00000000..d25b2a22 --- /dev/null +++ b/hsm-server/logger/logger.cpp @@ -0,0 +1,136 @@ +#include "logger.h" + +std::string logger::logFileName; +std::mutex logger::logMutex; +std::chrono::system_clock::time_point logger::initTime = + std::chrono::system_clock::now(); +std::string logger::componentName = "out"; + +logger::logger(std::string componentName) +{ + logger::componentName = componentName; +} +logger::~logger() +{ + cleanUp(); +} +void logger::initializeLogFile() +{ + if (isInitialized) + return; + + auto time = std::chrono::system_clock::to_time_t(initTime); + std::tm tm = *std::localtime(&time); + + std::ostringstream oss; + oss << "" << std::put_time(&tm, "%Y_%m_%d_%H_%M_%S") << "_" << componentName + << ".log"; + logFileName = oss.str(); + + std::ofstream sharedFile(sharedLogFileName, + std::ios::out | std::ios::trunc); + if (sharedFile) { + sharedFile << logFileName; + } + else { + std::cerr << logLevelToString(LogLevel::ERROR) + << "Failed to open shared log file name file" << std::endl; + } + + isInitialized = true; +} + +std::string logger::getLogFileName() +{ + if (!isInitialized) { + if (!isInitialized) { + std::ifstream sharedFile(sharedLogFileName); + if (sharedFile) { + std::getline(sharedFile, logFileName); + } + if (logFileName.empty()) { + initializeLogFile(); + } + } + } + + return logFileName; +} + +void logger::cleanUp() +{ + std::remove(sharedLogFileName.c_str()); +} + +std::string logger::logLevelToString(LogLevel level) +{ + switch (level) { + case LogLevel::ERROR: + return "[ERROR]"; + case LogLevel::INFO: + return "[INFO]"; + case LogLevel::DEBUG: + return "[DEBUG]"; + default: + return "[UNKNOWN]"; + } +} + +bool logger::shouldLog(LogLevel level) +{ + switch (LOG_LEVEL) { + case LogLevel::ERROR: + return level == LogLevel::ERROR; + case LogLevel::INFO: + return level == LogLevel::ERROR || level == LogLevel::INFO; + case LogLevel::DEBUG: + return true; + default: + return false; + } +} + +std::string logger::getElapsedTime() +{ + auto now = std::chrono::system_clock::now(); + auto elapsed = + std::chrono::duration_cast(now - initTime) + .count(); + return std::to_string(elapsed) + "ns"; +} + +void logger::logMessage(LogLevel level, std::string src, std::string dst, + const std::string &message) +{ + if (!shouldLog(level)) + return; + + std::lock_guard guard(logMutex); + std::ofstream logFile(getLogFileName(), std::ios_base::app); + if (!logFile) { + std::cerr << logLevelToString(LogLevel::ERROR) + << "Failed to open log file" << std::endl; + return; + } + logFile << "[" << getElapsedTime() << "] " << logLevelToString(level) << " " + << "SRC " << src << " " + << "DST " << dst << " " << message << std::endl; +} + +void logger::logMessage(LogLevel level, const std::string &message) +{ + if (!shouldLog(level)) + return; + + std::lock_guard guard(logMutex); + + std::ofstream logFile(getLogFileName(), std::ios_base::app); + if (!logFile) { + std::cerr << logLevelToString(LogLevel::ERROR) + << "Failed to open log file" << std::endl; + return; + } + + logFile << "[" << getElapsedTime() << "] " << logLevelToString(level) << " " + << message << std::endl; +} diff --git a/hsm-server/logger/logger.h b/hsm-server/logger/logger.h new file mode 100644 index 00000000..abd27e14 --- /dev/null +++ b/hsm-server/logger/logger.h @@ -0,0 +1,45 @@ +#ifndef LOGGER_H +#define LOGGER_H + +#include +#include +#include +#include +#include +#include +#include + +#ifndef LOG_LEVEL +#define LOG_LEVEL logger::LogLevel::INFO +#endif + +class logger { + public: + enum class LogLevel { + ERROR, + INFO, + DEBUG, + }; + logger() {} + logger(std::string componentName); + ~logger(); + void logMessage(LogLevel level, const std::string &message); + void logMessage(LogLevel level, std::string src, std::string dst, + const std::string &message); + void initializeLogFile(); + std::string getLogFileName(); + std::string sharedLogFileName = "shared_log_file_name.txt"; + void cleanUp(); + + private: + static std::string logLevelToString(LogLevel level); + static bool shouldLog(LogLevel level); + static std::string getElapsedTime(); + static std::string componentName; + static std::string logFileName; + bool isInitialized = false; + static std::mutex logMutex; + static std::chrono::system_clock::time_point initTime; +}; + +#endif // LOGGER_H diff --git a/hsm/proto/encryption.grpc.pb.cc b/hsm-server/proto/encryption.grpc.pb.cc similarity index 100% rename from hsm/proto/encryption.grpc.pb.cc rename to hsm-server/proto/encryption.grpc.pb.cc diff --git a/hsm-server/proto/encryption.grpc.pb.cc:Zone.Identifier b/hsm-server/proto/encryption.grpc.pb.cc:Zone.Identifier new file mode 100644 index 00000000..e69de29b diff --git a/hsm/proto/encryption.grpc.pb.h b/hsm-server/proto/encryption.grpc.pb.h similarity index 100% rename from hsm/proto/encryption.grpc.pb.h rename to hsm-server/proto/encryption.grpc.pb.h diff --git a/hsm-server/proto/encryption.grpc.pb.h:Zone.Identifier b/hsm-server/proto/encryption.grpc.pb.h:Zone.Identifier new file mode 100644 index 00000000..e69de29b diff --git a/hsm/proto/encryption.pb.cc b/hsm-server/proto/encryption.pb.cc similarity index 96% rename from hsm/proto/encryption.pb.cc rename to hsm-server/proto/encryption.pb.cc index c473c957..366a2cd6 100644 --- a/hsm/proto/encryption.pb.cc +++ b/hsm-server/proto/encryption.pb.cc @@ -136,7 +136,8 @@ constexpr GetWholeLength::GetWholeLength( : messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , senderid_(0) , inlen_(0) - , isfirst_(false){} + , isfirst_(false) + , userid_(0){} struct GetWholeLengthDefaultTypeInternal { constexpr GetWholeLengthDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -492,7 +493,8 @@ constexpr AESDecryptRequest::AESDecryptRequest( , chainingmode_(0) , counter_(int64_t{0}) - , isfirst_(false){} + , isfirst_(false) + , userid_(0){} struct AESDecryptRequestDefaultTypeInternal { constexpr AESDecryptRequestDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -602,6 +604,7 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::of PROTOBUF_FIELD_OFFSET(::crypto::GetWholeLength, inlen_), PROTOBUF_FIELD_OFFSET(::crypto::GetWholeLength, isfirst_), PROTOBUF_FIELD_OFFSET(::crypto::GetWholeLength, messageid_), + PROTOBUF_FIELD_OFFSET(::crypto::GetWholeLength, userid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::GenerateAESKeyRequest, _internal_metadata_), ~0u, // no _extensions_ @@ -826,6 +829,7 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_proto_2fencryption_2eproto::of PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, keyid_), PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, isfirst_), PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, messageid_), + PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptRequest, userid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::crypto::AESDecryptResponse, _internal_metadata_), ~0u, // no _extensions_ @@ -844,30 +848,30 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB { 56, -1, -1, sizeof(::crypto::GetLengthRequest)}, { 65, -1, -1, sizeof(::crypto::GetLengthResponse)}, { 72, -1, -1, sizeof(::crypto::GetWholeLength)}, - { 82, -1, -1, sizeof(::crypto::GenerateAESKeyRequest)}, - { 93, -1, -1, sizeof(::crypto::GenerateAESKeyResponse)}, - { 100, -1, -1, sizeof(::crypto::GenerateKeyPairRequest)}, - { 109, -1, -1, sizeof(::crypto::GenerateKeyPairResponse)}, - { 117, -1, -1, sizeof(::crypto::SignRequest)}, - { 129, -1, -1, sizeof(::crypto::SignResponse)}, - { 136, -1, -1, sizeof(::crypto::VerifyRequest)}, - { 150, -1, -1, sizeof(::crypto::VerifyResponse)}, - { 158, -1, -1, sizeof(::crypto::KeyRequest)}, - { 167, -1, -1, sizeof(::crypto::KeyResponse)}, - { 174, -1, -1, sizeof(::crypto::UserKeyPermissions)}, - { 182, -1, -1, sizeof(::crypto::BootSystemRequest)}, - { 190, -1, -1, sizeof(::crypto::Empty)}, - { 196, -1, -1, sizeof(::crypto::CryptoConfig)}, - { 207, -1, -1, sizeof(::crypto::ConfigureRequest)}, - { 216, -1, -1, sizeof(::crypto::AddProcessRequest)}, - { 225, -1, -1, sizeof(::crypto::EncryptRequest)}, - { 237, -1, -1, sizeof(::crypto::EncryptResponse)}, - { 245, -1, -1, sizeof(::crypto::DecryptRequest)}, - { 258, -1, -1, sizeof(::crypto::DecryptResponse)}, - { 265, -1, -1, sizeof(::crypto::AESEncryptRequest)}, - { 281, -1, -1, sizeof(::crypto::AESEncryptResponse)}, - { 288, -1, -1, sizeof(::crypto::AESDecryptRequest)}, - { 306, -1, -1, sizeof(::crypto::AESDecryptResponse)}, + { 83, -1, -1, sizeof(::crypto::GenerateAESKeyRequest)}, + { 94, -1, -1, sizeof(::crypto::GenerateAESKeyResponse)}, + { 101, -1, -1, sizeof(::crypto::GenerateKeyPairRequest)}, + { 110, -1, -1, sizeof(::crypto::GenerateKeyPairResponse)}, + { 118, -1, -1, sizeof(::crypto::SignRequest)}, + { 130, -1, -1, sizeof(::crypto::SignResponse)}, + { 137, -1, -1, sizeof(::crypto::VerifyRequest)}, + { 151, -1, -1, sizeof(::crypto::VerifyResponse)}, + { 159, -1, -1, sizeof(::crypto::KeyRequest)}, + { 168, -1, -1, sizeof(::crypto::KeyResponse)}, + { 175, -1, -1, sizeof(::crypto::UserKeyPermissions)}, + { 183, -1, -1, sizeof(::crypto::BootSystemRequest)}, + { 191, -1, -1, sizeof(::crypto::Empty)}, + { 197, -1, -1, sizeof(::crypto::CryptoConfig)}, + { 208, -1, -1, sizeof(::crypto::ConfigureRequest)}, + { 217, -1, -1, sizeof(::crypto::AddProcessRequest)}, + { 226, -1, -1, sizeof(::crypto::EncryptRequest)}, + { 238, -1, -1, sizeof(::crypto::EncryptResponse)}, + { 246, -1, -1, sizeof(::crypto::DecryptRequest)}, + { 259, -1, -1, sizeof(::crypto::DecryptResponse)}, + { 266, -1, -1, sizeof(::crypto::AESEncryptRequest)}, + { 282, -1, -1, sizeof(::crypto::AESEncryptResponse)}, + { 289, -1, -1, sizeof(::crypto::AESDecryptRequest)}, + { 308, -1, -1, sizeof(::crypto::AESDecryptResponse)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { @@ -924,139 +928,140 @@ const char descriptor_table_protodef_proto_2fencryption_2eproto[] PROTOBUF_SECTI "cryptResponse\022\025\n\rdecryptedData\030\001 \001(\014\"F\n\020" "GetLengthRequest\022\020\n\010senderId\030\001 \001(\005\022\r\n\005in" "Len\030\002 \001(\005\022\021\n\tmessageId\030\003 \001(\t\" \n\021GetLengt" - "hResponse\022\013\n\003len\030\001 \001(\005\"U\n\016GetWholeLength" + "hResponse\022\013\n\003len\030\001 \001(\005\"e\n\016GetWholeLength" "\022\020\n\010senderId\030\001 \001(\005\022\r\n\005inLen\030\002 \001(\005\022\017\n\007isF" - "irst\030\003 \001(\010\022\021\n\tmessageId\030\004 \001(\t\"\243\001\n\025Genera" - "teAESKeyRequest\022\016\n\006userId\030\001 \001(\005\022*\n\013permi" - "ssions\030\002 \003(\0162\025.crypto.KeyPermission\022\'\n\tk" - "eyLength\030\003 \001(\0162\024.crypto.AESKeyLength\022\022\n\n" - "destUserId\030\004 \001(\005\022\021\n\tmessageId\030\005 \001(\t\"(\n\026G" - "enerateAESKeyResponse\022\016\n\006aesKey\030\001 \001(\t\"g\n" - "\026GenerateKeyPairRequest\022\016\n\006userId\030\001 \001(\005\022" - "*\n\013permissions\030\002 \003(\0162\025.crypto.KeyPermiss" - "ion\022\021\n\tmessageId\030\003 \001(\t\"@\n\027GenerateKeyPai" - "rResponse\022\021\n\tpublicKey\030\001 \001(\t\022\022\n\nprivateK" - "ey\030\002 \001(\t\"\210\001\n\013SignRequest\022\020\n\010senderId\030\001 \001" - "(\005\022\014\n\004data\030\002 \001(\014\022&\n\010hashFunc\030\003 \001(\0162\024.cry" - "pto.SHAAlgorithm\022\017\n\007counter\030\005 \001(\003\022\r\n\005key" - "Id\030\006 \001(\t\022\021\n\tmessageId\030\007 \001(\t\"!\n\014SignRespo" - "nse\022\021\n\tsignature\030\001 \001(\014\"\261\001\n\rVerifyRequest" - "\022\020\n\010senderId\030\001 \001(\005\022\022\n\nreceiverId\030\002 \001(\005\022\014" - "\n\004data\030\003 \001(\014\022\021\n\tsignature\030\004 \001(\014\022&\n\010hashF" - "unc\030\005 \001(\0162\024.crypto.SHAAlgorithm\022\r\n\005keyId" - "\030\006 \001(\t\022\017\n\007counter\030\007 \001(\005\022\021\n\tmessageId\030\010 \001" - "(\t\",\n\016VerifyResponse\022\r\n\005valid\030\001 \001(\010\022\013\n\003o" - "ut\030\002 \001(\014\"A\n\nKeyRequest\022\020\n\010senderId\030\001 \001(\005" - "\022\016\n\006userId\030\002 \001(\005\022\021\n\tmessageId\030\003 \001(\t\"\032\n\013K" - "eyResponse\022\013\n\003key\030\001 \001(\t\"P\n\022UserKeyPermis" - "sions\022\016\n\006userId\030\001 \001(\005\022*\n\013permissions\030\002 \003" - "(\0162\025.crypto.KeyPermission\"_\n\021BootSystemR" - "equest\0227\n\023usersIdsPermissions\030\001 \003(\0132\032.cr" - "ypto.UserKeyPermissions\022\021\n\tmessageId\030\005 \001" - "(\t\"\007\n\005Empty\"\343\001\n\014CryptoConfig\022*\n\014hashFunc" - "tion\030\001 \001(\0162\024.crypto.SHAAlgorithm\022*\n\014aesK" - "eyLength\030\002 \001(\0162\024.crypto.AESKeyLength\0220\n\017" - "aesChainingMode\030\003 \001(\0162\027.crypto.AESChaini" - "ngMode\0226\n\022asymmetricFunction\030\004 \001(\0162\032.cry" - "pto.AsymmetricFunction\022\021\n\tmessageId\030\005 \001(" - "\t\"[\n\020ConfigureRequest\022\016\n\006userId\030\001 \001(\005\022$\n" - "\006config\030\002 \001(\0132\024.crypto.CryptoConfig\022\021\n\tm" - "essageId\030\003 \001(\t\"b\n\021AddProcessRequest\022\016\n\006u" - "serId\030\001 \001(\005\022*\n\013permissions\030\002 \003(\0162\025.crypt" - "o.KeyPermission\022\021\n\tmessageId\030\004 \001(\t\"y\n\016En" - "cryptRequest\022\020\n\010senderId\030\001 \001(\005\022\022\n\nreceiv" - "erId\030\002 \001(\005\022\014\n\004data\030\003 \001(\014\022\017\n\007counter\030\004 \001(" - "\003\022\017\n\007isFirst\030\005 \001(\010\022\021\n\tmessageId\030\006 \001(\t\";\n" - "\017EncryptResponse\022\025\n\rencryptedData\030\001 \001(\014\022" - "\021\n\tsignature\030\002 \001(\014\"\225\001\n\016DecryptRequest\022\020\n" - "\010senderId\030\001 \001(\005\022\022\n\nreceiverId\030\002 \001(\005\022\025\n\re" - "ncryptedData\030\003 \001(\014\022\017\n\007counter\030\004 \001(\003\022\021\n\ts" - "ignature\030\005 \001(\014\022\017\n\007isFirst\030\006 \001(\010\022\021\n\tmessa" - "geId\030\007 \001(\t\"(\n\017DecryptResponse\022\025\n\rdecrypt" - "edData\030\001 \001(\014\"\215\002\n\021AESEncryptRequest\022\020\n\010se" - "nderId\030\001 \001(\005\022\022\n\nreceiverId\030\002 \001(\005\022\014\n\004data" - "\030\003 \001(\014\022(\n\004func\030\004 \001(\0162\032.crypto.Asymmetric" - "Function\022\017\n\007counter\030\005 \001(\003\022\r\n\005keyId\030\006 \001(\t" - "\022\'\n\tkeyLength\030\007 \001(\0162\024.crypto.AESKeyLengt" - "h\022-\n\014chainingMode\030\010 \001(\0162\027.crypto.AESChai" - "ningMode\022\017\n\007isFirst\030\t \001(\010\022\021\n\tmessageId\030\n" - " \001(\t\"+\n\022AESEncryptResponse\022\025\n\rencryptedD" - "ata\030\001 \001(\014\"\257\002\n\021AESDecryptRequest\022\020\n\010sende" - "rId\030\001 \001(\005\022\022\n\nreceiverId\030\002 \001(\005\022\016\n\006dataIn\030" - "\003 \001(\014\022\r\n\005inLen\030\004 \001(\005\022\017\n\007dataOut\030\005 \001(\014\022(\n" - "\004func\030\006 \001(\0162\032.crypto.AsymmetricFunction\022" - "\'\n\tkeyLength\030\007 \001(\0162\024.crypto.AESKeyLength" - "\022-\n\014chainingMode\030\010 \001(\0162\027.crypto.AESChain" - "ingMode\022\017\n\007counter\030\t \001(\003\022\r\n\005keyId\030\n \001(\t\022" - "\017\n\007isFirst\030\013 \001(\010\022\021\n\tmessageId\030\014 \001(\t\"+\n\022A" - "ESDecryptResponse\022\025\n\rdecrypteddata\030\001 \001(\014" - "*O\n\rKeyPermission\022\n\n\006VERIFY\020\000\022\010\n\004SIGN\020\001\022" - "\013\n\007ENCRYPT\020\002\022\013\n\007DECRYPT\020\003\022\016\n\nEXPORTABLE\020" - "\004*>\n\017AESChainingMode\022\007\n\003ECB\020\000\022\007\n\003CBC\020\001\022\007" - "\n\003CFB\020\002\022\007\n\003OFB\020\003\022\007\n\003CTR\020\004*&\n\022AsymmetricF" - "unction\022\007\n\003RSA\020\000\022\007\n\003ECC\020\001*(\n\014SHAAlgorith" - "m\022\n\n\006SHA256\020\000\022\014\n\010SHA3_512\020\001*5\n\014AESKeyLen" - "gth\022\013\n\007AES_128\020\000\022\013\n\007AES_192\020\001\022\013\n\007AES_256" - "\020\0022\231\021\n\rCryptoService\0226\n\nbootSystem\022\031.cry" - "pto.BootSystemRequest\032\r.crypto.Empty\0227\n\013" - "addProccess\022\031.crypto.AddProcessRequest\032\r" - ".crypto.Empty\0224\n\tconfigure\022\030.crypto.Conf" - "igureRequest\032\r.crypto.Empty\022O\n\016generateA" - "ESKey\022\035.crypto.GenerateAESKeyRequest\032\036.c" - "rypto.GenerateAESKeyResponse\022U\n\022generate" - "RSAKeyPair\022\036.crypto.GenerateKeyPairReque" - "st\032\037.crypto.GenerateKeyPairResponse\022U\n\022g" - "enerateECCKeyPair\022\036.crypto.GenerateKeyPa" - "irRequest\032\037.crypto.GenerateKeyPairRespon" - "se\022N\n\023getSignedDataLength\022\034.crypto.GetHa" - "shLengthRequest\032\031.crypto.GetLengthRespon" - "se\022L\n\025getECCencryptedLength\022\030.crypto.Get" - "LengthRequest\032\031.crypto.GetLengthResponse" - "\022L\n\025getECCDecryptedLength\022\030.crypto.GetLe" - "ngthRequest\032\031.crypto.GetLengthResponse\022L" - "\n\025getRSAencryptedLength\022\030.crypto.GetLeng" - "thRequest\032\031.crypto.GetLengthResponse\022L\n\025" - "getRSAdecryptedLength\022\030.crypto.GetLength" - "Request\032\031.crypto.GetLengthResponse\022O\n\025ge" - "tAESencryptedLength\022\033.crypto.GetAESLengt" - "hRequest\032\031.crypto.GetLengthResponse\022O\n\025g" - "etAESdecryptedLength\022\033.crypto.GetAESLeng" - "thRequest\032\031.crypto.GetLengthResponse\022D\n\017" - "getEncryptedLen\022\026.crypto.GetWholeLength\032" - "\031.crypto.GetLengthResponse\022D\n\017getDecrypt" - "edLen\022\026.crypto.GetWholeLength\032\031.crypto.G" - "etLengthResponse\0221\n\004sign\022\023.crypto.SignRe" - "quest\032\024.crypto.SignResponse\0227\n\006verify\022\025." - "crypto.VerifyRequest\032\026.crypto.VerifyResp" - "onse\022B\n\027getPublicECCKeyByUserId\022\022.crypto" - ".KeyRequest\032\023.crypto.KeyResponse\022B\n\027getP" - "ublicRSAKeyByUserId\022\022.crypto.KeyRequest\032" - "\023.crypto.KeyResponse\022O\n\nECCencrypt\022\037.cry" - "pto.AsymetricEncryptRequest\032 .crypto.Asy" - "metricEncryptResponse\022O\n\nECCdecrypt\022\037.cr" - "ypto.AsymetricDecryptRequest\032 .crypto.As" - "ymetricDecryptResponse\022O\n\nRSAencrypt\022\037.c" - "rypto.AsymetricEncryptRequest\032 .crypto.A" - "symetricEncryptResponse\022O\n\nRSAdecrypt\022\037." - "crypto.AsymetricDecryptRequest\032 .crypto." - "AsymetricDecryptResponse\022C\n\nAESencrypt\022\031" - ".crypto.AESEncryptRequest\032\032.crypto.AESEn" - "cryptResponse\022C\n\nAESdecrypt\022\031.crypto.AES" - "DecryptRequest\032\032.crypto.AESDecryptRespon" - "se\022:\n\007encrypt\022\026.crypto.EncryptRequest\032\027." - "crypto.EncryptResponse\022:\n\007decrypt\022\026.cryp" - "to.DecryptRequest\032\027.crypto.DecryptRespon" - "se\0227\n\nsignUpdate\022\023.crypto.SignRequest\032\024." - "crypto.SignResponse\0229\n\014signFinalize\022\023.cr" - "ypto.SignRequest\032\024.crypto.SignResponse\022=" - "\n\014verifyUpdate\022\025.crypto.VerifyRequest\032\026." - "crypto.VerifyResponse\022\?\n\016verifyFinalize\022" - "\025.crypto.VerifyRequest\032\026.crypto.VerifyRe" - "sponseb\006proto3" + "irst\030\003 \001(\010\022\021\n\tmessageId\030\004 \001(\t\022\016\n\006userId\030" + "\005 \001(\005\"\243\001\n\025GenerateAESKeyRequest\022\016\n\006userI" + "d\030\001 \001(\005\022*\n\013permissions\030\002 \003(\0162\025.crypto.Ke" + "yPermission\022\'\n\tkeyLength\030\003 \001(\0162\024.crypto." + "AESKeyLength\022\022\n\ndestUserId\030\004 \001(\005\022\021\n\tmess" + "ageId\030\005 \001(\t\"(\n\026GenerateAESKeyResponse\022\016\n" + "\006aesKey\030\001 \001(\t\"g\n\026GenerateKeyPairRequest\022" + "\016\n\006userId\030\001 \001(\005\022*\n\013permissions\030\002 \003(\0162\025.c" + "rypto.KeyPermission\022\021\n\tmessageId\030\003 \001(\t\"@" + "\n\027GenerateKeyPairResponse\022\021\n\tpublicKey\030\001" + " \001(\t\022\022\n\nprivateKey\030\002 \001(\t\"\210\001\n\013SignRequest" + "\022\020\n\010senderId\030\001 \001(\005\022\014\n\004data\030\002 \001(\014\022&\n\010hash" + "Func\030\003 \001(\0162\024.crypto.SHAAlgorithm\022\017\n\007coun" + "ter\030\005 \001(\003\022\r\n\005keyId\030\006 \001(\t\022\021\n\tmessageId\030\007 " + "\001(\t\"!\n\014SignResponse\022\021\n\tsignature\030\001 \001(\014\"\261" + "\001\n\rVerifyRequest\022\020\n\010senderId\030\001 \001(\005\022\022\n\nre" + "ceiverId\030\002 \001(\005\022\014\n\004data\030\003 \001(\014\022\021\n\tsignatur" + "e\030\004 \001(\014\022&\n\010hashFunc\030\005 \001(\0162\024.crypto.SHAAl" + "gorithm\022\r\n\005keyId\030\006 \001(\t\022\017\n\007counter\030\007 \001(\005\022" + "\021\n\tmessageId\030\010 \001(\t\",\n\016VerifyResponse\022\r\n\005" + "valid\030\001 \001(\010\022\013\n\003out\030\002 \001(\014\"A\n\nKeyRequest\022\020" + "\n\010senderId\030\001 \001(\005\022\016\n\006userId\030\002 \001(\005\022\021\n\tmess" + "ageId\030\003 \001(\t\"\032\n\013KeyResponse\022\013\n\003key\030\001 \001(\t\"" + "P\n\022UserKeyPermissions\022\016\n\006userId\030\001 \001(\005\022*\n" + "\013permissions\030\002 \003(\0162\025.crypto.KeyPermissio" + "n\"_\n\021BootSystemRequest\0227\n\023usersIdsPermis" + "sions\030\001 \003(\0132\032.crypto.UserKeyPermissions\022" + "\021\n\tmessageId\030\005 \001(\t\"\007\n\005Empty\"\343\001\n\014CryptoCo" + "nfig\022*\n\014hashFunction\030\001 \001(\0162\024.crypto.SHAA" + "lgorithm\022*\n\014aesKeyLength\030\002 \001(\0162\024.crypto." + "AESKeyLength\0220\n\017aesChainingMode\030\003 \001(\0162\027." + "crypto.AESChainingMode\0226\n\022asymmetricFunc" + "tion\030\004 \001(\0162\032.crypto.AsymmetricFunction\022\021" + "\n\tmessageId\030\005 \001(\t\"[\n\020ConfigureRequest\022\016\n" + "\006userId\030\001 \001(\005\022$\n\006config\030\002 \001(\0132\024.crypto.C" + "ryptoConfig\022\021\n\tmessageId\030\003 \001(\t\"b\n\021AddPro" + "cessRequest\022\016\n\006userId\030\001 \001(\005\022*\n\013permissio" + "ns\030\002 \003(\0162\025.crypto.KeyPermission\022\021\n\tmessa" + "geId\030\004 \001(\t\"y\n\016EncryptRequest\022\020\n\010senderId" + "\030\001 \001(\005\022\022\n\nreceiverId\030\002 \001(\005\022\014\n\004data\030\003 \001(\014" + "\022\017\n\007counter\030\004 \001(\003\022\017\n\007isFirst\030\005 \001(\010\022\021\n\tme" + "ssageId\030\006 \001(\t\";\n\017EncryptResponse\022\025\n\rencr" + "yptedData\030\001 \001(\014\022\021\n\tsignature\030\002 \001(\014\"\225\001\n\016D" + "ecryptRequest\022\020\n\010senderId\030\001 \001(\005\022\022\n\nrecei" + "verId\030\002 \001(\005\022\025\n\rencryptedData\030\003 \001(\014\022\017\n\007co" + "unter\030\004 \001(\003\022\021\n\tsignature\030\005 \001(\014\022\017\n\007isFirs" + "t\030\006 \001(\010\022\021\n\tmessageId\030\007 \001(\t\"(\n\017DecryptRes" + "ponse\022\025\n\rdecryptedData\030\001 \001(\014\"\215\002\n\021AESEncr" + "yptRequest\022\020\n\010senderId\030\001 \001(\005\022\022\n\nreceiver" + "Id\030\002 \001(\005\022\014\n\004data\030\003 \001(\014\022(\n\004func\030\004 \001(\0162\032.c" + "rypto.AsymmetricFunction\022\017\n\007counter\030\005 \001(" + "\003\022\r\n\005keyId\030\006 \001(\t\022\'\n\tkeyLength\030\007 \001(\0162\024.cr" + "ypto.AESKeyLength\022-\n\014chainingMode\030\010 \001(\0162" + "\027.crypto.AESChainingMode\022\017\n\007isFirst\030\t \001(" + "\010\022\021\n\tmessageId\030\n \001(\t\"+\n\022AESEncryptRespon" + "se\022\025\n\rencryptedData\030\001 \001(\014\"\277\002\n\021AESDecrypt" + "Request\022\020\n\010senderId\030\001 \001(\005\022\022\n\nreceiverId\030" + "\002 \001(\005\022\016\n\006dataIn\030\003 \001(\014\022\r\n\005inLen\030\004 \001(\005\022\017\n\007" + "dataOut\030\005 \001(\014\022(\n\004func\030\006 \001(\0162\032.crypto.Asy" + "mmetricFunction\022\'\n\tkeyLength\030\007 \001(\0162\024.cry" + "pto.AESKeyLength\022-\n\014chainingMode\030\010 \001(\0162\027" + ".crypto.AESChainingMode\022\017\n\007counter\030\t \001(\003" + "\022\r\n\005keyId\030\n \001(\t\022\017\n\007isFirst\030\013 \001(\010\022\021\n\tmess" + "ageId\030\014 \001(\t\022\016\n\006userId\030\r \001(\005\"+\n\022AESDecryp" + "tResponse\022\025\n\rdecrypteddata\030\001 \001(\014*O\n\rKeyP" + "ermission\022\n\n\006VERIFY\020\000\022\010\n\004SIGN\020\001\022\013\n\007ENCRY" + "PT\020\002\022\013\n\007DECRYPT\020\003\022\016\n\nEXPORTABLE\020\004*>\n\017AES" + "ChainingMode\022\007\n\003ECB\020\000\022\007\n\003CBC\020\001\022\007\n\003CFB\020\002\022" + "\007\n\003OFB\020\003\022\007\n\003CTR\020\004*&\n\022AsymmetricFunction\022" + "\007\n\003RSA\020\000\022\007\n\003ECC\020\001*(\n\014SHAAlgorithm\022\n\n\006SHA" + "256\020\000\022\014\n\010SHA3_512\020\001*5\n\014AESKeyLength\022\013\n\007A" + "ES_128\020\000\022\013\n\007AES_192\020\001\022\013\n\007AES_256\020\0022\231\021\n\rC" + "ryptoService\0226\n\nbootSystem\022\031.crypto.Boot" + "SystemRequest\032\r.crypto.Empty\0227\n\013addProcc" + "ess\022\031.crypto.AddProcessRequest\032\r.crypto." + "Empty\0224\n\tconfigure\022\030.crypto.ConfigureReq" + "uest\032\r.crypto.Empty\022O\n\016generateAESKey\022\035." + "crypto.GenerateAESKeyRequest\032\036.crypto.Ge" + "nerateAESKeyResponse\022U\n\022generateRSAKeyPa" + "ir\022\036.crypto.GenerateKeyPairRequest\032\037.cry" + "pto.GenerateKeyPairResponse\022U\n\022generateE" + "CCKeyPair\022\036.crypto.GenerateKeyPairReques" + "t\032\037.crypto.GenerateKeyPairResponse\022N\n\023ge" + "tSignedDataLength\022\034.crypto.GetHashLength" + "Request\032\031.crypto.GetLengthResponse\022L\n\025ge" + "tECCencryptedLength\022\030.crypto.GetLengthRe" + "quest\032\031.crypto.GetLengthResponse\022L\n\025getE" + "CCDecryptedLength\022\030.crypto.GetLengthRequ" + "est\032\031.crypto.GetLengthResponse\022L\n\025getRSA" + "encryptedLength\022\030.crypto.GetLengthReques" + "t\032\031.crypto.GetLengthResponse\022L\n\025getRSAde" + "cryptedLength\022\030.crypto.GetLengthRequest\032" + "\031.crypto.GetLengthResponse\022O\n\025getAESencr" + "yptedLength\022\033.crypto.GetAESLengthRequest" + "\032\031.crypto.GetLengthResponse\022O\n\025getAESdec" + "ryptedLength\022\033.crypto.GetAESLengthReques" + "t\032\031.crypto.GetLengthResponse\022D\n\017getEncry" + "ptedLen\022\026.crypto.GetWholeLength\032\031.crypto" + ".GetLengthResponse\022D\n\017getDecryptedLen\022\026." + "crypto.GetWholeLength\032\031.crypto.GetLength" + "Response\0221\n\004sign\022\023.crypto.SignRequest\032\024." + "crypto.SignResponse\0227\n\006verify\022\025.crypto.V" + "erifyRequest\032\026.crypto.VerifyResponse\022B\n\027" + "getPublicECCKeyByUserId\022\022.crypto.KeyRequ" + "est\032\023.crypto.KeyResponse\022B\n\027getPublicRSA" + "KeyByUserId\022\022.crypto.KeyRequest\032\023.crypto" + ".KeyResponse\022O\n\nECCencrypt\022\037.crypto.Asym" + "etricEncryptRequest\032 .crypto.AsymetricEn" + "cryptResponse\022O\n\nECCdecrypt\022\037.crypto.Asy" + "metricDecryptRequest\032 .crypto.AsymetricD" + "ecryptResponse\022O\n\nRSAencrypt\022\037.crypto.As" + "ymetricEncryptRequest\032 .crypto.Asymetric" + "EncryptResponse\022O\n\nRSAdecrypt\022\037.crypto.A" + "symetricDecryptRequest\032 .crypto.Asymetri" + "cDecryptResponse\022C\n\nAESencrypt\022\031.crypto." + "AESEncryptRequest\032\032.crypto.AESEncryptRes" + "ponse\022C\n\nAESdecrypt\022\031.crypto.AESDecryptR" + "equest\032\032.crypto.AESDecryptResponse\022:\n\007en" + "crypt\022\026.crypto.EncryptRequest\032\027.crypto.E" + "ncryptResponse\022:\n\007decrypt\022\026.crypto.Decry" + "ptRequest\032\027.crypto.DecryptResponse\0227\n\nsi" + "gnUpdate\022\023.crypto.SignRequest\032\024.crypto.S" + "ignResponse\0229\n\014signFinalize\022\023.crypto.Sig" + "nRequest\032\024.crypto.SignResponse\022=\n\014verify" + "Update\022\025.crypto.VerifyRequest\032\026.crypto.V" + "erifyResponse\022\?\n\016verifyFinalize\022\025.crypto" + ".VerifyRequest\032\026.crypto.VerifyResponseb\006" + "proto3" ; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_proto_2fencryption_2eproto_once; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_proto_2fencryption_2eproto = { - false, false, 5814, descriptor_table_protodef_proto_2fencryption_2eproto, "proto/encryption.proto", + false, false, 5846, descriptor_table_protodef_proto_2fencryption_2eproto, "proto/encryption.proto", &descriptor_table_proto_2fencryption_2eproto_once, nullptr, 0, 33, schemas, file_default_instances, TableStruct_proto_2fencryption_2eproto::offsets, file_level_metadata_proto_2fencryption_2eproto, file_level_enum_descriptors_proto_2fencryption_2eproto, file_level_service_descriptors_proto_2fencryption_2eproto, @@ -3217,8 +3222,8 @@ GetWholeLength::GetWholeLength(const GetWholeLength& from) GetArenaForAllocation()); } ::memcpy(&senderid_, &from.senderid_, - static_cast(reinterpret_cast(&isfirst_) - - reinterpret_cast(&senderid_)) + sizeof(isfirst_)); + static_cast(reinterpret_cast(&userid_) - + reinterpret_cast(&senderid_)) + sizeof(userid_)); // @@protoc_insertion_point(copy_constructor:crypto.GetWholeLength) } @@ -3226,8 +3231,8 @@ void GetWholeLength::SharedCtor() { messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&senderid_) - reinterpret_cast(this)), - 0, static_cast(reinterpret_cast(&isfirst_) - - reinterpret_cast(&senderid_)) + sizeof(isfirst_)); + 0, static_cast(reinterpret_cast(&userid_) - + reinterpret_cast(&senderid_)) + sizeof(userid_)); } GetWholeLength::~GetWholeLength() { @@ -3260,8 +3265,8 @@ void GetWholeLength::Clear() { messageid_.ClearToEmpty(); ::memset(&senderid_, 0, static_cast( - reinterpret_cast(&isfirst_) - - reinterpret_cast(&senderid_)) + sizeof(isfirst_)); + reinterpret_cast(&userid_) - + reinterpret_cast(&senderid_)) + sizeof(userid_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -3305,6 +3310,14 @@ const char* GetWholeLength::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE } else goto handle_unusual; continue; + // int32 userId = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + userid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -3362,6 +3375,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* GetWholeLength::_InternalSerialize( 4, this->_internal_messageid(), target); } + // int32 userId = 5; + if (this->_internal_userid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_userid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -3400,6 +3419,11 @@ size_t GetWholeLength::ByteSizeLong() const { total_size += 1 + 1; } + // int32 userId = 5; + if (this->_internal_userid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_userid()); + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); } @@ -3434,6 +3458,9 @@ void GetWholeLength::MergeFrom(const GetWholeLength& from) { if (from._internal_isfirst() != 0) { _internal_set_isfirst(from._internal_isfirst()); } + if (from._internal_userid() != 0) { + _internal_set_userid(from._internal_userid()); + } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -3459,8 +3486,8 @@ void GetWholeLength::InternalSwap(GetWholeLength* other) { &other->messageid_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(GetWholeLength, isfirst_) - + sizeof(GetWholeLength::isfirst_) + PROTOBUF_FIELD_OFFSET(GetWholeLength, userid_) + + sizeof(GetWholeLength::userid_) - PROTOBUF_FIELD_OFFSET(GetWholeLength, senderid_)>( reinterpret_cast(&senderid_), reinterpret_cast(&other->senderid_)); @@ -9321,8 +9348,8 @@ AESDecryptRequest::AESDecryptRequest(const AESDecryptRequest& from) GetArenaForAllocation()); } ::memcpy(&senderid_, &from.senderid_, - static_cast(reinterpret_cast(&isfirst_) - - reinterpret_cast(&senderid_)) + sizeof(isfirst_)); + static_cast(reinterpret_cast(&userid_) - + reinterpret_cast(&senderid_)) + sizeof(userid_)); // @@protoc_insertion_point(copy_constructor:crypto.AESDecryptRequest) } @@ -9333,8 +9360,8 @@ keyid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlread messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&senderid_) - reinterpret_cast(this)), - 0, static_cast(reinterpret_cast(&isfirst_) - - reinterpret_cast(&senderid_)) + sizeof(isfirst_)); + 0, static_cast(reinterpret_cast(&userid_) - + reinterpret_cast(&senderid_)) + sizeof(userid_)); } AESDecryptRequest::~AESDecryptRequest() { @@ -9373,8 +9400,8 @@ void AESDecryptRequest::Clear() { keyid_.ClearToEmpty(); messageid_.ClearToEmpty(); ::memset(&senderid_, 0, static_cast( - reinterpret_cast(&isfirst_) - - reinterpret_cast(&senderid_)) + sizeof(isfirst_)); + reinterpret_cast(&userid_) - + reinterpret_cast(&senderid_)) + sizeof(userid_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -9489,6 +9516,14 @@ const char* AESDecryptRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP } else goto handle_unusual; continue; + // int32 userId = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { + userid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -9601,6 +9636,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* AESDecryptRequest::_InternalSerialize( 12, this->_internal_messageid(), target); } + // int32 userId = 13; + if (this->_internal_userid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(13, this->_internal_userid(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -9688,6 +9729,11 @@ size_t AESDecryptRequest::ByteSizeLong() const { total_size += 1 + 1; } + // int32 userId = 13; + if (this->_internal_userid() != 0) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_userid()); + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); } @@ -9746,6 +9792,9 @@ void AESDecryptRequest::MergeFrom(const AESDecryptRequest& from) { if (from._internal_isfirst() != 0) { _internal_set_isfirst(from._internal_isfirst()); } + if (from._internal_userid() != 0) { + _internal_set_userid(from._internal_userid()); + } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -9786,8 +9835,8 @@ void AESDecryptRequest::InternalSwap(AESDecryptRequest* other) { &other->messageid_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(AESDecryptRequest, isfirst_) - + sizeof(AESDecryptRequest::isfirst_) + PROTOBUF_FIELD_OFFSET(AESDecryptRequest, userid_) + + sizeof(AESDecryptRequest::userid_) - PROTOBUF_FIELD_OFFSET(AESDecryptRequest, senderid_)>( reinterpret_cast(&senderid_), reinterpret_cast(&other->senderid_)); diff --git a/hsm-server/proto/encryption.pb.cc:Zone.Identifier b/hsm-server/proto/encryption.pb.cc:Zone.Identifier new file mode 100644 index 00000000..e69de29b diff --git a/hsm/proto/encryption.pb.h b/hsm-server/proto/encryption.pb.h similarity index 99% rename from hsm/proto/encryption.pb.h rename to hsm-server/proto/encryption.pb.h index 52fdf2e8..33e5c77a 100644 --- a/hsm/proto/encryption.pb.h +++ b/hsm-server/proto/encryption.pb.h @@ -1825,6 +1825,7 @@ class GetWholeLength final : kSenderIdFieldNumber = 1, kInLenFieldNumber = 2, kIsFirstFieldNumber = 3, + kUserIdFieldNumber = 5, }; // string messageId = 4; void clear_messageid(); @@ -1867,6 +1868,15 @@ class GetWholeLength final : void _internal_set_isfirst(bool value); public: + // int32 userId = 5; + void clear_userid(); + ::PROTOBUF_NAMESPACE_ID::int32 userid() const; + void set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_userid() const; + void _internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + // @@protoc_insertion_point(class_scope:crypto.GetWholeLength) private: class _Internal; @@ -1878,6 +1888,7 @@ class GetWholeLength final : ::PROTOBUF_NAMESPACE_ID::int32 senderid_; ::PROTOBUF_NAMESPACE_ID::int32 inlen_; bool isfirst_; + ::PROTOBUF_NAMESPACE_ID::int32 userid_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -5929,6 +5940,7 @@ class AESDecryptRequest final : kChainingModeFieldNumber = 8, kCounterFieldNumber = 9, kIsFirstFieldNumber = 11, + kUserIdFieldNumber = 13, }; // bytes dataIn = 3; void clear_datain(); @@ -6058,6 +6070,15 @@ class AESDecryptRequest final : void _internal_set_isfirst(bool value); public: + // int32 userId = 13; + void clear_userid(); + ::PROTOBUF_NAMESPACE_ID::int32 userid() const; + void set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_userid() const; + void _internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + // @@protoc_insertion_point(class_scope:crypto.AESDecryptRequest) private: class _Internal; @@ -6077,6 +6098,7 @@ class AESDecryptRequest final : int chainingmode_; ::PROTOBUF_NAMESPACE_ID::int64 counter_; bool isfirst_; + ::PROTOBUF_NAMESPACE_ID::int32 userid_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_proto_2fencryption_2eproto; }; @@ -7143,6 +7165,26 @@ inline void GetWholeLength::set_allocated_messageid(std::string* messageid) { // @@protoc_insertion_point(field_set_allocated:crypto.GetWholeLength.messageId) } +// int32 userId = 5; +inline void GetWholeLength::clear_userid() { + userid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetWholeLength::_internal_userid() const { + return userid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GetWholeLength::userid() const { + // @@protoc_insertion_point(field_get:crypto.GetWholeLength.userId) + return _internal_userid(); +} +inline void GetWholeLength::_internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + userid_ = value; +} +inline void GetWholeLength::set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_userid(value); + // @@protoc_insertion_point(field_set:crypto.GetWholeLength.userId) +} + // ------------------------------------------------------------------- // GenerateAESKeyRequest @@ -10073,6 +10115,26 @@ inline void AESDecryptRequest::set_allocated_messageid(std::string* messageid) { // @@protoc_insertion_point(field_set_allocated:crypto.AESDecryptRequest.messageId) } +// int32 userId = 13; +inline void AESDecryptRequest::clear_userid() { + userid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::_internal_userid() const { + return userid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 AESDecryptRequest::userid() const { + // @@protoc_insertion_point(field_get:crypto.AESDecryptRequest.userId) + return _internal_userid(); +} +inline void AESDecryptRequest::_internal_set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + userid_ = value; +} +inline void AESDecryptRequest::set_userid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_userid(value); + // @@protoc_insertion_point(field_set:crypto.AESDecryptRequest.userId) +} + // ------------------------------------------------------------------- // AESDecryptResponse diff --git a/hsm-server/proto/encryption.pb.h:Zone.Identifier b/hsm-server/proto/encryption.pb.h:Zone.Identifier new file mode 100644 index 00000000..e69de29b diff --git a/hsm/proto/encryption.proto b/hsm-server/proto/encryption.proto similarity index 99% rename from hsm/proto/encryption.proto rename to hsm-server/proto/encryption.proto index 28ac2ce8..c44cb551 100644 --- a/hsm/proto/encryption.proto +++ b/hsm-server/proto/encryption.proto @@ -49,14 +49,12 @@ message AsymetricDecryptRequest{ string keyId = 3; bytes data = 4; string messageId = 5; - } message GetHashLengthRequest{ int32 senderId = 1; SHAAlgorithm func = 2; int32 dataLen = 3; string messageId = 4; - } message GetAESLengthRequest{ int32 senderId = 1; @@ -64,7 +62,6 @@ message GetAESLengthRequest{ bool isFirst = 3; AESChainingMode chainingMode = 4; string messageId = 5; - } message AsymetricDecryptResponse{ bytes decryptedData = 1; @@ -73,7 +70,6 @@ message GetLengthRequest { int32 senderId = 1; int32 inLen = 2; string messageId = 3; - } message GetLengthResponse { int32 len = 1; @@ -83,7 +79,7 @@ message GetWholeLength{ int32 inLen = 2; bool isFirst = 3; string messageId = 4; - + int32 userId = 5; } message GenerateAESKeyRequest { int32 userId = 1; @@ -91,7 +87,6 @@ message GenerateAESKeyRequest { AESKeyLength keyLength = 3; int32 destUserId = 4; string messageId = 5; - } message GenerateAESKeyResponse { string aesKey = 1; @@ -100,7 +95,6 @@ message GenerateKeyPairRequest { int32 userId = 1; repeated KeyPermission permissions = 2; string messageId = 3; - } message GenerateKeyPairResponse { string publicKey = 1; @@ -113,7 +107,6 @@ message SignRequest { int64 counter = 5; string keyId = 6; string messageId = 7; - } message SignResponse { bytes signature = 1; @@ -127,7 +120,6 @@ message VerifyRequest { string keyId = 6; int32 counter = 7; string messageId = 8; - } message VerifyResponse { bool valid = 1; @@ -148,7 +140,6 @@ message UserKeyPermissions { message BootSystemRequest { repeated UserKeyPermissions usersIdsPermissions = 1; string messageId = 5; - } message Empty{ } @@ -206,7 +197,6 @@ message AESEncryptRequest { AESChainingMode chainingMode = 8; bool isFirst = 9; string messageId = 10; - } message AESEncryptResponse { bytes encryptedData = 1; @@ -224,8 +214,7 @@ message AESDecryptRequest { string keyId = 10; bool isFirst = 11; string messageId = 12; - - + int32 userId = 13; } message AESDecryptResponse { bytes decrypteddata = 1; diff --git a/hsm-server/proto/encryption.proto:Zone.Identifier b/hsm-server/proto/encryption.proto:Zone.Identifier new file mode 100644 index 00000000..e69de29b diff --git a/hsm/src/SHA3-512.cpp b/hsm-server/src/SHA3-512.cpp similarity index 50% rename from hsm/src/SHA3-512.cpp rename to hsm-server/src/SHA3-512.cpp index 31c1f5bb..73ee8a4c 100644 --- a/hsm/src/SHA3-512.cpp +++ b/hsm-server/src/SHA3-512.cpp @@ -37,11 +37,12 @@ static const uint64_t RC[24] = { * @note The logger is initialized to log messages related to the SHA3-512 * algorithm. */ -SHA3_512::SHA3_512() { - log(logger::LogLevel::INFO, "SHA3-512: Initializing..."); - std::memset(S, 0, sizeof(S)); // Clear state - std::memset(buffer, 0, sizeof(buffer)); // Clear buffer - buffer_length = 0; // Reset buffer length +SHA3_512::SHA3_512() +{ + log(logger::LogLevel::INFO, "SHA3-512: Initializing..."); + std::memset(S, 0, sizeof(S)); // Clear state + std::memset(buffer, 0, sizeof(buffer)); // Clear buffer + buffer_length = 0; // Reset buffer length } /** @@ -56,33 +57,34 @@ SHA3_512::SHA3_512() { * * @note This function logs the start and completion of the round operation. */ -void SHA3_512::round(uint64_t A[5][5], uint64_t RC) { - uint64_t C[5]; - for (int x = 0; x < 5; x++) - C[x] = A[x][0] ^ A[x][1] ^ A[x][2] ^ A[x][3] ^ A[x][4]; - - uint64_t D[5]; - for (int x = 0; x < 5; x++) - D[x] = C[(x + 4) % 5] ^ ROT(C[(x + 1) % 5], 1); - - // Update state matrix A with D values - for (int x = 0; x < 5; x++) - for (int y = 0; y < 5; y++) - A[x][y] = A[x][y] ^ D[x]; - - // ρ & π steps: Perform rotation and permutation - uint64_t B[5][5]; - for (int x = 0; x < 5; x++) - for (int y = 0; y < 5; y++) - B[y][(2 * x + 3 * y) % 5] = ROT(A[x][y], r[x][y]); - - // χ step: Apply the χ transformation - for (int x = 0; x < 5; x++) - for (int y = 0; y < 5; y++) - A[x][y] = B[x][y] ^ ((~(B[(x + 1) % 5][y])) & B[(x + 2) % 5][y]); - - // ι step: Apply the round constant - A[0][0] = A[0][0] ^ RC; +void SHA3_512::round(uint64_t A[5][5], uint64_t RC) +{ + uint64_t C[5]; + for (int x = 0; x < 5; x++) + C[x] = A[x][0] ^ A[x][1] ^ A[x][2] ^ A[x][3] ^ A[x][4]; + + uint64_t D[5]; + for (int x = 0; x < 5; x++) + D[x] = C[(x + 4) % 5] ^ ROT(C[(x + 1) % 5], 1); + + // Update state matrix A with D values + for (int x = 0; x < 5; x++) + for (int y = 0; y < 5; y++) + A[x][y] = A[x][y] ^ D[x]; + + // ρ & π steps: Perform rotation and permutation + uint64_t B[5][5]; + for (int x = 0; x < 5; x++) + for (int y = 0; y < 5; y++) + B[y][(2 * x + 3 * y) % 5] = ROT(A[x][y], r[x][y]); + + // χ step: Apply the χ transformation + for (int x = 0; x < 5; x++) + for (int y = 0; y < 5; y++) + A[x][y] = B[x][y] ^ ((~(B[(x + 1) % 5][y])) & B[(x + 2) % 5][y]); + + // ι step: Apply the round constant + A[0][0] = A[0][0] ^ RC; } /** @@ -97,13 +99,14 @@ void SHA3_512::round(uint64_t A[5][5], uint64_t RC) { * * @note This function logs the start and completion of the permutation process. */ -void SHA3_512::f_function(uint64_t A[5][5]) { - log(logger::LogLevel::DEBUG, "SHA3-512: Starting f_function."); +void SHA3_512::f_function(uint64_t A[5][5]) +{ + log(logger::LogLevel::DEBUG, "SHA3-512: Starting f_function."); - for (int i = 0; i < 24; i++) - round(A, RC[i]); + for (int i = 0; i < 24; i++) + round(A, RC[i]); - log(logger::LogLevel::DEBUG, "SHA3-512: Done f_function."); + log(logger::LogLevel::DEBUG, "SHA3-512: Done f_function."); } /** @@ -127,36 +130,36 @@ void SHA3_512::f_function(uint64_t A[5][5]) { * involves adding a 0x06 byte followed by zeroes, and ending with a 0x80 byte. * The function logs various stages of padding and any errors encountered. */ -void SHA3_512::padding(uint8_t input[], std::size_t &in_len, - int &absorb_times) { - absorb_times = in_len / BLOCK_SIZE; // Number of full blocks - std::size_t add_last = in_len % BLOCK_SIZE; // Remaining bytes - log(logger::LogLevel::DEBUG, - "SHA3-512: Remaining bytes: " + std::to_string(add_last)); - - if (BLOCK_SIZE - add_last == 1) { - log( - logger::LogLevel::DEBUG, - "SHA3-512: Padding byte for the case where only one byte is left"); - input[in_len] = - 0x86; // Padding byte for the case where only one byte is left - } else if (BLOCK_SIZE - add_last > 1) { - log(logger::LogLevel::DEBUG, - "SHA3-512: Applying general padding"); - input[in_len] = 0x06; // Padding byte for general case - for (int i = 1; i < (BLOCK_SIZE - 1 - add_last); i++) - input[in_len + i] = 0x00; // Fill with zeroes - input[in_len + (BLOCK_SIZE - 1 - add_last)] = 0x80; // Final padding byte - in_len += (BLOCK_SIZE - add_last); // Update length - } else { - log(logger::LogLevel::ERROR, - "SHA3-512: Unexpected padding error"); - throw std::runtime_error( - "Padding failed due to unexpected error. Remaining bytes: " + - std::to_string(add_last)); - } - - absorb_times += 1; // Include the final padding block +void SHA3_512::padding(uint8_t input[], std::size_t &in_len, int &absorb_times) +{ + absorb_times = in_len / BLOCK_SIZE; // Number of full blocks + std::size_t add_last = in_len % BLOCK_SIZE; // Remaining bytes + log(logger::LogLevel::DEBUG, + "SHA3-512: Remaining bytes: " + std::to_string(add_last)); + + if (BLOCK_SIZE - add_last == 1) { + log(logger::LogLevel::DEBUG, + "SHA3-512: Padding byte for the case where only one byte is left"); + input[in_len] = + 0x86; // Padding byte for the case where only one byte is left + } + else if (BLOCK_SIZE - add_last > 1) { + log(logger::LogLevel::DEBUG, "SHA3-512: Applying general padding"); + input[in_len] = 0x06; // Padding byte for general case + for (int i = 1; i < (BLOCK_SIZE - 1 - add_last); i++) + input[in_len + i] = 0x00; // Fill with zeroes + input[in_len + (BLOCK_SIZE - 1 - add_last)] = + 0x80; // Final padding byte + in_len += (BLOCK_SIZE - add_last); // Update length + } + else { + log(logger::LogLevel::ERROR, "SHA3-512: Unexpected padding error"); + throw std::runtime_error( + "Padding failed due to unexpected error. Remaining bytes: " + + std::to_string(add_last)); + } + + absorb_times += 1; // Include the final padding block } /** @@ -176,16 +179,17 @@ void SHA3_512::padding(uint8_t input[], std::size_t &in_len, * @note The function assumes that the size of the block `p` is 25 elements. It * logs the block data and state matrix before and after the XOR operation. */ -void SHA3_512::assign_S_xor_p(uint64_t S[5][5], uint64_t *p) { - // Perform XOR of the block with the state matrix - for (int x = 0; x < 5; x++) { - for (int y = 0; y < 5; y++) { - int index = x + 5 * y; - if (index < 25) { - S[x][y] ^= p[index]; - } +void SHA3_512::assign_S_xor_p(uint64_t S[5][5], uint64_t *p) +{ + // Perform XOR of the block with the state matrix + for (int x = 0; x < 5; x++) { + for (int y = 0; y < 5; y++) { + int index = x + 5 * y; + if (index < 25) { + S[x][y] ^= p[index]; + } + } } - } } /** @@ -202,12 +206,13 @@ void SHA3_512::assign_S_xor_p(uint64_t S[5][5], uint64_t *p) { * endian swap for debugging purposes. Ensure that the integer is appropriately * sized (64-bit) for this operation. */ -void SHA3_512::endianSwap(uint64_t &x) { - // Perform endian swap - x = (x >> 56) | ((x << 40) & 0x00FF000000000000) | - ((x << 24) & 0x0000FF0000000000) | ((x << 8) & 0x000000FF00000000) | - ((x >> 8) & 0x00000000FF000000) | ((x >> 24) & 0x0000000000FF0000) | - ((x >> 40) & 0x000000000000FF00) | (x << 56); +void SHA3_512::endianSwap(uint64_t &x) +{ + // Perform endian swap + x = (x >> 56) | ((x << 40) & 0x00FF000000000000) | + ((x << 24) & 0x0000FF0000000000) | ((x << 8) & 0x000000FF00000000) | + ((x >> 8) & 0x00000000FF000000) | ((x >> 24) & 0x0000000000FF0000) | + ((x >> 40) & 0x000000000000FF00) | (x << 56); } /** @@ -229,20 +234,21 @@ void SHA3_512::endianSwap(uint64_t &x) { * `std::setw` to ensure each 64-bit integer is represented as a 16-character * wide hexadecimal string. */ -std::vector SHA3_512::hashPartToHexVector(uint64_t S[5][5]) { - std::ostringstream oss; - oss << std::hex << std::setfill('0'); - // Append values in the specified order - oss << std::setw(16) << S[0][0] << std::setw(16) << S[1][0] << std::setw(16) - << S[2][0] << std::setw(16) << S[3][0] << std::setw(16) << S[4][0] - << std::setw(16) << S[0][1] << std::setw(16) << S[1][1] << std::setw(16) - << S[2][1]; - std::string res = oss.str(); - std::vector vec; - vec.reserve(res.size()); // Optional: reserve space for performance - for (char c : res) - vec.push_back(static_cast(c)); - return vec; +std::vector SHA3_512::hashPartToHexVector(uint64_t S[5][5]) +{ + std::ostringstream oss; + oss << std::hex << std::setfill('0'); + // Append values in the specified order + oss << std::setw(16) << S[0][0] << std::setw(16) << S[1][0] << std::setw(16) + << S[2][0] << std::setw(16) << S[3][0] << std::setw(16) << S[4][0] + << std::setw(16) << S[0][1] << std::setw(16) << S[1][1] << std::setw(16) + << S[2][1]; + std::string res = oss.str(); + std::vector vec; + vec.reserve(res.size()); // Optional: reserve space for performance + for (char c : res) + vec.push_back(static_cast(c)); + return vec; } /** @@ -264,57 +270,55 @@ std::vector SHA3_512::hashPartToHexVector(uint64_t S[5][5]) { * length exceeds its size, an error will be logged, and the function will * return `CKR_FUNCTION_FAILED`. */ -CK_RV SHA3_512::update(const std::vector &data) { - log(logger::LogLevel::INFO, - "SHA3-512: Starting update with length: " + - std::to_string(data.size())); - - // Define the input size and starting pointer - std::size_t length = data.size(); - std::size_t data_index = 0; - - // Absorb input into the buffer and process in 72-byte chunks (576 bits) - while (length > 0) { - if (buffer_length > sizeof(buffer)) { - log(logger::LogLevel::ERROR, - "SHA3-512: Buffer length is bigger then buffer size"); - return CKR_FUNCTION_FAILED; - } - // Calculate the number of bytes we can copy into the buffer - std::size_t to_copy = std::min(length, sizeof(buffer) - buffer_length); - - // Copy input data into the buffer - std::memcpy(buffer + buffer_length, data.data(), to_copy); - - // Update buffer length and input pointers - buffer_length += to_copy; - data_index += to_copy; - length -= to_copy; - - log( - logger::LogLevel::DEBUG, - "SHA3-512: Copied " + std::to_string(to_copy) + - " bytes, remaining: " + std::to_string(length)); - - // If the buffer is full, process the absorbed data - if (buffer_length == sizeof(buffer)) { - // Convert the buffer into a block and XOR with state - uint64_t *block = reinterpret_cast(buffer); - assign_S_xor_p(S, block); - - // Apply the Keccak-f function to update the state - f_function(S); - - // Reset buffer length for the next block of data - buffer_length = 0; - log(logger::LogLevel::DEBUG, - "SHA3-512: Processed a full block."); +CK_RV SHA3_512::update(const std::vector &data) +{ + log(logger::LogLevel::INFO, "SHA3-512: Starting update with length: " + + std::to_string(data.size())); + + // Define the input size and starting pointer + std::size_t length = data.size(); + std::size_t data_index = 0; + + // Absorb input into the buffer and process in 72-byte chunks (576 bits) + while (length > 0) { + if (buffer_length > sizeof(buffer)) { + log(logger::LogLevel::ERROR, + "SHA3-512: Buffer length is bigger then buffer size"); + return CKR_FUNCTION_FAILED; + } + // Calculate the number of bytes we can copy into the buffer + std::size_t to_copy = std::min(length, sizeof(buffer) - buffer_length); + + // Copy input data into the buffer + std::memcpy(buffer + buffer_length, data.data(), to_copy); + + // Update buffer length and input pointers + buffer_length += to_copy; + data_index += to_copy; + length -= to_copy; + + log(logger::LogLevel::DEBUG, + "SHA3-512: Copied " + std::to_string(to_copy) + + " bytes, remaining: " + std::to_string(length)); + + // If the buffer is full, process the absorbed data + if (buffer_length == sizeof(buffer)) { + // Convert the buffer into a block and XOR with state + uint64_t *block = reinterpret_cast(buffer); + assign_S_xor_p(S, block); + + // Apply the Keccak-f function to update the state + f_function(S); + + // Reset buffer length for the next block of data + buffer_length = 0; + log(logger::LogLevel::DEBUG, "SHA3-512: Processed a full block."); + } } - } - log(logger::LogLevel::INFO, "SHA3-512: Update completed successfully."); + log(logger::LogLevel::INFO, "SHA3-512: Update completed successfully."); - return CKR_OK; + return CKR_OK; } /** @@ -337,49 +341,50 @@ CK_RV SHA3_512::update(const std::vector &data) { * a hexadecimal string. */ -CK_RV SHA3_512::finalize(std::vector &output) { - log(logger::LogLevel::INFO, "SHA3-512: Finalizing"); - - // Handle remaining data in the buffer with padding - std::size_t remaining_length = buffer_length; - log(logger::LogLevel::DEBUG, - "SHA3-512: Length of remaining unprocessed data: " + - std::to_string(remaining_length)); - - // Apply padding to the buffer - int absorb_times = 0; - - try { - padding(buffer, remaining_length, - absorb_times); // Call padding in try block - log( - logger::LogLevel::DEBUG, - "SHA3-512: Number of blocks to be processed after padding: " + - std::to_string(absorb_times)); - } catch (const std::exception &e) { - // Log the exception error message - log(logger::LogLevel::ERROR, - "SHA3-512: Padding error: " + std::string(e.what())); - return CKR_FUNCTION_FAILED; - } - - // Process any remaining data including padding - for (int i = 0; i < absorb_times; i++) { - // Convert the buffer into a block and XOR with state - uint64_t *block = reinterpret_cast(buffer + i * BLOCK_SIZE); - assign_S_xor_p(S, block); - - // Apply the Keccak-f function to update the state - f_function(S); - } - - // Perform endianess swap for each element of the state matrix - for (int i = 0; i < 5; i++) - for (int j = 0; j < 5; j++) - endianSwap(S[i][j]); - - // Convert the state to a hex string - output = hashPartToHexVector(S); - log(logger::LogLevel::INFO, "SHA3-512: Finalize completed successfully."); - return CKR_OK; +CK_RV SHA3_512::finalize(std::vector &output) +{ + log(logger::LogLevel::INFO, "SHA3-512: Finalizing"); + + // Handle remaining data in the buffer with padding + std::size_t remaining_length = buffer_length; + log(logger::LogLevel::DEBUG, + "SHA3-512: Length of remaining unprocessed data: " + + std::to_string(remaining_length)); + + // Apply padding to the buffer + int absorb_times = 0; + + try { + padding(buffer, remaining_length, + absorb_times); // Call padding in try block + log(logger::LogLevel::DEBUG, + "SHA3-512: Number of blocks to be processed after padding: " + + std::to_string(absorb_times)); + } + catch (const std::exception &e) { + // Log the exception error message + log(logger::LogLevel::ERROR, + "SHA3-512: Padding error: " + std::string(e.what())); + return CKR_FUNCTION_FAILED; + } + + // Process any remaining data including padding + for (int i = 0; i < absorb_times; i++) { + // Convert the buffer into a block and XOR with state + uint64_t *block = reinterpret_cast(buffer + i * BLOCK_SIZE); + assign_S_xor_p(S, block); + + // Apply the Keccak-f function to update the state + f_function(S); + } + + // Perform endianess swap for each element of the state matrix + for (int i = 0; i < 5; i++) + for (int j = 0; j < 5; j++) + endianSwap(S[i][j]); + + // Convert the state to a hex string + output = hashPartToHexVector(S); + log(logger::LogLevel::INFO, "SHA3-512: Finalize completed successfully."); + return CKR_OK; } \ No newline at end of file diff --git a/hsm/src/aes.cpp b/hsm-server/src/aes.cpp similarity index 99% rename from hsm/src/aes.cpp rename to hsm-server/src/aes.cpp index aabf219a..715a3587 100644 --- a/hsm/src/aes.cpp +++ b/hsm-server/src/aes.cpp @@ -30,7 +30,7 @@ void generateRandomIV(unsigned char *iv) for (unsigned int i = 0; i < BLOCK_BYTES_LEN; i++) iv[i] = static_cast(dis(gen)); //TODO delete this! - std::memset(iv, 01, BLOCK_BYTES_LEN); + std::memset(iv, 01, BLOCK_BYTES_LEN); } unsigned int getPaddedLength(unsigned int originalLength) diff --git a/hsm/src/aes_cbc.cpp b/hsm-server/src/aes_cbc.cpp similarity index 100% rename from hsm/src/aes_cbc.cpp rename to hsm-server/src/aes_cbc.cpp diff --git a/hsm/src/aes_cfb.cpp b/hsm-server/src/aes_cfb.cpp similarity index 99% rename from hsm/src/aes_cfb.cpp rename to hsm-server/src/aes_cfb.cpp index 9da2f495..65eef1c4 100644 --- a/hsm/src/aes_cfb.cpp +++ b/hsm-server/src/aes_cfb.cpp @@ -18,7 +18,8 @@ void AESCfb::encryptStart(unsigned char block[], unsigned int inLen, unsigned char *key, AESKeyLength keyLength) { generateRandomIV(iv); - encrypt(block, inLen, key, out, outLen - BLOCK_BYTES_LEN, iv, nullptr, keyLength); + encrypt(block, inLen, key, out, outLen - BLOCK_BYTES_LEN, iv, nullptr, + keyLength); memcpy(out + outLen - BLOCK_BYTES_LEN, iv, BLOCK_BYTES_LEN); memcpy(lastBlock, out + outLen - BLOCK_BYTES_LEN * 2, BLOCK_BYTES_LEN); this->key = new unsigned char[keyLength]; diff --git a/hsm/src/aes_ctr.cpp b/hsm-server/src/aes_ctr.cpp similarity index 100% rename from hsm/src/aes_ctr.cpp rename to hsm-server/src/aes_ctr.cpp diff --git a/hsm/src/aes_ecb.cpp b/hsm-server/src/aes_ecb.cpp similarity index 100% rename from hsm/src/aes_ecb.cpp rename to hsm-server/src/aes_ecb.cpp diff --git a/hsm/src/aes_ofb.cpp b/hsm-server/src/aes_ofb.cpp similarity index 98% rename from hsm/src/aes_ofb.cpp rename to hsm-server/src/aes_ofb.cpp index 9c42f1ad..d084838b 100644 --- a/hsm/src/aes_ofb.cpp +++ b/hsm-server/src/aes_ofb.cpp @@ -27,7 +27,7 @@ void AESOfb::decryptStart(unsigned char block[], unsigned int inLen, unsigned char *key, AESKeyLength keyLength) { memcpy(lastData, iv, BLOCK_BYTES_LEN); - memcpy(iv, block + inLen - BLOCK_BYTES_LEN,BLOCK_BYTES_LEN); + memcpy(iv, block + inLen - BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); decrypt(block, inLen - BLOCK_BYTES_LEN, key, out, outLen, block + inLen - BLOCK_BYTES_LEN, lastData, keyLength); memcpy(lastBlock, block + inLen - 2 * BLOCK_BYTES_LEN, BLOCK_BYTES_LEN); diff --git a/hsm/src/big_int10.cpp b/hsm-server/src/big_int10.cpp similarity index 98% rename from hsm/src/big_int10.cpp rename to hsm-server/src/big_int10.cpp index 12d16426..6380c89f 100644 --- a/hsm/src/big_int10.cpp +++ b/hsm-server/src/big_int10.cpp @@ -255,7 +255,7 @@ uint64_t BigInt10::toU64() const void BigInt10::removeLeadingZeros() { - while (limbs.size() > 1 && limbs.back() == 0) + while (limbs.size() > 1 && limbs.back() == 0) limbs.pop_back(); } @@ -373,8 +373,8 @@ void BigInt10::subtractUnsigned(const BigInt10 &b) BigInt10 longMultiplication(const BigInt10 &a, const BigInt10 &b) { - if (a.isZero() || b.isZero()) - return BigInt10(); + if (a.isZero() || b.isZero()) + return BigInt10(); int n = a.limbsCount(), m = b.limbsCount(); std::vector result(n + m, 0); @@ -430,7 +430,7 @@ BigInt10 longDivision(const BigInt10 &a, const BigInt10 &b, BigInt10 &remainder) break; left = mid + 1; } - else + else right = mid - 1; } @@ -440,7 +440,7 @@ BigInt10 longDivision(const BigInt10 &a, const BigInt10 &b, BigInt10 &remainder) if (quotient.size() > 0 || times > 0) quotient.push_back(times); } - + std::reverse(quotient.begin(), quotient.end()); BigInt10 quoti(a.isNegative != b.isNegative); quoti.limbs = std::move(quotient); diff --git a/hsm/src/big_int64.cpp b/hsm-server/src/big_int64.cpp similarity index 99% rename from hsm/src/big_int64.cpp rename to hsm-server/src/big_int64.cpp index 267a078e..0603d306 100644 --- a/hsm/src/big_int64.cpp +++ b/hsm-server/src/big_int64.cpp @@ -1439,7 +1439,7 @@ BigInt64 longDivision(const BigInt64 &a, const BigInt64 &b, BigInt64 &remainder) break; left = mid + 1; } - else + else right = mid - 1; } @@ -1692,4 +1692,4 @@ bool BigInt64::isEven() const { return (limbs[0] & 1) == 0; } -#endif \ No newline at end of file +#endif \ No newline at end of file diff --git a/hsm/src/crypto_api.cpp b/hsm-server/src/crypto_api.cpp similarity index 90% rename from hsm/src/crypto_api.cpp rename to hsm-server/src/crypto_api.cpp index d19cba59..be2e7374 100644 --- a/hsm/src/crypto_api.cpp +++ b/hsm-server/src/crypto_api.cpp @@ -18,12 +18,12 @@ constexpr size_t BITS_IN_BYTE = 8; constexpr size_t ECC_CIPHER_LENGTH = 512; constexpr size_t ECC_MAX_DECRYPTED_LENGTH = 256; -int getCountFromEncryptions(int userID) +int getCountFromEncryptions(int userID) { auto it = mapToInMiddleEncryptions.find(userID); - if (it != mapToInMiddleEncryptions.end()) + if (it != mapToInMiddleEncryptions.end()) return it->second.second; - + return 0; } @@ -87,21 +87,32 @@ std::string permissionsToString(const std::vector &permissions) CK_RV bootSystem( const std::map> &usersIdspermissions) { - log(logger::LogLevel::INFO, - "CryptoApi Boot System: Booting system started..."); + log(logger::LogLevel::INFO, "Boot: Booting system started..."); + for (const auto &[userId, permissions] : usersIdspermissions) { if (permissions.empty()) { - log(logger::LogLevel::ERROR, "User ID: " + std::to_string(userId) + - " did not send no permissions."); + log(logger::LogLevel::ERROR, + "Boot: User ID: " + std::to_string(userId) + + " did not send any permissions."); return CKR_ARGUMENTS_BAD; } + + // Generate ECC and RSA key pairs + std::pair eccIds = + TempHsm::getInstance().generateECCKeyPair(userId, permissions); + std::pair rsaIds = + TempHsm::getInstance().generateRSAKeyPair(userId, permissions); + + // Log the generated key IDs log(logger::LogLevel::INFO, - "Generating assymetric keys for User ID: " + - std::to_string(userId) + - ", Permissions: " + permissionsToString(permissions)); - TempHsm::getInstance().generateECCKeyPair(userId, permissions); - TempHsm::getInstance().generateRSAKeyPair(userId, permissions); + "Boot: Generated asymmetric keys for User ID: " + + std::to_string(userId) + ". ECC Key IDs (Public, Private): (" + + eccIds.first + ", " + eccIds.second + + "), RSA Key IDs (Public, Private): (" + rsaIds.first + ", " + + rsaIds.second + + "), Permissions: " + permissionsToString(permissions)); } + return CKR_OK; } @@ -181,9 +192,9 @@ CK_RV logAndHandleErrors(std::string action, int userId, std::string keyId, // ". An empty buffer was provided for " + action + "."); // return CKR_EMPTY_BUFFER; // } - CK_RV returnCode = logAndHandleErrors(action, userId, in, inLen, - isStarting); - if(returnCode != CKR_OK) + CK_RV returnCode = + logAndHandleErrors(action, userId, in, inLen, isStarting); + if (returnCode != CKR_OK) return returnCode; // Check if 'out' is nullptr @@ -209,18 +220,18 @@ CK_RV logAndHandleErrors(std::string action, int userId, std::string keyId, CK_RV logAndHandleErrors(std::string action, int userId, std::string keyId, void *in, size_t inLen, void *out, size_t outLen, - size_t requiredLength, bool isStarting, AESKeyLength keyLen) + size_t requiredLength, bool isStarting, + AESKeyLength keyLen) { - CK_RV returnCode = logAndHandleErrors(action, userId, keyId, - in, inLen, out, outLen, - requiredLength, isStarting); - if(returnCode!=CKR_OK) + CK_RV returnCode = logAndHandleErrors(action, userId, keyId, in, inLen, out, + outLen, requiredLength, isStarting); + if (returnCode != CKR_OK) return returnCode; - - if(!isValidAESKeyLength(keyLen)) - { + + if (!isValidAESKeyLength(keyLen)) { log(logger::LogLevel::ERROR, - "Invalid AES key length provided: "+std::to_string(keyLen)+". Supported lengths are 128, 192, or 256 bits."); + "Invalid AES key length provided: " + std::to_string(keyLen) + + ". Supported lengths are 128, 192, or 256 bits."); return CKR_KEY_SIZE_RANGE; } @@ -725,7 +736,9 @@ CK_RV retrieveAESKeyByKeyId(int userId, std::string aesKeyId, try { // std::pair, int> keyAndLength = // TempHsm::getInstance().getAESKey(userId, aesKeyId, permission); - symmetricKey = TempHsm::getInstance().getAESKey(userId, aesKeyId, permission).first; + symmetricKey = TempHsm::getInstance() + .getAESKey(userId, aesKeyId, permission) + .first; } catch (std::exception &e) { log(logger::LogLevel::ERROR, @@ -787,6 +800,7 @@ CK_RV performAESEncryption(int senderId, void *in, size_t inLen, void *out, std::shared_ptr symmetricKey, AESKeyLength keyLength, size_t counter) { + LOG_BUFFER_HEXA(in, inLen, "this is the plain data"); StreamAES *streamAES = FactoryManager::getInstance().create(chainingMode); mapToInMiddleEncryptions[senderId] = std::make_pair(streamAES, counter); @@ -794,6 +808,7 @@ CK_RV performAESEncryption(int senderId, void *in, size_t inLen, void *out, reinterpret_cast(in), inLen, static_cast(out), outLen, symmetricKey.get(), keyLength); + LOG_BUFFER_HEXA(out, outLen, "this is the encrypted data"); return CKR_OK; } @@ -807,12 +822,13 @@ CK_RV AESencrypt(int senderId, int receiverId, void *in, size_t inLen, { CK_RV returnCode = logAndHandleErrors( "AES Encryption", senderId, keyId, in, inLen, out, outLen, - getAESencryptedLength( - inLen, isFirstChunckForEncryption(senderId), chainingMode), + getAESencryptedLength(inLen, isFirstChunckForEncryption(senderId), + chainingMode), isFirstChunckForEncryption(senderId), keyLength); if (returnCode != CKR_OK) { - deleteFromMap(mapToInMiddleEncryptions, senderId); + deleteFromMap(mapToInMiddleEncryptions, senderId, + "mapToInMiddleEncryptions"); return returnCode; } @@ -836,28 +852,35 @@ CK_RV AESencrypt(int senderId, int receiverId, void *in, size_t inLen, out, getEncryptedLengthByAssymFunc(func), func); if (returnCode != CKR_OK) { - deleteFromMap(mapToInMiddleEncryptions, senderId); + deleteFromMap(mapToInMiddleEncryptions, senderId, + "mapToInMiddleEncryptions"); return returnCode; } } //otherwise retrieve the key from file by keyId: else { - - retrieveAESKeyByKeyId(senderId, keyId, key, - ENCRYPT); + retrieveAESKeyByKeyId(senderId, keyId, key, ENCRYPT); } //printBufferHexa(symmetricKey, symmetricKeyLen, "key retrieved for encrypting"); - log(logger::LogLevel::INFO, - "Performing AES encryption for user id: " + - std::to_string(senderId) + - " for chunck of data number 1 with keyId: " + keyId); + if (generateKeyFlag == true) + log(logger::LogLevel::INFO, + "Performing AES encryption for user id: " + + std::to_string(senderId) + + " for chunck of data number 1 with keyId: " + + keyId); //aes key + else + log(logger::LogLevel::INFO, + "Performing AES encryption for user id: " + + std::to_string(senderId) + + " for chunck of data number 1"); //receiver rsa public key // Perform AES encryption returnCode = performAESEncryption( senderId, in, inLen, static_cast(out) + encryptedKeyLength, outLen - encryptedKeyLength, chainingMode, key, keyLength, counter); if (returnCode != CKR_OK) { - deleteFromMap(mapToInMiddleEncryptions, senderId); + deleteFromMap(mapToInMiddleEncryptions, senderId, + "mapToInMiddleEncryptions"); return returnCode; } } @@ -870,9 +893,11 @@ CK_RV AESencrypt(int senderId, int receiverId, void *in, size_t inLen, mapToInMiddleEncryptions[senderId].second + 1) + "."); //perform encryption + LOG_BUFFER_HEXA(in, inLen, "this is the plain data"); mapToInMiddleEncryptions[senderId].first->encryptContinue( reinterpret_cast(in), inLen, static_cast(out), outLen); + LOG_BUFFER_HEXA(out, outLen, "this is the encrypted data"); } //reduce a chunck from the chuncks counter @@ -880,7 +905,8 @@ CK_RV AESencrypt(int senderId, int receiverId, void *in, size_t inLen, // If all chunks have been encrypted, erase the entry from the map if (mapToInMiddleEncryptions[senderId].second == 0) { - deleteFromMap(mapToInMiddleEncryptions, senderId); + deleteFromMap(mapToInMiddleEncryptions, senderId, + "mapToInMiddleEncryptions"); log(logger::LogLevel::INFO, "Successfully completed AES encryption for user id: " + std::to_string(senderId) + " for all " + @@ -897,6 +923,7 @@ CK_RV performAESDecryption(int receiverId, void *in, size_t inLen, void *out, AESKeyLength keyLength, size_t counter, bool generateKeyFlag) { + LOG_BUFFER_HEXA(in, inLen, "this is the encrypted data"); StreamAES *streamAES = FactoryManager::getInstance().create(chainingMode); mapToInMiddleDecryptions[receiverId] = std::make_pair(streamAES, counter); unsigned int outLen2 = outLen; @@ -912,6 +939,7 @@ CK_RV performAESDecryption(int receiverId, void *in, size_t inLen, void *out, std::to_string(receiverId) + ". Error: " + e.what()); return CKR_ARGUMENTS_BAD; } + LOG_BUFFER_HEXA(out, outLen, "this is the decrypted data"); outLen = outLen2; return CKR_OK; @@ -933,11 +961,13 @@ CK_RV AESdecrypt(int senderId, int receiverId, void *in, size_t inLen, chainingMode) - encryptedKeyLen; - CK_RV error = logAndHandleErrors( - "AES Decryption", senderId, keyId, in, inLen - encryptedKeyLen, out, - outLen, requiredLength, isFirstChunckForDecryption(receiverId), keyLength); + CK_RV error = + logAndHandleErrors("AES Decryption", receiverId, keyId, in, + inLen - encryptedKeyLen, out, outLen, requiredLength, + isFirstChunckForDecryption(receiverId), keyLength); if (error != CKR_OK) { - deleteFromMap(mapToInMiddleDecryptions, receiverId); + deleteFromMap(mapToInMiddleDecryptions, receiverId, + "mapToInMiddleDecryptions"); return error; } @@ -960,26 +990,33 @@ CK_RV AESdecrypt(int senderId, int receiverId, void *in, size_t inLen, offset = encryptedKeyLength; if (returnCode != CKR_OK) { - deleteFromMap(mapToInMiddleDecryptions, receiverId); + deleteFromMap(mapToInMiddleDecryptions, receiverId, + "mapToInMiddleDecryptions"); return returnCode; } } //otherwise retrieve the key from file by keyId: else { - retrieveAESKeyByKeyId(receiverId, keyId, symmetricKey, - DECRYPT); + retrieveAESKeyByKeyId(receiverId, keyId, symmetricKey, DECRYPT); } - log(logger::LogLevel::INFO, - "Performing AES decryption for user id: " + - std::to_string(receiverId) + - " for chunck of data number 1 with keyId: " + keyId + " ."); + if (keyId != "") + log(logger::LogLevel::INFO, + "Performing AES decryption for user id: " + + std::to_string(receiverId) + + " for chunck of data number 1 with keyId: " + keyId + "."); + else + log(logger::LogLevel::INFO, + "Performing AES decryption for user id: " + + std::to_string(receiverId) + + " for chunck of data number 1."); // Perform AES decryption CK_RV error = performAESDecryption( receiverId, static_cast(in) + offset, inLen - offset, out, outLen, chainingMode, symmetricKey, keyLength, counter, generateKeyFlag); if (error != CKR_OK) { - deleteFromMap(mapToInMiddleDecryptions, receiverId); + deleteFromMap(mapToInMiddleDecryptions, receiverId, + "mapToInMiddleDecryptions"); return error; } } @@ -993,15 +1030,18 @@ CK_RV AESdecrypt(int senderId, int receiverId, void *in, size_t inLen, "."); unsigned int outLen2 = outLen; try { + LOG_BUFFER_HEXA(in, inLen, "this is the encrypted data"); mapToInMiddleDecryptions[receiverId].first->decryptContinue( reinterpret_cast(in), inLen, static_cast(out), outLen2); + LOG_BUFFER_HEXA(out, outLen2, "this is the decrypted data"); } catch (std::exception &e) { log(logger::LogLevel::ERROR, "Failed to decrypt AES data for user id: " + std::to_string(receiverId) + ". Error: " + e.what()); - deleteFromMap(mapToInMiddleDecryptions, receiverId); + deleteFromMap(mapToInMiddleDecryptions, receiverId, + "mapToInMiddleDecryptions"); return CKR_ARGUMENTS_BAD; } outLen = outLen2; @@ -1011,7 +1051,8 @@ CK_RV AESdecrypt(int senderId, int receiverId, void *in, size_t inLen, // If all chunks have been decrypted, erase the entry from the map if (mapToInMiddleDecryptions[receiverId].second == 0) { - deleteFromMap(mapToInMiddleDecryptions, receiverId); + deleteFromMap(mapToInMiddleDecryptions, receiverId, + "mapToInMiddleDecryptions"); log(logger::LogLevel::INFO, "Successfully completed AES decryption for user id: " + std::to_string(receiverId) + " for all " + @@ -1026,10 +1067,10 @@ std::string generateAESKey(int userId, AESKeyLength aesKeyLength, std::vector permissions, int destUserId) { - if(!isValidAESKeyLength(aesKeyLength)) - { + if (!isValidAESKeyLength(aesKeyLength)) { log(logger::LogLevel::ERROR, - "Invalid AES key length provided: "+std::to_string(aesKeyLength)+". Supported lengths are 128, 192, or 256 bits."); + "Invalid AES key length provided: " + std::to_string(aesKeyLength) + + ". Supported lengths are 128, 192, or 256 bits."); //return CKR_KEY_SIZE_RANGE; return ""; } @@ -1050,7 +1091,7 @@ size_t getAESencryptedLength(size_t dataLen, bool isFirst, size_t getAESdecryptedLength(size_t dataLen, bool isFirst, AESChainingMode chainingMode) { - if (dataLen==0) + if (dataLen == 0) return 0; return calculatDecryptedLenAES(dataLen, isFirst, chainingMode); } @@ -1149,9 +1190,9 @@ CK_RV hashDataUpdate(int userId, void *data, size_t dataLen, SHAAlgorithm hashfunc, int counter, std::string signOrVerify) { - //printBufferHexa(static_cast(data), dataLen, "chunck to hash:"); - CK_RV returnCode = logAndHandleErrors("Digital Signature", userId, data, dataLen, - isFirstChunckHash(userId)); + LOG_BUFFER_HEXA(data, dataLen, "chunck to hash:"); + CK_RV returnCode = logAndHandleErrors("Digital Signature", userId, data, + dataLen, isFirstChunckHash(userId)); if (returnCode != CKR_OK) return returnCode; log(logger::LogLevel::INFO, signOrVerify + @@ -1190,9 +1231,7 @@ CK_RV hashDataFinalize(int userId, void *out, size_t outLen) return CKR_SIGNATURE_INVALID; CK_RV returnCode = mapToInMiddleHashing[userId].first->finalize(result); - auto it = mapToInMiddleHashing.find(userId); - - mapToInMiddleHashing.erase(userId); + deleteFromMap(mapToInMiddleHashing, userId, "mapToInMiddleHashing"); memcpy(out, result.data(), outLen); return returnCode; @@ -1219,7 +1258,7 @@ CK_RV signUpdate(int senderId, void *data, size_t dataLen, CK_RV returnCode = hashDataUpdate(senderId, data, dataLen, hashfunc, counter, "Signing "); if (returnCode != CKR_OK) - deleteFromMap(mapToInMiddleHashing, senderId); + deleteFromMap(mapToInMiddleHashing, senderId, "mapToInMiddleHashing"); return returnCode; } @@ -1231,18 +1270,13 @@ CK_RV signFinalize(int senderId, void *signature, size_t signatureLen, size_t hashLen = getHashedMessageSize(hashfunc); std::vector hash(hashLen); CK_RV returnCode = hashDataFinalize(senderId, hash.data(), hashLen); - - if (returnCode != CKR_OK) { - deleteFromMap(mapToInMiddleHashing, senderId); + LOG_BUFFER_HEXA(hash.data(), hashLen, "hashed in sign finalize"); + if (returnCode != CKR_OK) return returnCode; - } returnCode = RSAencrypt(senderId, keyId, hash.data(), hashLen, signature, signatureLen); - //printBufferHexa(hash.data(), hashLen, "hash by sign finalize"); - if (returnCode != CKR_OK) - deleteFromMap(mapToInMiddleHashing, senderId); - + LOG_BUFFER_HEXA(signature, signatureLen, "signature in sign finalize"); return returnCode; } @@ -1254,7 +1288,7 @@ CK_RV verifyUpdate(int recieverId, void *data, size_t dataLen, CK_RV returnCode = hashDataUpdate(recieverId, data, dataLen, hashFunc, counter, "Verifying "); if (returnCode != CKR_OK) - deleteFromMap(mapToInMiddleHashing, recieverId); + deleteFromMap(mapToInMiddleHashing, recieverId, "mapToInMiddleHashing"); return returnCode; } @@ -1267,10 +1301,11 @@ CK_RV verifyFinalize(int recieverId, void *signature, size_t signatureLen, size_t hashLen = getHashedMessageSize(hashFunc); std::vector hash(hashLen); CK_RV returnCode = hashDataFinalize(recieverId, hash.data(), hashLen); - if (returnCode != CKR_OK) { - deleteFromMap(mapToInMiddleHashing, recieverId); + if (returnCode != CKR_OK) return returnCode; - } + + LOG_BUFFER_HEXA(hash.data(), hashLen, "hashed in verify finalize"); + LOG_BUFFER_HEXA(signature, signatureLen, "signature in verify finalize"); size_t decryptSignatureLen = rsaGetDecryptedLen(RSA_KEY_SIZE); std::vector decryptSignature(decryptSignatureLen); @@ -1278,12 +1313,10 @@ CK_RV verifyFinalize(int recieverId, void *signature, size_t signatureLen, decryptSignature.data(), &decryptSignatureLen, getRSAdecryptedLength()); //printBufferHexa(decryptSignature.data(), decryptSignatureLen, "decrypted signature by verify finalize"); - if (returnCode != CKR_OK) { - deleteFromMap(mapToInMiddleHashing, recieverId); + if (returnCode != CKR_OK) return returnCode; - } - // printBufferHexa(decryptSignature.data(), decryptSignatureLen, "decrypt signature"); - // printBufferHexa(hash.data(), hash.size(), "hash"); + LOG_BUFFER_HEXA(decryptSignature.data(), decryptSignatureLen, + "decrypted signature in verify finalize"); //printBufferHexa(hash.data(), hashLen, "hash by verify finalize (before if)"); if (decryptSignatureLen != hashLen || @@ -1294,9 +1327,6 @@ CK_RV verifyFinalize(int recieverId, void *signature, size_t signatureLen, "Verifying signature failed for user id: " + std::to_string(recieverId) + "."); } - - if (returnCode != CKR_OK) - deleteFromMap(mapToInMiddleHashing, recieverId); return returnCode; } @@ -1411,6 +1441,8 @@ CK_RV encrypt(int senderId, int receiverId, void *in, size_t inLen, void *out, size_t outLen, void *signature, size_t signatureLen, size_t counter) { + LOG_BUFFER_HEXA(in, inLen, "this is the plain data"); + CryptoConfig config; try { @@ -1450,6 +1482,7 @@ CK_RV encrypt(int senderId, int receiverId, void *in, size_t inLen, void *out, if (returnCode != CKR_OK) return returnCode; } + LOG_BUFFER_HEXA(out, outLen, "this is the encrypted data"); return CKR_OK; } @@ -1475,6 +1508,8 @@ CK_RV decrypt(int senderId, int receiverId, void *in, size_t inLen, void *signature, size_t signatureLen, void *out, size_t &outLen, size_t counter) { + LOG_BUFFER_HEXA(in, inLen, "this is the encrypted data"); + CryptoConfig config; try { @@ -1496,7 +1531,6 @@ CK_RV decrypt(int senderId, int receiverId, void *in, size_t inLen, config.aesChainingMode, counter, true); if (returnCode != CKR_OK) return returnCode; - //perform signature verification returnCode = verifyUpdate(receiverId, out, outLen, config.hashFunction, counter); @@ -1511,6 +1545,8 @@ CK_RV decrypt(int senderId, int receiverId, void *in, size_t inLen, if (returnCode != CKR_OK) return returnCode; + LOG_BUFFER_HEXA(out, outLen, "this is the decrypted data"); + return CKR_OK; } @@ -1574,4 +1610,4 @@ CK_RV decrypt(int senderId, int receiverId, void *in, size_t inLen, // } // // Close the file after reading // file.close(); -// } \ No newline at end of file +// } diff --git a/hsm-server/src/crypto_service.cpp b/hsm-server/src/crypto_service.cpp new file mode 100644 index 00000000..f0d869e4 --- /dev/null +++ b/hsm-server/src/crypto_service.cpp @@ -0,0 +1,1051 @@ +#include "../include/crypto_service.h" +#include "../include/general.h" +#include "../include/crypto_api.h" +#include "../include/debug_utils.h" +#include "../include/my_logger.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +grpc::Status CryptoServiceServer::bootSystem( + grpc::ServerContext *context, const crypto::BootSystemRequest *request, + crypto::Empty *response) +{ + + std::map> usersIdsPermissions; + for (auto user : request->usersidspermissions()) + for (auto permission : user.permissions()) + usersIdsPermissions[user.userid()].push_back( + static_cast(permission)); + if (::bootSystem(usersIdsPermissions) == CKR_OK) + return grpc::Status::OK; + return grpc::Status::CANCELLED; +} + +grpc::Status CryptoServiceServer::addProccess( + grpc::ServerContext *context, const crypto::AddProcessRequest *request, + crypto::Empty *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->userid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->permissions().data(), + request->permissions().size())); + std::vector permissions; + for (auto permission : request->permissions()) + permissions.push_back(static_cast(permission)); + if (::addProccess(request->userid(), permissions) == CKR_OK) { + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->userid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + + std::to_string(request->userid()) + + std::string(", total packets: ") + std::to_string(1) + " " + + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + return grpc::Status::OK; + } + return grpc::Status::CANCELLED; +} + +grpc::Status CryptoServiceServer::configure( + grpc::ServerContext *context, const crypto::ConfigureRequest *request, + crypto::Empty *response) +{ + + CryptoConfig config( + static_cast(request->config().hashfunction()), + static_cast(request->config().aeskeylength()), + static_cast(request->config().aeschainingmode()), + static_cast( + request->config().asymmetricfunction())); + if (::configure(request->userid(), config) == CKR_OK) { + return grpc::Status::OK; + } + return grpc::Status::CANCELLED; +} + +/** + * Encrypts the provided data and returns the encrypted result and signature. + * + * @param context The gRPC server context. + * @param request The request containing the data to encrypt. + * @param response The response containing the encrypted data and signature. + * @return The gRPC status indicating success or failure. + */ +grpc::Status CryptoServiceServer::encrypt(grpc::ServerContext *context, + const crypto::EncryptRequest *request, + crypto::EncryptResponse *response) +{ + int packetNumber = getCountFromEncryptions(request->senderid()); + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber + 1 + : 1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + + dataToHex((unsigned char *)request->data().data(), + request->data().size())); + std::string data = request->data(); + size_t outLen = ::getEncryptedLen( + request->senderid(), request->data().length(), request->isfirst()); + void *out = new uint8_t[outLen]; + size_t signatureLen = ::getSignatureLength(); + void *signature = new uint8_t[signatureLen]; + CK_RV status = ::encrypt( + request->senderid(), request->receiverid(), + static_cast(const_cast(request->data().data())), + request->data().length(), out, outLen, signature, signatureLen, + request->counter()); + if (status != CKR_OK) + return grpc::Status::CANCELLED; + char *charPtr = static_cast(out); + response->set_encrypteddata(out, outLen); + response->set_signature(signature, signatureLen); + delete[](uint8_t *) out; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber + 1 + : 1) + + std::string(", of messageId: ") + request->messageid() + "1" + + std::string(", total packets: ") + + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + + dataToHex((unsigned char *)response->encrypteddata().data(), + response->encrypteddata().size())); + + return grpc::Status::OK; +} + +/** + * Decrypts the provided encrypted data and returns the decrypted result. + * + * @param context The gRPC server context. + * @param request The request containing the encrypted data and signature. + * @param response The response containing the decrypted data. + * @return The gRPC status indicating success or failure. + */ +grpc::Status CryptoServiceServer::decrypt(grpc::ServerContext *context, + const crypto::DecryptRequest *request, + crypto::DecryptResponse *response) +{ + int packetNumber = getCountFromDecryptions(request->receiverid()); + log(logger::LogLevel::INFO, std::to_string(request->receiverid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber + 1 + : 1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + + dataToHex((unsigned char *)request->encrypteddata().data(), + request->encrypteddata().size())); + + size_t outLen = ::getDecryptedLen(request->senderid(), + request->encrypteddata().length(), + request->isfirst()); + void *out = new uint8_t[outLen]; + CK_RV status = ::decrypt( + request->senderid(), request->receiverid(), + static_cast( + const_cast(request->encrypteddata().data())), + request->encrypteddata().length(), + static_cast(const_cast(request->signature().data())), + request->signature().length(), out, outLen, request->counter()); + if (status != CKR_OK) + return grpc::Status::CANCELLED; + response->set_decrypteddata(out, outLen); + delete[](uint8_t *) out; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->receiverid()), + std::string("sending packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber + 1 + : 1) + + std::string(", of messageId: ") + request->messageid() + "2" + + std::string(", total packets: ") + + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + + dataToHex((unsigned char *)response->decrypteddata().data(), + response->decrypteddata().size())); + + return grpc::Status::OK; +} + +/** + * Generates an AES key with the specified permissions and user ID. + * + * @param context The gRPC server context. + * @param request The request containing the user ID and key length. + * @param response The response containing the generated AES key. + * @return The gRPC status indicating success or failure. + */ +grpc::Status CryptoServiceServer::generateAESKey( + grpc::ServerContext *context, const crypto::GenerateAESKeyRequest *request, + crypto::GenerateAESKeyResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->userid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->SerializeAsString().data(), + request->SerializeAsString().size())); + std::vector permissions; + for (auto permission : request->permissions()) + permissions.push_back(static_cast(permission)); + response->set_aeskey(::generateAESKey( + request->userid(), static_cast(request->keylength()), + permissions, request->destuserid())); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->userid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "3" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + + return grpc::Status::OK; +} + +/** + * Generates an RSA key pair with the specified permissions and user ID. + * + * @param context The gRPC server context. + * @param request The request containing the user ID and permissions. + * @param response The response containing the generated RSA key pair. + * @return The gRPC status indicating success or failure. + */ +grpc::Status CryptoServiceServer::generateRSAKeyPair( + grpc::ServerContext *context, const crypto::GenerateKeyPairRequest *request, + crypto::GenerateKeyPairResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->userid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->SerializeAsString().data(), + request->SerializeAsString().size())); + std::vector permissions; + for (auto permission : request->permissions()) + permissions.push_back(static_cast(permission)); + std::pair pair = + ::generateRSAKeyPair(request->userid(), permissions); + response->set_privatekey(pair.second); + response->set_publickey(pair.first); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->userid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "4" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + + return grpc::Status::OK; +} + +/** + * Generates an ECC key pair with the specified permissions and user ID. + * + * @param context The gRPC server context. + * @param request The request containing the user ID and permissions. + * @param response The response containing the generated ECC key pair. + * @return The gRPC status indicating success or failure. + */ +grpc::Status CryptoServiceServer::generateECCKeyPair( + grpc::ServerContext *context, const crypto::GenerateKeyPairRequest *request, + crypto::GenerateKeyPairResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->userid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->SerializeAsString().data(), + request->SerializeAsString().size())); + std::vector permissions; + for (auto permission : request->permissions()) + permissions.push_back(static_cast(permission)); + std::pair pair = + ::generateECCKeyPair(request->userid(), permissions); + response->set_privatekey(pair.second); + response->set_publickey(pair.first); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->userid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "5" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + + return grpc::Status::OK; +} + +/** + * Retrieves the length of signed data (signature length). + * + * @param context The gRPC server context. + * @param request The request for getting the hash length. + * @param response The response containing the length of the signed data. + * @return The gRPC status indicating success or failure. + */ +grpc::Status CryptoServiceServer::getSignedDataLength( + grpc::ServerContext *context, const crypto::GetHashLengthRequest *request, + crypto::GetLengthResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->SerializeAsString().data(), + request->SerializeAsString().size())); + response->set_len(::getSignatureLength()); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + + request->messageid() + "6" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + + return grpc::Status::OK; +} + +// Retrieves the public ECC key associated with a given user ID. +grpc::Status CryptoServiceServer::getPublicECCKeyByUserId( + grpc::ServerContext *context, const crypto::KeyRequest *request, + crypto::KeyResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->SerializeAsString().data(), + request->SerializeAsString().size())); + response->set_key(::getPublicECCKeyByUserId(request->userid())); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "7" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + + return grpc::Status::OK; +} + +// Retrieves the public RSA key associated with a given user ID. +grpc::Status CryptoServiceServer::getPublicRSAKeyByUserId( + grpc::ServerContext *context, const crypto::KeyRequest *request, + crypto::KeyResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->SerializeAsString().data(), + request->SerializeAsString().size())); + response->set_key(::getPublicRSAKeyByUserId(request->userid())); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "8" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + + return grpc::Status::OK; +} + +// Gets the length of the encrypted ECC data. +grpc::Status CryptoServiceServer::getECCencryptedLength( + grpc::ServerContext *context, const crypto::GetLengthRequest *request, + crypto::GetLengthResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->SerializeAsString().data(), + request->SerializeAsString().size())); + response->set_len(::getECCencryptedLength()); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "9" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + + return grpc::Status::OK; +} + +// Gets the length of the decrypted ECC data. +grpc::Status CryptoServiceServer::getECCDecryptedLength( + grpc::ServerContext *context, const crypto::GetLengthRequest *request, + crypto::GetLengthResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->SerializeAsString().data(), + request->SerializeAsString().size())); + response->set_len(::getECCdecryptedLength()); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "10" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + + return grpc::Status::OK; +} + +// Encrypts data using ECC with the specified sender ID and key ID. +grpc::Status CryptoServiceServer::ECCencrypt( + grpc::ServerContext *context, + const crypto::AsymetricEncryptRequest *request, + crypto::AsymetricEncryptResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->data().data(), + request->data().size())); + size_t outLen = ::getECCencryptedLength(); + void *out = new uint8_t[outLen]; + + ::ECCencrypt(request->senderid(), request->keyid(), + (void *)request->data().data(), request->data().length(), out, + outLen); + response->set_encrypteddata(out, outLen); + delete[](uint8_t *) out; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "11" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->encrypteddata().data(), + response->encrypteddata().size())); + + return grpc::Status::OK; +} + +// Decrypts ECC-encrypted data using the specified receiver ID and key ID. +grpc::Status CryptoServiceServer::ECCdecrypt( + grpc::ServerContext *context, + const crypto::AsymetricDecryptRequest *request, + crypto::AsymetricDecryptResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->data().data(), + request->data().size())); + size_t outLen = ::getECCdecryptedLength(); + void *out = new uint8_t[outLen]; + ::ECCdecrypt(request->receiverid(), request->keyid(), + (void *)request->data().data(), request->data().length(), out, + outLen); + response->set_decrypteddata(out, outLen); + delete[](uint8_t *) out; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "12" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->decrypteddata().data(), + response->decrypteddata().size())); + + return grpc::Status::OK; +} + +// Gets the length of the encrypted RSA data. +grpc::Status CryptoServiceServer::getRSAencryptedLength( + grpc::ServerContext *context, const crypto::GetLengthRequest *request, + crypto::GetLengthResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->SerializeAsString().data(), + request->SerializeAsString().size())); + response->set_len(::getRSAencryptedLength()); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "13" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + + return grpc::Status::OK; +} + +// Gets the length of the decrypted RSA data. +grpc::Status CryptoServiceServer::getRSAdecryptedLength( + grpc::ServerContext *context, const crypto::GetLengthRequest *request, + crypto::GetLengthResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->SerializeAsString().data(), + request->SerializeAsString().size())); + response->set_len(::getRSAdecryptedLength()); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "14" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + + return grpc::Status::OK; +} + +// Encrypts data using RSA with the specified sender ID and key ID. +grpc::Status CryptoServiceServer::RSAencrypt( + grpc::ServerContext *context, + const crypto::AsymetricEncryptRequest *request, + crypto::AsymetricEncryptResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->data().data(), + request->data().size())); + size_t outLen = ::getRSAencryptedLength(); + void *out = new uint8_t[outLen]; + + ::RSAencrypt(request->senderid(), request->keyid(), + (void *)request->data().data(), request->data().length(), out, + outLen); + response->set_encrypteddata(out, outLen); + delete[](uint8_t *) out; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() +"15" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->encrypteddata().data(), + response->encrypteddata().size())); + + return grpc::Status::OK; +} + +// Decrypts RSA-encrypted data using the specified receiver ID and key ID. +grpc::Status CryptoServiceServer::RSAdecrypt( + grpc::ServerContext *context, + const crypto::AsymetricDecryptRequest *request, + crypto::AsymetricDecryptResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->data().data(), + request->data().size())); + size_t outLen = ::getRSAdecryptedLength(); + void *out = new uint8_t[outLen]; + ::RSAdecrypt(request->receiverid(), request->keyid(), + (void *)request->data().data(), request->data().length(), out, + &outLen); + response->set_decrypteddata(out, outLen); + delete[](uint8_t *) out; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "16" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->decrypteddata().data(), + response->decrypteddata().size())); + + return grpc::Status::OK; +} + +// aes +/** + * Retrieves the length of encrypted data using AES. + * + * @param context The gRPC server context. + * @param request The request containing data length and chaining mode. + * @param response The response object to send back the length. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::getAESencryptedLength( + grpc::ServerContext *context, const crypto::GetAESLengthRequest *request, + crypto::GetLengthResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->SerializeAsString().data(), + request->SerializeAsString().size())); + response->set_len(::getAESencryptedLength( + request->datalen(), request->isfirst(), + static_cast(request->chainingmode()))); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "17" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + + return grpc::Status::OK; +} + +/** + * Retrieves the length of decrypted data using AES. + * + * @param context The gRPC server context. + * @param request The request containing data length and chaining mode. + * @param response The response object to send back the length. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::getAESdecryptedLength( + grpc::ServerContext *context, const crypto::GetAESLengthRequest *request, + crypto::GetLengthResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->SerializeAsString().data(), + request->SerializeAsString().size())); + response->set_len(::getAESdecryptedLength( + request->datalen(), request->isfirst(), + static_cast(request->chainingmode()))); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "18" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + + return grpc::Status::OK; +} + +/** + * Encrypts data using AES encryption. + * + * @param context The gRPC server context. + * @param request The request containing sender and receiver IDs and data. + * @param response The response object to send back the encrypted data. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::AESencrypt( + grpc::ServerContext *context, const crypto::AESEncryptRequest *request, + crypto::AESEncryptResponse *response) +{ + int packetNumber = getCountFromEncryptions(request->senderid()); + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber +1 + : 1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + + dataToHex((unsigned char *)request->data().data(), + request->data().size())); + size_t outLen = ::getAESencryptedLength( + request->data().length(), request->isfirst(), + static_cast(request->chainingmode())); + + std::unique_ptr> out( + new uint8_t[outLen]); + + CK_RV status = ::AESencrypt( + request->senderid(), request->receiverid(), + (void *)request->data().data(), request->data().length(), out.get(), + outLen, static_cast(request->keylength()), + static_cast(request->chainingmode()), + request->counter(), request->keyid()); + response->set_encrypteddata(out.get(), outLen); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + + std::to_string(packetNumber != 0 ? (request->counter() - packetNumber) + 1 + : 1) + + std::string(", of messageId: ") + + request->messageid() + "19" + + std::string(", total packets: ") + + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + + dataToHex((unsigned char *)response->encrypteddata().data(), + response->encrypteddata().size())); + + return grpc::Status::OK; +} + +/** + * Decrypts data using AES decryption. + * + * @param context The gRPC server context. + * @param request The request containing sender and receiver IDs and encrypted data. + * @param response The response object to send back the decrypted data. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::AESdecrypt( + grpc::ServerContext *context, const crypto::AESDecryptRequest *request, + crypto::AESDecryptResponse *response) +{ + int packetNumber = getCountFromDecryptions(request->userid()); + log(logger::LogLevel::INFO, std::to_string(request->userid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber + 1 + : 1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + + dataToHex((unsigned char *)request->datain().data(), + request->datain().size())); + size_t outLen = ::getAESdecryptedLength( + request->datain().length(), request->isfirst(), + static_cast(request->chainingmode())); + + std::unique_ptr out(new uint8_t[outLen]); + CK_RV status = ::AESdecrypt( + request->senderid(), request->receiverid(), + (void *)request->datain().data(), request->datain().length(), out.get(), + outLen, static_cast(request->keylength()), + static_cast(request->chainingmode()), + request->counter(), request->keyid()); + if (status != CKR_OK) + return grpc::Status::CANCELLED; + response->set_decrypteddata(out.get(), outLen); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->userid()), + std::string("sending packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber + 1 + : 1) + + std::string(", of messageId: ") + request->messageid() + "20" + + std::string(", total packets: ") + + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + + dataToHex((unsigned char *)response->decrypteddata().data(), + response->decrypteddata().size())); + + return grpc::Status::OK; +} + +/** + * Retrieves the length of encrypted data for a specific sender. + * + * @param context The gRPC server context. + * @param request The request containing sender ID and input length. + * @param response The response object to send back the length. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::getEncryptedLen( + grpc::ServerContext *context, const crypto::GetWholeLength *request, + crypto::GetLengthResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->userid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->SerializeAsString().data(), + request->SerializeAsString().size())); + response->set_len(::getEncryptedLen(request->senderid(), request->inlen(), + request->isfirst())); + + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->userid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "21" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + return grpc::Status::OK; +} + +/** + * Retrieves the length of decrypted data for a specific sender. + * + * @param context The gRPC server context. + * @param request The request containing sender ID and input length. + * @param response The response object to send back the length. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::getDecryptedLen( + grpc::ServerContext *context, const crypto::GetWholeLength *request, + crypto::GetLengthResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->userid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)request->SerializeAsString().data(), + request->SerializeAsString().size())); + response->set_len(::getDecryptedLen(request->senderid(), request->inlen(), + request->isfirst())); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->userid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "22" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->SerializeAsString().data(), + response->SerializeAsString().size())); + + return grpc::Status::OK; +} + +/** + * Updates the signing process with new data. + * + * @param context The gRPC server context. + * @param request The request containing sender ID and data to sign. + * @param response The response object to send back the status of the operation. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::signUpdate(grpc::ServerContext *context, + const crypto::SignRequest *request, + crypto::SignResponse *response) +{ + int packetNumber = getCountFromHashing(request->senderid()); + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber + 1 + : 1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + + dataToHex((unsigned char *)request->data().data(), + request->data().size())); + CK_RV status = ::signUpdate( + request->senderid(), (void *)request->data().data(), + request->data().length(), + static_cast(request->hashfunc()), request->counter()); + + return status == CKR_OK ? grpc::Status::OK : grpc::Status::CANCELLED; +} + +/** + * Finalizes the signing process and returns the signature. + * + * @param context The gRPC server context. + * @param request The request containing sender ID and key ID. + * @param response The response object to send back the generated signature. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::signFinalize( + grpc::ServerContext *context, const crypto::SignRequest *request, + crypto::SignResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + + std::to_string(request->counter()) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + + dataToHex((unsigned char *)request->data().data(), + request->data().size())); + size_t signatureLen = ::getSignatureLength(); + void *signature = new uint8_t[signatureLen]; + if (CK_RV status = + ::signFinalize(request->senderid(), signature, signatureLen, + static_cast(request->hashfunc()), + request->keyid()) != CKR_OK) + return grpc::Status::CANCELLED; + response->set_signature(signature, getSignatureLength()); + delete[](uint8_t *) signature; + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "23" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + + dataToHex((unsigned char *)response->signature().data(), + response->signature().size())); + + return grpc::Status::OK; +} + +/** + * Updates the verification process with new data. + * + * @param context The gRPC server context. + * @param request The request containing receiver ID and data to verify. + * @param response The response object to send back the status of the verification. + * @return grpc::Status indicating the success or failure of the operation. + */ +grpc::Status CryptoServiceServer::verifyUpdate( + grpc::ServerContext *context, const crypto::VerifyRequest *request, + crypto::VerifyResponse *response) +{ + int packetNumber = getCountFromHashing(request->senderid()); + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + + std::to_string(packetNumber != 0 ? request->counter() - packetNumber + 1 + : 1) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + + dataToHex((unsigned char *)request->data().data(), + request->data().size())); + if (::verifyUpdate(request->receiverid(), (void *)request->data().data(), + request->data().length(), + static_cast(request->hashfunc()), + request->counter()) == CKR_OK) { + + + return grpc::Status::OK; + } + + return grpc::Status::CANCELLED; +} + +// Finalizes the verification process of a signature. +// Checks if the provided signature is valid by comparing it against the expected value. +// If the verification is successful, sets the validity of the signature in the response to true. +// +// Parameters: +// - context: A pointer to the server context. +// - request: A pointer to the VerifyRequest containing the necessary information for verification, +// including receiver ID, signature data, hash function, and key ID. +// - response: A pointer to the VerifyResponse where the result of the verification will be stored. +// +// Returns: +// - grpc::Status::OK if the signature is valid. +// - grpc::Status::CANCELLED if the verification fails. +grpc::Status CryptoServiceServer::verifyFinalize( + grpc::ServerContext *context, const crypto::VerifyRequest *request, + crypto::VerifyResponse *response) +{ + log(logger::LogLevel::INFO, std::to_string(request->senderid()), + std::to_string(HSM_ID), + std::string("received packet number: ") + + std::to_string(request->counter()) + + std::string(", of messageId: ") + request->messageid() + + std::string(", total packets: ") + + std::to_string(request->counter()) + std::string(" ") + + "Success Data: " + + dataToHex((unsigned char *)request->data().data(), + request->data().size())); + if (::verifyFinalize(request->receiverid(), + (void *)request->signature().data(), + request->signature().length(), + static_cast(request->hashfunc()), + request->keyid()) != CKR_OK) + return grpc::Status::CANCELLED; + response->set_valid(true); + log(logger::LogLevel::INFO, std::to_string(HSM_ID), + std::to_string(request->senderid()), + std::string("sending packet number: ") + std::to_string(1) + + std::string(", of messageId: ") + request->messageid() + "24" + + std::string(", total packets: ") + std::to_string(1) + + std::string(" ") + "Success Data: " + "0x01"); + + return grpc::Status::OK; +} + +void RunServer() +{ + std::string serverAddress("0.0.0.0:50051"); + CryptoServiceServer service; + + grpc::ServerBuilder builder; + builder.AddListeningPort(serverAddress, grpc::InsecureServerCredentials()); + builder.RegisterService(&service); + std::unique_ptr server(builder.BuildAndStart()); + std::cout << "Server listening on " << serverAddress << std::endl; + + server->Wait(); +} + +int main(int argc, char **argv) +{ + signal(SIGINT, signalHandler); + RunServer(); + return 0; +} diff --git a/hsm-server/src/debug_utils.cpp b/hsm-server/src/debug_utils.cpp new file mode 100644 index 00000000..7468bf5e --- /dev/null +++ b/hsm-server/src/debug_utils.cpp @@ -0,0 +1,91 @@ +#include +#include + +#include +#include "../include/debug_utils.h" +using namespace std; + +#define DEBUG +#define LOG_BUFFERS +void printBufferHexa(const uint8_t *buffer, size_t len, std::string message) +{ +#ifdef DEBUG + std::cout << message << std::endl; + for (size_t i = 0; i < len; ++i) { + std::cout << std::hex << std::setw(2) << std::setfill('0') + << static_cast(buffer[i]) << " "; + // Print a new line every 16 bytes for better readability + if ((i + 1) % 16 == 0) + std::cout << std::endl; + } + std::cout << std::endl; + // Reset the stream format back to decimal + std::cout << std::dec; +#endif +} + +void logBufferHexa(const void *voidBuffer, size_t len, + const std::string &message, const char *callingFunction, + int line) +{ +#ifdef LOG_BUFFERS + const uint8_t *buffer = static_cast(voidBuffer); + // Accumulate the message and buffer data in a single string + std::ostringstream oss; + oss << message << std::endl; + oss << " (function: " << callingFunction << ", line:" << line << ")\n"; + + for (size_t i = 0; i < len; ++i) { + oss << std::hex << std::setw(2) << std::setfill('0') + << static_cast(buffer[i]) << " "; + // Add a new line every 16 bytes for readability + if ((i + 1) % 16 == 0) + oss << std::endl; + } + + // Append a final newline after the buffer, if needed + if (len % 16 != 0) + oss << std::endl; + + // Reset the stream back to decimal + oss << std::dec; + + // Log the buffer content using the logging system + log(logger::LogLevel::INFO, oss.str()); +#endif +} + +void encryptStartPrintParams(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen, + unsigned char *key, AESKeyLength keyLength) +{ + printBufferHexa(block, inLen, "Block: "); + printBufferHexa(key, 128, "Key: "); + std::cout << "inLen: " << inLen << ", outLen(before): " << outLen + << std::endl; +} + +void encryptContinuePrintParams(unsigned char block[], unsigned int inLen, + unsigned char *&out, unsigned int &outLen) +{ + printBufferHexa(block, inLen, "Block: "); + std::cout << "inLen: " << inLen << ", outLen(before): " << outLen + << std::endl; +} + +void printStreamAES(const StreamAES &obj, size_t blockSize, std::string message) +{ + printBufferHexa(obj.iv, blockSize, "IV: "); + + printBufferHexa(obj.lastBlock, blockSize, "Last Block: "); + + printBufferHexa(obj.key, obj.keyLength, "Key: "); + + std::cout << "Key Length: " << obj.keyLength << " bytes" << std::endl; +} + +// Definition of the debugLog function +void debugLog(const std::string &message, const std::string &functionName) +{ + std::cout << "Function: " << functionName << " -> " << message << std::endl; +} diff --git a/hsm/src/ecc.cpp b/hsm-server/src/ecc.cpp similarity index 85% rename from hsm/src/ecc.cpp rename to hsm-server/src/ecc.cpp index 443d413d..183bd273 100644 --- a/hsm/src/ecc.cpp +++ b/hsm-server/src/ecc.cpp @@ -32,21 +32,22 @@ Point convertMessageToPoint(const std::string &text) std::string binaryStr(text.size() * 8, '0'); queue queue; buffer textBuf(text.data(), range<1>(text.size())); - buffer binaryStrBuf(binaryStr.data(), - range<1>(binaryStr.size())); - - queue.submit([&](handler &handler) { - auto textAcc = textBuf.get_access(handler); - auto binaryStrAcc = - binaryStrBuf.get_access(handler); - - handler.parallel_for(range<1>(text.size()), [=](id<1> idx) { - for (int i = 7; i >= 0; --i) - binaryStrAcc[idx[0] * 8 + (7 - i)] = - ((textAcc[idx] >> i) & 1) ? '1' : '0'; - - }); - }).wait(); + buffer binaryStrBuf(binaryStr.data(), range<1>(binaryStr.size())); + + queue + .submit([&](handler &handler) { + auto textAcc = textBuf.get_access(handler); + auto binaryStrAcc = + binaryStrBuf.get_access(handler); + + handler.parallel_for( + range<1>(text.size()), [=](id<1> idx) { + for (int i = 7; i >= 0; --i) + binaryStrAcc[idx[0] * 8 + (7 - i)] = + ((textAcc[idx] >> i) & 1) ? '1' : '0'; + }); + }) + .wait(); mpz_class x; x.set_str(binaryStr, 2); @@ -77,32 +78,33 @@ std::string convertPointToMessage(const Point &point) std::string binaryStr = x.get_str(2); size_t paddingLength = 8 - (binaryStr.size() % 8); - if (paddingLength != 8) + if (paddingLength != 8) binaryStr = std::string(paddingLength, '0') + binaryStr; - + size_t numBytes = binaryStr.size() / 8; std::vector result(numBytes); sycl::buffer binaryBuffer(binaryStr.data(), - sycl::range<1>(binaryStr.size())); + sycl::range<1>(binaryStr.size())); sycl::buffer resultBuffer(result.data(), - sycl::range<1>(result.size())); - - queue.submit([&](sycl::handler &handler) { - auto binaryAcc = - binaryBuffer.get_access(handler); - auto resultAcc = - resultBuffer.get_access(handler); - - handler.parallel_for( - sycl::range<1>(numBytes), [=](sycl::id<1> id) { - size_t idx = id[0] * 8; - std::bitset<8> byteStr; - for (size_t bit = 0; bit < 8; ++bit) - byteStr[7 - bit] = binaryAcc[idx + bit] == - '1'; - resultAcc[id] = static_cast(byteStr.to_ulong()); - }); - }).wait(); + sycl::range<1>(result.size())); + + queue + .submit([&](sycl::handler &handler) { + auto binaryAcc = + binaryBuffer.get_access(handler); + auto resultAcc = + resultBuffer.get_access(handler); + + handler.parallel_for( + sycl::range<1>(numBytes), [=](sycl::id<1> id) { + size_t idx = id[0] * 8; + std::bitset<8> byteStr; + for (size_t bit = 0; bit < 8; ++bit) + byteStr[7 - bit] = binaryAcc[idx + bit] == '1'; + resultAcc[id] = static_cast(byteStr.to_ulong()); + }); + }) + .wait(); std::string text(result.begin(), result.end()); return text; } @@ -387,7 +389,7 @@ EncryptedMessage encryptECC(std::vector message, Point publicKey) * @param uint8Vec The vector of uint8_t to convert. * @return std::string The resulting string from the conversion. */ -std::string uint8ToString(const std::vector& uint8Vec) +std::string uint8ToString(const std::vector &uint8Vec) { return std::string(uint8Vec.begin(), uint8Vec.end()); } @@ -402,7 +404,7 @@ std::string uint8ToString(const std::vector& uint8Vec) * @param str The string to convert. * @return std::vector The resulting vector of uint8_t from the conversion. */ -std::vector stringToUint8(const std::string& str) +std::vector stringToUint8(const std::string &str) { std::vector uint8Vec(str.begin(), str.end()); return uint8Vec; @@ -413,9 +415,9 @@ std::vector stringToUint8(const std::string& str) * @param ciphertext The ciphertext to decrypt. * @return The decrypted message point. */ -std::vector decryptECC(EncryptedMessage ciphertext, mpz_class privateKey) +std::vector decryptECC(EncryptedMessage ciphertext, + mpz_class privateKey) { - Point temp = multiply(Point(ciphertext.c1X, calculateY(ciphertext.c1X) * (ciphertext.c1Y ? -1 : 1)), privateKey); @@ -423,6 +425,6 @@ std::vector decryptECC(EncryptedMessage ciphertext, mpz_class privateKe Point decrypted = add(Point(ciphertext.c2X, calculateY(ciphertext.c2X) * (ciphertext.c1Y ? -1 : 1)), negTemp); - std::string text=convertPointToMessage(decrypted); + std::string text = convertPointToMessage(decrypted); return stringToUint8(text); } \ No newline at end of file diff --git a/hsm-server/src/general.cpp b/hsm-server/src/general.cpp new file mode 100644 index 00000000..5fb37998 --- /dev/null +++ b/hsm-server/src/general.cpp @@ -0,0 +1,36 @@ +#include "../include/general.h" + +std::unique_ptr logInstance; +void log(logger::LogLevel level, const std::string &message) +{ + // Ensure logger instance exists + if (!logInstance) { + logInstance = std::make_unique("HSM"); + } + logInstance->logMessage(level, message); +} + +bool isValidAESKeyLength(AESKeyLength aesKeyLength) +{ + // Create a set of valid key lengths and check if the provided key length is in this set + switch (aesKeyLength) { + case AES_128: + case AES_192: + case AES_256: + return true; + default: + return false; + } +} + +void signalHandler(int signum) +{ + std::cout << "Interrupt signal (" << signum + << ") received. Cleaning up resources..." << std::endl; + + // Explicitly delete the logger instance + logInstance.reset(); + + // Exit the program + exit(signum); +} diff --git a/hsm/src/hash_factory.cpp b/hsm-server/src/hash_factory.cpp similarity index 57% rename from hsm/src/hash_factory.cpp rename to hsm-server/src/hash_factory.cpp index ee07ab99..413ed36e 100644 --- a/hsm/src/hash_factory.cpp +++ b/hsm-server/src/hash_factory.cpp @@ -9,7 +9,7 @@ * * @return The singleton instance of HashFactory. */ -HashFactory& HashFactory::getInstance() +HashFactory &HashFactory::getInstance() { log(logger::LogLevel::DEBUG, "HashFactory::getInstance() called"); static HashFactory instance; @@ -26,22 +26,29 @@ HashFactory& HashFactory::getInstance() * @param hashPtr A reference to a unique_ptr where the newly created IHash object will be stored. * @return CK_RV The return code indicating success or failure. */ -CK_RV HashFactory::create(const SHAAlgorithm& type, std::unique_ptr& hashPtr) const +CK_RV HashFactory::create(const SHAAlgorithm &type, + std::unique_ptr &hashPtr) const { - log(logger::LogLevel::INFO, "HashFactory::create() called with SHAAlgorithm: " + std::to_string(static_cast(type))); + log(logger::LogLevel::INFO, + "HashFactory::create() called with SHAAlgorithm: " + + std::to_string(static_cast(type))); try { const auto it = factories.find(type); if (it != factories.end()) { hashPtr = it->second(); return CKR_OK; // Success - } else { - log(logger::LogLevel::ERROR, "Error: Algorithm type not found in HashFactory."); + } + else { + log(logger::LogLevel::ERROR, + "Error: Algorithm type not found in HashFactory."); return CKR_FUNCTION_FAILED; // Error: Algorithm type not found } } - catch (const std::exception& e) { - log(logger::LogLevel::ERROR, std::string("Exception caught in HashFactory::create: ") + e.what()); + catch (const std::exception &e) { + log(logger::LogLevel::ERROR, + std::string("Exception caught in HashFactory::create: ") + + e.what()); return CKR_FUNCTION_FAILED; // Error: Exception occurred } } @@ -53,10 +60,15 @@ CK_RV HashFactory::create(const SHAAlgorithm& type, std::unique_ptr& hash * to ensure that only one instance of HashFactory can exist (Singleton Pattern). */ HashFactory::HashFactory() - : factories({ - {SHAAlgorithm::SHA_256, []() -> std::unique_ptr { return std::make_unique(); }}, - {SHAAlgorithm::SHA_3_512, []() -> std::unique_ptr { return std::make_unique(); }} - }) + : factories({{SHAAlgorithm::SHA_256, + []() -> std::unique_ptr { + return std::make_unique(); + }}, + {SHAAlgorithm::SHA_3_512, []() -> std::unique_ptr { + return std::make_unique(); + }}}) { - log(logger::LogLevel::INFO, "HashFactory constructor called, initializing hash algorithm factories."); + log(logger::LogLevel::INFO, + "HashFactory constructor called, initializing hash algorithm " + "factories."); } \ No newline at end of file diff --git a/hsm-server/src/my_logger.cpp b/hsm-server/src/my_logger.cpp new file mode 100644 index 00000000..d1321b2e --- /dev/null +++ b/hsm-server/src/my_logger.cpp @@ -0,0 +1,45 @@ +#include "../include/my_logger.h" +const std::string logFilePath = "../sharedLogs/HSM_Communication.log"; + +std::ofstream logFile(logFilePath, std::ios::app); + +std::mutex logMutex; + +std::string getTimestamp() { + auto now = std::chrono::system_clock::now(); + auto now_ns = std::chrono::duration_cast(now.time_since_epoch()).count(); + return std::to_string(now_ns); +} + +std::string dataToHex(const unsigned char* data, size_t size) { + std::ostringstream oss; + oss << "0x"; + for (size_t i = 0; i < size; ++i) { + oss << std::hex << std::setw(2) << std::setfill('0') << static_cast(data[i]); + } + return oss.str(); +} + +void log(logger::LogLevel loglevel, const std::string& hsm_id, const std::string& user_id, const std::string& message) +{ + std::string levelStr; + switch (loglevel) { + case logger::LogLevel::INFO: + levelStr = "INFO"; + break; + case logger::LogLevel::ERROR: + levelStr = "ERROR"; + break; + } + + std::string logMessage = "[" + getTimestamp() + "ns] [" + levelStr + "] SRC " + hsm_id + " DST " + user_id + " " + message; + + std::lock_guard guard(logMutex); + logFile << logMessage << std::endl; +} + +int getId() +{ + static int counter = 0; + return ++counter; +} \ No newline at end of file diff --git a/hsm/src/prime_tests.cpp b/hsm-server/src/prime_tests.cpp similarity index 100% rename from hsm/src/prime_tests.cpp rename to hsm-server/src/prime_tests.cpp diff --git a/hsm/src/rsa.cpp b/hsm-server/src/rsa.cpp similarity index 92% rename from hsm/src/rsa.cpp rename to hsm-server/src/rsa.cpp index 406644e3..2cafd9f9 100644 --- a/hsm/src/rsa.cpp +++ b/hsm-server/src/rsa.cpp @@ -68,20 +68,17 @@ size_t rsaGetModulusLen(size_t keySize) CK_RV rsaGenerateKeys(size_t keySize, uint8_t *pubKey, size_t pubLen, uint8_t *privKey, size_t privLen) { - log(logger::LogLevel::INFO, - "RSA generate keys: generation RSA key pair of " + - to_string(keySize) + " bits : started..."); + "RSA generate keys: generation RSA key pair of " + to_string(keySize) + + " bits : started..."); if (!allowedKeySizes(keySize)) { - log(logger::LogLevel::ERROR, - "RSA generate keys: invalid key size"); + log(logger::LogLevel::ERROR, "RSA generate keys: invalid key size"); return CKR_KEY_SIZE_RANGE; } if (!(pubLen == rsaGetPublicKeyLen(keySize)) || !(privLen == rsaGetPrivateKeyLen(keySize))) { - log( - logger::LogLevel::ERROR, + log(logger::LogLevel::ERROR, "RSA generate keys: buffer sizes are insufficient"); return CKR_BUFFER_TOO_SMALL; } @@ -104,7 +101,7 @@ CK_RV rsaGenerateKeys(size_t keySize, uint8_t *pubKey, size_t pubLen, } catch (const std::exception &e) { log(logger::LogLevel::ERROR, - "RSA generate keys: failed " + string(e.what())); + "RSA generate keys: failed " + string(e.what())); return CKR_KEY_FUNCTION_NOT_PERMITTED; } @@ -181,30 +178,27 @@ CK_RV rsaEncrypt(const uint8_t *plaintext, size_t plaintextLen, const uint8_t *key, size_t keyLen, uint8_t *ciphertext, size_t ciphertextLen, size_t keySize) { - if (!allowedKeySizes(keySize)) { - log(logger::LogLevel::ERROR, - "RSA encryption: invalid key size"); + log(logger::LogLevel::ERROR, "RSA encryption: invalid key size"); return CKR_KEY_SIZE_RANGE; } if ((!(keyLen == rsaGetPublicKeyLen(keySize)) && !(keyLen == rsaGetPrivateKeyLen(keySize)))) { log(logger::LogLevel::ERROR, - "RSA encryption: buffer sizes are insufficient"); + "RSA encryption: buffer sizes are insufficient"); return CKR_BUFFER_TOO_SMALL; } size_t keySizeBytes = keySize / BITS_IN_BYTE; if (plaintextLen > rsaGetPlainMaxLen(keySize)) { - log(logger::LogLevel::ERROR, - "RSA encryption: plaintext is too long"); + log(logger::LogLevel::ERROR, "RSA encryption: plaintext is too long"); return CKR_DATA_TOO_LARGE; } if (ciphertextLen != keySizeBytes) { log(logger::LogLevel::ERROR, - "RSA encryption: ciphertext buffer is too small"); + "RSA encryption: ciphertext buffer is too small"); return CKR_BUFFER_TOO_SMALL; } @@ -226,8 +220,7 @@ CK_RV rsaEncrypt(const uint8_t *plaintext, size_t plaintextLen, cipherNumber = modularExponentiation(plainNumber, exponent, modulus); } catch (std::exception &e) { - log( - logger::LogLevel::ERROR, + log(logger::LogLevel::ERROR, "RSA encryption: error performing modular exponentiation " + string(e.what())); return CKR_DECRYPTED_DATA_INVALID; @@ -257,24 +250,22 @@ CK_RV rsaDecrypt(const uint8_t *ciphertext, size_t ciphertextLen, const uint8_t *key, size_t keyLen, uint8_t *plaintext, size_t *plaintextLen, size_t keySize) { - if (!allowedKeySizes(keySize)) { - log(logger::LogLevel::ERROR, - "RSA decryption: invalid key size"); + log(logger::LogLevel::ERROR, "RSA decryption: invalid key size"); return CKR_KEY_SIZE_RANGE; } if ((!(keyLen == rsaGetPublicKeyLen(keySize)) && !(keyLen == rsaGetPrivateKeyLen(keySize)))) { log(logger::LogLevel::ERROR, - "RSA encryption: buffer sizes are insufficient"); + "RSA encryption: buffer sizes are insufficient"); return CKR_BUFFER_TOO_SMALL; } size_t keySizeBytes = keySize / BITS_IN_BYTE; if (ciphertextLen != keySizeBytes) { log(logger::LogLevel::ERROR, - "RSA decryption: ciphertext buffer is too small"); + "RSA decryption: ciphertext buffer is too small"); return CKR_BUFFER_TOO_SMALL; } @@ -292,8 +283,7 @@ CK_RV rsaDecrypt(const uint8_t *ciphertext, size_t ciphertextLen, plainNumber = modularExponentiation(cipherNumber, exponent, modulus); } catch (std::exception &e) { - log( - logger::LogLevel::ERROR, + log(logger::LogLevel::ERROR, "RSA decryption: error performing modular exponentiation " + string(e.what())); return CKR_ENCRYPTED_DATA_INVALID; @@ -308,8 +298,7 @@ CK_RV rsaDecrypt(const uint8_t *ciphertext, size_t ciphertextLen, rsaPkcs1v15Unpad(padded, paddedLen, plaintext, plaintextLen); } catch (std::exception &e) { - log( - logger::LogLevel::ERROR, + log(logger::LogLevel::ERROR, "RSA decryption: error unpadding plaintext " + string(e.what())); delete[] padded; return CKR_DECRYPTED_DATA_INVALID; diff --git a/hsm/src/sha256.cpp b/hsm-server/src/sha256.cpp similarity index 73% rename from hsm/src/sha256.cpp rename to hsm-server/src/sha256.cpp index 13020233..568a0116 100644 --- a/hsm/src/sha256.cpp +++ b/hsm-server/src/sha256.cpp @@ -4,7 +4,7 @@ #ifdef USE_SYCL #include using namespace sycl; -#endif //USE_SYCL +#endif //USE_SYCL using namespace std; // Constants used in SHA-256 processing @@ -19,7 +19,8 @@ using namespace std; * SHA256 constructor initializes the hash values with SHA-256 specific constants. * Sets the initial message size and bit length to 0. */ -SHA256::SHA256(){ +SHA256::SHA256() +{ result[0] = 0x6a09e667; result[1] = 0xbb67ae85; result[2] = 0x3c6ef372; @@ -37,9 +38,9 @@ SHA256::SHA256(){ * * @param data A vector of bytes to be added to the hash. */ -CK_RV SHA256::update(const std::vector& data) +CK_RV SHA256::update(const std::vector &data) { - log(logger::LogLevel::DEBUG, "Updating SHA-256 with data."); + log(logger::LogLevel::DEBUG, "Updating SHA-256 with data."); // Get the size of the input data size_t length = data.size(); @@ -52,7 +53,8 @@ CK_RV SHA256::update(const std::vector& data) if (messageSize == 64) { CK_RV transform_status = transform(); if (transform_status != CKR_OK) { - log(logger::LogLevel::ERROR, "Transform failed during SHA-256 update."); + log(logger::LogLevel::ERROR, + "Transform failed during SHA-256 update."); return transform_status; // Return the error code from the transform function } @@ -70,7 +72,9 @@ CK_RV SHA256::update(const std::vector& data) */ void SHA256::padding() { - log(logger::LogLevel::DEBUG, "Padding the message and appending its length to make it congruent to 56 mod 64."); + log(logger::LogLevel::DEBUG, + "Padding the message and appending its length to make it congruent to " + "56 mod 64."); uint64_t currentLength = messageSize; uint8_t paddingEnd = currentLength < 56 ? 56 : 64; @@ -108,22 +112,26 @@ void SHA256::padding() */ CK_RV SHA256::transform() { - log(logger::LogLevel::DEBUG, "Transforming message block and updating hash state using 64 rounds of SHA-256 compression."); + log(logger::LogLevel::DEBUG, + "Transforming message block and updating hash state using 64 rounds of " + "SHA-256 compression."); uint32_t temp[64]; queue q; // Check if message size is correct if (messageSize != 64) { - log(logger::LogLevel::ERROR, "Message size is not 64 bytes."); + log(logger::LogLevel::ERROR, "Message size is not 64 bytes."); return CKR_FUNCTION_FAILED; // Return an error code if the message size is incorrect } // Initialize the first 16 elements of temp with the message schedule for (uint8_t i = 0, j = 0; i < 16; i++, j += 4) - temp[i] = (message[j] << 24) | (message[j + 1] << 16) | (message[j + 2] << 8) | (message[j + 3]); + temp[i] = (message[j] << 24) | (message[j + 1] << 16) | + (message[j + 2] << 8) | (message[j + 3]); for (uint8_t k = 16; k < 64; k++) - temp[k] = GAMMA1(temp[k - 2]) + temp[k - 7] + GAMMA0(temp[k - 15]) + temp[k - 16]; + temp[k] = GAMMA1(temp[k - 2]) + temp[k - 7] + GAMMA0(temp[k - 15]) + + temp[k - 16]; // Save the current state uint32_t s[8]; @@ -155,13 +163,14 @@ CK_RV SHA256::transform() // Update the result with the state q.submit([&](handler &h) { - auto state_acc = state_buf.get_access(h); - auto result_acc = result_buf.get_access(h); - - h.parallel_for(range<1>(8), [=](id<1> idx) { - result_acc[idx] += state_acc[idx]; - }); - }).wait(); + auto state_acc = state_buf.get_access(h); + auto result_acc = + result_buf.get_access(h); + + h.parallel_for(range<1>(8), [=](id<1> idx) { + result_acc[idx] += state_acc[idx]; + }); + }).wait(); } return CKR_OK; } @@ -174,9 +183,10 @@ CK_RV SHA256::transform() * @param state The SHA256State object to finalize. * @return A vector containing the SHA-256 hash value. */ -CK_RV SHA256::finalize(std::vector& output) +CK_RV SHA256::finalize(std::vector &output) { - log(logger::LogLevel::DEBUG, "Finalizing SHA-256 hash computation and returning the hash value."); + log(logger::LogLevel::DEBUG, + "Finalizing SHA-256 hash computation and returning the hash value."); try { // Perform padding @@ -191,31 +201,33 @@ CK_RV SHA256::finalize(std::vector& output) // Submit SYCL command group sycl::queue q; - q.submit([&](sycl::handler& h) { - auto result_acc = result_buf.get_access(h); - auto hash_acc = hash_buf.get_access(h); - h.parallel_for(sycl::range<1>(8), [=](sycl::id<1> idx) { - size_t i = idx[0]; - hash_acc[i * 4 + 0] = (result_acc[i] >> 24) & 0xff; - hash_acc[i * 4 + 1] = (result_acc[i] >> 16) & 0xff; - hash_acc[i * 4 + 2] = (result_acc[i] >> 8) & 0xff; - hash_acc[i * 4 + 3] = (result_acc[i] >> 0) & 0xff; - }); - }).wait(); + q.submit([&](sycl::handler &h) { + auto result_acc = + result_buf.get_access(h); + auto hash_acc = hash_buf.get_access(h); + h.parallel_for(sycl::range<1>(8), [=](sycl::id<1> idx) { + size_t i = idx[0]; + hash_acc[i * 4 + 0] = (result_acc[i] >> 24) & 0xff; + hash_acc[i * 4 + 1] = (result_acc[i] >> 16) & 0xff; + hash_acc[i * 4 + 2] = (result_acc[i] >> 8) & 0xff; + hash_acc[i * 4 + 3] = (result_acc[i] >> 0) & 0xff; + }); + }).wait(); // Copy the hash to the output vector output = hash; return CKR_OK; // Return success } - catch (const sycl::exception& e) { + catch (const sycl::exception &e) { // Handle SYCL exceptions - log(logger::LogLevel::ERROR, "SYCL error: " + std::string(e.what())); + log(logger::LogLevel::ERROR, "SYCL error: " + std::string(e.what())); return CKR_FUNCTION_FAILED; } - catch (const std::exception& e) { + catch (const std::exception &e) { // Handle other exceptions - log(logger::LogLevel::ERROR, "Standard error: " + std::string(e.what())); + log(logger::LogLevel::ERROR, + "Standard error: " + std::string(e.what())); return CKR_FUNCTION_FAILED; } } @@ -228,17 +240,21 @@ CK_RV SHA256::finalize(std::vector& output) */ CK_RV SHA256::transform() { - log(logger::LogLevel::DEBUG, "Transforming message block and updating hash state using 64 rounds of SHA-256 compression."); + log(logger::LogLevel::DEBUG, + "Transforming message block and updating hash state using 64 rounds of " + "SHA-256 compression."); uint32_t temp[64]; // Initialize temp array with message data for (uint8_t i = 0, j = 0; i < 16; i++, j += 4) - temp[i] = (message[j] << 24) | (message[j + 1] << 16) | (message[j + 2] << 8) | (message[j + 3]); + temp[i] = (message[j] << 24) | (message[j + 1] << 16) | + (message[j + 2] << 8) | (message[j + 3]); // Compute remaining values for temp array for (uint8_t k = 16; k < 64; k++) - temp[k] = GAMMA1(temp[k - 2]) + temp[k - 7] + GAMMA0(temp[k - 15]) + temp[k - 16]; + temp[k] = GAMMA1(temp[k - 2]) + temp[k - 7] + GAMMA0(temp[k - 15]) + + temp[k - 16]; // Initialize working variables uint32_t a, b, c, d, e, f, g, h; @@ -285,21 +301,24 @@ CK_RV SHA256::transform() * * @return A vector containing the SHA-256 hash value. */ -CK_RV SHA256::finalize(std::vector& output) +CK_RV SHA256::finalize(std::vector &output) { - log(logger::LogLevel::DEBUG, "Finalizing SHA-256 hash computation."); + log(logger::LogLevel::DEBUG, "Finalizing SHA-256 hash computation."); // Check if the internal state is valid if (result == nullptr) { - log(logger::LogLevel::ERROR, "SHA-256 computation has not been initialized or has failed."); + log(logger::LogLevel::ERROR, + "SHA-256 computation has not been initialized or has failed."); return CKR_FUNCTION_FAILED; } try { // Apply padding to the data padding(); - } catch (const std::exception& e) { - log(logger::LogLevel::ERROR, std::string("Padding failed: ") + e.what()); + } + catch (const std::exception &e) { + log(logger::LogLevel::ERROR, + std::string("Padding failed: ") + e.what()); return CKR_FUNCTION_FAILED; } @@ -314,8 +333,8 @@ CK_RV SHA256::finalize(std::vector& output) output[i * 4 + 2] = (result[i] >> 8) & 0xFF; output[i * 4 + 3] = (result[i]) & 0xFF; } - + return CKR_OK; } -#endif //USE_SYCL \ No newline at end of file +#endif //USE_SYCL \ No newline at end of file diff --git a/hsm/tests/aes_tests.cpp b/hsm-server/tests/aes_tests.cpp similarity index 98% rename from hsm/tests/aes_tests.cpp rename to hsm-server/tests/aes_tests.cpp index 8d2ab17a..2e467a11 100644 --- a/hsm/tests/aes_tests.cpp +++ b/hsm-server/tests/aes_tests.cpp @@ -1,8 +1,8 @@ #include #include "gtest/gtest.h" -#include "../include/aes.h" +#include "aes.h" #include "debug_utils.h" -#include "../include/aes_stream_factory.h" // Assuming this is where your FactoryManager is defined +#include "aes_stream_factory.h" // Assuming this is where your FactoryManager is defined /* Helper function to setup encryption and decryption */ void testEncryptionDecryption(AESChainingMode mode, AESKeyLength keyLength) diff --git a/hsm-server/tests/aes_tests.cpp:Zone.Identifier b/hsm-server/tests/aes_tests.cpp:Zone.Identifier new file mode 100644 index 00000000..e69de29b diff --git a/hsm/tests/crypto_api_tests.cpp b/hsm-server/tests/crypto_api_tests.cpp similarity index 99% rename from hsm/tests/crypto_api_tests.cpp rename to hsm-server/tests/crypto_api_tests.cpp index 31eed991..d2cadf5e 100644 --- a/hsm/tests/crypto_api_tests.cpp +++ b/hsm-server/tests/crypto_api_tests.cpp @@ -25,7 +25,7 @@ class CryptoAPIFixture : public ::testing::Test { void TearDown() override {} }; - //#define RSA_TEST +//#define RSA_TEST // #define ECC_TEST // #define SIGN_VERIFY_TEST @@ -297,7 +297,7 @@ void testEncryptionDecryptionAPI(AESChainingMode mode, AESKeyLength keyLength) EXPECT_EQ(inputLength3, decryptedLength3); }; -//#define AES_TESTS + //#define AES_TESTS #ifdef AES_TESTS TEST(KeyLengthsAPI, KeyLength128_ECB) @@ -483,7 +483,7 @@ void GenericEncryptionDecryptionTest(CryptoConfig config) // Control macros to enable or disable RSA and ECC tests //#define RUN_RSA_TESTS // Set to 1 to run RSA tests, 0 to skip -#define RUN_ECC_TESTS // Set to 1 to run ECC tests, 0 to skip +#define RUN_ECC_TESTS // Set to 1 to run ECC tests, 0 to skip //AES_128 combinations #ifdef RUN_RSA_TESTS diff --git a/hsm-server/tests/crypto_api_tests.cpp:Zone.Identifier b/hsm-server/tests/crypto_api_tests.cpp:Zone.Identifier new file mode 100644 index 00000000..e69de29b diff --git a/hsm/tests/ecc_tests.cpp b/hsm-server/tests/ecc_tests.cpp similarity index 82% rename from hsm/tests/ecc_tests.cpp rename to hsm-server/tests/ecc_tests.cpp index ad53b5ae..d2b1a6f1 100644 --- a/hsm/tests/ecc_tests.cpp +++ b/hsm-server/tests/ecc_tests.cpp @@ -6,12 +6,12 @@ TEST(ECCTest, EncryptDecrypt) { mpz_class privateKey = generatePrivateKey(); Point publicKey = generatePublicKey(privateKey); - std::vector messageBytes (16, 1); + std::vector messageBytes(16, 1); // Encrypt the message auto cipher = encryptECC(messageBytes, publicKey); // Decrypt the message - auto decryptedMessage = decryptECC(cipher, privateKey); + auto decryptedMessage = decryptECC(cipher, privateKey); // Check if the decrypted message matches the original message EXPECT_EQ(messageBytes, decryptedMessage); diff --git a/hsm-server/tests/ecc_tests.cpp:Zone.Identifier b/hsm-server/tests/ecc_tests.cpp:Zone.Identifier new file mode 100644 index 00000000..e69de29b diff --git a/hsm/tests/hash_tests.cpp b/hsm-server/tests/hash_tests.cpp similarity index 52% rename from hsm/tests/hash_tests.cpp rename to hsm-server/tests/hash_tests.cpp index 6c102810..ac8c9cbb 100644 --- a/hsm/tests/hash_tests.cpp +++ b/hsm-server/tests/hash_tests.cpp @@ -5,18 +5,21 @@ #include "../include/hash_factory.h" // Helper function to convert vector to a hex string for comparison -std::string to_hex_string(const std::vector& data) { +std::string to_hex_string(const std::vector &data) +{ std::ostringstream oss; for (auto byte : data) { - oss << std::hex << std::setw(2) << std::setfill('0') << static_cast(byte); + oss << std::hex << std::setw(2) << std::setfill('0') + << static_cast(byte); } return oss.str(); } // Test fixture class for SHA256 class HashTest : public ::testing::Test { -protected: - void SetUp() override { + protected: + void SetUp() override + { // Get the FactoryManager instance factoryManager = &HashFactory::getInstance(); CK_RV result; @@ -26,13 +29,14 @@ class HashTest : public ::testing::Test { FAIL() << "Failed to create SHA256 instance"; } - result = factoryManager->create(SHA_3_512, sha512); - if(!sha512 || result != CKR_OK){ + result = factoryManager->create(SHA_3_512, sha512); + if (!sha512 || result != CKR_OK) { FAIL() << "Failed to create SHA512 instance"; } } // Utility to hash a string and return the hex string of the result - std::string hashStringSHA256(const std::string& input) { + std::string hashStringSHA256(const std::string &input) + { std::vector output; std::vector data(input.begin(), input.end()); sha256->update(data); @@ -40,9 +44,11 @@ class HashTest : public ::testing::Test { return to_hex_string(output); } - void hashStringSHA512(const std::vector>& chunks, const std::string& expectedHash) { + void hashStringSHA512(const std::vector> &chunks, + const std::string &expectedHash) + { std::vector output; - for (const auto& chunk : chunks) { + for (const auto &chunk : chunks) { sha512->update(chunk); } sha512->finalize(output); @@ -50,36 +56,45 @@ class HashTest : public ::testing::Test { ASSERT_EQ(res, expectedHash); } - HashFactory* factoryManager; + HashFactory *factoryManager; std::unique_ptr sha256; std::unique_ptr sha512; }; // Test hashing an empty string -TEST_F(HashTest, HashEmptyString) { - std::string expectedHash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; +TEST_F(HashTest, HashEmptyString) +{ + std::string expectedHash = + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; std::string hash = hashStringSHA256(""); EXPECT_EQ(hash, expectedHash); } // Test hashing "abc" -TEST_F(HashTest, HashABC) { - std::string expectedHash = "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"; +TEST_F(HashTest, HashABC) +{ + std::string expectedHash = + "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"; std::string hash = hashStringSHA256("abc"); EXPECT_EQ(hash, expectedHash); } // Test hashing "hello world" -TEST_F(HashTest, HashHelloWorld) { - std::string expectedHash = "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"; +TEST_F(HashTest, HashHelloWorld) +{ + std::string expectedHash = + "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"; std::string hash = hashStringSHA256("hello world"); EXPECT_EQ(hash, expectedHash); } // Test hashing a string with special characters -TEST_F(HashTest, HashSpecialCharacters) { +TEST_F(HashTest, HashSpecialCharacters) +{ std::string specialChars = "!@#$%^&*()_+-={}[]|:;<>,.?/~`"; - std::string expectedHash = "64192e06fd03a054a8f7a478adfed5b15effe6f3ecc24df06df143cc1d45b7ab"; // Replace with the actual expected hash value + std::string expectedHash = + "64192e06fd03a054a8f7a478adfed5b15effe6f3ecc24df06df143cc1d45b7" + "ab"; // Replace with the actual expected hash value std::string hash = hashStringSHA256(specialChars); EXPECT_EQ(hash, expectedHash); } @@ -88,10 +103,11 @@ TEST_F(HashTest, HashSpecialCharacters) { TEST_F(HashTest, EmptyStringHash) { std::vector> data = {{}}; - std::string expectedHash = "a69f73cca23a9ac5c8b567dc185a756e97c98216" - "4fe25859e0d1dcc1475c80a615b2123af1f5f94" - "c11e3e9402c3ac558f500199d95b6d3e3017585" - "86281dcd26"; + std::string expectedHash = + "a69f73cca23a9ac5c8b567dc185a756e97c98216" + "4fe25859e0d1dcc1475c80a615b2123af1f5f94" + "c11e3e9402c3ac558f500199d95b6d3e3017585" + "86281dcd26"; hashStringSHA512(data, expectedHash); } @@ -99,10 +115,11 @@ TEST_F(HashTest, EmptyStringHash) TEST_F(HashTest, ABCStringHash) { std::vector> data = {{'a', 'b', 'c'}}; - std::string expectedHash = "b751850b1a57168a5693cd924b6b096e08f621827" - "444f70d884f5d0240d2712e10e116e9192af3c91" - "a7ec57647e3934057340b4cf408d5a56592f8274" - "eec53f0"; + std::string expectedHash = + "b751850b1a57168a5693cd924b6b096e08f621827" + "444f70d884f5d0240d2712e10e116e9192af3c91" + "a7ec57647e3934057340b4cf408d5a56592f8274" + "eec53f0"; hashStringSHA512(data, expectedHash); } @@ -110,11 +127,13 @@ TEST_F(HashTest, ABCStringHash) TEST_F(HashTest, StringLongerThan64BytesHash) { std::string longString = "The quick brown fox jumps over the lazy dog"; - std::vector> data = {std::vector(longString.begin(), longString.end())}; - std::string expectedHash = "01dedd5de4ef14642445ba5f5b97c15e47b9ad931" - "326e4b0727cd94cefc44fff23f07bf543139939b" - "49128caf436dc1bdee54fcb24023a08d9403f9b4" - "bf0d450"; + std::vector> data = { + std::vector(longString.begin(), longString.end())}; + std::string expectedHash = + "01dedd5de4ef14642445ba5f5b97c15e47b9ad931" + "326e4b0727cd94cefc44fff23f07bf543139939b" + "49128caf436dc1bdee54fcb24023a08d9403f9b4" + "bf0d450"; hashStringSHA512(data, expectedHash); } @@ -122,11 +141,13 @@ TEST_F(HashTest, StringLongerThan64BytesHash) TEST_F(HashTest, SpecialCharsHash) { std::string specialString = "!@#$%^&*()"; - std::vector> data = {std::vector(specialString.begin(), specialString.end())}; - std::string expectedHash = "fbbcb3e21184dd4061de0b85c4756f74e36a36112" - "5733e2c7470232fc66f71c902d1e6ff7eb60cfe6" - "b47e8b72e1429b4ff21de0fa150a2b3e8d8e29e2" - "64d56ab"; + std::vector> data = { + std::vector(specialString.begin(), specialString.end())}; + std::string expectedHash = + "fbbcb3e21184dd4061de0b85c4756f74e36a36112" + "5733e2c7470232fc66f71c902d1e6ff7eb60cfe6" + "b47e8b72e1429b4ff21de0fa150a2b3e8d8e29e2" + "64d56ab"; hashStringSHA512(data, expectedHash); } @@ -135,10 +156,11 @@ TEST_F(HashTest, MultipleUpdatesHash) { std::vector> data = { {'a', 'b'}, // First update with two bytes - {'c', 'd'} // Second update with two more bytes + {'c', 'd'} // Second update with two more bytes }; - std::string expectedHash = "6eb7b86765bf96a8467b72401231539cbb830f6c641" - "20954c4567272f613f1364d6a80084234fa3400d30" - "6b9f5e10c341bbdc5894d9b484a8c7deea9cbe4e265"; + std::string expectedHash = + "6eb7b86765bf96a8467b72401231539cbb830f6c641" + "20954c4567272f613f1364d6a80084234fa3400d30" + "6b9f5e10c341bbdc5894d9b484a8c7deea9cbe4e265"; hashStringSHA512(data, expectedHash); } \ No newline at end of file diff --git a/hsm-server/tests/hash_tests.cpp:Zone.Identifier b/hsm-server/tests/hash_tests.cpp:Zone.Identifier new file mode 100644 index 00000000..e69de29b diff --git a/hsm/tests/keys_tests.cpp b/hsm-server/tests/keys_tests.cpp similarity index 100% rename from hsm/tests/keys_tests.cpp rename to hsm-server/tests/keys_tests.cpp diff --git a/hsm-server/tests/keys_tests.cpp:Zone.Identifier b/hsm-server/tests/keys_tests.cpp:Zone.Identifier new file mode 100644 index 00000000..e69de29b diff --git a/hsm/tests/rsa_tests.cpp b/hsm-server/tests/rsa_tests.cpp similarity index 99% rename from hsm/tests/rsa_tests.cpp rename to hsm-server/tests/rsa_tests.cpp index 168e6514..fa67530d 100644 --- a/hsm/tests/rsa_tests.cpp +++ b/hsm-server/tests/rsa_tests.cpp @@ -86,7 +86,7 @@ TEST(RSATest, EncryptDecrypt_2048) TEST(RSATest, EncryptDecrypt_4096) { const int KEY_SIZE = 4096; - + size_t pubLen = rsaGetPublicKeyLen(KEY_SIZE); size_t priLen = rsaGetPrivateKeyLen(KEY_SIZE); uint8_t *pubBuff = new uint8_t[pubLen]; diff --git a/hsm-server/tests/rsa_tests.cpp:Zone.Identifier b/hsm-server/tests/rsa_tests.cpp:Zone.Identifier new file mode 100644 index 00000000..e69de29b diff --git a/hsm/tests/sha256_tests.cpp b/hsm-server/tests/sha256_tests.cpp similarity index 100% rename from hsm/tests/sha256_tests.cpp rename to hsm-server/tests/sha256_tests.cpp diff --git a/hsm-server/tests/sha256_tests.cpp:Zone.Identifier b/hsm-server/tests/sha256_tests.cpp:Zone.Identifier new file mode 100644 index 00000000..e69de29b diff --git a/hsm/HSM_Communication.txt b/hsm/HSM_Communication.txt deleted file mode 100644 index 20c0d2ac..00000000 --- a/hsm/HSM_Communication.txt +++ /dev/null @@ -1,40 +0,0 @@ -[1728830880712433005ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 217288308803, total packets: 1 Success Data: 0x0802120210101a0c323137323838333038383033 -[1728830880712992662ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 217288308803, total packets: 1 Success Data: 0x -[1728830880715112671ns] [INFO] SRC 3 DST 1 received packet number: 1, of messageId: 317288308803, total packets: 1 Success Data: 0x0803120210101a0c333137323838333038383033 -[1728830880715305028ns] [INFO] SRC 1 DST 3 sending packet number: 1, of messageId: 317288308803, total packets: 1 Success Data: 0x -[1728830880828687977ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 2172883088024, total packets: 1 Success Data: 0x08021080081801220d32313732383833303838303234 -[1728830880828779927ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 22172883088024211 Success Data: 0x089009 -[1728830880829372920ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 2172883088024, total packets: 1 Success Data: 0x0802108008220d32313732383833303838303234 -[1728830880829435314ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 22172883088024211 Success Data: 0x089008 -[1728830880829949892ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 2172883088024, total packets: 1 Success Data: 0x0802109404220d32313732383833303838303234 -[1728830880830018854ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 22172883088024211 Success Data: 0x08a004 -[1728830880830601697ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 217288308807, total packets: 1 Success Data: 0x0802220c323137323838333038383037 -[1728830880830668768ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 22172883088076, total packets: 1 Success Data: 0x088001 -[1728830880831628663ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 2172883088026, total packets: 3 Success Data: 0x41414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141 -[1728830880914013949ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 21728830880261, total packets: 3 Success Data: 0x28381dc779eff330b15f34ad6fd53203def4d28751ebb6a27d5d4f176aafd4bb9db473f07374bde89cfdac6722c3e295123a344d3f2661554ca7546f13ba4183420974fd45353509e6a917b6ca568344cb3994a5a375c03d3d50e9be95329accf33627d2ccf16a4ee04b586ce42f491bbab39795cff6c5f1fd94295e30b433a1b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e30143db63ee66b0cdff9f69917680151e -[1728830880915517480ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 2172883088026, total packets: 3 Success Data: 0x41414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141 -[1728830880931844452ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 21728830880261, total packets: 3 Success Data: 0xb49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e30143db63ee66b0cdff9f69917680151e -[1728830880932878683ns] [INFO] SRC 2 DST 1 received packet number: 2, of messageId: 2172883088026, total packets: 3 Success Data: 0x41414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141 -[1728830889226746624ns] [INFO] SRC 1 DST 2 sending packet number: 2, of messageId: 21728830880261, total packets: 3 Success Data: 0xb49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e370738c3eb7f6cbf97acbb54878be46c6 -[1728830889228654413ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 3172883088924, total packets: 1 Success Data: 0x0802108008220d33313732383833303838393234 -[1728830889228849039ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 23172883088924211 Success Data: 0x089008 -[1728830889229579359ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 3172883088924, total packets: 1 Success Data: 0x08021080081801220d33313732383833303838393234 -[1728830889229715522ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 23172883088924211 Success Data: 0x089009 -[1728830889230684692ns] [INFO] SRC 3 DST 1 received packet number: 1, of messageId: 317288308897, total packets: 1 Success Data: 0x0803220c333137323838333038383937 -[1728830889230763523ns] [INFO] SRC 1 DST 3 sending packet number: 1, of messageId: 33172883088976, total packets: 1 Success Data: 0x088001 -[1728830889231463197ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 3172883088925, total packets: 1 Success Data: 0x08021090081801220d33313732383833303838393235 -[1728830889231573900ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 317288308892522, total packets: 1 Success Data: 0x089007 -[1728830889232243116ns] [INFO] SRC 3 DST 1 received packet number: 1, of messageId: 317288308897, total packets: 1 Success Data: 0x0803220c333137323838333038383937 -[1728830889232322418ns] [INFO] SRC 1 DST 3 sending packet number: 1, of messageId: 33172883088976, total packets: 1 Success Data: 0x088001 -[1728830889232970512ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 3172883088925, total packets: 1 Success Data: 0x08021090071801220d33313732383833303838393235 -[1728830889233040008ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 317288308892522, total packets: 1 Success Data: 0x089006 -[1728830889233686216ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 3172883088924, total packets: 1 Success Data: 0x080210a005220d33313732383833303838393234 -[1728830889233766839ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 23172883088924211 Success Data: 0x08b005 -[1728830889234353075ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 3172883088924, total packets: 1 Success Data: 0x0802108008220d33313732383833303838393234 -[1728830889234458497ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 23172883088924211 Success Data: 0x089008 -[1728830889235240585ns] [INFO] SRC 3 DST 1 received packet number: 1, of messageId: 317288308897, total packets: 1 Success Data: 0x0803220c333137323838333038383937 -[1728830889235332335ns] [INFO] SRC 1 DST 3 sending packet number: 1, of messageId: 33172883088976, total packets: 1 Success Data: 0x088001 -[1728830889235977599ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 3172883088924, total packets: 1 Success Data: 0x08021080081801220d33313732383833303838393234 -[1728830889236051716ns] [INFO] SRC 1 DST 2 sending packet number: 1, of messageId: 23172883088924211 Success Data: 0x089009 -[1728830889236936680ns] [INFO] SRC 2 DST 1 received packet number: 1, of messageId: 31728830889, total packets: 3 Success Data: 0x28381dc779eff330b15f34ad6fd53203def4d28751ebb6a27d5d4f176aafd4bb9db473f07374bde89cfdac6722c3e295123a344d3f2661554ca7546f13ba4183420974fd45353509e6a917b6ca568344cb3994a5a375c03d3d50e9be95329accf33627d2ccf16a4ee04b586ce42f491bbab39795cff6c5f1fd94295e30b433a1b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e30143db63ee66b0cdff9f69917680151e -[1728830889237289346ns] [INFO] SRC 2 DST 1 received packet number: 0, of messageId: 21728830889, total packets: 1 Success Data: 0x28381dc779eff330b15f34ad6fd53203def4d28751ebb6a27d5d4f176aafd4bb9db473f07374bde89cfdac6722c3e295123a344d3f2661554ca7546f13ba4183420974fd45353509e6a917b6ca568344cb3994a5a375c03d3d50e9be95329accf33627d2ccf16a4ee04b586ce42f491bbab39795cff6c5f1fd94295e30b433a1b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e3b49cbf19d357e6e1f6845c30fd5b63e30143db63ee66b0cdff9f69917680151e diff --git a/hsm/README.md b/hsm/README.md deleted file mode 100644 index f6fa7e0c..00000000 --- a/hsm/README.md +++ /dev/null @@ -1 +0,0 @@ -# VehicleComputingSimulator \ No newline at end of file diff --git a/hsm/include/IHash.h b/hsm/include/IHash.h deleted file mode 100644 index 011509c2..00000000 --- a/hsm/include/IHash.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef IHASH_H -#define IHASH_H -#include "general.h" -#include -#include - -class IHash { -public: - enum SHAAlgorithm { SHA256, SHA3_512 }; - virtual CK_RV update(const std::vector &data) = 0; - virtual CK_RV finalize(std::vector &output) = 0; - virtual ~IHash() = default; -}; - -#endif // IHASH_H \ No newline at end of file diff --git a/hsm/include/SHA3-512.h b/hsm/include/SHA3-512.h deleted file mode 100644 index cc1a951c..00000000 --- a/hsm/include/SHA3-512.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef SHA3_512_H -#define SHA3_512_H - -#include "IHash.h" -#include "general.h" -#include // For fixed-width integer types -#include // For std::ostringstream -#include -#include - -class SHA3_512 : public IHash { -public: - SHA3_512(); // Constructor to initialize the state - CK_RV update(const std::vector &data) - override; // Update the hash with more data - CK_RV finalize( - std::vector &output) override; // Finalize and get the hash value - -private: - uint64_t S[5][5]; // State matrix - uint8_t buffer[576]; // Buffer to hold input data - std::size_t buffer_length; // Current length of data in the buffer - - void round(uint64_t A[5][5], uint64_t RC); - void f_function(uint64_t A[5][5]); - void padding(uint8_t input[], std::size_t &in_len, int &absorb_times); - void assign_S_xor_p(uint64_t S[5][5], uint64_t *p); - void endianSwap(uint64_t &x); - std::vector hashPartToHexVector(uint64_t S[5][5]); -}; - -#endif // SHA3_512_H \ No newline at end of file diff --git a/hsm/include/crypto_service.h b/hsm/include/crypto_service.h deleted file mode 100644 index f5e82d39..00000000 --- a/hsm/include/crypto_service.h +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include -#include -#include "../proto/encryption.pb.h" -#include "../proto/encryption.grpc.pb.h" -#include "general.h" - -class CryptoServiceServer final : public crypto::CryptoService::Service { -public: - - grpc::Status bootSystem(grpc::ServerContext* context, const crypto::BootSystemRequest* request, crypto::Empty* response) override; - grpc::Status addProccess(grpc::ServerContext* context, const crypto::AddProcessRequest* request, crypto::Empty* response) override; - grpc::Status configure(grpc::ServerContext* context, const crypto::ConfigureRequest* request, crypto::Empty* response) override; - grpc::Status encrypt(grpc::ServerContext* context, const crypto::EncryptRequest* request, crypto::EncryptResponse* response) override; - grpc::Status decrypt(grpc::ServerContext* context, const crypto::DecryptRequest* request, crypto::DecryptResponse* response) override; - grpc::Status generateAESKey(grpc::ServerContext* context, const crypto::GenerateAESKeyRequest* request, crypto::GenerateAESKeyResponse* response) override; - grpc::Status generateRSAKeyPair(grpc::ServerContext* context, const crypto::GenerateKeyPairRequest* request, crypto::GenerateKeyPairResponse* response) override; - grpc::Status generateECCKeyPair(grpc::ServerContext* context, const crypto::GenerateKeyPairRequest* request, crypto::GenerateKeyPairResponse* response) override; - grpc::Status getSignedDataLength(grpc::ServerContext* context, const crypto::GetHashLengthRequest* request, crypto::GetLengthResponse* response) override; - grpc::Status getPublicECCKeyByUserId(grpc::ServerContext* context, const crypto::KeyRequest* request, crypto::KeyResponse* response) override; - grpc::Status getPublicRSAKeyByUserId(grpc::ServerContext* context, const crypto::KeyRequest* request, crypto::KeyResponse* response) override; -// ecc - grpc::Status getECCencryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) override; - grpc::Status getECCDecryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) override; - grpc::Status ECCencrypt(grpc::ServerContext* context, const crypto::AsymetricEncryptRequest* request, crypto::AsymetricEncryptResponse* response) override; - grpc::Status ECCdecrypt(grpc::ServerContext* context, const crypto::AsymetricDecryptRequest* request, crypto::AsymetricDecryptResponse* response) override; -// rsa - grpc::Status getRSAencryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) override; - grpc::Status getRSAdecryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) override; - grpc::Status RSAencrypt(grpc::ServerContext* context, const crypto::AsymetricEncryptRequest* request, crypto::AsymetricEncryptResponse* response) override; - grpc::Status RSAdecrypt(grpc::ServerContext* context, const crypto::AsymetricDecryptRequest* request, crypto::AsymetricDecryptResponse* response) override; -// aes - grpc::Status getAESencryptedLength(grpc::ServerContext* context, const crypto::GetAESLengthRequest* request, crypto::GetLengthResponse* response) override; - grpc::Status getAESdecryptedLength(grpc::ServerContext* context, const crypto::GetAESLengthRequest* request, crypto::GetLengthResponse* response) override; - grpc::Status AESencrypt(grpc::ServerContext* context, const crypto::AESEncryptRequest* request, crypto::AESEncryptResponse* response) override; - grpc::Status AESdecrypt(grpc::ServerContext* context, const crypto::AESDecryptRequest* request, crypto::AESDecryptResponse* response) override; -//sign - verify - grpc::Status getEncryptedLen(grpc::ServerContext* context, const crypto::GetWholeLength* request, crypto::GetLengthResponse* response) override; - grpc::Status getDecryptedLen(grpc::ServerContext* context, const crypto::GetWholeLength* request, crypto::GetLengthResponse* response) override; - grpc::Status signUpdate(grpc::ServerContext* context, const crypto::SignRequest* request, crypto::SignResponse* response) override; - grpc::Status signFinalize(grpc::ServerContext* context, const crypto::SignRequest* request, crypto::SignResponse* response) override; - grpc::Status verifyUpdate(grpc::ServerContext* context, const crypto::VerifyRequest* request, crypto::VerifyResponse* response) override; - grpc::Status verifyFinalize(grpc::ServerContext* context, const crypto::VerifyRequest* request, crypto::VerifyResponse* response) override; - private: - static const size_t HSM_ID = 1; - -}; \ No newline at end of file diff --git a/hsm/include/debug_utils.h b/hsm/include/debug_utils.h deleted file mode 100644 index a95b6d15..00000000 --- a/hsm/include/debug_utils.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __DEBUG_UTILS_H__ -#define __DEBUG_UTILS_H__ - -#include -#include -#include -#include "general.h" -#include "aes_stream.h" -#include "ecc.h" - -#define START_TIMER \ - auto start_timer = std::chrono::high_resolution_clock::now(); - -#define END_TIMER(message) \ - auto end_timer = std::chrono::high_resolution_clock::now(); \ - std::chrono::duration elapsed = end_timer - start_timer; \ - std::cout << message << " took " << elapsed.count() << " seconds\n"; - -void printBufferHexa(const uint8_t *buffer, size_t len, std::string message); - -void encryptStartPrintParams(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen, unsigned char* key, AESKeyLength keyLength); -void encryptContinuePrintParams(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen); -void printStreamAES(const StreamAES& obj, size_t blockSize, std::string message); -void printEncryptedMessage(const EncryptedMessage& message) ; -//Declaration of the debugLog functionvoid -void debugLog(const std::string& message, const std::string& functionName); // Macro for easier use -#define DEBUG_LOG(msg) debugLog(msg, __func__) - -#endif // __DEBUG_UTILS_H__ diff --git a/hsm/include/hash_factory.h b/hsm/include/hash_factory.h deleted file mode 100644 index 6d08106d..00000000 --- a/hsm/include/hash_factory.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef FACTORY_MANAGER_H -#define FACTORY_MANAGER_H - -#include "IHash.h" -#include "SHA3-512.h" -#include "general.h" -#include "sha256.h" -#include -#include -#include - -class HashFactory { -public: - static HashFactory &getInstance(); - CK_RV create(const SHAAlgorithm &type, - std::unique_ptr &hashPtr) const; - -private: - std::map()>> - factories; - HashFactory(); // Private constructor for singleton pattern. -}; - -#endif // FACTORY_MANAGER_H \ No newline at end of file diff --git a/hsm/include/my_logger.h b/hsm/include/my_logger.h deleted file mode 100644 index cbe1ca13..00000000 --- a/hsm/include/my_logger.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef MY_LOGGER_H -#define MY_LOGGER_H - -#include -#include -#include "../logger/logger.h" - - void log(logger::LogLevel loglevel, const std::string& hsm_id, const std::string& user_id, const std::string& message); - std::string dataToHex(const unsigned char* data, size_t size); - - -#endif // LOGGER_H diff --git a/hsm/include/sha256.h b/hsm/include/sha256.h deleted file mode 100644 index e2edbe06..00000000 --- a/hsm/include/sha256.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef SHA256_H -#define SHA256_H - -#include "../logger/logger.h" -#include "IHash.h" -#include "general.h" -#include -#include -#include - -class SHA256 : public IHash { -private: - uint32_t result[8]; - uint8_t message[64]; - size_t messageSize; - size_t bitLength; - const uint32_t bytes[64] = { - // SHA-256 constants - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, - 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, - 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, - 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, - 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, - 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, - 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, - 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, - 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2}; - CK_RV transform(); - void padding(); - -public: - SHA256(); - CK_RV update(const std::vector &data) override; - CK_RV finalize(std::vector &output) override; -}; - -#endif // SHA256_H \ No newline at end of file diff --git a/hsm/logger/logger.cpp b/hsm/logger/logger.cpp deleted file mode 100644 index ec9bff7b..00000000 --- a/hsm/logger/logger.cpp +++ /dev/null @@ -1,119 +0,0 @@ -#include "logger.h" - -std::string logger::logFileName; -std::mutex logger::logMutex; -std::chrono::system_clock::time_point logger::initTime = - std::chrono::system_clock::now(); -std::string logger::componentName = "out"; - -logger::logger(std::string componentName) { - logger::componentName = componentName; -} -void logger::initializeLogFile() { - if (isInitialized) - return; - - auto time = std::chrono::system_clock::to_time_t(initTime); - std::tm tm = *std::localtime(&time); - - std::ostringstream oss; - oss << "" << std::put_time(&tm, "%Y_%m_%d_%H_%M_%S") << "_" << componentName - << ".log"; - logFileName = oss.str(); - - std::ofstream sharedFile(sharedLogFileName, std::ios::out | std::ios::trunc); - if (sharedFile) { - sharedFile << logFileName; - } else { - std::cerr << logLevelToString(LogLevel::ERROR) - << "Failed to open shared log file name file" << std::endl; - } - - isInitialized = true; -} - -std::string logger::getLogFileName() { - if (!isInitialized) { - if (!isInitialized) { - std::ifstream sharedFile(sharedLogFileName); - if (sharedFile) { - std::getline(sharedFile, logFileName); - } - if (logFileName.empty()) { - initializeLogFile(); - } - } - } - - return logFileName; -} - -void logger::cleanUp() { std::remove(sharedLogFileName.c_str()); } - -std::string logger::logLevelToString(LogLevel level) { - switch (level) { - case LogLevel::ERROR: - return "[ERROR]"; - case LogLevel::INFO: - return "[INFO]"; - case LogLevel::DEBUG: - return "[DEBUG]"; - default: - return "[UNKNOWN]"; - } -} - -bool logger::shouldLog(LogLevel level) { - switch (LOG_LEVEL) { - case LogLevel::ERROR: - return level == LogLevel::ERROR; - case LogLevel::INFO: - return level == LogLevel::ERROR || level == LogLevel::INFO; - case LogLevel::DEBUG: - return true; - default: - return false; - } -} - -std::string logger::getElapsedTime() { - auto now = std::chrono::system_clock::now(); - auto elapsed = - std::chrono::duration_cast(now - initTime) - .count(); - return std::to_string(elapsed) + "ns"; -} - -void logger::logMessage(LogLevel level, std::string src, std::string dst, - const std::string &message) { - if (!shouldLog(level)) - return; - - std::lock_guard guard(logMutex); - std::ofstream logFile(getLogFileName(), std::ios_base::app); - if (!logFile) { - std::cerr << logLevelToString(LogLevel::ERROR) << "Failed to open log file" - << std::endl; - return; - } - logFile << "[" << getElapsedTime() << "] " << logLevelToString(level) << " " - << "SRC " << src << " " - << "DST " << dst << " " << message << std::endl; -} - -void logger::logMessage(LogLevel level, const std::string &message) { - if (!shouldLog(level)) - return; - - std::lock_guard guard(logMutex); - - std::ofstream logFile(getLogFileName(), std::ios_base::app); - if (!logFile) { - std::cerr << logLevelToString(LogLevel::ERROR) << "Failed to open log file" - << std::endl; - return; - } - - logFile << "[" << getElapsedTime() << "] " << logLevelToString(level) << " " - << message << std::endl; -} \ No newline at end of file diff --git a/hsm/logger/logger.h b/hsm/logger/logger.h deleted file mode 100644 index 918d249f..00000000 --- a/hsm/logger/logger.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef LOGGER_H -#define LOGGER_H - -#include -#include -#include -#include -#include -#include -#include - -#ifndef LOG_LEVEL -#define LOG_LEVEL logger::LogLevel::INFO -#endif - -class logger { -public: - enum class LogLevel { - ERROR, - INFO, - DEBUG, - }; - logger() {} - logger(std::string componentName); - void logMessage(LogLevel level, const std::string &message); - void logMessage(LogLevel level, std::string src, std::string dst, - const std::string &message); - void initializeLogFile(); - std::string getLogFileName(); - std::string sharedLogFileName = "shared_log_file_name.txt"; - void cleanUp(); - -private: - static std::string logLevelToString(LogLevel level); - static bool shouldLog(LogLevel level); - static std::string getElapsedTime(); - static std::string componentName; - static std::string logFileName; - bool isInitialized = false; - static std::mutex logMutex; - static std::chrono::system_clock::time_point initTime; -}; - -#endif // LOGGER_H \ No newline at end of file diff --git a/hsm/src/crypto_service.cpp b/hsm/src/crypto_service.cpp deleted file mode 100644 index a0b30c9c..00000000 --- a/hsm/src/crypto_service.cpp +++ /dev/null @@ -1,616 +0,0 @@ -#include "../include/crypto_service.h" -#include "../include/general.h" -#include "../include/crypto_api.h" -#include "../include/debug_utils.h" -#include "../include/my_logger.h" - -#include -#include -#include -#include -#include -#include -#include - - - -grpc::Status CryptoServiceServer::bootSystem(grpc::ServerContext* context, const crypto::BootSystemRequest* request, crypto::Empty* response) -{ - std::map> usersIdsPermissions; - for(auto user:request->usersidspermissions()) - for(auto permission: user.permissions()) - usersIdsPermissions[user.userid()].push_back(static_cast(permission)); - if(::bootSystem(usersIdsPermissions) == CKR_OK) - return grpc::Status::OK; - return grpc::Status::CANCELLED; -} - -grpc::Status CryptoServiceServer::addProccess(grpc::ServerContext* context, const crypto::AddProcessRequest* request, crypto::Empty* response) -{ - - log(logger::LogLevel::INFO, std::to_string(request->userid()), std::to_string(HSM_ID), - std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->permissions().data(), request->permissions().size())); - std::vector permissions; - for(auto permission: request->permissions()) - permissions.push_back(static_cast(permission)); - if(::addProccess(request->userid(),permissions) == CKR_OK){ - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->userid()), - std::string("sending packet number: ") + std::to_string(1) + - std::string(", of messageId: ") + std::to_string(request->userid()) + - std::string(", total packets: ") + std::to_string(1) + " " + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - return grpc::Status::OK; - } - return grpc::Status::CANCELLED; -} - - -grpc::Status CryptoServiceServer::configure(grpc::ServerContext* context, const crypto::ConfigureRequest* request, crypto::Empty* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->userid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - CryptoConfig config(static_cast(request->config().hashfunction()),static_cast(request->config().aeskeylength()), - static_cast(request->config().aeschainingmode()),static_cast(request->config().asymmetricfunction())); - if(::configure(request->userid(),config) == CKR_OK){ - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->userid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid()+ std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - return grpc::Status::OK; - } - return grpc::Status::CANCELLED; -} - -/** - * Encrypts the provided data and returns the encrypted result and signature. - * - * @param context The gRPC server context. - * @param request The request containing the data to encrypt. - * @param response The response containing the encrypted data and signature. - * @return The gRPC status indicating success or failure. - */ -grpc::Status CryptoServiceServer::encrypt(grpc::ServerContext* context, const crypto::EncryptRequest* request, crypto::EncryptResponse* response) -{ - int packetNumber = getCountFromEncryptions(request->senderid()); - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + - std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + std::string(", of messageId: ") + - request->messageid() + - std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); - std::string data = request->data(); - size_t outLen = ::getEncryptedLen(request->senderid(), request->data().length(), request->isfirst()); - void *out = new uint8_t[outLen]; - size_t signatureLen = ::getSignatureLength(); - void* signature = new uint8_t[signatureLen]; - CK_RV status = ::encrypt(request->senderid(), request->receiverid(), static_cast(const_cast(request->data().data())), request->data().length(), out, outLen, signature, signatureLen, request->counter()); - if(status != CKR_OK) - return grpc::Status::CANCELLED; - char *charPtr = static_cast(out); - response->set_encrypteddata(out, outLen); - response->set_signature(signature, signatureLen); - delete [] (uint8_t*)out; - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + std::string(", of messageId: ") - + request->messageid()+ "1"+ std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->encrypteddata().data(), response->encrypteddata().size())); - - return grpc::Status::OK; - -} - -/** - * Decrypts the provided encrypted data and returns the decrypted result. - * - * @param context The gRPC server context. - * @param request The request containing the encrypted data and signature. - * @param response The response containing the decrypted data. - * @return The gRPC status indicating success or failure. - */ -grpc::Status CryptoServiceServer::decrypt(grpc::ServerContext* context, const crypto::DecryptRequest* request, crypto::DecryptResponse* response) -{ - int packetNumber = getCountFromDecryptions(request->senderid()); - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + - std::to_string(packetNumber != 0 ? request->counter() - packetNumber: 1) + std::string(", of messageId: ") + - request->messageid() + - std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)request->encrypteddata().data(), request->encrypteddata().size())); - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(packetNumber) + std::string(", of messageId: ") + std::to_string(request->senderid() )+ std::to_string(std::time(nullptr)) + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->encrypteddata().data(), - request->encrypteddata().size())); - size_t outLen = ::getDecryptedLen(request->senderid(), request->encrypteddata().length(), request->isfirst()); - void* out = new uint8_t[outLen]; - CK_RV status = ::decrypt(request->senderid(), request->receiverid(), static_cast(const_cast(request->encrypteddata().data())), request->encrypteddata().length(), static_cast(const_cast(request->signature().data())), request->signature().length(), out, outLen, request->counter()); - if(status != CKR_OK) - return grpc::Status::CANCELLED; - response->set_decrypteddata(out, outLen); - delete [] (uint8_t*)out; - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + - std::string(", of messageId: ") + request->messageid()+ "2" + std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->decrypteddata().data(), response->decrypteddata().size())); - - return grpc::Status::OK; -} - -/** - * Generates an AES key with the specified permissions and user ID. - * - * @param context The gRPC server context. - * @param request The request containing the user ID and key length. - * @param response The response containing the generated AES key. - * @return The gRPC status indicating success or failure. - */ -grpc::Status CryptoServiceServer::generateAESKey(grpc::ServerContext *context, const crypto::GenerateAESKeyRequest *request, crypto::GenerateAESKeyResponse *response) -{ - log(logger::LogLevel::INFO, std::to_string(request->userid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - std::vector permissions; - for (auto permission : request->permissions()) - permissions.push_back(static_cast(permission)); - response->set_aeskey(::generateAESKey(request->userid(), static_cast(request->keylength()), permissions, request->destuserid())); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->userid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid()+ "3"+ std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), request->SerializeAsString().size())); - - return grpc::Status::OK; -} - -/** - * Generates an RSA key pair with the specified permissions and user ID. - * - * @param context The gRPC server context. - * @param request The request containing the user ID and permissions. - * @param response The response containing the generated RSA key pair. - * @return The gRPC status indicating success or failure. - */ -grpc::Status CryptoServiceServer::generateRSAKeyPair(grpc::ServerContext* context, const crypto::GenerateKeyPairRequest* request, crypto::GenerateKeyPairResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->userid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - std::vector permissions; - for(auto permission: request->permissions()) - permissions.push_back(static_cast(permission)); - std::pair pair = ::generateRSAKeyPair(request->userid(), permissions); - response->set_privatekey(pair.second); - response->set_publickey(pair.first); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->userid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid()+ "4"+ std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - - return grpc::Status::OK; -} - -/** - * Generates an ECC key pair with the specified permissions and user ID. - * - * @param context The gRPC server context. - * @param request The request containing the user ID and permissions. - * @param response The response containing the generated ECC key pair. - * @return The gRPC status indicating success or failure. - */ -grpc::Status CryptoServiceServer::generateECCKeyPair(grpc::ServerContext* context, const crypto::GenerateKeyPairRequest* request, crypto::GenerateKeyPairResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->userid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - std::vector permissions; - for(auto permission: request->permissions()) - permissions.push_back(static_cast(permission)); - std::pair pair = ::generateECCKeyPair(request->userid(), permissions); - response->set_privatekey(pair.second); - response->set_publickey(pair.first); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->userid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid()+ "5"+ std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - - return grpc::Status::OK; -} - -/** - * Retrieves the length of signed data (signature length). - * - * @param context The gRPC server context. - * @param request The request for getting the hash length. - * @param response The response containing the length of the signed data. - * @return The gRPC status indicating success or failure. - */ -grpc::Status CryptoServiceServer::getSignedDataLength(grpc::ServerContext* context, const crypto::GetHashLengthRequest* request, crypto::GetLengthResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - response->set_len(::getSignatureLength()); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + std::to_string(request->senderid()) + request->messageid() + "6" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - - return grpc::Status::OK; -} - -// Retrieves the public ECC key associated with a given user ID. -grpc::Status CryptoServiceServer::getPublicECCKeyByUserId(grpc::ServerContext* context, const crypto::KeyRequest* request, crypto::KeyResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->userid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - response->set_key(::getPublicECCKeyByUserId(request->userid())); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->userid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "7" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - - return grpc::Status::OK; -} - -// Retrieves the public RSA key associated with a given user ID. -grpc::Status CryptoServiceServer::getPublicRSAKeyByUserId(grpc::ServerContext* context, const crypto::KeyRequest* request, crypto::KeyResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->userid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - response->set_key(::getPublicRSAKeyByUserId(request->userid())); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->userid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "8" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - - return grpc::Status::OK; -} - -// Gets the length of the encrypted ECC data. -grpc::Status CryptoServiceServer::getECCencryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - response->set_len(::getECCencryptedLength()); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "9" + std::to_string(std::time(nullptr))+ std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - - return grpc::Status::OK; -} - -// Gets the length of the decrypted ECC data. -grpc::Status CryptoServiceServer::getECCDecryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - response->set_len(::getECCdecryptedLength()); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "10" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - - return grpc::Status::OK; -} - -// Encrypts data using ECC with the specified sender ID and key ID. -grpc::Status CryptoServiceServer::ECCencrypt(grpc::ServerContext* context, const crypto::AsymetricEncryptRequest* request, crypto::AsymetricEncryptResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); - size_t outLen = ::getECCencryptedLength(); - void* out = new uint8_t[outLen]; - - ::ECCencrypt(request->senderid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, outLen); - response->set_encrypteddata(out, outLen); - delete [] (uint8_t*)out; - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "11" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->encrypteddata().data(), response->encrypteddata().size())); - - return grpc::Status::OK; -} - -// Decrypts ECC-encrypted data using the specified receiver ID and key ID. -grpc::Status CryptoServiceServer::ECCdecrypt(grpc::ServerContext* context, const crypto::AsymetricDecryptRequest* request, crypto::AsymetricDecryptResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); - size_t outLen = ::getECCdecryptedLength(); - void* out = new uint8_t[outLen]; - ::ECCdecrypt(request->receiverid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, outLen); - response->set_decrypteddata(out, outLen); - delete [] (uint8_t*)out; - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "12"+ std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->decrypteddata().data(), response->decrypteddata().size())); - - return grpc::Status::OK; -} - -// Gets the length of the encrypted RSA data. -grpc::Status CryptoServiceServer::getRSAencryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - response->set_len(::getRSAencryptedLength()); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "13" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - - return grpc::Status::OK; -} - -// Gets the length of the decrypted RSA data. -grpc::Status CryptoServiceServer::getRSAdecryptedLength(grpc::ServerContext* context, const crypto::GetLengthRequest* request, crypto::GetLengthResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - response->set_len(::getRSAdecryptedLength()); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: " - ) + request->messageid() + "14" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - - return grpc::Status::OK; -} - -// Encrypts data using RSA with the specified sender ID and key ID. -grpc::Status CryptoServiceServer::RSAencrypt(grpc::ServerContext* context, const crypto::AsymetricEncryptRequest* request, crypto::AsymetricEncryptResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + std::to_string(request->senderid() )+ std::to_string(std::time(nullptr)) + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); - size_t outLen = ::getRSAencryptedLength(); - void* out = new uint8_t[outLen]; - - ::RSAencrypt(request->senderid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, outLen); - response->set_encrypteddata(out, outLen); - delete [] (uint8_t*)out; - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + "15" + request->messageid()+ std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->encrypteddata().data(), response->encrypteddata().size())); - - return grpc::Status::OK; -} - -// Decrypts RSA-encrypted data using the specified receiver ID and key ID. -grpc::Status CryptoServiceServer::RSAdecrypt(grpc::ServerContext* context, const crypto::AsymetricDecryptRequest* request, crypto::AsymetricDecryptResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); - size_t outLen = ::getRSAdecryptedLength(); - void* out = new uint8_t[outLen]; - ::RSAdecrypt(request->receiverid(), request->keyid(), (void*)request->data().data(), request->data().length(), out, &outLen); - response->set_decrypteddata(out, outLen); - delete [] (uint8_t*)out; - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "16" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->decrypteddata().data(), response->decrypteddata().size())); - - return grpc::Status::OK; -} - - -// aes -/** - * Retrieves the length of encrypted data using AES. - * - * @param context The gRPC server context. - * @param request The request containing data length and chaining mode. - * @param response The response object to send back the length. - * @return grpc::Status indicating the success or failure of the operation. - */ -grpc::Status CryptoServiceServer::getAESencryptedLength( - grpc::ServerContext *context, const crypto::GetAESLengthRequest *request, - crypto::GetLengthResponse *response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + std::to_string(request->senderid() ) + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - response->set_len(::getAESencryptedLength( - request->datalen(), request->isfirst(), - static_cast(request->chainingmode()))); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "17" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - - return grpc::Status::OK; -} - -/** - * Retrieves the length of decrypted data using AES. - * - * @param context The gRPC server context. - * @param request The request containing data length and chaining mode. - * @param response The response object to send back the length. - * @return grpc::Status indicating the success or failure of the operation. - */ -grpc::Status CryptoServiceServer::getAESdecryptedLength( - grpc::ServerContext *context, const crypto::GetAESLengthRequest *request, - crypto::GetLengthResponse *response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - response->set_len( - ::getAESdecryptedLength(request->datalen(), request->isfirst(), static_cast(request->chainingmode()))); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "18" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - - return grpc::Status::OK; -} - -/** - * Encrypts data using AES encryption. - * - * @param context The gRPC server context. - * @param request The request containing sender and receiver IDs and data. - * @param response The response object to send back the encrypted data. - * @return grpc::Status indicating the success or failure of the operation. - */ -grpc::Status CryptoServiceServer::AESencrypt(grpc::ServerContext *context, - const crypto::AESEncryptRequest *request, - crypto::AESEncryptResponse *response) -{ - int packetNumber = getCountFromEncryptions(request->senderid()); - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + - std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1)+ std::string(", of messageId: ") + - request->messageid() + - std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); - size_t outLen = ::getAESencryptedLength( - request->data().length(), request->isfirst(), - static_cast(request->chainingmode())); - - std::unique_ptr> out(new uint8_t[outLen]); - - CK_RV status = ::AESencrypt(request->senderid(), request->receiverid(), - (void *)request->data().data(), request->data().length(), - out.get(), outLen, - static_cast(request->keylength()), - static_cast(request->chainingmode()), - request->counter(), request->keyid()); - response->set_encrypteddata(out.get(), outLen); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + std::string(", of messageId: ") + std::to_string(request->senderid() )+ request->messageid() + "19"+ std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->encrypteddata().data(), response->encrypteddata().size())); - - return grpc::Status::OK; -} - - -/** - * Decrypts data using AES decryption. - * - * @param context The gRPC server context. - * @param request The request containing sender and receiver IDs and encrypted data. - * @param response The response object to send back the decrypted data. - * @return grpc::Status indicating the success or failure of the operation. - */ -grpc::Status CryptoServiceServer::AESdecrypt(grpc::ServerContext *context, - const crypto::AESDecryptRequest *request, - crypto::AESDecryptResponse *response) -{ - int packetNumber = getCountFromDecryptions(request->senderid()); - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + - std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + std::string(", of messageId: ") + - request->messageid() + - std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)request->datain().data(), request->datain().size())); - size_t outLen = ::getAESdecryptedLength(request->datain().length(), request->isfirst(), static_cast(request->chainingmode())); - - std::unique_ptr out(new uint8_t[outLen]); - CK_RV status = ::AESdecrypt(request->senderid(), request->receiverid(), - (void *)request->datain().data(), request->datain().length(), - out.get(), outLen, static_cast(request->keylength()), - static_cast(request->chainingmode()), - request->counter(), request->keyid()); - if(status != CKR_OK) - return grpc::Status::CANCELLED; - response->set_decrypteddata(out.get(), outLen); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + std::string(", of messageId: ") + request->messageid() + "20"+ std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->decrypteddata().data(), response->decrypteddata().size())); - - return grpc::Status::OK; -} - -/** - * Retrieves the length of encrypted data for a specific sender. - * - * @param context The gRPC server context. - * @param request The request containing sender ID and input length. - * @param response The response object to send back the length. - * @return grpc::Status indicating the success or failure of the operation. - */ -grpc::Status CryptoServiceServer::getEncryptedLen(grpc::ServerContext* context, const crypto::GetWholeLength* request, crypto::GetLengthResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - response->set_len(::getEncryptedLen(request->senderid(), request->inlen(), request->isfirst())); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + std::to_string(request->senderid() )+ request->messageid() + "21" + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - - return grpc::Status::OK; -} - -/** - * Retrieves the length of decrypted data for a specific sender. - * - * @param context The gRPC server context. - * @param request The request containing sender ID and input length. - * @param response The response object to send back the length. - * @return grpc::Status indicating the success or failure of the operation. - */ -grpc::Status CryptoServiceServer::getDecryptedLen(grpc::ServerContext* context, const crypto::GetWholeLength* request, crypto::GetLengthResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + "Success Data: " + dataToHex((unsigned char*)request->SerializeAsString().data(), request->SerializeAsString().size())); - response->set_len(::getDecryptedLen(request->senderid(), request->inlen(), request->isfirst())); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "22" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->SerializeAsString().data(), response->SerializeAsString().size())); - - return grpc::Status::OK; -} - -/** - * Updates the signing process with new data. - * - * @param context The gRPC server context. - * @param request The request containing sender ID and data to sign. - * @param response The response object to send back the status of the operation. - * @return grpc::Status indicating the success or failure of the operation. - */ -grpc::Status CryptoServiceServer::signUpdate(grpc::ServerContext* context, const crypto::SignRequest* request, crypto::SignResponse* response) -{ - int packetNumber = getCountFromHashing(request->senderid()); - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + - std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + std::string(", of messageId: ") + - request->messageid() + - std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); - CK_RV status = ::signUpdate(request->senderid(), (void*)request->data().data(), request->data().length(), static_cast(request->hashfunc()), request->counter()); - - return status == CKR_OK ? grpc::Status::OK : grpc::Status::CANCELLED; -} - -/** - * Finalizes the signing process and returns the signature. - * - * @param context The gRPC server context. - * @param request The request containing sender ID and key ID. - * @param response The response object to send back the generated signature. - * @return grpc::Status indicating the success or failure of the operation. - */ -grpc::Status CryptoServiceServer::signFinalize(grpc::ServerContext* context, const crypto::SignRequest* request, crypto::SignResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + - std::to_string(request->counter()) + std::string(", of messageId: ") + - request->messageid() + - std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); - size_t signatureLen = ::getSignatureLength(); - void * signature = new uint8_t[signatureLen]; - if(CK_RV status = ::signFinalize(request->senderid(), signature, signatureLen, static_cast(request->hashfunc()), request->keyid()) != CKR_OK) - return grpc::Status::CANCELLED; - response->set_signature(signature, getSignatureLength()); - delete [] (uint8_t*)signature; - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "23" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)response->signature().data(), response->signature().size())); - - return grpc::Status::OK; -} - -/** - * Updates the verification process with new data. - * - * @param context The gRPC server context. - * @param request The request containing receiver ID and data to verify. - * @param response The response object to send back the status of the verification. - * @return grpc::Status indicating the success or failure of the operation. - */ -grpc::Status CryptoServiceServer::verifyUpdate(grpc::ServerContext* context, const crypto::VerifyRequest* request, crypto::VerifyResponse* response) -{ - int packetNumber = getCountFromHashing(request->senderid()); - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + - std::to_string(packetNumber != 0 ? request->counter() - packetNumber :1) + std::string(", of messageId: ") + - request->messageid() + - std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); - if (::verifyUpdate(request->receiverid(), (void*)request->data().data(), request->data().length(), static_cast(request->hashfunc()), request->counter()) == CKR_OK){ - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + std::to_string(request->senderid() )+ request->messageid() + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + "0x01"); - - return grpc::Status::OK; - } - - return grpc::Status::CANCELLED; -} - -// Finalizes the verification process of a signature. -// Checks if the provided signature is valid by comparing it against the expected value. -// If the verification is successful, sets the validity of the signature in the response to true. -// -// Parameters: -// - context: A pointer to the server context. -// - request: A pointer to the VerifyRequest containing the necessary information for verification, -// including receiver ID, signature data, hash function, and key ID. -// - response: A pointer to the VerifyResponse where the result of the verification will be stored. -// -// Returns: -// - grpc::Status::OK if the signature is valid. -// - grpc::Status::CANCELLED if the verification fails. -grpc::Status CryptoServiceServer::verifyFinalize(grpc::ServerContext* context, const crypto::VerifyRequest* request, crypto::VerifyResponse* response) -{ - log(logger::LogLevel::INFO, std::to_string(request->senderid()), std::to_string(HSM_ID), std::string("received packet number: ") + - std::to_string(request->counter()) + std::string(", of messageId: ") + - request->messageid() + std::string(", total packets: ") + std::to_string(request->counter()) + std::string(" ") + - "Success Data: " + dataToHex((unsigned char*)request->data().data(), request->data().size())); - if(::verifyFinalize(request->receiverid(), (void*)request->signature().data(),request->signature().length(), static_cast(request->hashfunc()), request->keyid())!=CKR_OK) - return grpc::Status::CANCELLED; - response->set_valid(true); - log(logger::LogLevel::INFO, std::to_string(HSM_ID), std::to_string(request->senderid()), std::string("sending packet number: ") + std::to_string(1) + std::string(", of messageId: ") + request->messageid() + "24" + std::string(", total packets: ") + std::to_string(1) + std::string(" ") + - "Success Data: " + "0x01"); - - return grpc::Status::OK; -} - -void RunServer() { - std::string serverAddress("0.0.0.0:50051"); - CryptoServiceServer service; - - grpc::ServerBuilder builder; - builder.AddListeningPort(serverAddress, grpc::InsecureServerCredentials()); - builder.RegisterService(&service); - std::unique_ptr server(builder.BuildAndStart()); - std::cout << "Server listening on " << serverAddress << std::endl; - - server->Wait(); - -} - -int main(int argc, char** argv) { - RunServer(); - return 0; -} diff --git a/hsm/src/debug_utils.cpp b/hsm/src/debug_utils.cpp deleted file mode 100644 index e81e685f..00000000 --- a/hsm/src/debug_utils.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include -#include - -#include -#include "../include/debug_utils.h" -using namespace std; - -#define DEBUG - -void printBufferHexa(const uint8_t *buffer, size_t len, std::string message) -{ -#ifdef DEBUG - std::cout << message << std::endl; - for (size_t i = 0; i < len; ++i) - { - std::cout << std::hex << std::setw(2) << std::setfill('0') - << static_cast(buffer[i]) << " "; - // Print a new line every 16 bytes for better readability - if ((i + 1) % 16 == 0) - std::cout << std::endl; - } - std::cout << std::endl; - // Reset the stream format back to decimal - std::cout << std::dec; -#endif -} - -void encryptStartPrintParams(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen, unsigned char* key, AESKeyLength keyLength) -{ - printBufferHexa(block, inLen, "Block: "); - printBufferHexa(key, 128, "Key: "); - std::cout << "inLen: " << inLen << ", outLen(before): " << outLen << std::endl; -} - -void encryptContinuePrintParams(unsigned char block[], unsigned int inLen, unsigned char*& out, unsigned int& outLen) -{ - printBufferHexa(block, inLen, "Block: "); - std::cout << "inLen: " << inLen << ", outLen(before): " << outLen << std::endl; -} - -void printStreamAES(const StreamAES& obj, size_t blockSize, std::string message) { - - printBufferHexa(obj.iv, blockSize, "IV: "); - - printBufferHexa(obj.lastBlock, blockSize, "Last Block: "); - - printBufferHexa(obj.key, obj.keyLength, "Key: "); - - std::cout << "Key Length: " << obj.keyLength << " bytes" << std::endl; -} - -// Definition of the debugLog function -void debugLog(const std::string& message, const std::string& functionName) { - std::cout << "Function: " << functionName << " -> " << message << std::endl; -} \ No newline at end of file diff --git a/hsm/src/general.cpp b/hsm/src/general.cpp deleted file mode 100644 index 8cb2e0b9..00000000 --- a/hsm/src/general.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "../include/general.h" - -void log(logger::LogLevel level, const std::string &message) { - logger logInstance("HSM"); - logInstance.logMessage(level, message); -} - -bool isValidAESKeyLength(AESKeyLength aesKeyLength) -{ - // Create a set of valid key lengths and check if the provided key length is in this set - switch (aesKeyLength) { - case AES_128: - case AES_192: - case AES_256: - return true; - default: - return false; - } -} - - - diff --git a/hsm/src/my_logger.cpp b/hsm/src/my_logger.cpp deleted file mode 100644 index 07be43dc..00000000 --- a/hsm/src/my_logger.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "../include/my_logger.h" -#include -#include -#include -#include -#include - - std::ofstream logFile("../HSM_Communication.txt", std::ios::app); - std::string getTimestamp() { - auto now = std::chrono::system_clock::now(); - auto now_ns = std::chrono::duration_cast(now.time_since_epoch()).count(); - return std::to_string(now_ns); - } - - std::string dataToHex(const unsigned char* data, size_t size) { - std::ostringstream oss; - oss << "0x"; - for (size_t i = 0; i < size; ++i) { - oss << std::hex << std::setw(2) << std::setfill('0') << static_cast(data[i]); - } - return oss.str(); - } - - void log(logger::LogLevel loglevel, const std::string& hsm_id, const std::string& user_id, const std::string& message) - { - std::string levelStr; - switch (loglevel) { - case logger::LogLevel::INFO: - levelStr = "INFO"; - break; - case logger::LogLevel::ERROR: - levelStr = "ERROR"; - break; - } - - std::string logMessage = "[" + getTimestamp() + "ns] [" + levelStr + "] SRC " + hsm_id + " DST " + user_id + " " + message; - - // Write to file - logFile << logMessage << std::endl; - } -