aboutsummaryrefslogtreecommitdiffstats
path: root/SoftHSMv2/src/lib/SoftHSM.h
diff options
context:
space:
mode:
Diffstat (limited to 'SoftHSMv2/src/lib/SoftHSM.h')
-rw-r--r--SoftHSMv2/src/lib/SoftHSM.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/SoftHSMv2/src/lib/SoftHSM.h b/SoftHSMv2/src/lib/SoftHSM.h
index 323f3a5..6456cbe 100644
--- a/SoftHSMv2/src/lib/SoftHSM.h
+++ b/SoftHSMv2/src/lib/SoftHSM.h
@@ -46,6 +46,8 @@
#include "DSAPrivateKey.h"
#include "ECPublicKey.h"
#include "ECPrivateKey.h"
+#include "EDPublicKey.h"
+#include "EDPrivateKey.h"
#include "DHPublicKey.h"
#include "DHPrivateKey.h"
#include "GOSTPublicKey.h"
@@ -291,6 +293,20 @@ private:
CK_BBOOL isPrivateKeyOnToken,
CK_BBOOL isPrivateKeyPrivate
);
+ CK_RV generateED
+ (
+ CK_SESSION_HANDLE hSession,
+ CK_ATTRIBUTE_PTR pPublicKeyTemplate,
+ CK_ULONG ulPublicKeyAttributeCount,
+ CK_ATTRIBUTE_PTR pPrivateKeyTemplate,
+ CK_ULONG ulPrivateKeyAttributeCount,
+ CK_OBJECT_HANDLE_PTR phPublicKey,
+ CK_OBJECT_HANDLE_PTR phPrivateKey,
+ CK_BBOOL isPublicKeyOnToken,
+ CK_BBOOL isPublicKeyPrivate,
+ CK_BBOOL isPrivateKeyOnToken,
+ CK_BBOOL isPrivateKeyPrivate
+ );
CK_RV generateDH
(
CK_SESSION_HANDLE hSession,
@@ -328,6 +344,15 @@ private:
CK_BBOOL isPrivateKeyOnToken,
CK_BBOOL isPrivateKeyPrivate
);
+ CK_RV generateGeneric
+ (
+ CK_SESSION_HANDLE hSession,
+ CK_ATTRIBUTE_PTR pTemplate,
+ CK_ULONG ulCount,
+ CK_OBJECT_HANDLE_PTR phKey,
+ CK_BBOOL isOnToken,
+ CK_BBOOL isPrivate
+ );
CK_RV deriveDH
(
CK_SESSION_HANDLE hSession,
@@ -340,6 +365,7 @@ private:
CK_BBOOL isOnToken,
CK_BBOOL isPrivate
);
+#ifdef WITH_ECC
CK_RV deriveECDH
(
CK_SESSION_HANDLE hSession,
@@ -352,6 +378,21 @@ private:
CK_BBOOL isOnToken,
CK_BBOOL isPrivate
);
+#endif
+#ifdef WITH_EDDSA
+ CK_RV deriveEDDSA
+ (
+ CK_SESSION_HANDLE hSession,
+ CK_MECHANISM_PTR pMechanism,
+ CK_OBJECT_HANDLE hBaseKey,
+ CK_ATTRIBUTE_PTR pTemplate,
+ CK_ULONG ulCount,
+ CK_OBJECT_HANDLE_PTR phKey,
+ CK_KEY_TYPE keyType,
+ CK_BBOOL isOnToken,
+ CK_BBOOL isPrivate
+ );
+#endif
CK_RV deriveSymmetric
(
CK_SESSION_HANDLE hSession,
@@ -379,9 +420,12 @@ private:
CK_RV getDSAPublicKey(DSAPublicKey* publicKey, Token* token, OSObject* key);
CK_RV getECPrivateKey(ECPrivateKey* privateKey, Token* token, OSObject* key);
CK_RV getECPublicKey(ECPublicKey* publicKey, Token* token, OSObject* key);
+ CK_RV getEDPrivateKey(EDPrivateKey* privateKey, Token* token, OSObject* key);
+ CK_RV getEDPublicKey(EDPublicKey* publicKey, Token* token, OSObject* key);
CK_RV getDHPrivateKey(DHPrivateKey* privateKey, Token* token, OSObject* key);
CK_RV getDHPublicKey(DHPublicKey* publicKey, DHPrivateKey* privateKey, ByteString& pubParams);
CK_RV getECDHPublicKey(ECPublicKey* publicKey, ECPrivateKey* privateKey, ByteString& pubData);
+ CK_RV getEDDHPublicKey(EDPublicKey* publicKey, EDPrivateKey* privateKey, ByteString& pubData);
CK_RV getGOSTPrivateKey(GOSTPrivateKey* privateKey, Token* token, OSObject* key);
CK_RV getGOSTPublicKey(GOSTPublicKey* publicKey, Token* token, OSObject* key);
CK_RV getSymmetricKey(SymmetricKey* skey, Token* token, OSObject* key);