Home | History | Annotate | Download | only in pkcs1

Lines Matching refs:DB

39    unsigned char *DB, *seed, *mask;
63 /* allocate ram for DB/mask/salt of size modulus_len */
64 DB = XMALLOC(modulus_len);
67 if (DB == NULL || mask == NULL || seed == NULL) {
68 if (DB != NULL) {
69 XFREE(DB);
99 /* now read the masked DB */
100 XMEMCPY(DB, msg + x, modulus_len - hLen - 1);
104 if ((err = pkcs_1_mgf1(hash_idx, DB, modulus_len - hLen - 1, mask, hLen)) != CRYPT_OK) {
118 /* xor against DB */
120 DB[y] ^= mask[y];
123 /* now DB == lhash || PS || 0x01 || M, PS == k - mlen - 2hlen - 2 zeroes */
132 /* can't pass hash_memory a NULL so use DB with zero length */
133 if ((err = hash_memory(hash_idx, DB, 0, seed, &x)) != CRYPT_OK) {
139 if (XMEMCMP(seed, DB, hLen) != 0) {
145 for (x = hLen; x < (modulus_len - hLen - 1) && DB[x] == 0x00; x++) {
150 if (x == (modulus_len - hLen - 1) || DB[x] != 0x01) {
164 XMEMCPY(out, DB + x, modulus_len - hLen - 1 - x);
173 zeromem(DB, modulus_len);
180 XFREE(DB);