Home
last modified time | relevance | path

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

1234567

/linux/fs/bcachefs/
H A Dchecksum.h34 struct bch_csum bch2_checksum(struct bch_fs *, unsigned, struct nonce,
72 int bch2_chacha_encrypt_key(struct bch_key *, struct nonce, void *, size_t);
78 int bch2_encrypt(struct bch_fs *, unsigned, struct nonce,
82 struct nonce, struct bio *);
91 struct nonce, struct bio *);
94 struct nonce nonce, struct bio *bio) in bch2_encrypt_bio() argument
97 ? __bch2_encrypt_bio(c, type, nonce, bio) in bch2_encrypt_bio()
174 static inline struct nonce nonce_add(struct nonce nonce, unsigned offset) in nonce_add() argument
178 le32_add_cpu(&nonce.d[0], offset / CHACHA_BLOCK_SIZE); in nonce_add()
179 return nonce; in nonce_add()
[all …]
H A Dchecksum.c99 struct nonce nonce, in do_encrypt_sg() argument
106 skcipher_request_set_crypt(req, sg, sg, len, nonce.d); in do_encrypt_sg()
116 struct nonce nonce, in do_encrypt() argument
124 return do_encrypt_sg(tfm, nonce, &sg, len); in do_encrypt()
142 ret = do_encrypt_sg(tfm, nonce, sgl.data, sgl_len); in do_encrypt()
146 nonce = nonce_add(nonce, sgl_len); in do_encrypt()
158 ret = do_encrypt_sg(tfm, nonce, sgl.data, sgl_len); in do_encrypt()
165 int bch2_chacha_encrypt_key(struct bch_key *key, struct nonce nonce, in bch2_chacha_encrypt_key() argument
185 ret = do_encrypt(chacha20, nonce, buf, len); in bch2_chacha_encrypt_key()
192 struct nonce nonce) in gen_poly_key() argument
[all …]
H A Dbtree_io.h91 static inline struct nonce btree_nonce(struct bset *i, unsigned offset) in btree_nonce()
93 return (struct nonce) {{ in btree_nonce()
103 struct nonce nonce = btree_nonce(i, offset); in bset_encrypt() local
110 ret = bch2_encrypt(c, BSET_CSUM_TYPE(i), nonce, in bset_encrypt()
115 nonce = nonce_add(nonce, round_up(bytes, CHACHA_BLOCK_SIZE)); in bset_encrypt()
118 return bch2_encrypt(c, BSET_CSUM_TYPE(i), nonce, i->_data, in bset_encrypt()
H A Dextents_format.h123 nonce:10, member
131 nonce:10,
149 nonce:13, member
155 nonce:13,
/linux/include/trace/events/
H A Dbpf_test_run.h12 TP_PROTO(int nonce),
14 TP_ARGS(nonce),
17 __field(int, nonce)
21 __entry->nonce = nonce;
24 TP_printk("nonce %d", __entry->nonce)
/linux/include/crypto/
H A Dchacha20poly1305.h20 const u64 nonce,
25 const u8 *ad, const size_t ad_len, const u64 nonce,
30 const u8 nonce[XCHACHA20POLY1305_NONCE_SIZE],
35 const size_t ad_len, const u8 nonce[XCHACHA20POLY1305_NONCE_SIZE],
40 const u64 nonce,
45 const u64 nonce,
/linux/lib/crypto/
H A Dchacha20poly1305.c36 static void xchacha_init(u32 *chacha_state, const u8 *key, const u8 *nonce) in xchacha_init() argument
42 memcpy(iv + 8, nonce + 16, 8); in xchacha_init()
47 chacha_init(chacha_state, k, nonce); in xchacha_init()
92 const u64 nonce, in chacha20poly1305_encrypt() argument
102 iv[1] = cpu_to_le64(nonce); in chacha20poly1305_encrypt()
114 const u8 nonce[XCHACHA20POLY1305_NONCE_SIZE], in xchacha20poly1305_encrypt()
119 xchacha_init(chacha_state, key, nonce); in xchacha20poly1305_encrypt()
170 const u64 nonce, in chacha20poly1305_decrypt() argument
181 iv[1] = cpu_to_le64(nonce); in chacha20poly1305_decrypt()
196 const u8 nonce[XCHACHA20POLY1305_NONCE_SIZE], in xchacha20poly1305_decrypt()
[all …]
H A Dpoly1305-donna64.c111 void poly1305_core_emit(const struct poly1305_state *state, const u32 nonce[4], in poly1305_core_emit()
162 if (likely(nonce)) { in poly1305_core_emit()
164 t0 = ((u64)nonce[1] << 32) | nonce[0]; in poly1305_core_emit()
165 t1 = ((u64)nonce[3] << 32) | nonce[2]; in poly1305_core_emit()
H A Dpoly1305-donna32.c120 void poly1305_core_emit(const struct poly1305_state *state, const u32 nonce[4], in poly1305_core_emit()
188 if (likely(nonce)) { in poly1305_core_emit()
190 f = (u64)h0 + nonce[0]; in poly1305_core_emit()
192 f = (u64)h1 + nonce[1] + (f >> 32); in poly1305_core_emit()
194 f = (u64)h2 + nonce[2] + (f >> 32); in poly1305_core_emit()
196 f = (u64)h3 + nonce[3] + (f >> 32); in poly1305_core_emit()
/linux/net/ceph/
H A Ddecode.c28 ceph_decode_copy_safe(p, end, &addr->nonce, sizeof(addr->nonce), bad); in ceph_decode_entity_addr_versioned()
63 ceph_decode_copy_safe(p, end, &addr->nonce, sizeof(addr->nonce), bad); in ceph_decode_entity_addr_legacy()
185 sizeof(addr->nonce) + in ceph_encode_entity_addr()
188 ceph_encode_copy(p, &addr->nonce, sizeof(addr->nonce)); in ceph_encode_entity_addr()
/linux/drivers/md/dm-vdo/
H A Dencodings.h96 nonce_t nonce; member
112 nonce_t nonce; member
154 __le64 nonce; member
312 nonce_t nonce; /* A given VDO instance's nonce */ member
336 __le64 nonce; member
476 nonce_t nonce; member
499 __le64 nonce; member
617 nonce_t nonce; member
641 __le64 nonce; member
879 struct block_map_page *vdo_format_block_map_page(void *buffer, nonce_t nonce,
[all …]
H A Dencodings.c253 nonce_t nonce; in decode_volume_geometry() local
261 decode_u64_le(buffer, offset, &nonce); in decode_volume_geometry()
262 geometry->nonce = nonce; in decode_volume_geometry()
335 struct block_map_page *vdo_format_block_map_page(void *buffer, nonce_t nonce, in vdo_format_block_map_page() argument
343 page->header.nonce = __cpu_to_le64(nonce); in vdo_format_block_map_page()
350 nonce_t nonce, in vdo_validate_block_map_page() argument
357 !page->header.initialized || (nonce != __le64_to_cpu(page->header.nonce))) in vdo_validate_block_map_page()
1120 .nonce = __cpu_to_le64(component.nonce), in pack_vdo_component()
1166 .nonce = __le64_to_cpu(component.nonce), in unpack_vdo_component_41_0()
1392 if (geometry_nonce != states->vdo.nonce) { in vdo_validate_component_states()
[all …]
/linux/include/net/
H A Damt.h117 __be32 nonce; member
132 __be32 nonce; member
152 __be32 nonce; member
173 __be32 nonce; member
190 __be32 nonce; member
249 __be32 nonce; member
356 __be32 nonce; member
/linux/drivers/md/dm-vdo/indexer/
H A Dconfig.c82 if (saved_config->nonce != user->nonce) { in are_matching_configurations()
84 (unsigned long long) saved_config->nonce, in are_matching_configurations()
85 (unsigned long long) user->nonce); in are_matching_configurations()
135 decode_u64_le(buffer, &offset, &config.nonce); in uds_validate_config_contents()
211 encode_u64_le(buffer, &offset, config->nonce); in uds_write_config_contents()
346 config->nonce = params->nonce; in uds_make_configuration()
375 vdo_log_debug(" Nonce: %llu", (unsigned long long) config->nonce); in uds_log_configuration()
H A Dconfig.h43 u64 nonce; member
82 u64 nonce; member
108 u64 nonce; member
H A Dindex-layout.c130 u64 nonce; member
168 u64 nonce; member
177 u64 nonce; member
316 static u64 generate_secondary_nonce(u64 nonce, const void *data, size_t len) in generate_secondary_nonce() argument
318 return hash_stuff(nonce + 1, data, len); in generate_secondary_nonce()
358 super->nonce = generate_primary_nonce(super->nonce_info, in generate_super_block_data()
377 u64 primary_nonce = layout->super.nonce; in define_sub_index_nonce()
383 sil->nonce = generate_secondary_nonce(primary_nonce, buffer, sizeof(buffer)); in define_sub_index_nonce()
384 if (sil->nonce == 0) { in define_sub_index_nonce()
385 sil->nonce = generate_secondary_nonce(~primary_nonce + 1, buffer, in define_sub_index_nonce()
[all …]
/linux/security/keys/trusted-keys/
H A Dtrusted_dcp.c59 __u8 nonce[AES_KEYSIZE_128]; member
129 static int do_aead_crypto(u8 *in, u8 *out, size_t len, u8 *key, u8 *nonce, in do_aead_crypto() argument
166 aead_request_set_crypt(aead_req, &src_sg, &dst_sg, len, nonce); in do_aead_crypto()
211 get_random_bytes(b->nonce, AES_KEYSIZE_128); in trusted_dcp_seal()
215 b->nonce, true); in trusted_dcp_seal()
266 plain_blob_key, b->nonce, false); in trusted_dcp_unseal()
/linux/drivers/crypto/nx/
H A Dnx-aes-gcm.c67 char *nonce = nx_ctx->priv.gcm.nonce; in gcm4106_aes_nx_set_key() local
79 memcpy(nonce, in_key + key_len, 4); in gcm4106_aes_nx_set_key()
442 char *nonce = nx_ctx->priv.gcm.nonce; in gcm4106_aes_nx_encrypt() local
444 memcpy(iv, nonce, NX_GCM4106_NONCE_LEN); in gcm4106_aes_nx_encrypt()
459 char *nonce = nx_ctx->priv.gcm.nonce; in gcm4106_aes_nx_decrypt() local
461 memcpy(iv, nonce, NX_GCM4106_NONCE_LEN); in gcm4106_aes_nx_decrypt()
/linux/fs/crypto/
H A Dpolicy.c112 if (mode->ivsize < offsetofend(union fscrypt_iv, nonce)) { in supported_direct_key_modes()
327 const u8 nonce[FSCRYPT_FILE_NONCE_SIZE]) in fscrypt_new_context()
345 memcpy(ctx->nonce, nonce, FSCRYPT_FILE_NONCE_SIZE); in fscrypt_new_context()
362 memcpy(ctx->nonce, nonce, FSCRYPT_FILE_NONCE_SIZE); in fscrypt_new_context()
459 u8 nonce[FSCRYPT_FILE_NONCE_SIZE]; in set_encryption_policy() local
497 get_random_bytes(nonce, FSCRYPT_FILE_NONCE_SIZE); in set_encryption_policy()
498 ctxsize = fscrypt_new_context(&ctx, policy, nonce); in set_encryption_policy()
H A Dfscrypt_private.h42 u8 nonce[FSCRYPT_FILE_NONCE_SIZE]; member
53 u8 nonce[FSCRYPT_FILE_NONCE_SIZE]; member
101 return ctx->v1.nonce; in fscrypt_context_nonce()
103 return ctx->v2.nonce; in fscrypt_context_nonce()
324 u8 nonce[FSCRYPT_FILE_NONCE_SIZE]; member
/linux/drivers/gpu/drm/radeon/
H A Dvce_v1_0.c47 uint32_t nonce[4]; member
190 data[0] = sign->val[i].nonce[0]; in vce_v1_0_load_fw()
191 data[1] = sign->val[i].nonce[1]; in vce_v1_0_load_fw()
192 data[2] = sign->val[i].nonce[2]; in vce_v1_0_load_fw()
193 data[3] = sign->val[i].nonce[3]; in vce_v1_0_load_fw()
/linux/arch/x86/crypto/
H A Dpoly1305_glue.c23 const u32 nonce[4]);
25 const u32 nonce[4]);
124 const u32 nonce[4]) in poly1305_simd_emit()
127 poly1305_emit_x86_64(ctx, mac, nonce); in poly1305_simd_emit()
129 poly1305_emit_avx(ctx, mac, nonce); in poly1305_simd_emit()
/linux/drivers/crypto/caam/
H A Dcaamalg_desc.h60 u32 *nonce, const u32 ctx1_iv_off,
66 const bool is_rfc3686, u32 *nonce,
72 u32 *nonce, const u32 ctx1_iv_off,
/linux/tools/crypto/ccp/
H A Ddbc.c34 memcpy(nonce_out, tmp.nonce, sizeof(tmp.nonce)); in get_nonce()
/linux/include/linux/ceph/
H A Dmsgr.h86 __le32 nonce; /* unique id for process (e.g. pid) */ member
94 lhs->nonce == rhs->nonce; in ceph_addr_equal_no_type()

1234567