Home
last modified time | relevance | path

Searched refs:nonce (Results 1 – 25 of 189) sorted by relevance

12345678

/external/google-tv-pairing-protocol/cpp/src/polo/pairing/
Dpolochallengeresponse.cc32 Alpha* PoloChallengeResponse::GetAlpha(const Nonce& nonce) const { in GetAlpha()
64 + nonce.size(); in GetAlpha()
81 memcpy(pos, &nonce[0], nonce.size()); in GetAlpha()
96 Gamma* PoloChallengeResponse::GetGamma(const Nonce& nonce) const { in GetGamma()
97 const Alpha* alpha = GetAlpha(nonce); in GetGamma()
102 Gamma* gamma = new Gamma(nonce.size() * 2); in GetGamma()
104 if (alpha->size() >= nonce.size()) { in GetGamma()
105 memcpy(&(*gamma)[0], &(*alpha)[0], nonce.size()); in GetGamma()
106 memcpy(&(*gamma)[nonce.size()], &nonce[0], nonce.size()); in GetGamma()
118 Nonce* nonce = new Nonce(gamma.size() / 2); in ExtractNonce() local
[all …]
/external/google-tv-pairing-protocol/java/src/com/google/polo/pairing/
DPoloChallengeResponse.java83 public byte[] getAlpha(byte[] nonce) throws PoloException { in getAlpha() argument
87 logDebug("getAlpha, nonce=" + PoloUtil.bytesToHexString(nonce)); in getAlpha()
124 logVerbose(" nonce: " + PoloUtil.bytesToHexString(nonce)); in getAlpha()
133 digest.update(nonce); in getAlpha()
148 public byte[] getGamma(byte[] nonce) throws PoloException { in getGamma() argument
149 byte[] alphaBytes = getAlpha(nonce); in getGamma()
150 assert(alphaBytes.length >= nonce.length); in getGamma()
152 byte[] result = new byte[nonce.length * 2]; in getGamma()
154 System.arraycopy(alphaBytes, 0, result, 0, nonce.length); in getGamma()
155 System.arraycopy(nonce, 0, result, nonce.length, nonce.length); in getGamma()
[all …]
/external/boringssl/src/ssl/test/runner/
Dchacha20_poly1305.go79 func chaCha20(out, in, key, nonce []byte, counter uint64) {
89 switch len(nonce) {
91 state[14] = binary.LittleEndian.Uint32(nonce[0:4])
92 state[15] = binary.LittleEndian.Uint32(nonce[4:8])
94 state[13] = binary.LittleEndian.Uint32(nonce[0:4])
95 state[14] = binary.LittleEndian.Uint32(nonce[4:8])
96 state[15] = binary.LittleEndian.Uint32(nonce[8:12])
139 func (c *chaCha20Poly1305) poly1305(tag *[16]byte, nonce, ciphertext, additionalData []byte) {
156 chaCha20(poly1305Key[:], poly1305Key[:], c.key[:], nonce, 0)
161 func (c *chaCha20Poly1305) Seal(dst, nonce, plaintext, additionalData []byte) []byte {
[all …]
Dchacha20_poly1305_test.go92 key, input, nonce, ad, output string
98 nonce: "070000004041424344454647",
106 nonce: "000000000102030405060708",
117 nonce := decodeHexOrPanic(tt.nonce)
126 out, err := aead.Open(nil, nonce, output, ad)
133 out = aead.Seal(nil, nonce, input, ad)
139 _, err = aead.Open(nil, nonce, out, ad)
/external/boringssl/src/crypto/cipher/
Daead_test.cc51 std::vector<uint8_t> key, nonce, in, ad, ct, tag; in TestAEAD() local
53 !t->GetBytes(&nonce, "NONCE") || in TestAEAD()
72 nonce.data(), nonce.size(), in.data(), in.size(), in TestAEAD()
107 nonce.data(), nonce.size(), out.data(), in TestAEAD()
140 nonce.data(), nonce.size(), out.data(), out.size(), in TestAEAD()
161 nonce.data(), nonce.size(), out.data(), out.size(), in TestAEAD()
207 uint8_t nonce[EVP_AEAD_MAX_NONCE_LENGTH]; in TestTruncatedTags() local
208 OPENSSL_memset(nonce, 0, sizeof(nonce)); in TestTruncatedTags()
210 assert(sizeof(nonce) >= nonce_len); in TestTruncatedTags()
227 sizeof(ciphertext), nonce, nonce_len, plaintext, in TestTruncatedTags()
[all …]
De_chacha20poly1305.c142 const uint8_t nonce[12], const uint8_t *ad, size_t ad_len, in calc_tag()
147 c20_ctx->key, nonce, 0); in calc_tag()
160 const uint8_t *nonce, size_t nonce_len, in aead_chacha20_poly1305_seal() argument
197 OPENSSL_memcpy(tag + 32 + 4, nonce, 12); in aead_chacha20_poly1305_seal()
200 CRYPTO_chacha_20(out, in, in_len, c20_ctx->key, nonce, 1); in aead_chacha20_poly1305_seal()
201 calc_tag(tag, c20_ctx, nonce, ad, ad_len, out, in_len); in aead_chacha20_poly1305_seal()
211 const uint8_t *nonce, size_t nonce_len, in aead_chacha20_poly1305_open() argument
245 OPENSSL_memcpy(tag + 32 + 4, nonce, 12); in aead_chacha20_poly1305_open()
248 calc_tag(tag, c20_ctx, nonce, ad, ad_len, in, plaintext_len); in aead_chacha20_poly1305_open()
249 CRYPTO_chacha_20(out, in, plaintext_len, c20_ctx->key, nonce, 1); in aead_chacha20_poly1305_open()
/external/libmojo/ipc/
Dbrokerable_attachment.h27 uint8_t nonce[kNonceSize]; member
44 return std::equal(nonce, nonce + kNonceSize, rhs.nonce);
48 return std::lexicographical_compare(nonce, nonce + kNonceSize, rhs.nonce,
49 rhs.nonce + kNonceSize);
/external/libmicrohttpd/src/microhttpd/
Ddigestauth.c103 const char *nonce, in digest_calc_ha1() argument
122 MD5Update (&md5, nonce, strlen (nonce)); in digest_calc_ha1()
146 const char *nonce, in digest_calc_response() argument
180 MD5Update (&md5, nonce, strlen(nonce)); in digest_calc_response()
302 const char *nonce, in check_nonce_nc() argument
314 np = nonce; in check_nonce_nc()
330 strcpy(connection->daemon->nnc[off].nonce, in check_nonce_nc()
331 nonce); in check_nonce_nc()
337 (0 != strcmp(connection->daemon->nnc[off].nonce, nonce)) ) in check_nonce_nc()
403 char *nonce) in calculate_nonce() argument
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/params/
DAEADParameters.java9 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/google-tv-pairing-protocol/cpp/tests/polo/pairing/
Dpolochallengeresponsetest.cc26 PoloChallengeResponseTest() : nonce(4) { } in PoloChallengeResponseTest()
76 nonce[0] = 0x1; in SetUp()
77 nonce[1] = 0x2; in SetUp()
78 nonce[2] = 0x3; in SetUp()
79 nonce[3] = 0x4; in SetUp()
98 Nonce nonce; member in polo::pairing::PoloChallengeResponseTest
103 const Alpha* alpha = response->GetAlpha(nonce); in TEST_F()
112 const Gamma* gamma = response->GetGamma(nonce); in TEST_F()
121 const Gamma* gamma = response->GetGamma(nonce); in TEST_F()
/external/ImageMagick/MagickCore/
Drandom.c84 *nonce, member
174 *nonce; in AcquireRandomInfo() local
181 random_info->nonce=AcquireStringInfo(2*GetSignatureDigestsize( in AcquireRandomInfo()
183 ResetStringInfo(random_info->nonce); in AcquireRandomInfo()
197 nonce=GenerateEntropicChaos(random_info); in AcquireRandomInfo()
198 if (nonce == (StringInfo *) NULL) in AcquireRandomInfo()
201 UpdateSignature(random_info->signature_info,nonce); in AcquireRandomInfo()
203 SetStringInfoLength(nonce,(GetSignatureDigestsize( in AcquireRandomInfo()
205 SetStringInfo(nonce,GetSignatureDigest(random_info->signature_info)); in AcquireRandomInfo()
206 SetStringInfo(random_info->nonce,nonce); in AcquireRandomInfo()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/cms/
DGCMParameters.java25 private byte[] nonce; field in GCMParameters
59 this.nonce = ASN1OctetString.getInstance(seq.getObjectAt(0)).getOctets(); in GCMParameters()
72 byte[] nonce, in GCMParameters() argument
75 this.nonce = Arrays.clone(nonce); in GCMParameters()
81 return Arrays.clone(nonce); in getNonce()
93 v.add(new DEROctetString(nonce)); in toASN1Primitive()
/external/curl/tests/data/
Dtest202729 WWW-Authenticate: Digest realm="testrealm", nonce="1"
39 WWW-Authenticate: Digest realm="testrealm", nonce="2"
50 WWW-Authenticate: Digest realm="testrealm", nonce="3"
70 WWW-Authenticate: Digest realm="testrealm", nonce="4"
80 WWW-Authenticate: Digest realm="testrealm", nonce="5"
91 WWW-Authenticate: Digest realm="testrealm", nonce="6"
101 WWW-Authenticate: Digest realm="testrealm", nonce="7"
121 WWW-Authenticate: Digest realm="testrealm", nonce="1"
127 WWW-Authenticate: Digest realm="testrealm", nonce="2"
140 WWW-Authenticate: Digest realm="testrealm", nonce="4"
[all …]
Dtest203035 WWW-Authenticate: Digest realm="testrealm", nonce="1"
55 WWW-Authenticate: Digest realm="testrealm", nonce="2"
68 WWW-Authenticate: Digest realm="testrealm", nonce="3"
88 WWW-Authenticate: Digest realm="testrealm", nonce="4"
110 WWW-Authenticate: Digest realm="testrealm", nonce="5"
121 WWW-Authenticate: Digest realm="testrealm", nonce="6"
133 WWW-Authenticate: Digest realm="testrealm", nonce="7"
144 WWW-Authenticate: Digest realm="testrealm", nonce="8"
170 WWW-Authenticate: Digest realm="testrealm", nonce="2"
191 WWW-Authenticate: Digest realm="testrealm", nonce="5"
[all …]
Dtest202622 WWW-Authenticate: Digest realm="testrealm", nonce="1"
34 WWW-Authenticate: Digest realm="testrealm", nonce="2"
55 WWW-Authenticate: Digest realm="testrealm", nonce="3"
67 WWW-Authenticate: Digest realm="testrealm", nonce="4"
78 WWW-Authenticate: Digest realm="testrealm", nonce="5"
99 WWW-Authenticate: Digest realm="testrealm", nonce="1"
107 WWW-Authenticate: Digest realm="testrealm", nonce="2"
120 WWW-Authenticate: Digest realm="testrealm", nonce="3"
128 WWW-Authenticate: Digest realm="testrealm", nonce="4"
135 WWW-Authenticate: Digest realm="testrealm", nonce="5"
[all …]
/external/boringssl/src/ssl/
Dssl_aead_ctx.c207 uint8_t nonce[EVP_AEAD_MAX_NONCE_LENGTH]; in SSL_AEAD_CTX_open() local
213 OPENSSL_memset(nonce, 0, nonce_len); in SSL_AEAD_CTX_open()
215 OPENSSL_memcpy(nonce, aead->fixed_nonce, aead->fixed_nonce_len); in SSL_AEAD_CTX_open()
226 OPENSSL_memcpy(nonce + nonce_len, in, aead->variable_nonce_len); in SSL_AEAD_CTX_open()
231 OPENSSL_memcpy(nonce + nonce_len, seqnum, aead->variable_nonce_len); in SSL_AEAD_CTX_open()
239 nonce[i] ^= aead->fixed_nonce[i]; in SSL_AEAD_CTX_open()
245 if (!EVP_AEAD_CTX_open(&aead->ctx, in, &len, in_len, nonce, nonce_len, in SSL_AEAD_CTX_open()
277 uint8_t nonce[EVP_AEAD_MAX_NONCE_LENGTH]; in SSL_AEAD_CTX_seal() local
283 OPENSSL_memset(nonce, 0, nonce_len); in SSL_AEAD_CTX_seal()
285 OPENSSL_memcpy(nonce, aead->fixed_nonce, aead->fixed_nonce_len); in SSL_AEAD_CTX_seal()
[all …]
/external/syslinux/gpxe/src/net/80211/
Dwpa_ccmp.c185 static void ccmp_ctr_xor ( struct ccmp_ctx *ctx, const void *nonce, in ccmp_ctr_xor() argument
196 memcpy ( A + 1, nonce, CCMP_NONCE_LEN ); in ccmp_ctr_xor()
259 static void ccmp_cbc_mac ( struct ccmp_ctx *ctx, const void *nonce, in ccmp_cbc_mac() argument
271 memcpy ( B + 1, nonce, CCMP_NONCE_LEN ); in ccmp_cbc_mac()
327 struct ccmp_nonce nonce; in ccmp_encrypt() local
353 nonce.prio = 0; in ccmp_encrypt()
354 memcpy ( nonce.a2, hdr->addr2, ETH_ALEN ); in ccmp_encrypt()
355 u64_to_pn ( ctx->tx_seq, nonce.pn, PN_MSB ); in ccmp_encrypt()
363 ccmp_cbc_mac ( ctx, &nonce, iob->data + hdrlen, datalen, &aad, mic ); in ccmp_encrypt()
368 ccmp_ctr_xor ( ctx, &nonce, in ccmp_encrypt()
[all …]
/external/curl/lib/vauth/
Ddigest.c256 char *nonce, size_t nlen, in auth_decode_digest_md5_message() argument
278 if(!auth_digest_get_key_value((char *) chlg, "nonce=\"", nonce, nlen, in auth_decode_digest_md5_message()
342 char nonce[64]; in Curl_auth_create_digest_md5_message() local
355 result = auth_decode_digest_md5_message(chlg64, nonce, sizeof(nonce), in Curl_auth_create_digest_md5_message()
406 Curl_MD5_update(ctxt, (const unsigned char *) nonce, in Curl_auth_create_digest_md5_message()
407 curlx_uztoui(strlen(nonce))); in Curl_auth_create_digest_md5_message()
450 Curl_MD5_update(ctxt, (const unsigned char *) nonce, in Curl_auth_create_digest_md5_message()
451 curlx_uztoui(strlen(nonce))); in Curl_auth_create_digest_md5_message()
474 userp, realm, nonce, in Curl_auth_create_digest_md5_message()
511 if(digest->nonce) in Curl_auth_decode_digest_http_message()
[all …]
/external/boringssl/src/crypto/rand/
Ddeterministic.c39 uint8_t nonce[12]; in CRYPTO_sysrand() local
40 OPENSSL_memset(nonce, 0, sizeof(nonce)); in CRYPTO_sysrand()
41 OPENSSL_memcpy(nonce, &g_num_calls, sizeof(g_num_calls)); in CRYPTO_sysrand()
44 CRYPTO_chacha_20(out, out, requested, kZeroKey, nonce, 0); in CRYPTO_sysrand()
Drand.c163 uint8_t nonce[12]; in RAND_bytes() local
164 OPENSSL_memset(nonce, 0, 4); in RAND_bytes()
165 OPENSSL_memcpy(nonce + 4, &state->calls_used, sizeof(state->calls_used)); in RAND_bytes()
166 CRYPTO_chacha_20(buf, buf, todo, state->key, nonce, 0); in RAND_bytes()
173 uint8_t nonce[12]; in RAND_bytes() local
174 OPENSSL_memset(nonce, 0, 4); in RAND_bytes()
175 OPENSSL_memcpy(nonce + 4, &state->calls_used, sizeof(state->calls_used)); in RAND_bytes()
177 sizeof(state->partial_block), state->key, nonce, 0); in RAND_bytes()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/modes/
DCCMBlockCipher.java28 private byte[] nonce; field in CCMBlockCipher
74 nonce = param.getNonce(); in init()
83 nonce = param.getIV(); in init()
99 if (nonce == null || nonce.length < 7 || nonce.length > 13) in init()
248 int n = nonce.length; in processPacket()
261 System.arraycopy(nonce, 0, iv, 1, nonce.length); in processPacket()
368 b0[0] |= ((15 - nonce.length) - 1) & 0x7; in calculateMac()
370 System.arraycopy(nonce, 0, b0, 1, nonce.length); in calculateMac()
/external/wpa_supplicant_8/src/crypto/
Daes-ccm.c28 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()
/external/boringssl/src/crypto/chacha/
Dchacha.c40 const uint8_t key[32], const uint8_t nonce[12], in CRYPTO_chacha_20()
45 counter_nonce[1] = U8TO32_LITTLE(nonce + 0); in CRYPTO_chacha_20()
46 counter_nonce[2] = U8TO32_LITTLE(nonce + 4); in CRYPTO_chacha_20()
47 counter_nonce[3] = U8TO32_LITTLE(nonce + 8); in CRYPTO_chacha_20()
120 const uint8_t key[32], const uint8_t nonce[12], in CRYPTO_chacha_20()
144 input[13] = U8TO32_LITTLE(nonce + 0); in CRYPTO_chacha_20()
145 input[14] = U8TO32_LITTLE(nonce + 4); in CRYPTO_chacha_20()
146 input[15] = U8TO32_LITTLE(nonce + 8); in CRYPTO_chacha_20()
/external/tpm2/
DPolicy_spt.c25 TPM2B_NONCE *nonce, in PolicyParameterChecks() argument
33 if(nonce != NULL && nonce->t.size != 0) in PolicyParameterChecks()
36 if(!Memory2BEqual(&nonce->b, &session->nonceTPM.b)) in PolicyParameterChecks()
44 if(nonce != NULL && nonce->t.size == 0) in PolicyParameterChecks()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/spec/
DAEADParameterSpec.java24 public AEADParameterSpec(byte[] nonce, int macSizeInBits) in AEADParameterSpec() argument
26 this(nonce, macSizeInBits, null); in AEADParameterSpec()
36 public AEADParameterSpec(byte[] nonce, int macSizeInBits, byte[] associatedData) in AEADParameterSpec() argument
38 super(nonce); in AEADParameterSpec()

12345678