summaryrefslogtreecommitdiff
path: root/usr/src/lib/pkcs11/pkcs11_softtoken/common/softCrypt.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/pkcs11/pkcs11_softtoken/common/softCrypt.h')
-rw-r--r--usr/src/lib/pkcs11/pkcs11_softtoken/common/softCrypt.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/usr/src/lib/pkcs11/pkcs11_softtoken/common/softCrypt.h b/usr/src/lib/pkcs11/pkcs11_softtoken/common/softCrypt.h
index d4c58bc9d3..eb9f69e74b 100644
--- a/usr/src/lib/pkcs11/pkcs11_softtoken/common/softCrypt.h
+++ b/usr/src/lib/pkcs11/pkcs11_softtoken/common/softCrypt.h
@@ -59,6 +59,7 @@ typedef struct soft_aes_ctx {
uint8_t data[AES_BLOCK_LEN]; /* for use by update */
size_t remain_len; /* for use by update */
void *aes_cbc; /* to be used by CBC mode */
+ size_t mac_len;
} soft_aes_ctx_t;
typedef struct soft_blowfish_ctx {
@@ -84,15 +85,14 @@ CK_RV soft_des_encrypt_common(soft_session_t *, CK_BYTE_PTR, CK_ULONG,
CK_RV soft_des_decrypt_common(soft_session_t *, CK_BYTE_PTR, CK_ULONG,
CK_BYTE_PTR, CK_ULONG_PTR, boolean_t);
-CK_RV soft_des_sign_verify_common(soft_session_t *session_p, CK_BYTE_PTR pData,
- CK_ULONG ulDataLen, CK_BYTE_PTR pSigned, CK_ULONG_PTR pulSignedLen,
- boolean_t sign_op, boolean_t Final);
+CK_RV soft_des_sign_verify_common(soft_session_t *, CK_BYTE_PTR,
+ CK_ULONG, CK_BYTE_PTR, CK_ULONG_PTR,
+ boolean_t, boolean_t);
-CK_RV soft_des_sign_verify_init_common(soft_session_t *session_p,
- CK_MECHANISM_PTR pMechanism, soft_object_t *key_p, boolean_t sign_op);
+CK_RV soft_des_sign_verify_init_common(soft_session_t *, CK_MECHANISM_PTR,
+ soft_object_t *, boolean_t);
-CK_RV soft_des_mac_sign_verify_update(soft_session_t *session_p,
- CK_BYTE_PTR pPart, CK_ULONG ulPartLen);
+CK_RV soft_des_mac_sign_verify_update(soft_session_t *, CK_BYTE_PTR, CK_ULONG);
void soft_add_pkcs7_padding(CK_BYTE *, int, CK_ULONG);
@@ -105,6 +105,7 @@ CK_RV soft_arcfour_crypt(crypto_active_op_t *, CK_BYTE_PTR, CK_ULONG,
CK_BYTE_PTR, CK_ULONG_PTR);
void *aes_cbc_ctx_init(void *, size_t, uint8_t *);
+void *aes_cmac_ctx_init(void *, size_t);
void *aes_ctr_ctx_init(void *, size_t, uint8_t *);
CK_RV soft_aes_crypt_init_common(soft_session_t *, CK_MECHANISM_PTR,
@@ -116,6 +117,15 @@ CK_RV soft_aes_encrypt_common(soft_session_t *, CK_BYTE_PTR, CK_ULONG,
CK_RV soft_aes_decrypt_common(soft_session_t *, CK_BYTE_PTR, CK_ULONG,
CK_BYTE_PTR, CK_ULONG_PTR, boolean_t);
+CK_RV soft_aes_sign_verify_common(soft_session_t *, CK_BYTE_PTR,
+ CK_ULONG, CK_BYTE_PTR, CK_ULONG_PTR,
+ boolean_t, boolean_t);
+
+CK_RV soft_aes_sign_verify_init_common(soft_session_t *, CK_MECHANISM_PTR,
+ soft_object_t *, boolean_t);
+
+CK_RV soft_aes_mac_sign_verify_update(soft_session_t *, CK_BYTE_PTR, CK_ULONG);
+
void *blowfish_cbc_ctx_init(void *, size_t, uint8_t *);
CK_RV soft_blowfish_crypt_init_common(soft_session_t *, CK_MECHANISM_PTR,