Home
last modified time | relevance | path

Searched refs:mask (Results 1 – 25 of 55) sorted by relevance

123

/optee_os/core/lib/libtomcrypt/src/pk/pkcs1/
A Dpkcs_1_pss_decode.c36 unsigned char *DB, *mask, *salt, *hash; in pkcs_1_pss_decode() local
64 mask = XMALLOC(modulus_len); in pkcs_1_pss_decode()
67 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { in pkcs_1_pss_decode()
71 if (mask != NULL) { in pkcs_1_pss_decode()
72 XFREE(mask); in pkcs_1_pss_decode()
111 DB[y] ^= mask[y]; in pkcs_1_pss_decode()
137 zeromem(mask, 8); in pkcs_1_pss_decode()
147 if ((err = hash_descriptor[hash_idx]->done(&md, mask)) != CRYPT_OK) { in pkcs_1_pss_decode()
152 if (XMEM_NEQ(mask, hash, hLen) == 0) { in pkcs_1_pss_decode()
160 zeromem(mask, modulus_len); in pkcs_1_pss_decode()
[all …]
A Dpkcs_1_oaep_decode.c38 unsigned char *DB, *seed, *mask; in pkcs_1_oaep_decode() local
64 mask = XMALLOC(modulus_len); in pkcs_1_oaep_decode()
66 if (DB == NULL || mask == NULL || seed == NULL) { in pkcs_1_oaep_decode()
70 if (mask != NULL) { in pkcs_1_oaep_decode()
71 XFREE(mask); in pkcs_1_oaep_decode()
104 if ((err = pkcs_1_mgf1(hash_idx, DB, modulus_len - hLen - 1, mask, hLen)) != CRYPT_OK) { in pkcs_1_oaep_decode()
110 seed[y] ^= mask[y]; in pkcs_1_oaep_decode()
114 if ((err = pkcs_1_mgf1(hash_idx, seed, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_oaep_decode()
120 DB[y] ^= mask[y]; in pkcs_1_oaep_decode()
172 zeromem(mask, modulus_len); in pkcs_1_oaep_decode()
[all …]
A Dpkcs_1_oaep_encode.c39 unsigned char *DB, *seed, *mask; in pkcs_1_oaep_encode() local
67 mask = XMALLOC(modulus_len); in pkcs_1_oaep_encode()
69 if (DB == NULL || mask == NULL || seed == NULL) { in pkcs_1_oaep_encode()
73 if (mask != NULL) { in pkcs_1_oaep_encode()
74 XFREE(mask); in pkcs_1_oaep_encode()
116 if ((err = pkcs_1_mgf1(hash_idx, seed, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_oaep_encode()
122 DB[y] ^= mask[y]; in pkcs_1_oaep_encode()
126 if ((err = pkcs_1_mgf1(hash_idx, DB, modulus_len - hLen - 1, mask, hLen)) != CRYPT_OK) { in pkcs_1_oaep_encode()
132 seed[y] ^= mask[y]; in pkcs_1_oaep_encode()
157 zeromem(mask, modulus_len); in pkcs_1_oaep_encode()
[all …]
A Dpkcs_1_pss_encode.c38 unsigned char *DB, *mask, *salt, *hash; in pkcs_1_pss_encode() local
66 mask = XMALLOC(modulus_len); in pkcs_1_pss_encode()
69 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { in pkcs_1_pss_encode()
73 if (mask != NULL) { in pkcs_1_pss_encode()
74 XFREE(mask); in pkcs_1_pss_encode()
121 if ((err = pkcs_1_mgf1(hash_idx, hash, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_pss_encode()
127 DB[y] ^= mask[y]; in pkcs_1_pss_encode()
158 zeromem(mask, modulus_len); in pkcs_1_pss_encode()
165 XFREE(mask); in pkcs_1_pss_encode()
A Dpkcs_1_mgf1.c30 unsigned char *mask, unsigned long masklen) in pkcs_1_mgf1() argument
39 LTC_ARGCHK(mask != NULL); in pkcs_1_mgf1()
86 *mask++ = buf[x]; in pkcs_1_mgf1()
/optee_os/lib/libutils/isoc/newlib/
A Dmemchr.c113 unsigned long mask; variable
134 mask = d << 8 | d;
135 mask = mask << 16 | mask;
137 mask = (mask << i) | mask;
140 if (DETECTCHAR(*asrc, mask))
A Dstrchr.c103 unsigned long mask,j; variable
136 mask = c;
138 mask = (mask << j) | mask;
141 while (!DETECTNULL (*aligned_addr) && !DETECTCHAR (*aligned_addr, mask))
/optee_os/core/drivers/crypto/caam/hal/imx_6_7/
A Dhal_clk_mx6.c17 uint32_t mask = 0; in caam_hal_clk_enable() local
21 mask = BM_CCM_CCGR0_CAAM_WRAPPER_IPG | BM_CCM_CCGR0_CAAM_WRAPPER_ACLK | in caam_hal_clk_enable()
25 reg |= mask; in caam_hal_clk_enable()
27 reg &= ~mask; in caam_hal_clk_enable()
34 mask = BM_CCM_CCGR6_EMI_SLOW; in caam_hal_clk_enable()
37 reg |= mask; in caam_hal_clk_enable()
39 reg &= ~mask; in caam_hal_clk_enable()
/optee_os/core/drivers/
A Dstpmic1.c674 uint8_t mask = 0; in stpmic1_regulator_voltage_set() local
680 if (!mask) in stpmic1_regulator_voltage_set()
685 mask); in stpmic1_regulator_voltage_set()
732 if (!mask) in stpmic1_bo_voltage_cfg()
737 cfg->mask = mask; in stpmic1_bo_voltage_cfg()
813 if (!mask) in stpmic1_regulator_voltage_get()
922 if (!mask) in stpmic1_lp_set_voltage()
926 mask); in stpmic1_lp_set_voltage()
938 if (!mask) in stpmic1_lp_voltage_cfg()
945 cfg->mask = mask; in stpmic1_lp_voltage_cfg()
[all …]
A Dgic.c257 uint32_t mask = 1 << (it % NUM_INTS_PER_REG); in gic_it_add() local
260 io_write32(gd->gicd_base + GICD_ICENABLER(idx), mask); in gic_it_add()
262 io_write32(gd->gicd_base + GICD_ICPENDR(idx), mask); in gic_it_add()
310 uint32_t mask = 1 << (it % NUM_INTS_PER_REG); in gic_it_enable() local
317 io_write32(base + GICD_ISENABLER(idx), mask); in gic_it_enable()
323 uint32_t mask = 1 << (it % NUM_INTS_PER_REG); in gic_it_disable() local
335 uint32_t mask = BIT32(it % NUM_INTS_PER_REG); in gic_it_set_pending() local
341 io_write32(gd->gicd_base + GICD_ISPENDR(idx), mask); in gic_it_set_pending()
357 io_write32(gd->gicd_base + GICD_SGIR, mask); in gic_it_raise_sgi()
381 uint32_t mask = 1 << (it % NUM_INTS_PER_REG); in gic_it_is_enabled() local
[all …]
A Dimx_mu.c24 static TEE_Result mu_wait_for(vaddr_t addr, uint32_t mask) in mu_wait_for() argument
28 while (!(io_read32(addr) & mask)) { in mu_wait_for()
/optee_os/lib/libmbedtls/mbedtls/library/
A Dbase64.c82 unsigned char mask = ( condition | -condition ); in mbedtls_base64_cond_assign_uchar() local
83 mask >>= 7; in mbedtls_base64_cond_assign_uchar()
84 mask = -mask; in mbedtls_base64_cond_assign_uchar()
90 *dest = ( ( *src ) & mask ) | ( ( *dest ) & ~mask ); in mbedtls_base64_cond_assign_uchar()
107 uint32_t mask = ( condition | -condition ); in mbedtls_base64_cond_assign_uint32() local
108 mask >>= 31; in mbedtls_base64_cond_assign_uint32()
109 mask = -mask; in mbedtls_base64_cond_assign_uint32()
115 *dest = ( src & mask ) | ( ( *dest ) & ~mask ); in mbedtls_base64_cond_assign_uint32()
A Dpoly1305.c215 uint32_t mask; in poly1305_compute_mac() local
241 mask = (uint32_t) 0U - ( g4 >> 2U ); in poly1305_compute_mac()
242 mask_inv = ~mask; in poly1305_compute_mac()
245 acc0 = ( acc0 & mask_inv ) | ( g0 & mask ); in poly1305_compute_mac()
246 acc1 = ( acc1 & mask_inv ) | ( g1 & mask ); in poly1305_compute_mac()
247 acc2 = ( acc2 & mask_inv ) | ( g2 & mask ); in poly1305_compute_mac()
248 acc3 = ( acc3 & mask_inv ) | ( g3 & mask ); in poly1305_compute_mac()
/optee_os/lib/libunw/
A Dunwind_arm32.c209 uint32_t mask; in unwind_exec_insn() local
213 if (!unwind_exec_read_byte(state, &mask)) in unwind_exec_insn()
215 mask |= (insn & INSN_STD_DATA_MASK) << 8; in unwind_exec_insn()
218 if (mask == 0) in unwind_exec_insn()
225 for (reg = 4; mask && reg < 16; mask >>= 1, reg++) { in unwind_exec_insn()
226 if (mask & 1) { in unwind_exec_insn()
274 uint32_t mask; in unwind_exec_insn() local
277 if (!unwind_exec_read_byte(state, &mask)) in unwind_exec_insn()
279 if (mask == 0 || (mask & 0xf0) != 0) in unwind_exec_insn()
286 for (reg = 0; mask && reg < 4; mask >>= 1, reg++) { in unwind_exec_insn()
[all …]
/optee_os/core/include/
A Dio.h53 static inline void io_mask8(vaddr_t addr, uint8_t val, uint8_t mask) in io_mask8() argument
55 io_write8(addr, (io_read8(addr) & ~mask) | (val & mask)); in io_mask8()
58 static inline void io_mask16(vaddr_t addr, uint16_t val, uint16_t mask) in io_mask16() argument
60 io_write16(addr, (io_read16(addr) & ~mask) | (val & mask)); in io_mask16()
63 static inline void io_mask32(vaddr_t addr, uint32_t val, uint32_t mask) in io_mask32() argument
65 io_write32(addr, (io_read32(addr) & ~mask) | (val & mask)); in io_mask32()
/optee_os/core/arch/arm/plat-rzn1/
A Dsm_platform_handler.c36 static uint32_t oem_sysreg(uint32_t addr, uint32_t mask, uint32_t *pvalue) in oem_sysreg() argument
47 if (mask) { in oem_sysreg()
49 mask &= auth->wmask; in oem_sysreg()
50 if (!reg || !mask) in oem_sysreg()
53 else if (mask == ~0UL) in oem_sysreg()
56 io_mask32(reg, *pvalue, mask); in oem_sysreg()
/optee_os/core/lib/libtomcrypt/src/mac/poly1305/
A Dpoly1305.c177 ulong32 mask; in poly1305_done() local
215 mask = (g4 >> 31) - 1; in poly1305_done()
216 g0 &= mask; in poly1305_done()
217 g1 &= mask; in poly1305_done()
218 g2 &= mask; in poly1305_done()
219 g3 &= mask; in poly1305_done()
220 g4 &= mask; in poly1305_done()
221 mask = ~mask; in poly1305_done()
222 h0 = (h0 & mask) | g0; in poly1305_done()
223 h1 = (h1 & mask) | g1; in poly1305_done()
[all …]
/optee_os/lib/libutils/ext/
A Dconsttime_memcmp.c41 volatile unsigned int mask = (1u << CHAR_BIT); in consttime_memcmp() local
44 isLT |= mask & in consttime_memcmp()
46 isGT |= mask & in consttime_memcmp()
48 mask &= ~(isLT | isGT); in consttime_memcmp()
/optee_os/core/lib/libtomcrypt/src/misc/
A Dcopy_or_zeromem.c31 unsigned char mask = 0xff; /* initialize mask at all ones */ in copy_or_zeromem() local
38 mask *= 1 - coz; /* mask = ( coz ? 0 : 0xff ) */ in copy_or_zeromem()
50 dest[y] = src[y] & mask; in copy_or_zeromem()
56 mask = 0; in copy_or_zeromem()
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/object_identifier/
A Dder_encode_object_identifier.c29 unsigned long i, x, y, z, t, mask, wordbuf; in der_encode_object_identifier() local
72 mask = 0; in der_encode_object_identifier()
74 out[x++] = (unsigned char)((t & 0x7F) | mask); in der_encode_object_identifier()
76 mask |= 0x80; /* upper bit is set on all but the last byte */ in der_encode_object_identifier()
/optee_os/core/lib/libtomcrypt/src/mac/omac/
A Domac_init.c30 int err, x, y, mask, msb, len; in omac_init() local
48 case 8: mask = 0x1B; in omac_init()
51 case 16: mask = 0x87; in omac_init()
78 omac->Lu[x][len - 1] = ((omac->Lu[x][len - 1] << 1) ^ (msb ? mask : 0)) & 255; in omac_init()
/optee_os/core/drivers/crypto/crypto_api/acipher/
A Drsamgf.c22 uint8_t *cur_mask = mgf_data->mask.data; in drvcrypt_rsa_mgf1()
26 mgf_data->mask.length, mgf_data->seed.length); in drvcrypt_rsa_mgf1()
29 lastBlock_size = mgf_data->mask.length % mgf_data->digest_size; in drvcrypt_rsa_mgf1()
42 nbBlock = (mgf_data->mask.length - lastBlock_size) / in drvcrypt_rsa_mgf1()
/optee_os/core/lib/libtomcrypt/src/math/
A Drand_bn.c20 unsigned char *buf, mask; in rand_bn_bits() local
29 mask = 0xff << (8 - bits % 8); in rand_bn_bits()
40 buf[0] &= ~mask; in rand_bn_bits()
/optee_os/core/lib/zlib/
A Dinftrees.c53 unsigned mask; /* mask for low root bits */ local
207 mask = used - 1; /* mask for comparing low */
259 if (len > root && (huff & mask) != low) {
284 low = huff & mask;
/optee_os/core/drivers/clk/sam/
A Dat91_pll.c60 uint32_t mask = PLL_STATUS_MASK(id); in clk_pll_enable() local
73 if ((status & mask) && in clk_pll_enable()
99 unsigned int mask = pll->layout->pllr_mask; in clk_pll_disable() local
101 io_clrsetbits32(pll->base + PLL_REG(pll->id), mask, ~mask); in clk_pll_disable()

Completed in 23 milliseconds

123