Function report |
Source Code:lib\digsig.c |
Create Date:2022-07-28 07:19:59 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:RSA Signature verification with public key
Proto:static int digsig_verify_rsa(struct key *key, const char *sig, int siglen, const char *h, int hlen)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct key * | key | |
const char * | sig | |
int | siglen | |
const char * | h | |
int | hlen |
76 | unsigned char * out1 = NULL |
85 | ukp = user_key_payload_locked(key) |
87 | If Not ukp Then |
89 | err = -EKEYREVOKED |
90 | Go to err1 |
93 | If length of this data < size of pkh Then Go to err1 |
96 | pkh = actual data |
98 | If key format version != 1 Then Go to err1 |
101 | If algo != PUBKEY_ALGO_RSA Then Go to err1 |
108 | endp = actual data + length of this data |
112 | pkey[i] = mpi_read_from_buffer(datap, & remaining) |
121 | mlen = DIV_ROUND_UP(mblen, 8) |
123 | If mlen == 0 Then |
130 | out1 = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
135 | in = mpi_read_from_buffer(sig, & nret) |
145 | err = RES = BASE ^ EXP mod MOD |
149 | If number of valid limbs * BYTES_PER_MPI_LIMB > mlen Then |
155 | If Not p Then |
163 | No 3D Now!(out1 + head, p, l) |
172 | err : |
178 | err1 : |
181 | Return err |
Name | Describe |
---|---|
digsig_verify | digsig_verify() - digital signature verification with public key*@keyring: keyring to search key in*@sig: digital signature*@siglen: length of the signature*@data: data*@datalen: length of the data* Returns 0 on success, -EINVAL otherwise |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |