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

12345678

/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/params/
H A DAEADParameters.java9 private byte[] nonce; field in class:AEADParameters
18 * @param nonce nonce to be used
20 public AEADParameters(KeyParameter key, int macSize, byte[] nonce) argument
22 this(key, macSize, nonce, null);
30 * @param nonce nonce to be used
33 public AEADParameters(KeyParameter key, int macSize, byte[] nonce, byte[] associatedText) argument
36 this.nonce = nonce;
[all...]
/external/boringssl/src/crypto/rand/
H A Ddeterministic.c39 uint8_t nonce[12]; local
40 OPENSSL_memset(nonce, 0, sizeof(nonce));
41 OPENSSL_memcpy(nonce, &g_num_calls, sizeof(g_num_calls));
44 CRYPTO_chacha_20(out, out, requested, kZeroKey, nonce, 0);
H A Drand.c163 uint8_t nonce[12]; local
164 OPENSSL_memset(nonce, 0, 4);
165 OPENSSL_memcpy(nonce + 4, &state->calls_used, sizeof(state->calls_used));
166 CRYPTO_chacha_20(buf, buf, todo, state->key, nonce, 0);
173 uint8_t nonce[12]; local
174 OPENSSL_memset(nonce, 0, 4);
175 OPENSSL_memcpy(nonce + 4, &state->calls_used, sizeof(state->calls_used));
177 sizeof(state->partial_block), state->key, nonce, 0);
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/spec/
H A DAEADParameterSpec.java21 * @param nonce nonce/iv to be used
24 public AEADParameterSpec(byte[] nonce, int macSizeInBits) argument
26 this(nonce, macSizeInBits, null);
32 * @param nonce nonce/iv to be used
36 public AEADParameterSpec(byte[] nonce, int macSizeInBits, byte[] associatedData) argument
38 super(nonce);
65 * Return the nonce (same as IV) associated with this parameter spec.
67 * @return the nonce/I
[all...]
/external/google-tv-pairing-protocol/cpp/src/polo/pairing/
H A Dpolochallengeresponse.cc32 Alpha* PoloChallengeResponse::GetAlpha(const Nonce& nonce) const {
54 // modulus and exponent are concatenated along with the random nonce then a
64 + nonce.size();
81 memcpy(pos, &nonce[0], nonce.size());
96 Gamma* PoloChallengeResponse::GetGamma(const Nonce& nonce) const {
97 const Alpha* alpha = GetAlpha(nonce);
102 Gamma* gamma = new Gamma(nonce.size() * 2);
104 if (alpha->size() >= nonce.size()) {
105 memcpy(&(*gamma)[0], &(*alpha)[0], nonce
118 Nonce* nonce = new Nonce(gamma.size() / 2); local
125 const Nonce* nonce = ExtractNonce(gamma); local
[all...]
H A Dpolochallengeresponse.h40 // Computes the alpha value based on the given nonce.
41 virtual Alpha* GetAlpha(const Nonce& nonce) const;
43 // Computes the gamma value based on the given nonce.
44 virtual Gamma* GetGamma(const Nonce& nonce) const;
46 // Extracts the nonce from the given gamma value.
/external/libmojo/ipc/
H A Dbrokerable_attachment.h27 uint8_t nonce[kNonceSize]; member in struct:IPC::BrokerableAttachment::AttachmentId
29 // Generates an AttachmentId with an unguessable, random nonce.
32 // Creates an AttachmentId with a zeroed nonce. This should only be used by
40 // Writes the nonce into a buffer.
44 return std::equal(nonce, nonce + kNonceSize, rhs.nonce);
48 return std::lexicographical_compare(nonce, nonce + kNonceSize, rhs.nonce,
[all...]
H A Dbrokerable_attachment.cc20 "be trying to generating a random nonce.";
27 nonce[i] = 0;
34 nonce[i] = start_address[i];
41 start_address[i] = nonce[i];
/external/google-tv-pairing-protocol/java/src/com/google/polo/pairing/
H A DPoloChallengeResponse.java77 * <li>the random nonce.</li>
79 * @param nonce the nonce to use for computation
83 public byte[] getAlpha(byte[] nonce) throws PoloException { argument
87 logDebug("getAlpha, nonce=" + PoloUtil.bytesToHexString(nonce));
124 logVerbose(" nonce: " + PoloUtil.bytesToHexString(nonce));
128 // nonce.
133 digest.update(nonce);
148 getGamma(byte[] nonce) argument
[all...]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/cms/
H A DGCMParameters.java18 aes-nonce OCTET STRING, -- recommended size is 12 octets
25 private byte[] nonce; field in class:GCMParameters
59 this.nonce = ASN1OctetString.getInstance(seq.getObjectAt(0)).getOctets();
72 byte[] nonce,
75 this.nonce = Arrays.clone(nonce);
81 return Arrays.clone(nonce);
93 v.add(new DEROctetString(nonce));
71 GCMParameters( byte[] nonce, int icvLen) argument
/external/google-tv-pairing-protocol/cpp/tests/polo/pairing/
H A Dpolochallengeresponsetest.cc26 PoloChallengeResponseTest() : nonce(4) { }
76 nonce[0] = 0x1;
77 nonce[1] = 0x2;
78 nonce[2] = 0x3;
79 nonce[3] = 0x4;
98 Nonce nonce; member in class:polo::pairing::PoloChallengeResponseTest
103 const Alpha* alpha = response->GetAlpha(nonce);
112 const Gamma* gamma = response->GetGamma(nonce);
121 const Gamma* gamma = response->GetGamma(nonce);
H A Dmocks.h28 MOCK_CONST_METHOD1(GetAlpha, Alpha*(const Nonce& nonce));
29 MOCK_CONST_METHOD1(GetGamma, Gamma*(const Nonce& nonce));
/external/boringssl/include/openssl/
H A Dchacha.h26 * nonce and writes the result to |out|. If |in| and |out| alias, they must be
30 const uint8_t nonce[12], uint32_t counter);
/external/boringssl/src/include/openssl/
H A Dchacha.h26 * nonce and writes the result to |out|. If |in| and |out| alias, they must be
30 const uint8_t nonce[12], uint32_t counter);
/external/tpm2/
H A DPolicy_spt_fp.h19 TPM2B_DIGEST *cpHashA, TPM2B_NONCE *nonce,
H A DPolicy_spt.c25 TPM2B_NONCE *nonce,
33 if(nonce != NULL && nonce->t.size != 0)
36 if(!Memory2BEqual(&nonce->b, &session->nonceTPM.b))
42 // ...then nonce must be present
43 // nonce present isn't checked in PolicyTicket
44 if(nonce != NULL && nonce->t.size == 0)
21 PolicyParameterChecks( SESSION *session, UINT64 authTimeout, TPM2B_DIGEST *cpHashA, TPM2B_NONCE *nonce, TPM_RC nonceParameterNumber, TPM_RC cpHashParameterNumber, TPM_RC expirationParameterNumber ) argument
/external/wpa_supplicant_8/hostapd/src/crypto/
H A Daes-ctr.c20 * @nonce: Nonce for counter mode (16 bytes)
25 int aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, argument
37 os_memcpy(counter, nonce, AES_BLOCK_SIZE);
62 * @nonce: Nonce for counter mode (16 bytes)
67 int aes_128_ctr_encrypt(const u8 *key, const u8 *nonce, argument
70 return aes_ctr_encrypt(key, 16, nonce, data, data_len);
/external/wpa_supplicant_8/src/crypto/
H A Daes-ctr.c20 * @nonce: Nonce for counter mode (16 bytes)
25 int aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, argument
37 os_memcpy(counter, nonce, AES_BLOCK_SIZE);
62 * @nonce: Nonce for counter mode (16 bytes)
67 int aes_128_ctr_encrypt(const u8 *key, const u8 *nonce, argument
70 return aes_ctr_encrypt(key, 16, nonce, data, data_len);
/external/wpa_supplicant_8/wpa_supplicant/src/crypto/
H A Daes-ctr.c20 * @nonce: Nonce for counter mode (16 bytes)
25 int aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, argument
37 os_memcpy(counter, nonce, AES_BLOCK_SIZE);
62 * @nonce: Nonce for counter mode (16 bytes)
67 int aes_128_ctr_encrypt(const u8 *key, const u8 *nonce, argument
70 return aes_ctr_encrypt(key, 16, nonce, data, data_len);
/external/boringssl/src/crypto/cipher/
H A Daead_test.cc51 std::vector<uint8_t> key, nonce, in, ad, ct, tag; local
53 !t->GetBytes(&nonce, "NONCE") ||
72 nonce.data(), nonce.size(), in.data(), in.size(),
107 nonce.data(), nonce.size(), out.data(),
140 nonce.data(), nonce.size(), out.data(), out.size(),
161 nonce.data(), nonce
207 uint8_t nonce[EVP_AEAD_MAX_NONCE_LENGTH]; local
[all...]
H A De_chacha20poly1305.c48 // by the nonce. On exit, it will contain the calculated tag value, which the
59 // by the nonce. On exit, it will contain the calculated tag value, which the
142 const uint8_t nonce[12], const uint8_t *ad, size_t ad_len,
147 c20_ctx->key, nonce, 0);
160 const uint8_t *nonce, size_t nonce_len,
197 OPENSSL_memcpy(tag + 32 + 4, nonce, 12);
200 CRYPTO_chacha_20(out, in, in_len, c20_ctx->key, nonce, 1);
201 calc_tag(tag, c20_ctx, nonce, ad, ad_len, out, in_len);
211 const uint8_t *nonce, size_t nonce_len,
245 OPENSSL_memcpy(tag + 32 + 4, nonce, 1
140 calc_tag(uint8_t tag[POLY1305_TAG_LEN], const struct aead_chacha20_poly1305_ctx *c20_ctx, const uint8_t nonce[12], const uint8_t *ad, size_t ad_len, const uint8_t *ciphertext, size_t ciphertext_len) argument
158 aead_chacha20_poly1305_seal(const EVP_AEAD_CTX *ctx, uint8_t *out, size_t *out_len, size_t max_out_len, const uint8_t *nonce, size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *ad, size_t ad_len) argument
209 aead_chacha20_poly1305_open(const EVP_AEAD_CTX *ctx, uint8_t *out, size_t *out_len, size_t max_out_len, const uint8_t *nonce, size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *ad, size_t ad_len) argument
[all...]
/external/boringssl/src/crypto/chacha/
H A Dchacha.c40 const uint8_t key[32], const uint8_t nonce[12],
45 counter_nonce[1] = U8TO32_LITTLE(nonce + 0);
46 counter_nonce[2] = U8TO32_LITTLE(nonce + 4);
47 counter_nonce[3] = U8TO32_LITTLE(nonce + 8);
120 const uint8_t key[32], const uint8_t nonce[12],
144 input[13] = U8TO32_LITTLE(nonce + 0);
145 input[14] = U8TO32_LITTLE(nonce + 4);
146 input[15] = U8TO32_LITTLE(nonce + 8);
39 CRYPTO_chacha_20(uint8_t *out, const uint8_t *in, size_t in_len, const uint8_t key[32], const uint8_t nonce[12], uint32_t counter) argument
119 CRYPTO_chacha_20(uint8_t *out, const uint8_t *in, size_t in_len, const uint8_t key[32], const uint8_t nonce[12], uint32_t counter) argument
/external/openssh/
H A Dumac.h68 int umac_final(struct umac_ctx *ctx, u_char tag[], const u_char nonce[8]);
79 u_char nonce[8]);
122 int umac128_final(struct umac_ctx *ctx, u_char tag[], const u_char nonce[8]);
/external/boringssl/src/ssl/
H A Dssl_aead_ctx.c88 /* The fixed nonce into the actual nonce (the sequence number). */
92 /* The fixed IV is prepended to the nonce. */
97 /* AES-GCM uses an explicit nonce. */
102 /* The TLS 1.3 construction XORs the fixed nonce into the sequence number
206 /* Assemble the nonce. */
207 uint8_t nonce[EVP_AEAD_MAX_NONCE_LENGTH]; local
210 /* Prepend the fixed nonce, or left-pad with zeros if XORing. */
213 OPENSSL_memset(nonce, 0, nonce_len);
215 OPENSSL_memcpy(nonce, aea
277 uint8_t nonce[EVP_AEAD_MAX_NONCE_LENGTH]; local
[all...]
/external/libmicrohttpd/src/microhttpd/
H A Ddigestauth.c94 * @param nonce A `char *' pointer to the nonce value
103 const char *nonce,
122 MD5Update (&md5, nonce, strlen (nonce));
135 * @param nonce nonce from server
137 * @param cnonce client nonce
146 const char *nonce,
180 MD5Update (&md5, nonce, strle
99 digest_calc_ha1(const char *alg, const char *username, const char *realm, const char *password, const char *nonce, const char *cnonce, char *sessionkey) argument
145 digest_calc_response(const char *ha1, const char *nonce, const char *noncecount, const char *cnonce, const char *qop, const char *method, const char *uri, const char *hentity, char *response) argument
301 check_nonce_nc(struct MHD_Connection *connection, const char *nonce, unsigned long int nc) argument
397 calculate_nonce(uint32_t nonce_time, const char *method, const char *rnd, size_t rnd_size, const char *uri, const char *realm, char *nonce) argument
571 char nonce[MAX_NONCE_LENGTH]; local
808 char nonce[HASH_MD5_HEX_LEN + 9]; local
[all...]

Completed in 478 milliseconds

12345678