Searched defs:nonce (Results 1 - 25 of 119) sorted by relevance

12345

/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/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/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/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/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...]
/external/tpm2/
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);
H A Daes-eax.c19 * @nonce: Nonce for counter mode
28 int aes_128_eax_encrypt(const u8 *key, const u8 *nonce, size_t nonce_len, argument
53 os_memcpy(buf + 16, nonce, nonce_len);
83 * @nonce: Nonce for counter mode
92 int aes_128_eax_decrypt(const u8 *key, const u8 *nonce, size_t nonce_len, argument
117 os_memcpy(buf + 16, nonce, nonce_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);
H A Daes-eax.c19 * @nonce: Nonce for counter mode
28 int aes_128_eax_encrypt(const u8 *key, const u8 *nonce, size_t nonce_len, argument
53 os_memcpy(buf + 16, nonce, nonce_len);
83 * @nonce: Nonce for counter mode
92 int aes_128_eax_decrypt(const u8 *key, const u8 *nonce, size_t nonce_len, argument
117 os_memcpy(buf + 16, nonce, nonce_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);
H A Daes-eax.c19 * @nonce: Nonce for counter mode
28 int aes_128_eax_encrypt(const u8 *key, const u8 *nonce, size_t nonce_len, argument
53 os_memcpy(buf + 16, nonce, nonce_len);
83 * @nonce: Nonce for counter mode
92 int aes_128_eax_decrypt(const u8 *key, const u8 *nonce, size_t nonce_len, argument
117 os_memcpy(buf + 16, nonce, nonce_len);
/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);
/external/libcups/cups/
H A Dmd5passwd.c58 * with the server-supplied nonce value, method, and
63 httpMD5Final(const char *nonce, /* I - Server nonce value */ argument
85 * Then combine A1 (MD5 of username, realm, and password) with the nonce
90 snprintf(line, sizeof(line), "%s:%s:%s", md5, nonce, a2);
/external/wycheproof/java/com/google/security/wycheproof/testcases/
H A DAesEaxTest.java44 String message, String keyMaterial, String nonce, String aad, String ciphertext) {
54 this.parameters = new GCMParameterSpec(128, TestUtil.hexToBytes(nonce));
43 EaxTestVector( String message, String keyMaterial, String nonce, String aad, String ciphertext) argument
/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/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 Dpairingsession.h160 // Gets the nonce value.
161 const Nonce* nonce() const { return nonce_; } function in class:polo::pairing::PairingSession
/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/ImageMagick/MagickCore/
H A Dversion.c461 % unsigned int GetMagickSignature(const StringInfo *nonce)
465 % o nonce: arbitrary data.
512 MagickExport unsigned int GetMagickSignature(const StringInfo *nonce)
538 if (nonce != (const StringInfo *) NULL)
539 ConcatenateStringInfo(version,nonce);
500 GetMagickSignature(const StringInfo *nonce) argument
/external/boringssl/src/crypto/cipher/
H A Daead.c96 size_t max_out_len, const uint8_t *nonce,
111 if (ctx->aead->seal(ctx, out, out_len, max_out_len, nonce, nonce_len, in,
125 size_t max_out_len, const uint8_t *nonce,
133 if (ctx->aead->open(ctx, out, out_len, max_out_len, nonce, nonce_len, in,
95 EVP_AEAD_CTX_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
124 EVP_AEAD_CTX_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
/external/boringssl/src/crypto/modes/
H A Dgcm_test.cc71 const char *nonce; member in struct:test_case
241 /* This nonce results in 0xfff in counter LSB. */
309 *nonce = NULL, *ciphertext = NULL, *tag = NULL, *out = NULL; local
319 !decode_hex(&nonce, &nonce_len, test->nonce, test_num, "nonce") ||
352 CRYPTO_gcm128_setiv(&ctx, &aes_key, nonce, nonce_len);
368 CRYPTO_gcm128_setiv(&ctx, &aes_key, nonce, nonce_len);
391 OPENSSL_free(nonce);
/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/openssh/
H A Dmac.c180 u_char nonce[8]; local
196 POKE_U64(nonce, seqno);
198 umac_final(mac->umac_ctx, u.m, nonce);
201 put_u64(nonce, seqno);
203 umac128_final(mac->umac_ctx, u.m, nonce);

Completed in 524 milliseconds

12345