Skip to content

Commit

Permalink
Fixes bug in PSS causing error in compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
HLRichardson-Git committed Nov 13, 2024
1 parent 361d649 commit 2ab2806
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/gestalt/rsa.h
Original file line number Diff line number Diff line change
@@ -34,6 +34,8 @@ class RSA {

public:
RSA() {};
RSA(RSAKeyGenOptions keyGenerationOptions) // TODO: Make a unit test for this constructor
: keyPair(keyGenerationOptions) {}
RSA(RSASecurityStrength specifiedStength, const RSAPrivateKey& privateKey, const RSAPublicKey& publicKey)
: keyPair(specifiedStength, privateKey, publicKey) {}

2 changes: 2 additions & 0 deletions src/rsa/padding_schemes/pss/pss.cpp
Original file line number Diff line number Diff line change
@@ -19,6 +19,8 @@
#include "pss.h"
#include "utils.h"

const size_t PADDING1_SIZE = 8;

// Source: https://datatracker.ietf.org/doc/html/rfc3447#section-9.1.1
std::string encodePSS_Padding(const std::string& input, const PSSParams& params, unsigned int modulusSizeBytes) {
unsigned int emLen = ((4 * modulusSizeBytes) + 3) / 4; // Simplified equation to calcualte intended EM Length

0 comments on commit 2ab2806

Please sign in to comment.