-
Notifications
You must be signed in to change notification settings - Fork 1
/
pkcs11_5_13_sign.rpc
126 lines (118 loc) · 3.29 KB
/
pkcs11_5_13_sign.rpc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/* -*- c -*-
*
* Copyright (c) 2020-2021 Markku Rossi.
*
* All rights reserved.
*/
#include "vp_includes.h"
/** Version: 3.0 */
/** Section: 5.13 Signing and MACing functions */
/* C_SignInit initializes a signature (private key encryption)
* operation, where the signature is (will be) an appendix to
* the data, and plaintext cannot be recovered from the
* signature.
*/
CK_RV
C_SignInit
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_MECHANISM_PTR pMechanism, /* the signature mechanism */
CK_OBJECT_HANDLE hKey /* handle of signature key */
)
{
/**
* Session:
* CK_SESSION_HANDLE hSession
* Inputs:
* CK_MECHANISM pMechanism
* CK_OBJECT_HANDLE hKey
*/
}
/* C_Sign signs (encrypts with private key) data in a single
* part, where the signature is (will be) an appendix to the
* data, and plaintext cannot be recovered from the signature.
*/
CK_RV
C_Sign
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pData, /* the data to sign */
CK_ULONG ulDataLen, /* count of bytes to sign */
CK_BYTE_PTR pSignature, /* gets the signature */
CK_ULONG_PTR pulSignatureLen /* gets signature length */
)
{
/**
* Session:
* CK_SESSION_HANDLE hSession
* Inputs:
* [CK_ULONG ulDataLen]CK_BYTE pData
* InOutputs:
* [CK_ULONG_PTR pulSignatureLen]CK_BYTE pSignature?
*/
}
/* C_SignUpdate continues a multiple-part signature operation,
* where the signature is (will be) an appendix to the data,
* and plaintext cannot be recovered from the signature.
*/
CK_RV
C_SignUpdate
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pPart, /* the data to sign */
CK_ULONG ulPartLen /* count of bytes to sign */
)
{
/**
* Session:
* CK_SESSION_HANDLE hSession
* Inputs:
* [CK_ULONG ulPartLen]CK_BYTE pPart
*/
}
/* C_SignFinal finishes a multiple-part signature operation,
* returning the signature.
*/
CK_RV
C_SignFinal
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pSignature, /* gets the signature */
CK_ULONG_PTR pulSignatureLen /* gets signature length */
)
{
/**
* Session:
* CK_SESSION_HANDLE hSession
* InOutputs:
* [CK_ULONG_PTR pulSignatureLen]CK_BYTE pSignature?
*/
}
/* C_SignRecoverInit initializes a signature operation, where
* the data can be recovered from the signature.
*/
CK_RV
C_SignRecoverInit
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_MECHANISM_PTR pMechanism, /* the signature mechanism */
CK_OBJECT_HANDLE hKey /* handle of the signature key */
)
{
VP_FUNCTION_NOT_SUPPORTED;
}
/* C_SignRecover signs data in a single operation, where the
* data can be recovered from the signature.
*/
CK_RV
C_SignRecover
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pData, /* the data to sign */
CK_ULONG ulDataLen, /* count of bytes to sign */
CK_BYTE_PTR pSignature, /* gets the signature */
CK_ULONG_PTR pulSignatureLen /* gets signature length */
)
{
VP_FUNCTION_NOT_SUPPORTED;
}