Home
last modified time | relevance | path

Searched refs:ctr (Results 1 – 25 of 59) sorted by relevance

123

/external/dropbear/libtomcrypt/src/modes/ctr/
Dctr_encrypt.c29 int ctr_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_CTR *ctr) in ctr_encrypt() argument
35 LTC_ARGCHK(ctr != NULL); in ctr_encrypt()
37 if ((err = cipher_is_valid(ctr->cipher)) != CRYPT_OK) { in ctr_encrypt()
42 if (ctr->blocklen < 1 || ctr->blocklen > (int)sizeof(ctr->ctr) || in ctr_encrypt()
43 ctr->padlen < 0 || ctr->padlen > (int)sizeof(ctr->pad)) { in ctr_encrypt()
48 if (ctr->blocklen % sizeof(LTC_FAST_TYPE)) { in ctr_encrypt()
54 …if ((ctr->padlen == ctr->blocklen) && cipher_descriptor[ctr->cipher].accel_ctr_encrypt != NULL && … in ctr_encrypt()
55 …if ((err = cipher_descriptor[ctr->cipher].accel_ctr_encrypt(pt, ct, len/ctr->blocklen, ctr->ctr, c… in ctr_encrypt()
58 len %= ctr->blocklen; in ctr_encrypt()
63 if (ctr->padlen == ctr->blocklen) { in ctr_encrypt()
[all …]
Dctr_start.c36 symmetric_CTR *ctr) in ctr_start() argument
42 LTC_ARGCHK(ctr != NULL); in ctr_start()
50 if ((err = cipher_descriptor[cipher].setup(key, keylen, num_rounds, &ctr->key)) != CRYPT_OK) { in ctr_start()
55 ctr->blocklen = cipher_descriptor[cipher].block_length; in ctr_start()
56 ctr->cipher = cipher; in ctr_start()
57 ctr->padlen = 0; in ctr_start()
58 ctr->mode = ctr_mode & 1; in ctr_start()
59 for (x = 0; x < ctr->blocklen; x++) { in ctr_start()
60 ctr->ctr[x] = IV[x]; in ctr_start()
65 if (ctr->mode == CTR_COUNTER_LITTLE_ENDIAN) { in ctr_start()
[all …]
Dctr_setiv.c27 int ctr_setiv(const unsigned char *IV, unsigned long len, symmetric_CTR *ctr) in ctr_setiv() argument
32 LTC_ARGCHK(ctr != NULL); in ctr_setiv()
35 if ((err = cipher_is_valid(ctr->cipher)) != CRYPT_OK) { in ctr_setiv()
39 if (len != (unsigned long)ctr->blocklen) { in ctr_setiv()
44 XMEMCPY(ctr->ctr, IV, len); in ctr_setiv()
47 ctr->padlen = 0; in ctr_setiv()
48 return cipher_descriptor[ctr->cipher].ecb_encrypt(IV, ctr->pad, &ctr->key); in ctr_setiv()
Dctr_getiv.c27 int ctr_getiv(unsigned char *IV, unsigned long *len, symmetric_CTR *ctr) in ctr_getiv() argument
31 LTC_ARGCHK(ctr != NULL); in ctr_getiv()
32 if ((unsigned long)ctr->blocklen > *len) { in ctr_getiv()
33 *len = ctr->blocklen; in ctr_getiv()
36 XMEMCPY(IV, ctr->ctr, ctr->blocklen); in ctr_getiv()
37 *len = ctr->blocklen; in ctr_getiv()
Dctr_done.c24 int ctr_done(symmetric_CTR *ctr) in ctr_done() argument
27 LTC_ARGCHK(ctr != NULL); in ctr_done()
29 if ((err = cipher_is_valid(ctr->cipher)) != CRYPT_OK) { in ctr_done()
32 cipher_descriptor[ctr->cipher].done(&ctr->key); in ctr_done()
Dctr_test.c53 symmetric_CTR ctr; in ctr_test()
63 …IV, tests[x].key, tests[x].keylen, 0, CTR_COUNTER_BIG_ENDIAN|LTC_CTR_RFC3686, &ctr)) != CRYPT_OK) { in ctr_test()
66 if ((err = ctr_encrypt(tests[x].pt, buf, tests[x].msglen, &ctr)) != CRYPT_OK) { in ctr_test()
69 ctr_done(&ctr); in ctr_test()
Dctr_decrypt.c28 int ctr_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_CTR *ctr) in ctr_decrypt() argument
32 LTC_ARGCHK(ctr != NULL); in ctr_decrypt()
34 return ctr_encrypt(ct, pt, len, ctr); in ctr_decrypt()
/external/webkit/V8Binding/v8/test/mjsunit/
Dstring-replace.js123 var ctr = 0; variable
129 return String(ctr++);
131 assertEquals(1, ctr, "replace('x',func) num-match");
133 ctr = 0;
139 return String(ctr++);
141 assertEquals(1, ctr, "replace(/x/,func) num-match");
143 ctr = 0;
147 assertEquals(ctr * 2, i, "replace(/x/g,func(..,i,.))");
149 return String(ctr++);
151 assertEquals(4, ctr, "replace(/x/g,func) num-match");
[all …]
/external/dropbear/libtomcrypt/src/encauth/ccm/
Dccm_memory.c48 unsigned char PAD[16], ctr[16], CTRPAD[16], b; in ccm_memory() local
215 ctr[x++] = (unsigned char)L-1; in ccm_memory()
219 ctr[x++] = nonce[y]; in ccm_memory()
223 ctr[x++] = 0; in ccm_memory()
238 ctr[z] = (ctr[z] + 1) & 255; in ccm_memory()
239 if (ctr[z]) break; in ccm_memory()
241 if ((err = cipher_descriptor[cipher].ecb_encrypt(ctr, CTRPAD, skey)) != CRYPT_OK) { in ccm_memory()
258 ctr[z] = (ctr[z] + 1) & 255; in ccm_memory()
259 if (ctr[z]) break; in ccm_memory()
261 if ((err = cipher_descriptor[cipher].ecb_encrypt(ctr, CTRPAD, skey)) != CRYPT_OK) { in ccm_memory()
[all …]
/external/jpeg/
Djidctred.c129 int ctr; variable
138 for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) {
140 if (ctr == DCTSIZE-4)
197 for (ctr = 0; ctr < 4; ctr++) {
198 outptr = output_buf[ctr] + output_col;
281 int ctr; in jpeg_idct_2x2() local
290 for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) { in jpeg_idct_2x2()
292 if (ctr == DCTSIZE-2 || ctr == DCTSIZE-4 || ctr == DCTSIZE-6) in jpeg_idct_2x2()
330 for (ctr = 0; ctr < 2; ctr++) { in jpeg_idct_2x2()
331 outptr = output_buf[ctr] + output_col; in jpeg_idct_2x2()
Djfdctflt.c65 int ctr; variable
70 for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
120 for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
Djfdctfst.c120 int ctr; variable
126 for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
176 for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
Djidctflt.c80 int ctr; variable
89 for (ctr = DCTSIZE; ctr > 0; ctr--) {
180 for (ctr = 0; ctr < DCTSIZE; ctr++) {
181 outptr = output_buf[ctr] + output_col;
Djidctfst.c180 int ctr; variable
190 for (ctr = DCTSIZE; ctr > 0; ctr--) {
282 for (ctr = 0; ctr < DCTSIZE; ctr++) {
283 outptr = output_buf[ctr] + output_col;
Djfdctint.c146 int ctr; variable
154 for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
219 for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
Djidctint.c160 int ctr; variable
171 for (ctr = DCTSIZE; ctr > 0; ctr--) {
277 for (ctr = 0; ctr < DCTSIZE; ctr++) {
278 outptr = output_buf[ctr] + output_col;
/external/openssl/crypto/
Dmem_clr.c67 size_t loop = len, ctr = cleanse_ctr; in OPENSSL_cleanse() local
70 *(p++) = (unsigned char)ctr; in OPENSSL_cleanse()
71 ctr += (17 + ((size_t)p & 0xF)); in OPENSSL_cleanse()
73 p=memchr(ptr, (unsigned char)ctr, len); in OPENSSL_cleanse()
75 ctr += (63 + (size_t)p); in OPENSSL_cleanse()
76 cleanse_ctr = (unsigned char)ctr; in OPENSSL_cleanse()
/external/bluetooth/hcidump/parser/
Dcapi.c275 uint8_t ctr, plci; in cmd_common() local
278 ctr = val & 0xff; in cmd_common()
283 printf("Controller: %d %s\n", ctr & 0x7f, ctr & 0x80 ? "Ext." : "Int."); in cmd_common()
488 uint32_t ctr, value, major, minor; in cmd_interoperability() local
525 ctr = CAPI_U32(frm); in cmd_interoperability()
527 printf("Controller: %d\n", ctr); in cmd_interoperability()
554 ctr = CAPI_U32(frm); in cmd_interoperability()
556 printf("Controller: %d\n", ctr); in cmd_interoperability()
565 ctr = CAPI_U32(frm); in cmd_interoperability()
567 printf("Controller: %d\n", ctr); in cmd_interoperability()
[all …]
Drfcomm.h43 #define SET_PF(ctr) ((ctr) | (1 << 4)) argument
45 #define CLR_PF(ctr) ((ctr) & 0xef) argument
47 #define GET_PF(ctr) (((ctr) >> 4) & 0x1) argument
/external/dropbear/libtomcrypt/demos/
Dencrypt.c101 symmetric_CTR ctr; in main() local
173 if ((errno = ctr_start(cipher_idx,IV,key,ks,0,CTR_COUNTER_LITTLE_ENDIAN,&ctr)) != CRYPT_OK) { in main()
182 if ((errno = ctr_decrypt(inbuf,plaintext,y,&ctr)) != CRYPT_OK) { in main()
215 if ((errno = ctr_start(cipher_idx,IV,key,ks,0,CTR_COUNTER_LITTLE_ENDIAN,&ctr)) != CRYPT_OK) { in main()
223 if ((errno = ctr_encrypt(inbuf,ciphertext,y,&ctr)) != CRYPT_OK) { in main()
/external/iptables/
Diptables-xml.c71 parse_counters(char *string, struct ipt_counters *ctr) in parse_counters() argument
76 (unsigned long long *) &ctr->pcnt, in parse_counters()
77 (unsigned long long *) &ctr->bcnt) == 2); in parse_counters()
245 openChain(char *chain, char *policy, struct ipt_counters *ctr, char close) in openChain() argument
256 xmlAttrI("packet-count", (unsigned long long) ctr->pcnt); in openChain()
257 xmlAttrI("byte-count", (unsigned long long) ctr->bcnt); in openChain()
299 saveChain(char *chain, char *policy, struct ipt_counters *ctr) in saveChain() argument
309 chains[nextChain].count = *ctr; in saveChain()
/external/qemu/hw/
Dsmc91c111.c25 uint16_t ctr; member
205 if (s->ctr & CTR_AUTO_RELEASE) in smc91c111_do_tx()
237 s->ctr = 0x1210; in smc91c111_reset()
306 SET_LOW(ctr, value); in smc91c111_writeb()
309 SET_HIGH(ctr, value); in smc91c111_writeb()
483 return s->ctr & 0xff; in smc91c111_readb()
485 return s->ctr >> 8; in smc91c111_readb()
/external/webkit/V8Binding/v8/src/
Dmksnapshot.cc104 Counter* ctr = counters->GetNextCounter(); in counter_callback() local
105 if (ctr == NULL) return NULL; in counter_callback()
106 int* ptr = ctr->Bind(name); in counter_callback()
/external/dropbear/libtomcrypt/
DAndroid.mk60 src/modes/ctr/ctr_decrypt.c src/modes/ctr/ctr_done.c src/modes/ctr/ctr_encrypt.c \
61 src/modes/ctr/ctr_getiv.c src/modes/ctr/ctr_setiv.c src/modes/ctr/ctr_start.c src/modes/ctr/ctr_tes…
/external/dropbear/libtomcrypt/src/headers/
Dtomcrypt_cipher.h263 unsigned char ctr[MAXBLOCKSIZE], member
783 symmetric_CTR *ctr);
784 int ctr_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_CTR *ctr);
785 int ctr_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_CTR *ctr);
786 int ctr_getiv(unsigned char *IV, unsigned long *len, symmetric_CTR *ctr);
787 int ctr_setiv(const unsigned char *IV, unsigned long len, symmetric_CTR *ctr);
788 int ctr_done(symmetric_CTR *ctr);

123