Home
last modified time | relevance | path

Searched refs:key (Results 1 – 25 of 51) sorted by relevance

123

/system/core/libmincrypt/
Drsa.c32 static void subM(const RSAPublicKey *key, uint32_t *a) { in subM() argument
35 for (i = 0; i < key->len; ++i) { in subM()
36 A += (uint64_t)a[i] - key->n[i]; in subM()
43 static int geM(const RSAPublicKey *key, const uint32_t *a) { in geM() argument
45 for (i = key->len; i;) { in geM()
47 if (a[i] < key->n[i]) return 0; in geM()
48 if (a[i] > key->n[i]) return 1; in geM()
54 static void montMulAdd(const RSAPublicKey *key, in montMulAdd() argument
59 uint32_t d0 = (uint32_t)A * key->n0inv; in montMulAdd()
60 uint64_t B = (uint64_t)d0 * key->n[0] + (uint32_t)A; in montMulAdd()
[all …]
/system/wlan/ti/sta_dk_4_0_4_32/common/src/core/rsn/
DkeyDeriveTkip.c108 securityKeys_t key; in keyDeriveTkip_derive() local
116 key.keyType = TKIP_KEY; in keyDeriveTkip_derive()
117 key.keyIndex = (UINT8)pEncodedKey->keyId; in keyDeriveTkip_derive()
118 key.encLen = KEY_DERIVE_TKIP_ENC_LEN; in keyDeriveTkip_derive()
124 ("KEY_DERIVE_TKIP: ERROR: wrong key length %d !!!\n", key.encLen)); in keyDeriveTkip_derive()
130 …os_memoryCopy(pKeyDerive->hOs, (void *)key.encKey, (void *)keyMaterialTkip->encKey, KEY_DERIVE_TKI… in keyDeriveTkip_derive()
133 …os_memoryCopy(pKeyDerive->hOs, (void *)key.micTxKey, (void *)keyMaterialTkip->micRxKey, KEY_DERIVE… in keyDeriveTkip_derive()
135 …os_memoryCopy(pKeyDerive->hOs, (void *)key.micRxKey, (void *)keyMaterialTkip->micTxKey, KEY_DERIVE… in keyDeriveTkip_derive()
139 …os_memoryCopy(pKeyDerive->hOs, (void *)key.micRxKey, (void *)keyMaterialTkip->micRxKey, KEY_DERIVE… in keyDeriveTkip_derive()
141 …os_memoryCopy(pKeyDerive->hOs, (void *)key.micTxKey, (void *)keyMaterialTkip->micTxKey, KEY_DERIVE… in keyDeriveTkip_derive()
[all …]
DkeyDeriveWep.c108 securityKeys_t key; in keyDeriveWep_derive() local
124 key.keyType = WEP_KEY; in keyDeriveWep_derive()
125 key.keyIndex = (UINT8)pEncodedKey->keyId; in keyDeriveWep_derive()
126 key.encLen = (UINT16)pEncodedKey->keyLen; in keyDeriveWep_derive()
127 os_memoryCopy(pKeyDerive->hOs, (void *)key.encKey, pEncodedKey->pData, pEncodedKey->keyLen); in keyDeriveWep_derive()
129 status = pKeyDerive->pMainKeys->setKey(pKeyDerive->pMainKeys, &key); in keyDeriveWep_derive()
132 os_memoryCopy(pKeyDerive->hOs, &pKeyDerive->key, pEncodedKey, sizeof(encodedKeyMaterial_t)); in keyDeriveWep_derive()
159 securityKeys_t key; in keyDeriveWep_remove() local
161 os_memoryZero(pKeyDerive->hOs, &key, sizeof(securityKeys_t)); in keyDeriveWep_remove()
162 key.keyType = WEP_KEY; in keyDeriveWep_remove()
[all …]
DkeyDeriveAes.c106 securityKeys_t key; in keyDeriveAes_derive() local
127 os_memoryZero(pKeyDerive->hOs, &key, sizeof(securityKeys_t)); in keyDeriveAes_derive()
129 key.keyType = AES_KEY; in keyDeriveAes_derive()
130 key.keyIndex = (UINT8)pEncodedKey->keyId; in keyDeriveAes_derive()
131 key.encLen = DERIVE_AES_KEY_LEN; in keyDeriveAes_derive()
132 os_memoryCopy(pKeyDerive->hOs, (void *)key.encKey, pEncodedKey->pData + MAC_ADDR_LEN+KEY_RSC_LEN, in keyDeriveAes_derive()
136 …os_memoryCopy(pKeyDerive->hOs, (void *)key.macAddress.addr, (void *)keyMaterialAes->macAddress, MA… in keyDeriveAes_derive()
139 os_memoryCopy(pKeyDerive->hOs, (void *)key.keyRsc, (void *)keyMaterialAes->keyRSC, KEY_RSC_LEN); in keyDeriveAes_derive()
141 status = pKeyDerive->pMainKeys->setKey(pKeyDerive->pMainKeys, &key); in keyDeriveAes_derive()
144 os_memoryCopy(pKeyDerive->hOs, &pKeyDerive->key, pEncodedKey, sizeof(encodedKeyMaterial_t)); in keyDeriveAes_derive()
[all …]
/system/wlan/ti/wilink_6_1/stad/src/Connection_Managment/
DkeyDeriveTkip.c107 TSecurityKeys key; in keyDeriveTkip_derive() local
115 key.keyType = KEY_TKIP; in keyDeriveTkip_derive()
116 key.keyIndex = (TI_UINT8)pEncodedKey->keyId; in keyDeriveTkip_derive()
117 key.encLen = KEY_DERIVE_TKIP_ENC_LEN; in keyDeriveTkip_derive()
129 …os_memoryCopy(pKeyDerive->hOs, (void *)key.encKey, (void *)keyMaterialTkip->encKey, KEY_DERIVE_TKI… in keyDeriveTkip_derive()
132 …os_memoryCopy(pKeyDerive->hOs, (void *)key.micTxKey, (void *)keyMaterialTkip->micRxKey, KEY_DERIVE… in keyDeriveTkip_derive()
134 …os_memoryCopy(pKeyDerive->hOs, (void *)key.micRxKey, (void *)keyMaterialTkip->micTxKey, KEY_DERIVE… in keyDeriveTkip_derive()
138 …os_memoryCopy(pKeyDerive->hOs, (void *)key.micRxKey, (void *)keyMaterialTkip->micRxKey, KEY_DERIVE… in keyDeriveTkip_derive()
140 …os_memoryCopy(pKeyDerive->hOs, (void *)key.micTxKey, (void *)keyMaterialTkip->micTxKey, KEY_DERIVE… in keyDeriveTkip_derive()
144 MAC_COPY (key.macAddress, keyMaterialTkip->macAddress); in keyDeriveTkip_derive()
[all …]
DkeyDeriveWep.c107 TSecurityKeys key; in keyDeriveWep_derive() local
122 key.keyType = KEY_WEP; in keyDeriveWep_derive()
123 key.keyIndex = (TI_UINT8)pEncodedKey->keyId; in keyDeriveWep_derive()
124 key.encLen = (TI_UINT16)pEncodedKey->keyLen; in keyDeriveWep_derive()
125 os_memoryCopy(pKeyDerive->hOs, (void *)key.encKey, pEncodedKey->pData, pEncodedKey->keyLen); in keyDeriveWep_derive()
127 status = pKeyDerive->pMainKeys->setKey(pKeyDerive->pMainKeys, &key); in keyDeriveWep_derive()
130 os_memoryCopy(pKeyDerive->hOs, &pKeyDerive->key, pEncodedKey, sizeof(encodedKeyMaterial_t)); in keyDeriveWep_derive()
157 TSecurityKeys key; in keyDeriveWep_remove() local
159 os_memoryZero(pKeyDerive->hOs, &key, sizeof(TSecurityKeys)); in keyDeriveWep_remove()
160 key.keyType = KEY_WEP; in keyDeriveWep_remove()
[all …]
DkeyDeriveCkip.c111 TSecurityKeys key; in keyDeriveCkip_derive() local
115 key.keyType = KEY_XCC; in keyDeriveCkip_derive()
116 key.keyIndex = (TI_UINT8)pEncodedKey->keyId; in keyDeriveCkip_derive()
148 key.encLen = KEY_DERIVE_CKIP_ENC_LEN; in keyDeriveCkip_derive()
152 key.encLen = pEncodedKey->keyLen; in keyDeriveCkip_derive()
156 os_memoryCopy(pKeyDerive->hOs, (void*)key.encKey, ckipKey, key.encLen); in keyDeriveCkip_derive()
158 os_memoryCopy(pKeyDerive->hOs, (void*)key.micRxKey, ckipKey, KEY_DERIVE_CKIP_ENC_LEN); in keyDeriveCkip_derive()
159 os_memoryCopy(pKeyDerive->hOs, (void*)key.micTxKey, ckipKey, KEY_DERIVE_CKIP_ENC_LEN); in keyDeriveCkip_derive()
161 status = pKeyDerive->pMainKeys->setKey(pKeyDerive->pMainKeys, &key); in keyDeriveCkip_derive()
164 os_memoryCopy(pKeyDerive->hOs, &pKeyDerive->key, pEncodedKey, sizeof(encodedKeyMaterial_t)); in keyDeriveCkip_derive()
[all …]
DkeyDeriveAes.c105 TSecurityKeys key; in keyDeriveAes_derive() local
126 os_memoryZero(pKeyDerive->hOs, &key, sizeof(TSecurityKeys)); in keyDeriveAes_derive()
128 key.keyType = KEY_AES; in keyDeriveAes_derive()
129 key.keyIndex = (TI_UINT8)pEncodedKey->keyId; in keyDeriveAes_derive()
130 key.encLen = DERIVE_AES_KEY_LEN; in keyDeriveAes_derive()
131 os_memoryCopy(pKeyDerive->hOs, (void *)key.encKey, pEncodedKey->pData + MAC_ADDR_LEN+KEY_RSC_LEN, in keyDeriveAes_derive()
135 MAC_COPY (key.macAddress, keyMaterialAes->macAddress); in keyDeriveAes_derive()
137 os_memoryCopy(pKeyDerive->hOs, (void *)key.keyRsc, (void *)keyMaterialAes->keyRSC, KEY_RSC_LEN); in keyDeriveAes_derive()
139 status = pKeyDerive->pMainKeys->setKey(pKeyDerive->pMainKeys, &key); in keyDeriveAes_derive()
142 os_memoryCopy(pKeyDerive->hOs, &pKeyDerive->key, pEncodedKey, sizeof(encodedKeyMaterial_t)); in keyDeriveAes_derive()
[all …]
/system/core/libcutils/
Dhashmap.c28 void* key; member
37 int (*hash)(void* key);
44 int (*hash)(void* key), bool (*equals)(void* keyA, void* keyB)) { in hashmapCreate() argument
80 static inline int hashKey(Hashmap* map, void* key) { in hashKey() argument
81 int h = map->hash(key); in hashKey()
155 int hashmapHash(void* key, size_t keySize) { in hashmapHash() argument
157 char* data = (char*) key; in hashmapHash()
166 static Entry* createEntry(void* key, int hash, void* value) { in createEntry() argument
171 entry->key = key; in createEntry()
189 void* hashmapPut(Hashmap* map, void* key, void* value) { in hashmapPut() argument
[all …]
Dproperties.c59 int property_set(const char *key, const char *value) in property_set() argument
64 if(key == 0) return -1; in property_set()
67 if(strlen(key) >= PROP_NAME_MAX) return -1; in property_set()
71 strcpy((char*) msg.name, key); in property_set()
77 int property_get(const char *key, char *value, const char *default_value) in property_get() argument
81 len = __system_property_get(key, value); in property_get()
93 int property_list(void (*propfn)(const char *key, const char *value, void *cookie), in property_list() argument
175 int property_get(const char *key, char *value, const char *default_value) in property_get() argument
193 if (strlen(key) >= PROPERTY_KEY_MAX) return -1; in property_get()
198 strcpy(sendBuf+1, key); in property_get()
[all …]
/system/core/include/cutils/
Dhashmap.h42 int (*hash)(void* key), bool (*equals)(void* keyA, void* keyB));
53 int hashmapHash(void* key, size_t keySize);
62 void* hashmapPut(Hashmap* map, void* key, void* value);
68 void* hashmapGet(Hashmap* map, void* key);
73 bool hashmapContainsKey(Hashmap* map, void* key);
82 void* hashmapMemoize(Hashmap* map, void* key,
83 void* (*initialValue)(void* key, void* context), void* context);
89 void* hashmapRemove(Hashmap* map, void* key);
101 bool (*callback)(void* key, void* value, void* context),
125 int hashmapIntHash(void* key);
Dsockets.h48 char key[64] = ANDROID_SOCKET_ENV_PREFIX; in android_get_control_socket() local
54 strlcpy(key + sizeof(ANDROID_SOCKET_ENV_PREFIX) - 1, in android_get_control_socket()
56 sizeof(key) - sizeof(ANDROID_SOCKET_ENV_PREFIX)); in android_get_control_socket()
58 strncpy(key + sizeof(ANDROID_SOCKET_ENV_PREFIX) - 1, in android_get_control_socket()
60 sizeof(key) - sizeof(ANDROID_SOCKET_ENV_PREFIX)); in android_get_control_socket()
61 key[sizeof(key)-1] = '\0'; in android_get_control_socket()
64 val = getenv(key); in android_get_control_socket()
Dproperties.h41 int property_get(const char *key, char *value, const char *default_value);
45 int property_set(const char *key, const char *value);
47 int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie); …
/system/core/libpixelflinger/tinyutils/
DKeyedVector.h55 const VALUE& valueFor(const KEY& key) const;
58 ssize_t indexOfKey(const KEY& key) const;
64 VALUE& editValueFor(const KEY& key);
71 ssize_t add(const KEY& key, const VALUE& item);
72 ssize_t replaceValueFor(const KEY& key, const VALUE& item);
79 ssize_t removeItem(const KEY& key);
97 const VALUE& valueFor(const KEY& key) const;
111 ssize_t KeyedVector<KEY,VALUE>::indexOfKey(const KEY& key) const { in indexOfKey() argument
112 return mVector.indexOf( key_value_pair_t<KEY,VALUE>(key) ); in indexOfKey()
116 const VALUE& KeyedVector<KEY,VALUE>::valueFor(const KEY& key) const { in valueFor() argument
[all …]
DTypeHelpers.h211 KEY key;
214 key_value_pair_t(const key_value_pair_t& o) : key(o.key), value(o.value) { }
215 key_value_pair_t(const KEY& k, const VALUE& v) : key(k), value(v) { }
216 key_value_pair_t(const KEY& k) : key(k) { }
218 return strictly_order_type(key, o.key);
/system/core/toolbox/
Dreadtty.c11 char key; member
26 char next_char(char key, char current) in next_char() argument
31 if(key == map[i].key) { in next_char()
38 return key; in next_char()
41 char prev_char(char key, char current) in prev_char() argument
46 if(key == map[i].key) { in prev_char()
53 return key; in prev_char()
Dgetprop.c7 static void proplist(const char *key, const char *name, in proplist() argument
10 printf("[%s]: [%s]\n", key, name); in proplist()
/system/core/libmincrypt/tools/
DDumpPublicKey.java39 static void check(RSAPublicKey key) throws Exception { in check() argument
40 BigInteger pubexp = key.getPublicExponent(); in check()
41 BigInteger modulus = key.getModulus(); in check()
56 static String print(RSAPublicKey key) throws Exception { in print() argument
57 check(key); in print()
59 BigInteger N = key.getModulus(); in print()
119 RSAPublicKey key = (RSAPublicKey) (cert.getPublicKey()); in main() local
120 check(key); in main()
121 System.out.print(print(key)); in main()
/system/core/libpixelflinger/codeflinger/
DCodeCache.h37 virtual int compare_type(const AssemblyKeyBase& key) const = 0;
45 virtual int compare_type(const AssemblyKeyBase& key) const { in compare_type() argument
46 const T& rhs = static_cast<const AssemblyKey&>(key).mKey; in compare_type()
88 sp<Assembly> lookup(const AssemblyKeyBase& key) const;
90 int cache( const AssemblyKeyBase& key,
130 return lhs.key.mKey->compare_type(*(rhs.key.mKey)); in compare_type()
/system/media/opensles/libopensles/
DIMetadataExtraction.c64 SLMetadataInfo key; in IMetadataExtraction_GetKey() local
65 key.size = 1; in IMetadataExtraction_GetKey()
66 key.encoding = SL_CHARACTERENCODING_UTF8; in IMetadataExtraction_GetKey()
67 memcpy((char *) key.langCountry, "en", 3); in IMetadataExtraction_GetKey()
68 key.data[0] = 0; in IMetadataExtraction_GetKey()
69 *pKey = key; in IMetadataExtraction_GetKey()
DIID_to_MPH.c181 unsigned key = asso_values[((unsigned char *)iid)[3]] + in IID_to_MPH() local
183 if (key <= MAX_HASH_VALUE) { in IID_to_MPH()
184 int MPH = hash_to_MPH[key]; in IID_to_MPH()
/system/core/rootdir/etc/
Dinit.testmenu86 echo Got key -$c-
101 echo Got key -$c-
129 echo Got key -$c-
159 echo Got key -$c-
194 echo Got key -$c-
219 echo Got key -$c-
281 echo Got key -$c-
/system/wlan/ti/wilink_6_1/CUDK/configurationutility/src/
Dcu_common.c309 OS_802_11_KEY key; in CuCommon_AddKey() local
311 os_memset(&key, 0, sizeof(OS_802_11_KEY)); in CuCommon_AddKey()
313 key.Length = pKey->Length; in CuCommon_AddKey()
314 key.KeyIndex = (pKey->KeyIndex & 0x80000000) | (pKey->KeyIndex & 0x3FFFFFFF); in CuCommon_AddKey()
315 key.KeyLength = pKey->KeyLength; in CuCommon_AddKey()
316 os_memcpy(key.KeyMaterial, pKey->KeyMaterial, pKey->KeyLength); in CuCommon_AddKey()
318 res = IPC_STA_Private_Send(pCuCommon->hIpcSta, RSN_ADD_KEY_PARAM, &key, sizeof(OS_802_11_KEY), in CuCommon_AddKey()
331 OS_802_11_KEY key; in CuCommon_RemoveKey() local
333 os_memset(&key, 0, sizeof(OS_802_11_KEY)); in CuCommon_RemoveKey()
334 key.KeyIndex = KeyIndex; in CuCommon_RemoveKey()
[all …]
/system/media/opensles/tools/hashgen/
Dpart8.c1 if (key <= MAX_HASH_VALUE) {
2 int MPH = hash_to_MPH[key];
/system/core/init/
Dproperty_service.c346 static int property_list(void (*propfn)(const char *key, const char *value, void *cookie), in property_list() argument
426 char *key, *value, *eol, *sol, *tmp; in load_properties() local
430 key = sol; in load_properties()
434 value = strchr(key, '='); in load_properties()
438 while(isspace(*key)) key++; in load_properties()
439 if(*key == '#') continue; in load_properties()
441 while((tmp > key) && isspace(*tmp)) *tmp-- = 0; in load_properties()
447 property_set(key, value); in load_properties()

123