Skip to content

Commit

Permalink
Apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
FAlbertDev committed Aug 5, 2024
1 parent 40ba567 commit a6828dc
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/lib/pubkey/hybrid_kem/hybrid_kem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
*/
#include <botan/hybrid_kem.h>

#include <botan/kex_to_kem_adapter.h>
#include <botan/pk_algs.h>
#include <botan/internal/fmt.h>
#include <botan/internal/kex_to_kem_adapter.h>
#include <botan/internal/pk_ops_impl.h>
#include <botan/internal/stl_util.h>

Expand Down
8 changes: 8 additions & 0 deletions src/lib/pubkey/hybrid_kem/hybrid_kem_ops.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* Abstraction for a combined KEM encryptors and decryptors.
*
* (C) 2024 Jack Lloyd
* 2024 Fabian Albert, René Meusel - Rohde & Schwarz Cybersecurity
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/internal/hybrid_kem_ops.h>

#include <botan/internal/stl_util.h>
Expand Down
6 changes: 4 additions & 2 deletions src/lib/pubkey/kex_to_kem_adapter/info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ KEX_TO_KEM_ADAPTER -> 20240504

<module_info>
name -> "KEX to KEM adapter"
brief -> "Basic KEX to KEM key transformation"
type -> "Internal"
</module_info>


<header:public>
<header:internal>
kex_to_kem_adapter.h
</header:public>
</header:internal>

<requires>

Expand Down
4 changes: 2 additions & 2 deletions src/lib/pubkey/kex_to_kem_adapter/kex_to_kem_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* key in the KEM encapsulation.
*
* (C) 2023 Jack Lloyd
* 2023 Fabian Albert, René Meusel - Rohde & Schwarz Cybersecurity
* 2023,2024 Fabian Albert, René Meusel - Rohde & Schwarz Cybersecurity
*
* Botan is released under the Simplified BSD License (see license.txt)
*/

#include <botan/kex_to_kem_adapter.h>
#include <botan/internal/kex_to_kem_adapter.h>

#include <botan/internal/fmt.h>
#include <botan/internal/pk_ops_impl.h>
Expand Down
8 changes: 4 additions & 4 deletions src/lib/pubkey/kex_to_kem_adapter/kex_to_kem_adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* key in the KEM encapsulation.
*
* (C) 2023 Jack Lloyd
* 2023 Fabian Albert, René Meusel - Rohde & Schwarz Cybersecurity
* 2023,2024 Fabian Albert, René Meusel - Rohde & Schwarz Cybersecurity
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
Expand All @@ -21,7 +21,7 @@ namespace Botan {
* Adapter to use a key agreement key pair (e.g. ECDH) as a key encapsulation
* mechanism.
*/
class BOTAN_PUBLIC_API(3, 5) KEX_to_KEM_Adapter_PublicKey : public virtual Public_Key {
class BOTAN_TEST_API KEX_to_KEM_Adapter_PublicKey : public virtual Public_Key {
public:
KEX_to_KEM_Adapter_PublicKey(std::unique_ptr<Public_Key> public_key);

Expand Down Expand Up @@ -65,8 +65,8 @@ BOTAN_DIAGNOSTIC_IGNORE_INHERITED_VIA_DOMINANCE
* * KEM-decapsulate(PrivateKey, EncapsulatedSharedSecret) -> SharedSecret
* => KEX-agree(PrivateKey, EncapsulatedSharedSecret)
*/
class BOTAN_PUBLIC_API(3, 5) KEX_to_KEM_Adapter_PrivateKey final : public KEX_to_KEM_Adapter_PublicKey,
public virtual Private_Key {
class BOTAN_TEST_API KEX_to_KEM_Adapter_PrivateKey final : public KEX_to_KEM_Adapter_PublicKey,
public virtual Private_Key {
public:
KEX_to_KEM_Adapter_PrivateKey(std::unique_ptr<Private_Key> private_key);

Expand Down
2 changes: 1 addition & 1 deletion src/lib/tls/tls13_pqc/hybrid_public_key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

#include <botan/pk_algs.h>

#include <botan/kex_to_kem_adapter.h>
#include <botan/internal/fmt.h>
#include <botan/internal/hybrid_kem_ops.h>
#include <botan/internal/kex_to_kem_adapter.h>
#include <botan/internal/pk_ops_impl.h>
#include <botan/internal/stl_util.h>

Expand Down
2 changes: 1 addition & 1 deletion src/tests/test_tls_hybrid_kem_key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#if defined(BOTAN_HAS_TLS_13_PQC) && defined(BOTAN_HAS_KYBER) && defined(BOTAN_HAS_DIFFIE_HELLMAN) && \
defined(BOTAN_HAS_ECDSA)

#include <botan/kex_to_kem_adapter.h>
#include <botan/pk_algs.h>
#include <botan/internal/hybrid_public_key.h>
#include <botan/internal/kex_to_kem_adapter.h>
#include <botan/internal/stl_util.h>

namespace Botan_Tests {
Expand Down

0 comments on commit a6828dc

Please sign in to comment.