Searched refs:iv (Results 1 - 17 of 17) sorted by relevance

/fuchsia/zircon/third_party/ulib/uboringssl/crypto/fipsmodule/modes/
H A Dcbc.c59 const uint8_t *iv = ivec; local
69 out[n] = in[n] ^ iv[n];
72 iv = out;
80 store_word_le(out + n, load_word_le(in + n) ^ load_word_le(iv + n));
83 iv = out;
92 out[n] = in[n] ^ iv[n];
95 out[n] = iv[n];
98 iv = out;
107 OPENSSL_memcpy(ivec, iv, 16);
130 const uint8_t *iv local
[all...]
H A Dinternal.h199 const uint8_t *iv, size_t iv_len);
H A Dgcm.c437 const uint8_t *iv, size_t len) {
453 OPENSSL_memcpy(ctx->Yi.c, iv, 12);
461 ctx->Yi.c[i] ^= iv[i];
464 iv += 16;
469 ctx->Yi.c[i] ^= iv[i];
436 CRYPTO_gcm128_setiv(GCM128_CONTEXT *ctx, const void *key, const uint8_t *iv, size_t len) argument
/fuchsia/zircon/system/ulib/crypto/include/crypto/
H A Dcipher.h55 // Sets up the cipher to encrypt or decrypt data using the given |key| and |iv|, based on the
60 zx_status_t Init(Algorithm algo, Direction direction, const Secret& key, const Bytes& iv,
63 // Sets up the cipher to encrypt data using the given |key| and |iv|, either as a stream cipher
65 zx_status_t InitEncrypt(Algorithm algo, const Secret& key, const Bytes& iv) { argument
66 return Init(algo, kEncrypt, key, iv, 0);
68 zx_status_t InitEncrypt(Algorithm algo, const Secret& key, const Bytes& iv, uint64_t alignment) { argument
69 return Init(algo, kEncrypt, key, iv, alignment);
72 // Sets up the cipher to decrypt data using the given |key| and |iv|, either as a stream cipher
74 zx_status_t InitDecrypt(Algorithm algo, const Secret& key, const Bytes& iv) { argument
75 return Init(algo, kDecrypt, key, iv,
77 InitDecrypt(Algorithm algo, const Secret& key, const Bytes& iv, uint64_t alignment) argument
[all...]
H A Daead.h46 // |key| and |iv|.
47 zx_status_t InitSeal(Algorithm aead, const Secret& key, const Bytes& iv) { argument
48 return Init(aead, key, iv, Cipher::kEncrypt);
52 // |key| and |iv|.
53 zx_status_t InitOpen(Algorithm aead, const Secret& key, const Bytes& iv) { argument
54 return Init(aead, key, iv, Cipher::kDecrypt);
58 // |iv| used; |iv| will be resized and filled automatically. The AEAD tag is stored at the end
69 // Decryption can only succeed if the |iv| matches those produced by |Seal| and the AEAD tag is
87 zx_status_t Init(Algorithm aead, const Secret& key, const Bytes& iv,
[all...]
/fuchsia/zircon/system/utest/crypto/
H A Dcipher.cpp78 Bytes iv; local
79 EXPECT_ZX(cipher.InitEncrypt(Cipher::kUninitialized, key, iv), ZX_ERR_INVALID_ARGS);
87 Bytes iv; local
88 ASSERT_OK(GenerateKeyMaterial(cipher, &key, &iv));
93 EXPECT_ZX(encrypt.InitEncrypt(cipher, bad_key, iv), ZX_ERR_INVALID_ARGS);
97 ASSERT_OK(bad_iv.Copy(iv.get(), iv.len() - 1));
101 EXPECT_ZX(encrypt.InitEncrypt(cipher, key, iv, PAGE_SIZE - 1), ZX_ERR_INVALID_ARGS);
104 EXPECT_OK(encrypt.InitEncrypt(cipher, key, iv));
105 EXPECT_OK(encrypt.InitEncrypt(cipher, key, iv, PAGE_SIZ
115 Bytes iv; local
124 Bytes iv; local
152 Bytes iv, ptext; local
187 Bytes iv, ptext; local
225 Bytes iv, ptext; local
290 Bytes iv, ptext; local
358 Bytes iv, ctext, ptext; local
[all...]
H A Dutils.cpp76 zx_status_t GenerateKeyMaterial(Cipher::Algorithm cipher, Secret* key, Bytes* iv) { argument
85 if (iv) {
88 (rc = iv->Randomize(iv_len)) != ZX_OK) {
96 zx_status_t GenerateKeyMaterial(AEAD::Algorithm cipher, Secret* key, Bytes* iv) { argument
105 if (iv) {
108 (rc = iv->Randomize(iv_len)) != ZX_OK) {
H A Daead.cpp76 Bytes iv; local
77 EXPECT_ZX(sealer.InitSeal(AEAD::kUninitialized, key, iv), ZX_ERR_INVALID_ARGS);
85 Bytes iv; local
86 ASSERT_OK(GenerateKeyMaterial(aead, &key, &iv));
91 EXPECT_ZX(sealer.InitSeal(aead, bad_key, iv), ZX_ERR_INVALID_ARGS);
95 ASSERT_OK(iv.Copy(iv.get(), iv.len() - 1));
99 EXPECT_OK(sealer.InitSeal(aead, key, iv));
109 Bytes iv; local
118 Bytes iv; local
142 Bytes iv, ptext, ctext; local
173 Bytes iv, ptext, ctext, result; local
237 Bytes ptext, aad, iv, ctext, tag, result; local
478 Bytes ptext, aad, iv, ctext, tag, result; local
[all...]
H A Dutils.h68 // Fills the given |key| and |iv| with as much random data as indicated by |Cipher::GetKeyLen| and
69 // |Cipher::GetIVLen| for the given |cipher|. |iv| may be null.
70 zx_status_t GenerateKeyMaterial(Cipher::Algorithm cipher, Secret* key, Bytes* iv);
72 // Fills the given |key|, |iv| with as much random data as indicated by |AEAD::GetKeyLen| and
73 //|AEAD::GetIVLen| for the given |aead|. |iv| may be null.
74 zx_status_t GenerateKeyMaterial(AEAD::Algorithm aead, Secret* key, Bytes* iv);
/fuchsia/zircon/third_party/ulib/uboringssl/crypto/fipsmodule/cipher/
H A De_aes.c92 int iv_set; // Set if an iv is set
94 uint8_t *iv; // Temporary IV store member in struct:__anon1909
193 const uint8_t *iv, int enc) {
259 (*dat->stream.cbc)(in, out, len, &dat->ks, ctx->iv, ctx->encrypt);
261 CRYPTO_cbc128_encrypt(in, out, len, &dat->ks, ctx->iv, dat->block);
263 CRYPTO_cbc128_decrypt(in, out, len, &dat->ks, ctx->iv, dat->block);
291 CRYPTO_ctr128_encrypt_ctr32(in, out, len, &dat->ks, ctx->iv, ctx->buf,
294 CRYPTO_ctr128_encrypt(in, out, len, &dat->ks, ctx->iv, ctx->buf, &ctx->num,
304 CRYPTO_ofb128_encrypt(in, out, len, &dat->ks, ctx->iv, &ctx->num, dat->block);
355 const uint8_t *iv, in
192 aes_init_key(EVP_CIPHER_CTX *ctx, const uint8_t *key, const uint8_t *iv, int enc) argument
354 aes_gcm_init_key(EVP_CIPHER_CTX *ctx, const uint8_t *key, const uint8_t *iv, int enc) argument
[all...]
H A Dcipher.c134 ENGINE *engine, const uint8_t *key, const uint8_t *iv,
197 assert(EVP_CIPHER_CTX_iv_length(ctx) <= sizeof(ctx->iv));
198 if (iv) {
199 OPENSSL_memcpy(ctx->oiv, iv, EVP_CIPHER_CTX_iv_length(ctx));
201 OPENSSL_memcpy(ctx->iv, ctx->oiv, EVP_CIPHER_CTX_iv_length(ctx));
208 if (iv) {
209 OPENSSL_memcpy(ctx->iv, iv, EVP_CIPHER_CTX_iv_length(ctx));
219 if (!ctx->cipher->init(ctx, key, iv, enc)) {
231 ENGINE *impl, const uint8_t *key, const uint8_t *iv) {
133 EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine, const uint8_t *key, const uint8_t *iv, int enc) argument
230 EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const uint8_t *key, const uint8_t *iv) argument
235 EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const uint8_t *key, const uint8_t *iv) argument
597 EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const uint8_t *key, const uint8_t *iv, int enc) argument
605 EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const uint8_t *key, const uint8_t *iv) argument
610 EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const uint8_t *key, const uint8_t *iv) argument
[all...]
/fuchsia/zircon/third_party/ulib/uboringssl/decrepit/xts/
H A Dxts.c65 const uint8_t iv[16], const uint8_t *inp,
76 OPENSSL_memcpy(tweak.c, iv, 16);
179 const uint8_t *iv, int enc) {
181 if (!iv && !key) {
201 if (iv) {
203 OPENSSL_memcpy(ctx->iv, iv, 16);
217 !CRYPTO_xts128_encrypt(&xctx->xts, ctx->iv, in, out, len, ctx->encrypt)) {
64 CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx, const uint8_t iv[16], const uint8_t *inp, uint8_t *out, size_t len, int enc) argument
178 aes_xts_init_key(EVP_CIPHER_CTX *ctx, const uint8_t *key, const uint8_t *iv, int enc) argument
/fuchsia/zircon/third_party/ulib/uboringssl/include/openssl/
H A Dcipher.h147 // configured with a cipher then |cipher|, |key| and |iv| may be |NULL| and
149 // as the key and |iv| as the IV (if any). These should have the correct
154 const uint8_t *key, const uint8_t *iv,
160 const uint8_t *key, const uint8_t *iv);
165 const uint8_t *key, const uint8_t *iv);
329 // |md| |count| times using |data| and |salt|. On entry, the |key| and |iv|
335 uint8_t *iv);
362 // than keeping it in the |iv| member of |EVP_CIPHER_CTX|.
389 const uint8_t *key, const uint8_t *iv,
395 const uint8_t *iv);
496 uint8_t iv[EVP_MAX_IV_LENGTH]; member in struct:evp_cipher_ctx_st
522 unsigned char iv[EVP_MAX_IV_LENGTH]; member in struct:evp_cipher_info_st
[all...]
H A Daes.h149 // bytes. |iv| must point to an 8 byte value or be NULL to use the default IV.
153 OPENSSL_EXPORT int AES_wrap_key(const AES_KEY *key, const uint8_t *iv,
157 // bytes. |iv| must point to an 8 byte value or be NULL to use the default IV.
161 OPENSSL_EXPORT int AES_unwrap_key(const AES_KEY *key, const uint8_t *iv,
/fuchsia/zircon/system/ulib/crypto/
H A Dcipher.cpp116 zx_status_t Cipher::Init(Algorithm algo, Direction direction, const Secret& key, const Bytes& iv, argument
127 if (key.len() != cipher->key_len || iv.len() != cipher->iv_len) {
128 xprintf("bad parameter(s): key_len=%zu, iv_len=%zu\n", key.len(), iv.len());
141 memcpy(iv_.get(), iv.get(), iv.len());
H A Daead.cpp205 zx_status_t AEAD::Init(Algorithm algo, const Secret& key, const Bytes& iv, argument
226 if (iv.len() != iv_len_) {
227 xprintf("wrong IV length; have %zu, need %zu\n", iv.len(), iv_len_);
254 memcpy(iv_.get(), iv.get(), iv_len_);
/fuchsia/zircon/third_party/ulib/uboringssl/crypto/fipsmodule/aes/asm/
H A Daesni-x86_64.pl235 $in0="%xmm8"; $iv="%xmm9";
968 my $iv="%xmm6";
979 movaps %xmm6,(%rsp) # $iv
987 movdqu ($ivp),$iv
995 movdqa $iv,$inout0
997 pshufb $bswap_mask,$iv
1023 paddq $increment,$iv
1029 xorps $inout0,$in0 # inp ^= E(iv)
1030 movdqa $iv,$inout0
1042 pxor $iv,
[all...]

Completed in 57 milliseconds