SSP21-CPP
CryptoSuite.h
1 
2 #ifndef SSP21_CRYPTOSUITE_H
3 #define SSP21_CRYPTOSUITE_H
4 
5 #include "ssp21/crypto/gen/NonceMode.h"
6 #include "ssp21/crypto/gen/HandshakeEphemeral.h"
7 #include "ssp21/crypto/gen/HandshakeHash.h"
8 #include "ssp21/crypto/gen/HandshakeKDF.h"
9 #include "ssp21/crypto/gen/SessionMode.h"
10 
11 namespace ssp21
12 {
13  // The cyrptographic modes that the initiator will request from the responder
14  struct CryptoSuite
15  {
16  CryptoSuite() = default;
17 
19  NonceMode nonce_mode,
20  HandshakeEphemeral handshake_ephemeral,
21  HandshakeHash handshake_hash,
22  HandshakeKDF handshake_kdf,
23  SessionMode session_mode
24  ) :
25  nonce_mode(nonce_mode),
26  handshake_ephemeral(handshake_ephemeral),
27  handshake_hash(handshake_hash),
28  handshake_kdf(handshake_kdf),
29  session_mode(session_mode)
30  {}
31 
33  HandshakeEphemeral handshake_ephemeral = HandshakeEphemeral::x25519;
34  HandshakeHash handshake_hash = HandshakeHash::sha256;
37  };
38 
39 }
40 
41 #endif
SSP21-cpp main namespace.
Definition: BufferTypes.h:12
HandshakeKDF
Definition: HandshakeKDF.h:27
new nonce must strictly be equal to last nonce plus one
NonceMode
Definition: NonceMode.h:27
Use HKDF with HMAC-SHA256.
x25519 algorithm public key
HMAC-SHA256 truncated to 16 bytes.
SessionMode
Definition: SessionMode.h:27