Home
last modified time | relevance | path

Searched refs:padlen (Results 1 – 19 of 19) sorted by relevance

/optee_os/core/lib/libtomcrypt/src/modes/ctr/
A Dctr_encrypt.c54 if (ctr->padlen == ctr->blocklen) { in _ctr_encrypt()
59 ctr->padlen = 0; in _ctr_encrypt()
62 if ((ctr->padlen == 0) && (len >= (unsigned long)ctr->blocklen)) { in _ctr_encrypt()
70 ctr->padlen = ctr->blocklen; in _ctr_encrypt()
74 *ct++ = *pt++ ^ ctr->pad[ctr->padlen++]; in _ctr_encrypt()
78 if (ctr->padlen == ctr->blocklen) { in _ctr_encrypt()
108 (ctr->padlen < 0) || (ctr->padlen > (int)sizeof(ctr->pad))) { in ctr_encrypt()
120 … if ((ctr->padlen == 0 || ctr->padlen == ctr->blocklen) && len >= (unsigned long)ctr->blocklen) { in ctr_encrypt()
128 ctr->padlen = ctr->blocklen; in ctr_encrypt()
132 incr = ctr->blocklen - ctr->padlen; in ctr_encrypt()
A Dctr_setiv.c46 ctr->padlen = 0; in ctr_setiv()
A Dctr_start.c66 ctr->padlen = 0; in ctr_start()
/optee_os/core/lib/libtomcrypt/src/modes/cfb/
A Dcfb_encrypt.c41 cfb->padlen < 0 || cfb->padlen > (int)sizeof(cfb->pad)) { in cfb_encrypt()
46 if (cfb->padlen == cfb->blocklen) { in cfb_encrypt()
50 cfb->padlen = 0; in cfb_encrypt()
52 cfb->pad[cfb->padlen] = (*ct = *pt ^ cfb->IV[cfb->padlen]); in cfb_encrypt()
55 ++(cfb->padlen); in cfb_encrypt()
A Dcfb_decrypt.c41 cfb->padlen < 0 || cfb->padlen > (int)sizeof(cfb->pad)) { in cfb_decrypt()
46 if (cfb->padlen == cfb->blocklen) { in cfb_decrypt()
50 cfb->padlen = 0; in cfb_decrypt()
52 cfb->pad[cfb->padlen] = *ct; in cfb_decrypt()
53 *pt = *ct ^ cfb->IV[cfb->padlen]; in cfb_decrypt()
56 ++(cfb->padlen); in cfb_decrypt()
A Dcfb_setiv.c42 cfb->padlen = 0; in cfb_setiv()
A Dcfb_start.c57 cfb->padlen = 0; in cfb_start()
/optee_os/core/lib/libtomcrypt/src/modes/f8/
A Df8_encrypt.c40 f8->padlen < 0 || f8->padlen > (int)sizeof(f8->IV)) { in f8_encrypt()
47 if (f8->padlen == f8->blocklen) { in f8_encrypt()
57 f8->padlen = 0; in f8_encrypt()
61 if (f8->padlen == 0) { in f8_encrypt()
80 if (f8->padlen == f8->blocklen) { in f8_encrypt()
90 f8->padlen = 0; in f8_encrypt()
92 *ct++ = *pt++ ^ f8->IV[f8->padlen++]; in f8_encrypt()
A Df8_setiv.c42 f8->padlen = 0; in f8_setiv()
A Df8_start.c59 f8->padlen = f8->blocklen; in f8_start()
/optee_os/core/lib/libtomcrypt/src/modes/ofb/
A Dofb_encrypt.c39 ofb->padlen < 0 || ofb->padlen > (int)sizeof(ofb->IV)) { in ofb_encrypt()
44 if (ofb->padlen == ofb->blocklen) { in ofb_encrypt()
48 ofb->padlen = 0; in ofb_encrypt()
50 *ct++ = *pt++ ^ ofb->IV[(ofb->padlen)++]; in ofb_encrypt()
A Dofb_setiv.c42 ofb->padlen = 0; in ofb_setiv()
A Dofb_start.c51 ofb->padlen = ofb->blocklen; in ofb_start()
/optee_os/core/lib/libtomcrypt/src/encauth/chachapoly/
A Dchacha20poly1305_encrypt.c26 unsigned long padlen; in chacha20poly1305_encrypt() local
33 padlen = 16 - (unsigned long)(st->aadlen % 16); in chacha20poly1305_encrypt()
34 if (padlen < 16) { in chacha20poly1305_encrypt()
35 if ((err = poly1305_process(&st->poly, padzero, padlen)) != CRYPT_OK) return err; in chacha20poly1305_encrypt()
A Dchacha20poly1305_decrypt.c26 unsigned long padlen; in chacha20poly1305_decrypt() local
32 padlen = 16 - (unsigned long)(st->aadlen % 16); in chacha20poly1305_decrypt()
33 if (padlen < 16) { in chacha20poly1305_decrypt()
34 if ((err = poly1305_process(&st->poly, padzero, padlen)) != CRYPT_OK) return err; in chacha20poly1305_decrypt()
A Dchacha20poly1305_done.c25 unsigned long padlen; in chacha20poly1305_done() local
31 padlen = 16 - (unsigned long)(st->ctlen % 16); in chacha20poly1305_done()
32 if (padlen < 16) { in chacha20poly1305_done()
33 if ((err = poly1305_process(&st->poly, padzero, padlen)) != CRYPT_OK) return err; in chacha20poly1305_done()
/optee_os/lib/libmbedtls/mbedtls/library/
A Dnist_kw.c188 size_t olen, padlen = 0; in mbedtls_nist_kw_wrap() local
224 padlen = ( 8 - ( in_len % 8 ) ); in mbedtls_nist_kw_wrap()
227 if( out_size < in_len + KW_SEMIBLOCK_LENGTH + padlen ) in mbedtls_nist_kw_wrap()
250 memset( output + KW_SEMIBLOCK_LENGTH + in_len, 0, padlen ); in mbedtls_nist_kw_wrap()
252 semiblocks = ( ( in_len + padlen ) / KW_SEMIBLOCK_LENGTH ) + 1; in mbedtls_nist_kw_wrap()
432 size_t padlen = 0; in mbedtls_nist_kw_unwrap() local
484 padlen = in_len - KW_SEMIBLOCK_LENGTH - Plen; in mbedtls_nist_kw_unwrap()
485 if ( padlen > 7 ) in mbedtls_nist_kw_unwrap()
487 padlen &= 7; in mbedtls_nist_kw_unwrap()
494 if( i >= KW_SEMIBLOCK_LENGTH - padlen ) in mbedtls_nist_kw_unwrap()
[all …]
A Dssl_msg.c487 int padlen; in ssl_mac() local
493 padlen = 48; in ssl_mac()
495 padlen = 40; in ssl_mac()
895 size_t padlen, i; in mbedtls_ssl_encrypt_buf() local
902 padlen = 0; in mbedtls_ssl_encrypt_buf()
915 post_avail -= padlen + 1; in mbedtls_ssl_encrypt_buf()
1331 padlen = 0; in mbedtls_ssl_decrypt_buf()
1630 padlen &= mask; in mbedtls_ssl_decrypt_buf()
1650 padlen &= mask; in mbedtls_ssl_decrypt_buf()
1653 padlen++; in mbedtls_ssl_decrypt_buf()
[all …]
/optee_os/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_cipher.h263 padlen; member
281 padlen; member
312 padlen, member
361 padlen; member

Completed in 26 milliseconds