Skip to content

Commit

Permalink
add FrodoKEM_PublicKey::generate_another() after rebase to master
Browse files Browse the repository at this point in the history
  • Loading branch information
reneme committed Nov 2, 2023
1 parent cad730a commit cdcaad5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/pubkey/frodokem/frodokem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@ bool FrodoKEM_PublicKey::check_key(RandomNumberGenerator&, bool) const {
return true;
}

std::unique_ptr<Private_Key> FrodoKEM_PublicKey::generate_another(RandomNumberGenerator& rng) const {
return std::make_unique<FrodoKEM_PrivateKey>(rng, m_public->constants().mode());
}

std::unique_ptr<PK_Ops::KEM_Encryption> FrodoKEM_PublicKey::create_kem_encryption_op(std::string_view params,
std::string_view provider) const {
if(provider.empty() || provider == "base") {
Expand Down
2 changes: 2 additions & 0 deletions src/lib/pubkey/frodokem/frodokem.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class BOTAN_PUBLIC_API(3, 3) FrodoKEM_PublicKey : public virtual Public_Key {
return (op == PublicKeyOperation::KeyEncapsulation);
}

std::unique_ptr<Private_Key> generate_another(RandomNumberGenerator& rng) const final;

std::unique_ptr<PK_Ops::KEM_Encryption> create_kem_encryption_op(std::string_view params,
std::string_view provider) const override;

Expand Down

0 comments on commit cdcaad5

Please sign in to comment.