/external/chromium_org/net/quic/crypto/ |
D | strike_register_test.cc | 23 void SetNonce(uint8 nonce[32], unsigned time, const uint8 orbit[8]) { in SetNonce() 24 nonce[0] = time >> 24; in SetNonce() 25 nonce[1] = time >> 16; in SetNonce() 26 nonce[2] = time >> 8; in SetNonce() 27 nonce[3] = time; in SetNonce() 28 memcpy(nonce + 4, orbit, 8); in SetNonce() 29 memset(nonce + 12, 0, 20); in SetNonce() 37 uint8 nonce[32]; in TEST() local 38 SetNonce(nonce, 999, kOrbit); in TEST() 39 ASSERT_FALSE(set.Insert(nonce, 1000)); in TEST() [all …]
|
D | crypto_utils.cc | 26 string* nonce) { in GenerateNonce() argument 28 nonce->reserve(kNonceSize); in GenerateNonce() 29 nonce->resize(kNonceSize); in GenerateNonce() 33 (*nonce)[0] = static_cast<char>(gmt_unix_time >> 24); in GenerateNonce() 34 (*nonce)[1] = static_cast<char>(gmt_unix_time >> 16); in GenerateNonce() 35 (*nonce)[2] = static_cast<char>(gmt_unix_time >> 8); in GenerateNonce() 36 (*nonce)[3] = static_cast<char>(gmt_unix_time); in GenerateNonce() 40 memcpy(&(*nonce)[bytes_written], orbit.data(), orbit.size()); in GenerateNonce() 43 random_generator->RandBytes(&(*nonce)[bytes_written], in GenerateNonce() 92 StringPiece nonce = client_nonce; in DeriveKeys() local [all …]
|
D | aes_128_gcm_12_decrypter_openssl.cc | 57 bool Aes128Gcm12Decrypter::Decrypt(StringPiece nonce, in Decrypt() argument 63 nonce.size() != kNoncePrefixSize + sizeof(QuicPacketSequenceNumber)) { in Decrypt() 71 reinterpret_cast<const uint8*>(nonce.data())) == 0) { in Decrypt() 125 uint8 nonce[kNoncePrefixSize + sizeof(sequence_number)]; in DecryptPacket() local 126 COMPILE_ASSERT(sizeof(nonce) == kAESNonceSize, bad_sequence_number_size); in DecryptPacket() 127 memcpy(nonce, nonce_prefix_, kNoncePrefixSize); in DecryptPacket() 128 memcpy(nonce + kNoncePrefixSize, &sequence_number, sizeof(sequence_number)); in DecryptPacket() 129 if (!Decrypt(StringPiece(reinterpret_cast<char*>(nonce), sizeof(nonce)), in DecryptPacket()
|
D | aes_128_gcm_12_encrypter_openssl.cc | 75 bool Aes128Gcm12Encrypter::Encrypt(StringPiece nonce, in Encrypt() argument 79 if (nonce.size() != kNoncePrefixSize + sizeof(QuicPacketSequenceNumber)) { in Encrypt() 86 reinterpret_cast<const unsigned char*>(nonce.data())) == 0) { in Encrypt() 140 uint8 nonce[kNoncePrefixSize + sizeof(sequence_number)]; in EncryptPacket() local 141 COMPILE_ASSERT(sizeof(nonce) == kAESNonceSize, bad_sequence_number_size); in EncryptPacket() 142 memcpy(nonce, nonce_prefix_, kNoncePrefixSize); in EncryptPacket() 143 memcpy(nonce + kNoncePrefixSize, &sequence_number, sizeof(sequence_number)); in EncryptPacket() 144 if (!Encrypt(StringPiece(reinterpret_cast<char*>(nonce), sizeof(nonce)), in EncryptPacket()
|
D | aes_128_gcm_12_encrypter_nss.cc | 278 bool Aes128Gcm12Encrypter::Encrypt(StringPiece nonce, in Encrypt() argument 282 if (nonce.size() != kNoncePrefixSize + sizeof(QuicPacketSequenceNumber)) { in Encrypt() 309 reinterpret_cast<CK_BYTE*>(const_cast<char*>(nonce.data())); in Encrypt() 310 gcm_params.ulIvLen = nonce.size(); in Encrypt() 347 uint8 nonce[kNoncePrefixSize + sizeof(sequence_number)]; in EncryptPacket() local 348 COMPILE_ASSERT(sizeof(nonce) == kAESNonceSize, bad_sequence_number_size); in EncryptPacket() 349 memcpy(nonce, nonce_prefix_, kNoncePrefixSize); in EncryptPacket() 350 memcpy(nonce + kNoncePrefixSize, &sequence_number, sizeof(sequence_number)); in EncryptPacket() 351 if (!Encrypt(StringPiece(reinterpret_cast<char*>(nonce), sizeof(nonce)), in EncryptPacket()
|
D | aes_128_gcm_12_decrypter_nss.cc | 286 bool Aes128Gcm12Decrypter::Decrypt(StringPiece nonce, in Decrypt() argument 292 nonce.size() != kNoncePrefixSize + sizeof(QuicPacketSequenceNumber)) { in Decrypt() 323 reinterpret_cast<CK_BYTE*>(const_cast<char*>(nonce.data())); in Decrypt() 324 gcm_params.ulIvLen = nonce.size(); in Decrypt() 361 uint8 nonce[kNoncePrefixSize + sizeof(sequence_number)]; in DecryptPacket() local 362 COMPILE_ASSERT(sizeof(nonce) == kAESNonceSize, bad_sequence_number_size); in DecryptPacket() 363 memcpy(nonce, nonce_prefix_, kNoncePrefixSize); in DecryptPacket() 364 memcpy(nonce + kNoncePrefixSize, &sequence_number, sizeof(sequence_number)); in DecryptPacket() 365 if (!Decrypt(StringPiece(reinterpret_cast<char*>(nonce), sizeof(nonce)), in DecryptPacket()
|
D | local_strike_register_client.cc | 31 StringPiece nonce, QuicWallTime now, ResultCallback* cb) { in VerifyNonceIsValidAndUnique() argument 33 if (nonce.length() != kNonceSize) { in VerifyNonceIsValidAndUnique() 38 reinterpret_cast<const uint8*>(nonce.data()), in VerifyNonceIsValidAndUnique()
|
/external/openssl/crypto/modes/ |
D | ccm128.c | 66 memset(ctx->nonce.c,0,sizeof(ctx->nonce.c)); in CRYPTO_ccm128_init() 67 ctx->nonce.c[0] = ((u8)(L-1)&7) | (u8)(((M-2)/2)&7)<<3; in CRYPTO_ccm128_init() 77 const unsigned char *nonce,size_t nlen,size_t mlen) in CRYPTO_ccm128_setiv() argument 79 unsigned int L = ctx->nonce.c[0]&7; /* the L parameter */ in CRYPTO_ccm128_setiv() 84 ctx->nonce.c[8] = (u8)(mlen>>(56%(sizeof(mlen)*8))); in CRYPTO_ccm128_setiv() 85 ctx->nonce.c[9] = (u8)(mlen>>(48%(sizeof(mlen)*8))); in CRYPTO_ccm128_setiv() 86 ctx->nonce.c[10] = (u8)(mlen>>(40%(sizeof(mlen)*8))); in CRYPTO_ccm128_setiv() 87 ctx->nonce.c[11] = (u8)(mlen>>(32%(sizeof(mlen)*8))); in CRYPTO_ccm128_setiv() 90 *(u32*)(&ctx->nonce.c[8]) = 0; in CRYPTO_ccm128_setiv() 92 ctx->nonce.c[12] = (u8)(mlen>>24); in CRYPTO_ccm128_setiv() [all …]
|
/external/chromium_org/third_party/openssl/openssl/crypto/modes/ |
D | ccm128.c | 66 memset(ctx->nonce.c,0,sizeof(ctx->nonce.c)); in CRYPTO_ccm128_init() 67 ctx->nonce.c[0] = ((u8)(L-1)&7) | (u8)(((M-2)/2)&7)<<3; in CRYPTO_ccm128_init() 77 const unsigned char *nonce,size_t nlen,size_t mlen) in CRYPTO_ccm128_setiv() argument 79 unsigned int L = ctx->nonce.c[0]&7; /* the L parameter */ in CRYPTO_ccm128_setiv() 84 ctx->nonce.c[8] = (u8)(mlen>>(56%(sizeof(mlen)*8))); in CRYPTO_ccm128_setiv() 85 ctx->nonce.c[9] = (u8)(mlen>>(48%(sizeof(mlen)*8))); in CRYPTO_ccm128_setiv() 86 ctx->nonce.c[10] = (u8)(mlen>>(40%(sizeof(mlen)*8))); in CRYPTO_ccm128_setiv() 87 ctx->nonce.c[11] = (u8)(mlen>>(32%(sizeof(mlen)*8))); in CRYPTO_ccm128_setiv() 90 *(u32*)(&ctx->nonce.c[8]) = 0; in CRYPTO_ccm128_setiv() 92 ctx->nonce.c[12] = (u8)(mlen>>24); in CRYPTO_ccm128_setiv() [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/params/ |
D | AEADParameters.java | 9 private byte[] nonce; field in AEADParameters 20 public AEADParameters(KeyParameter key, int macSize, byte[] nonce) in AEADParameters() argument 22 this(key, macSize, nonce, null); in AEADParameters() 33 public AEADParameters(KeyParameter key, int macSize, byte[] nonce, byte[] associatedText) in AEADParameters() argument 36 this.nonce = nonce; in AEADParameters() 58 return nonce; in getNonce()
|
/external/chromium_org/third_party/sqlite/src/tool/ |
D | restore_jrnl.tcl | 80 set nonce [hexio_get_int [hexio_read $jrnl_name [expr $jrnl_pg_offset+4+$db_pgsz] 4]] 83 set nonce [expr $nonce-$byte] 85 return $nonce 94 global nonce 96 set chksum $nonce 116 set nonce [calc_nonce $jrnl_pgno] 121 $nonce $chksum] 174 set nonce [calc_nonce 0] 179 if {$tnonce != $nonce} { 180 puts "WARNING: different nonces: 0=$nonce $i=$tnonce" [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/modes/ |
D | CCMBlockCipher.java | 27 private byte[] nonce; field in CCMBlockCipher 72 nonce = param.getNonce(); in init() 81 nonce = param.getIV(); in init() 91 if (nonce == null || nonce.length < 7 || nonce.length > 13) in init() 191 int n = nonce.length; in processPacket() 204 System.arraycopy(nonce, 0, iv, 1, nonce.length); in processPacket() 299 b0[0] |= ((15 - nonce.length) - 1) & 0x7; in calculateMac() 301 System.arraycopy(nonce, 0, b0, 1, nonce.length); in calculateMac()
|
D | GCMBlockCipher.java | 34 private byte[] nonce; field in GCMBlockCipher 96 nonce = param.getNonce(); in init() 112 nonce = param.getIV(); in init() 125 if (nonce == null || nonce.length < 1) in init() 150 if (nonce.length == 12) in init() 152 System.arraycopy(nonce, 0, J0, 0, nonce.length); in init() 157 gHASH(J0, nonce, nonce.length); in init() 159 Pack.longToBigEndian((long)nonce.length * 8, X, 8); in init()
|
/external/wpa_supplicant_8/src/crypto/ |
D | aes-ccm.c | 28 static void aes_ccm_auth_start(void *aes, size_t M, size_t L, const u8 *nonce, in aes_ccm_auth_start() argument 40 os_memcpy(&b[1], nonce, 15 - L); in aes_ccm_auth_start() 84 static void aes_ccm_encr_start(size_t L, const u8 *nonce, u8 *a) in aes_ccm_encr_start() argument 88 os_memcpy(&a[1], nonce, 15 - L); in aes_ccm_encr_start() 148 int aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce, in aes_ccm_ae() argument 163 aes_ccm_auth_start(aes, M, L, nonce, aad, aad_len, plain_len, x); in aes_ccm_ae() 167 aes_ccm_encr_start(L, nonce, a); in aes_ccm_ae() 178 int aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce, in aes_ccm_ad() argument 195 aes_ccm_encr_start(L, nonce, a); in aes_ccm_ad() 201 aes_ccm_auth_start(aes, M, L, nonce, aad, aad_len, crypt_len, x); in aes_ccm_ad()
|
D | aes_wrap.h | 29 int __must_check aes_128_ctr_encrypt(const u8 *key, const u8 *nonce, 32 const u8 *nonce, size_t nonce_len, 36 const u8 *nonce, size_t nonce_len, 56 int __must_check aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce, 59 int __must_check aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce,
|
/external/srtp/crypto/test/ |
D | stat_driver.c | 46 v128_t nonce; in main() local 74 err_check(cipher_set_iv(c, &nonce)); in main() 84 v128_set_to_zero(&nonce); in main() 88 nonce.v32[3] = i; in main() 89 err_check(cipher_set_iv(c, &nonce)); in main()
|
/external/chromium_org/net/quic/test_tools/ |
D | delayed_verify_strike_register_client.cc | 28 StringPiece nonce, in VerifyNonceIsValidAndUnique() argument 32 pending_verifications_.push_back(VerifyArgs(nonce.as_string(), now, cb)); in VerifyNonceIsValidAndUnique() 34 LocalStrikeRegisterClient::VerifyNonceIsValidAndUnique(nonce, now, cb); in VerifyNonceIsValidAndUnique() 48 it->nonce, it->now, it->cb); in RunPendingVerifications()
|
D | delayed_verify_strike_register_client.h | 28 virtual void VerifyNonceIsValidAndUnique(base::StringPiece nonce, 46 : nonce(in_nonce.as_string()), now(in_now), cb(in_cb) { in VerifyArgs() 49 std::string nonce; member
|
/external/chromium_org/third_party/openssl/openssl/crypto/chacha/ |
D | chacha_vec.c | 169 const unsigned char nonce[8], in CRYPTO_chacha_20_neon() 178 __attribute__ ((aligned (16))) unsigned key[8], nonce[4]; in CRYPTO_chacha_20_neon() local 187 nonce[0] = REVW_BE(((unsigned *)nonce)[0]); in CRYPTO_chacha_20_neon() 188 nonce[1] = REVW_BE(((unsigned *)nonce)[1]); in CRYPTO_chacha_20_neon() 189 nonce[2] = REVW_BE(((unsigned *)nonce)[2]); in CRYPTO_chacha_20_neon() 190 nonce[3] = REVW_BE(((unsigned *)nonce)[3]); in CRYPTO_chacha_20_neon() 192 np = (unsigned *)nonce; in CRYPTO_chacha_20_neon() 195 np = (unsigned*) nonce; in CRYPTO_chacha_20_neon() 207 ((uint32_t*)nonce)[0], in CRYPTO_chacha_20_neon() 208 ((uint32_t*)nonce)[1] in CRYPTO_chacha_20_neon()
|
D | chachatest.c | 150 unsigned char *nonce = misalign(nonce_bytes); in main() local 166 hex_decode(nonce, test->noncehex); in main() 177 CRYPTO_chacha_20(out, zeros, len, key, nonce, 0); in main() 195 CRYPTO_chacha_20(out, zeros, len - 64, key, nonce, 1); in main()
|
D | chacha_enc.c | 96 const unsigned char nonce[8], 130 const unsigned char nonce[8], in CRYPTO_chacha_20() 142 CRYPTO_chacha_20_neon(out, in, in_len, key, nonce, counter); in CRYPTO_chacha_20() 164 input[14] = U8TO32_LITTLE(nonce + 0); in CRYPTO_chacha_20() 165 input[15] = U8TO32_LITTLE(nonce + 4); in CRYPTO_chacha_20()
|
/external/apache-http/src/org/apache/http/impl/auth/ |
D | DigestScheme.java | 264 String nonce = getParameter("nonce"); in createDigest() local 273 if (nonce == null) { in createDigest() 315 … StringBuilder tmp3 = new StringBuilder(tmp2.length() + nonce.length() + cnonce.length() + 2); in createDigest() 318 tmp3.append(nonce); in createDigest() 340 … StringBuilder tmp2 = new StringBuilder(md5a1.length() + nonce.length() + md5a2.length()); in createDigest() 343 tmp2.append(nonce); in createDigest() 351 StringBuilder tmp2 = new StringBuilder(md5a1.length() + nonce.length() in createDigest() 355 tmp2.append(nonce); in createDigest() 395 String nonce = getParameter("nonce"); in createDigestHeader() local 405 params.add(new BasicNameValuePair("nonce", nonce)); in createDigestHeader()
|
/external/chromium_org/third_party/openssl/openssl/crypto/evp/ |
D | e_chacha20poly1305.c | 131 const unsigned char *nonce, size_t nonce_len, in aead_chacha20_poly1305_seal() argument 166 CRYPTO_chacha_20(poly1305_key, poly1305_key, sizeof(poly1305_key), c20_ctx->key, nonce, 0); in aead_chacha20_poly1305_seal() 170 CRYPTO_chacha_20(out, in, in_len, c20_ctx->key, nonce, 1); in aead_chacha20_poly1305_seal() 187 const unsigned char *nonce, size_t nonce_len, in aead_chacha20_poly1305_open() argument 232 CRYPTO_chacha_20(poly1305_key, poly1305_key, sizeof(poly1305_key), c20_ctx->key, nonce, 0); in aead_chacha20_poly1305_open() 245 CRYPTO_chacha_20(out, in, out_len, c20_ctx->key, nonce, 1); in aead_chacha20_poly1305_open()
|
/external/wpa_supplicant_8/src/eap_peer/ |
D | eap_psk.c | 185 u8 *buf, *rpchannel, nonce[16], *decrypted; in eap_psk_process_3() local 259 os_memset(nonce, 0, 12); in eap_psk_process_3() 260 os_memcpy(nonce + 12, pchannel, 4); in eap_psk_process_3() 271 nonce, sizeof(nonce)); in eap_psk_process_3() 284 if (aes_128_eax_decrypt(data->tek, nonce, sizeof(nonce), in eap_psk_process_3() 329 inc_byte_array(nonce, sizeof(nonce)); in eap_psk_process_3() 330 os_memcpy(rpchannel, nonce + 12, 4); in eap_psk_process_3() 348 if (aes_128_eax_encrypt(data->tek, nonce, sizeof(nonce), in eap_psk_process_3()
|
/external/dropbear/libtomcrypt/src/encauth/ocb/ |
D | ocb_encrypt_authenticate_memory.c | 35 const unsigned char *nonce, in ocb_encrypt_authenticate_memory() argument 44 LTC_ARGCHK(nonce != NULL); in ocb_encrypt_authenticate_memory() 56 if ((err = ocb_init(ocb, cipher, key, keylen, nonce)) != CRYPT_OK) { in ocb_encrypt_authenticate_memory()
|