/external/dropbear/libtomcrypt/src/pk/pkcs1/ |
pkcs_1_mgf1.c | 27 @return CRYPT_OK if successful 43 if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { 72 if ((err = hash_descriptor[hash_idx].init(md)) != CRYPT_OK) { 75 if ((err = hash_descriptor[hash_idx].process(md, seed, seedlen)) != CRYPT_OK) { 78 if ((err = hash_descriptor[hash_idx].process(md, buf, 4)) != CRYPT_OK) { 81 if ((err = hash_descriptor[hash_idx].done(md, buf)) != CRYPT_OK) { 91 err = CRYPT_OK;
|
/external/dropbear/libtomcrypt/src/pk/dsa/ |
dsa_make_key.c | 27 @return CRYPT_OK if successful, upon error this function will free all allocated memory 39 if ((err = prng_is_valid(wprng)) != CRYPT_OK) { 56 if ((err = mp_init_multi(&tmp, &tmp2, &key->g, &key->q, &key->p, &key->x, &key->y, NULL)) != CRYPT_OK) { 62 if ((err = rand_prime(key->q, group_size, prng, wprng)) != CRYPT_OK) { goto error; } 65 if ((err = mp_add(key->q, key->q, tmp)) != CRYPT_OK) { goto error; } 79 if ((err = mp_read_unsigned_bin(tmp2, buf, modulus_size - group_size)) != CRYPT_OK) { goto error; } 80 if ((err = mp_mul(key->q, tmp2, key->p)) != CRYPT_OK) { goto error; } 81 if ((err = mp_add_d(key->p, 1, key->p)) != CRYPT_OK) { goto error; } 85 if ((err = mp_prime_is_prime(key->p, 8, &res)) != CRYPT_OK) { goto error; } 89 if ((err = mp_add(tmp, key->p, key->p)) != CRYPT_OK) { goto error; [all...] |
dsa_sign_hash.c | 29 @return CRYPT_OK if successful 44 if ((err = prng_is_valid(wprng)) != CRYPT_OK) { 62 if ((err = mp_init_multi(&k, &kinv, &tmp, NULL)) != CRYPT_OK) { goto ERRBUF; } 74 if ((err = mp_read_unsigned_bin(k, buf, key->qord)) != CRYPT_OK) { goto error; } 80 if ((err = mp_gcd(k, key->q, tmp)) != CRYPT_OK) { goto error; } 84 if ((err = mp_invmod(k, key->q, kinv)) != CRYPT_OK) { goto error; } 87 if ((err = mp_exptmod(key->g, k, key->p, r)) != CRYPT_OK) { goto error; } 88 if ((err = mp_mod(r, key->q, r)) != CRYPT_OK) { goto error; } 93 if ((err = mp_read_unsigned_bin(tmp, (unsigned char *)in, inlen)) != CRYPT_OK) { goto error; } 94 if ((err = mp_mul(key->x, r, s)) != CRYPT_OK) { goto error; [all...] |
/external/dropbear/libtomcrypt/src/math/ |
gmp_desc.c | 29 return CRYPT_OK; 44 return CRYPT_OK; 52 return CRYPT_OK; 57 if (init(a) != CRYPT_OK) { 68 return CRYPT_OK; 136 return CRYPT_OK; 147 return CRYPT_OK; 156 return CRYPT_OK; 175 return CRYPT_OK; 184 return CRYPT_OK; [all...] |
/external/dropbear/libtomcrypt/src/mac/hmac/ |
hmac_done.c | 27 @return CRYPT_OK if successful 40 if((err = hash_is_valid(hash)) != CRYPT_OK) { 61 if ((err = hash_descriptor[hash].done(&hmac->md, isha)) != CRYPT_OK) { 71 if ((err = hash_descriptor[hash].init(&hmac->md)) != CRYPT_OK) { 74 if ((err = hash_descriptor[hash].process(&hmac->md, buf, HMAC_BLOCKSIZE)) != CRYPT_OK) { 77 if ((err = hash_descriptor[hash].process(&hmac->md, isha, hashsize)) != CRYPT_OK) { 80 if ((err = hash_descriptor[hash].done(&hmac->md, buf)) != CRYPT_OK) { 90 err = CRYPT_OK;
|
/external/dropbear/libtomcrypt/src/misc/pkcs5/ |
pkcs_5_2.c | 29 @return CRYPT_OK if successful 48 if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { 78 if ((err = hmac_init(hmac, hash_idx, password, password_len)) != CRYPT_OK) { 81 if ((err = hmac_process(hmac, salt, salt_len)) != CRYPT_OK) { 84 if ((err = hmac_process(hmac, buf[1], 4)) != CRYPT_OK) { 88 if ((err = hmac_done(hmac, buf[0], &x)) != CRYPT_OK) { 95 if ((err = hmac_memory(hash_idx, password, password_len, buf[0], x, buf[0], &x)) != CRYPT_OK) { 111 err = CRYPT_OK;
|
/external/dropbear/libtomcrypt/src/pk/asn1/der/integer/ |
der_encode_integer.c | 27 @return CRYPT_OK if successful 39 if ((err = der_length_integer(num, &tmplen)) != CRYPT_OK) { 95 if ((err = mp_to_unsigned_bin(num, out)) != CRYPT_OK) { 102 if (mp_init(&tmp) != CRYPT_OK) { 110 if (mp_2expt(tmp, y) != CRYPT_OK || mp_add(tmp, num, tmp) != CRYPT_OK) { 114 if ((err = mp_to_unsigned_bin(tmp, out)) != CRYPT_OK) { 123 return CRYPT_OK;
|
/external/dropbear/libtomcrypt/src/pk/asn1/der/sequence/ |
der_decode_sequence_flexi.c | 61 @return CRYPT_OK on success. 112 if ((err = der_decode_boolean(in, *inlen, l->data)) != CRYPT_OK) { 116 if ((err = der_length_boolean(&len)) != CRYPT_OK) { 125 if ((err = mp_init(&l->data)) != CRYPT_OK) { 130 if ((err = der_decode_integer(in, *inlen, l->data)) != CRYPT_OK) { 135 if ((err = der_length_integer(l->data, &len)) != CRYPT_OK) { 150 if ((err = der_decode_bit_string(in, *inlen, l->data, &l->size)) != CRYPT_OK) { 154 if ((err = der_length_bit_string(l->size, &len)) != CRYPT_OK) { 170 if ((err = der_decode_octet_string(in, *inlen, l->data, &l->size)) != CRYPT_OK) { 174 if ((err = der_length_octet_string(l->size, &len)) != CRYPT_OK) { [all...] |
/external/dropbear/libtomcrypt/src/pk/ecc/ |
ecc_make_key.c | 32 @return CRYPT_OK if successful, upon error all allocated memory will be freed 63 if ((err = prng_is_valid(wprng)) != CRYPT_OK) { 85 if ((err = mp_init_multi(&key->pubkey.x, &key->pubkey.y, &key->pubkey.z, &key->k, &prime, NULL)) != CRYPT_OK) { 95 if ((err = mp_read_radix(prime, (char *)key->dp->prime, 16)) != CRYPT_OK) { goto errkey; } 96 if ((err = mp_read_radix(base->x, (char *)key->dp->Gx, 16)) != CRYPT_OK) { goto errkey; } 97 if ((err = mp_read_radix(base->y, (char *)key->dp->Gy, 16)) != CRYPT_OK) { goto errkey; } 98 if ((err = mp_set(base->z, 1)) != CRYPT_OK) { goto errkey; } 99 if ((err = mp_read_unsigned_bin(key->k, (unsigned char *)buf, keysize)) != CRYPT_OK) { goto errkey; } 102 if ((err = ltc_mp.ecc_ptmul(key->k, base, &key->pubkey, prime, 1)) != CRYPT_OK) { goto errkey; } 106 err = CRYPT_OK; [all...] |
ecc_shared_secret.c | 32 @return CRYPT_OK if successful 66 if ((err = mp_init(&prime)) != CRYPT_OK) { 71 if ((err = mp_read_radix(prime, (char *)private_key->dp->prime, 16)) != CRYPT_OK) { goto done; } 72 if ((err = ltc_mp.ecc_ptmul(private_key->k, &public_key->pubkey, result, prime, 1)) != CRYPT_OK) { goto done; } 81 if ((err = mp_to_unsigned_bin(result->x, out + (x - mp_unsigned_bin_size(result->x)))) != CRYPT_OK) { goto done; } 83 err = CRYPT_OK;
|
ltc_ecc_mul2add.c | 35 @return CRYPT_OK on success 97 if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) { 100 if ((err = mp_init(&mu)) != CRYPT_OK) { 103 if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) { 108 if ((err = mp_mulmod(A->x, mu, modulus, precomp[1]->x)) != CRYPT_OK) { goto ERR_MU; } 109 if ((err = mp_mulmod(A->y, mu, modulus, precomp[1]->y)) != CRYPT_OK) { goto ERR_MU; } 110 if ((err = mp_mulmod(A->z, mu, modulus, precomp[1]->z)) != CRYPT_OK) { goto ERR_MU; } 112 if ((err = mp_mulmod(B->x, mu, modulus, precomp[1<<2]->x)) != CRYPT_OK) { goto ERR_MU; } 113 if ((err = mp_mulmod(B->y, mu, modulus, precomp[1<<2]->y)) != CRYPT_OK) { goto ERR_MU; } 114 if ((err = mp_mulmod(B->z, mu, modulus, precomp[1<<2]->z)) != CRYPT_OK) { goto ERR_MU; [all...] |
/external/dropbear/libtomcrypt/src/encauth/gcm/ |
gcm_memory.c | 35 @return CRYPT_OK on success 50 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { 87 if ((err = gcm_init(gcm, cipher, key, keylen)) != CRYPT_OK) { 90 if ((err = gcm_add_iv(gcm, IV, IVlen)) != CRYPT_OK) { 93 if ((err = gcm_add_aad(gcm, adata, adatalen)) != CRYPT_OK) { 96 if ((err = gcm_process(gcm, pt, ptlen, ct, direction)) != CRYPT_OK) {
|
/external/dropbear/libtomcrypt/src/prngs/ |
fortuna.c | 76 if ((err = sha256_process(&md, prng->fortuna.K, 32)) != CRYPT_OK) { 84 if ((err = sha256_done(&prng->fortuna.pool[x], tmp)) != CRYPT_OK) { 89 if ((err = sha256_process(&md, tmp, 32)) != CRYPT_OK) { 94 if ((err = sha256_init(&prng->fortuna.pool[x])) != CRYPT_OK) { 104 if ((err = sha256_done(&md, prng->fortuna.K)) != CRYPT_OK) { 107 if ((err = rijndael_setup(prng->fortuna.K, 32, 0, &prng->fortuna.skey)) != CRYPT_OK) { 122 return CRYPT_OK; 128 @return CRYPT_OK if successful 139 if ((err = sha256_init(&prng->fortuna.pool[x])) != CRYPT_OK) { 151 if ((err = rijndael_setup(prng->fortuna.K, 32, 0, &prng->fortuna.skey)) != CRYPT_OK) { [all...] |
rc4.c | 36 @return CRYPT_OK if successful 45 return CRYPT_OK; 53 @return CRYPT_OK if successful 64 return CRYPT_OK; 75 return CRYPT_OK; 82 @return CRYPT_OK if successful 115 return CRYPT_OK; 156 @return CRYPT_OK if successful 161 return CRYPT_OK; 169 @return CRYPT_OK if successfu [all...] |
/external/dropbear/libtomcrypt/src/hashes/helper/ |
hash_filehandle.c | 24 @result CRYPT_OK if successful 40 if ((err = hash_is_valid(hash)) != CRYPT_OK) { 48 if ((err = hash_descriptor[hash].init(&md)) != CRYPT_OK) { 55 if ((err = hash_descriptor[hash].process(&md, buf, x)) != CRYPT_OK) {
|
hash_memory.c | 25 @return CRYPT_OK if successful 36 if ((err = hash_is_valid(hash)) != CRYPT_OK) { 50 if ((err = hash_descriptor[hash].init(md)) != CRYPT_OK) { 53 if ((err = hash_descriptor[hash].process(md, in, inlen)) != CRYPT_OK) {
|
/external/dropbear/libtomcrypt/src/mac/f9/ |
f9_memory.c | 28 Return CRYPT_OK on success. 39 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { 53 if ((err = f9_init(f9, cipher, key, keylen)) != CRYPT_OK) { 57 if ((err = f9_process(f9, in, inlen)) != CRYPT_OK) {
|
/external/dropbear/libtomcrypt/src/mac/xcbc/ |
xcbc_memory.c | 28 Return CRYPT_OK on success. 39 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { 53 if ((err = xcbc_init(xcbc, cipher, key, keylen)) != CRYPT_OK) { 57 if ((err = xcbc_process(xcbc, in, inlen)) != CRYPT_OK) {
|
/external/dropbear/libtomcrypt/src/modes/cfb/ |
cfb_decrypt.c | 26 @return CRYPT_OK if successful 36 if ((err = cipher_is_valid(cfb->cipher)) != CRYPT_OK) { 48 if ((err = cipher_descriptor[cfb->cipher].ecb_encrypt(cfb->pad, cfb->IV, &cfb->key)) != CRYPT_OK) { 59 return CRYPT_OK;
|
cfb_encrypt.c | 26 @return CRYPT_OK if successful 36 if ((err = cipher_is_valid(cfb->cipher)) != CRYPT_OK) { 48 if ((err = cipher_descriptor[cfb->cipher].ecb_encrypt(cfb->pad, cfb->IV, &cfb->key)) != CRYPT_OK) { 58 return CRYPT_OK;
|
/external/dropbear/libtomcrypt/src/modes/ecb/ |
ecb_decrypt.c | 26 @return CRYPT_OK if successful 34 if ((err = cipher_is_valid(ecb->cipher)) != CRYPT_OK) { 46 if ((err = cipher_descriptor[ecb->cipher].ecb_decrypt(ct, pt, &ecb->key)) != CRYPT_OK) { 54 return CRYPT_OK;
|
ecb_encrypt.c | 26 @return CRYPT_OK if successful 34 if ((err = cipher_is_valid(ecb->cipher)) != CRYPT_OK) { 46 if ((err = cipher_descriptor[ecb->cipher].ecb_encrypt(pt, ct, &ecb->key)) != CRYPT_OK) { 54 return CRYPT_OK;
|
/external/dropbear/libtomcrypt/src/modes/ofb/ |
ofb_encrypt.c | 26 @return CRYPT_OK if successful 34 if ((err = cipher_is_valid(ofb->cipher)) != CRYPT_OK) { 46 if ((err = cipher_descriptor[ofb->cipher].ecb_encrypt(ofb->IV, ofb->IV, &ofb->key)) != CRYPT_OK) { 53 return CRYPT_OK;
|
/external/dropbear/libtomcrypt/src/pk/katja/ |
katja_encrypt_key.c | 32 @return CRYPT_OK if successful 48 if ((err = prng_is_valid(prng_idx)) != CRYPT_OK) { 51 if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) { 75 out, &x)) != CRYPT_OK) {
|
/external/dropbear/libtomcrypt/src/math/fp/ |
ltc_ecc_fp_mulmod.c | [all...] |